@rio-cloud/rio-uikit 0.16.2-beta.14 → 0.16.2-beta.16

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 (164) hide show
  1. package/.DS_Store +0 -0
  2. package/Map.d.ts +1 -0
  3. package/components/activity/Activity.js +6 -4
  4. package/components/animatedNumber/AnimatedNumber.js +6 -4
  5. package/components/applicationHeader/ApplicationHeader.js +6 -3
  6. package/components/applicationLayout/ApplicationLayout.js +8 -8
  7. package/components/applicationLayout/ApplicationLayoutBody.js +6 -3
  8. package/components/applicationLayout/ApplicationLayoutBodyBanner.js +4 -3
  9. package/components/applicationLayout/ApplicationLayoutBodyNavigation.js +6 -4
  10. package/components/applicationLayout/ApplicationLayoutHeader.js +9 -7
  11. package/components/assetTree/AssetTree.js +6 -3
  12. package/components/assetTree/TypeCounter.js +6 -4
  13. package/components/map/assets/icon_map_settings_bounding_box_active.svg +1 -1
  14. package/components/map/assets/icon_map_settings_bounding_box_inactive.svg +1 -1
  15. package/components/map/assets/icon_map_settings_construction_active.svg +1 -1
  16. package/components/map/assets/icon_map_settings_construction_inactive.svg +1 -1
  17. package/components/map/assets/icon_map_settings_layer_active.svg +1 -1
  18. package/components/map/assets/icon_map_settings_layer_inactive.svg +1 -1
  19. package/components/map/assets/icon_map_settings_maptype_flat_active.svg +1 -1
  20. package/components/map/assets/icon_map_settings_maptype_flat_inactive.svg +1 -1
  21. package/components/map/assets/icon_map_settings_maptype_flat_truck_active.svg +1 -1
  22. package/components/map/assets/icon_map_settings_maptype_flat_truck_inactive.svg +1 -1
  23. package/components/map/assets/icon_map_settings_maptype_night_active.svg +1 -12
  24. package/components/map/assets/icon_map_settings_maptype_night_inactive.svg +1 -12
  25. package/components/map/assets/icon_map_settings_maptype_satelite_active.svg +1 -1
  26. package/components/map/assets/icon_map_settings_maptype_satelite_inactive.svg +1 -1
  27. package/components/map/assets/icon_map_settings_maptype_terrain_active.svg +1 -1
  28. package/components/map/assets/icon_map_settings_maptype_terrain_inactive.svg +1 -1
  29. package/components/map/assets/icon_map_settings_road_restrictions_active.svg +1 -1
  30. package/components/map/assets/icon_map_settings_road_restrictions_inactive.svg +1 -1
  31. package/components/map/assets/icon_map_settings_system_pois_active.svg +1 -1
  32. package/components/map/assets/icon_map_settings_system_pois_inactive.svg +1 -1
  33. package/components/map/assets/icon_map_settings_workshop_pois_active.svg +1 -1
  34. package/components/map/assets/icon_map_settings_workshop_pois_inactive.svg +1 -1
  35. package/components/map/components/Map.js +3 -1
  36. package/components/map/components/features/Route.js +1 -9
  37. package/components/map/components/features/basics/Circle.js +9 -5
  38. package/components/map/components/features/basics/MapLayerGroup.js +6 -5
  39. package/components/map/components/features/basics/Polygon.js +4 -4
  40. package/components/map/components/features/basics/Polyline.js +5 -30
  41. package/components/map/components/features/basics/marker/DomMarker.js +9 -3
  42. package/components/map/components/features/basics/marker/Marker.js +6 -31
  43. package/components/map/components/features/layers/Layer.js +1 -1
  44. package/components/map/components/features/layers/MarkerLayer.js +0 -1
  45. package/components/map/components/features/layers/RoadRestrictionLayer.js +1 -2
  46. package/components/map/components/features/layers/TrafficLayer.js +2 -2
  47. package/components/map/components/features/layers/clustering/ClusterLayer.js +1 -1
  48. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +16 -2
  49. package/components/map/icons/MapIcon.js +46 -66
  50. package/components/mapMarker/ClusterMapMarker.js +16 -20
  51. package/components/mapMarker/SingleMapMarker.js +17 -28
  52. package/lib/es/Map.d.ts +1 -0
  53. package/lib/es/components/activity/Activity.js +9 -4
  54. package/lib/es/components/animatedNumber/AnimatedNumber.js +5 -3
  55. package/lib/es/components/applicationHeader/ApplicationHeader.js +5 -2
  56. package/lib/es/components/applicationLayout/ApplicationLayout.js +11 -8
  57. package/lib/es/components/applicationLayout/ApplicationLayoutBody.js +5 -2
  58. package/lib/es/components/applicationLayout/ApplicationLayoutBodyBanner.js +7 -3
  59. package/lib/es/components/applicationLayout/ApplicationLayoutBodyNavigation.js +9 -4
  60. package/lib/es/components/applicationLayout/ApplicationLayoutHeader.js +12 -7
  61. package/lib/es/components/assetTree/AssetTree.js +5 -2
  62. package/lib/es/components/assetTree/TypeCounter.js +9 -4
  63. package/lib/es/components/map/assets/icon_map_settings_bounding_box_active.svg +1 -1
  64. package/lib/es/components/map/assets/icon_map_settings_bounding_box_inactive.svg +1 -1
  65. package/lib/es/components/map/assets/icon_map_settings_construction_active.svg +1 -1
  66. package/lib/es/components/map/assets/icon_map_settings_construction_inactive.svg +1 -1
  67. package/lib/es/components/map/assets/icon_map_settings_layer_active.svg +1 -1
  68. package/lib/es/components/map/assets/icon_map_settings_layer_inactive.svg +1 -1
  69. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_active.svg +1 -1
  70. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_inactive.svg +1 -1
  71. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_truck_active.svg +1 -1
  72. package/lib/es/components/map/assets/icon_map_settings_maptype_flat_truck_inactive.svg +1 -1
  73. package/lib/es/components/map/assets/icon_map_settings_maptype_night_active.svg +1 -12
  74. package/lib/es/components/map/assets/icon_map_settings_maptype_night_inactive.svg +1 -12
  75. package/lib/es/components/map/assets/icon_map_settings_maptype_satelite_active.svg +1 -1
  76. package/lib/es/components/map/assets/icon_map_settings_maptype_satelite_inactive.svg +1 -1
  77. package/lib/es/components/map/assets/icon_map_settings_maptype_terrain_active.svg +1 -1
  78. package/lib/es/components/map/assets/icon_map_settings_maptype_terrain_inactive.svg +1 -1
  79. package/lib/es/components/map/assets/icon_map_settings_road_restrictions_active.svg +1 -1
  80. package/lib/es/components/map/assets/icon_map_settings_road_restrictions_inactive.svg +1 -1
  81. package/lib/es/components/map/assets/icon_map_settings_system_pois_active.svg +1 -1
  82. package/lib/es/components/map/assets/icon_map_settings_system_pois_inactive.svg +1 -1
  83. package/lib/es/components/map/assets/icon_map_settings_workshop_pois_active.svg +1 -1
  84. package/lib/es/components/map/assets/icon_map_settings_workshop_pois_inactive.svg +1 -1
  85. package/lib/es/components/map/components/Map.js +3 -1
  86. package/lib/es/components/map/components/features/Route.js +1 -9
  87. package/lib/es/components/map/components/features/basics/Circle.js +8 -4
  88. package/lib/es/components/map/components/features/basics/MapLayerGroup.js +6 -5
  89. package/lib/es/components/map/components/features/basics/Polygon.js +4 -4
  90. package/lib/es/components/map/components/features/basics/Polyline.js +5 -30
  91. package/lib/es/components/map/components/features/basics/marker/DomMarker.js +8 -3
  92. package/lib/es/components/map/components/features/basics/marker/Marker.js +6 -31
  93. package/lib/es/components/map/components/features/layers/Layer.js +1 -1
  94. package/lib/es/components/map/components/features/layers/MarkerLayer.js +0 -1
  95. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.js +1 -2
  96. package/lib/es/components/map/components/features/layers/TrafficLayer.js +2 -2
  97. package/lib/es/components/map/components/features/layers/clustering/ClusterLayer.js +1 -1
  98. package/lib/es/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +16 -2
  99. package/lib/es/components/map/icons/MapIcon.js +46 -66
  100. package/lib/es/components/mapMarker/ClusterMapMarker.js +16 -20
  101. package/lib/es/components/mapMarker/SingleMapMarker.js +17 -28
  102. package/lib/es/styles/components/MapMarker.less +224 -14
  103. package/lib/es/styles/components/MapSettings.less +45 -29
  104. package/lib/es/styles/design/border.less +14 -14
  105. package/lib/es/styles/design/colors.less +7 -6
  106. package/lib/es/styles/design/divide.less +165 -0
  107. package/lib/es/styles/design/responsive/_imports.less +1 -0
  108. package/lib/es/styles/design/responsive/gap.less +0 -8
  109. package/lib/es/styles/design/responsive/spacing.less +12 -0
  110. package/lib/es/styles/rio-uikit-core.less +1 -0
  111. package/lib/es/styles/variables/light_colors.less +6 -6
  112. package/lib/es/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +14 -5
  113. package/lib/es/types.ts +6 -4
  114. package/lib/es/version.json +1 -1
  115. package/package.json +1 -1
  116. package/styles/components/MapMarker.less +224 -14
  117. package/styles/components/MapSettings.less +45 -29
  118. package/styles/design/border.less +14 -14
  119. package/styles/design/colors.less +7 -6
  120. package/styles/design/divide.less +165 -0
  121. package/styles/design/responsive/_imports.less +1 -0
  122. package/styles/design/responsive/gap.less +0 -8
  123. package/styles/design/responsive/spacing.less +12 -0
  124. package/styles/rio-uikit-core.less +1 -0
  125. package/styles/variables/light_colors.less +6 -6
  126. package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +15 -6
  127. package/types.ts +6 -4
  128. package/version.json +1 -1
  129. package/components/.DS_Store +0 -0
  130. package/components/map/.DS_Store +0 -0
  131. package/components/map/components/.DS_Store +0 -0
  132. package/components/map/components/features/layers/TruckLayer.js +0 -20
  133. package/components/map/components/features/layers/baselayers/BaseLayer.js +0 -33
  134. package/components/map/components/features/layers/baselayers/DefaultLayer.js +0 -23
  135. package/hooks/useHereMap.ts +0 -23
  136. package/hooks/useScripts.ts +0 -52
  137. package/lib/.DS_Store +0 -0
  138. package/lib/es/.DS_Store +0 -0
  139. package/lib/es/components/.DS_Store +0 -0
  140. package/lib/es/components/map/components/features/layers/TruckLayer.js +0 -28
  141. package/lib/es/components/map/components/features/layers/baselayers/BaseLayer.js +0 -41
  142. package/lib/es/components/map/components/features/layers/baselayers/DefaultLayer.js +0 -30
  143. package/lib/es/hooks/useHereMap.ts +0 -23
  144. package/lib/es/hooks/useScripts.ts +0 -52
  145. package/lib/es/styles/.DS_Store +0 -0
  146. package/lib/es/styles/mixins/_mixins.less +0 -13
  147. package/lib/es/styles/mixins/alerts.less +0 -13
  148. package/lib/es/styles/shared/colors.json +0 -56
  149. package/lib/es/styles/shared/colors.less +0 -73
  150. package/lib/es/styles/shared/screens.less +0 -7
  151. package/lib/es/styles/shared/text.less +0 -23
  152. package/lib/es/styles/variables.less +0 -186
  153. package/lib/es/themes/.DS_Store +0 -0
  154. package/styles/.DS_Store +0 -0
  155. package/styles/mixins/_mixins.less +0 -13
  156. package/styles/mixins/alerts.less +0 -13
  157. package/styles/shared/colors.json +0 -56
  158. package/styles/shared/colors.less +0 -73
  159. package/styles/shared/screens.less +0 -7
  160. package/styles/shared/text.less +0 -23
  161. package/styles/variables.less +0 -186
  162. package/themes/.DS_Store +0 -0
  163. package/themes/Volkswagen/.DS_Store +0 -0
  164. package/themes/Website/.DS_Store +0 -0
@@ -0,0 +1,165 @@
1
+ [class*="divider-y"] > :not([hidden]) ~ :not([hidden]) {
2
+ border-bottom-width: 0;
3
+ border-top-style: solid;
4
+ }
5
+
6
+ [class*="divider-x"] > :not([hidden]) ~ :not([hidden]) {
7
+ border-right-width: 0;
8
+ border-left-style: solid;
9
+ }
10
+
11
+ .divider-y-1 {
12
+ &> :not([hidden]) ~ :not([hidden]) {
13
+ border-top-width: 1px;
14
+ }
15
+ }
16
+
17
+ .divider-y-2 > :not([hidden]) ~ :not([hidden]) {
18
+ border-top-width: 2px;
19
+ }
20
+
21
+ .divider-y-3 > :not([hidden]) ~ :not([hidden]) {
22
+ border-top-width: 3px;
23
+ }
24
+
25
+ .divider-x-1 {
26
+ &> :not([hidden]) ~ :not([hidden]) {
27
+ border-left-width: 1px;
28
+ }
29
+ }
30
+
31
+ .divider-x-2 > :not([hidden]) ~ :not([hidden]) {
32
+ border-left-width: 2px;
33
+ }
34
+
35
+ .divider-x-3 > :not([hidden]) ~ :not([hidden]) {
36
+ border-left-width: 3px;
37
+ }
38
+
39
+ // coloring
40
+
41
+ .divider-color {
42
+ // white
43
+ // black
44
+ each(@colors-text-map, {
45
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
46
+ border-color: @value !important;
47
+ }
48
+ })
49
+
50
+ // primary
51
+ // secondary
52
+ each(@colors-brand-map, {
53
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
54
+ border-color: @value !important;
55
+ }
56
+ })
57
+
58
+ // info
59
+ // success
60
+ // warning
61
+ // danger
62
+ each(@colors-status-map, {
63
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
64
+ border-color: @value !important;
65
+ }
66
+ })
67
+
68
+ // darkest
69
+ // darker
70
+ // dark
71
+ // gray
72
+ // light
73
+ // lighter
74
+ // lightest
75
+ each(@colors-gray-map, {
76
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
77
+ border-color: @value !important;
78
+ }
79
+ })
80
+
81
+ // map-marker-asset
82
+ // map-marker-poi
83
+ // map-marker-geofence
84
+ // map-marker-route
85
+ each(@colors-map-marker-map, {
86
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
87
+ border-color: @value !important;
88
+ }
89
+ })
90
+
91
+ each(@colors-map-marker-night-map, {
92
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
93
+ border-color: @value !important;
94
+ }
95
+ })
96
+
97
+ // rating-1
98
+ // rating-2
99
+ // rating-3
100
+ // rating-4
101
+ // rating-5
102
+ each(@colors-rating-map, {
103
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
104
+ border-color: @value !important;
105
+ }
106
+ })
107
+
108
+ // status-available
109
+ // status-driving
110
+ // status-resting
111
+ // status-working
112
+ each(@colors-driving-status-map, {
113
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
114
+ border-color: @value !important;
115
+ }
116
+ })
117
+
118
+ // highlight-darkest
119
+ // highlight-darker
120
+ // highlight-dark
121
+ // highlight
122
+ // highlight-light
123
+ // highlight-lighter
124
+ // highlight-lightest
125
+ // highlight-decent
126
+ each(@colors-highlight-map, {
127
+ &-@{key} > :not([hidden]) ~ :not([hidden]) {
128
+ border-color: @value !important;
129
+ }
130
+ })
131
+
132
+ // coldplay-wine
133
+ // coldplay-aubergine
134
+ // coldplay-kashmir
135
+ // coldplay-fountain
136
+ // coldplay-turquoise
137
+ // coldplay-bermuda
138
+ // coldplay-moos
139
+ // coldplay-primrose
140
+ // coldplay-khaki
141
+ // & when (@buildColdplayColors = true) {
142
+ // each(@colors-coldplay-map, {
143
+ // &-@{key} > :not([hidden]) ~ :not([hidden]) {
144
+ // border-color: @value !important;
145
+ // }
146
+ // })
147
+ // }
148
+
149
+ // warmup-crimson
150
+ // warmup-victoria
151
+ // warmup-cadillac
152
+ // warmup-raspberry
153
+ // warmup-cerise
154
+ // warmup-charm
155
+ // warmup-salmon
156
+ // warmup-cherokee
157
+ // warmup-corn
158
+ // & when (@buildWarmupColors = true) {
159
+ // each(@colors-warmup-map, {
160
+ // &-@{key} > :not([hidden]) ~ :not([hidden]) {
161
+ // border-color: @value !important;
162
+ // }
163
+ // })
164
+ // }
165
+ }
@@ -11,6 +11,7 @@
11
11
  @import (multiple) "padding.less";
12
12
  @import (multiple) "position.less";
13
13
  @import (multiple) "sizing.less";
14
+ @import (multiple) "spacing.less";
14
15
  @import (multiple) "text.less";
15
16
  }
16
17
 
@@ -26,16 +26,8 @@ each(@spacings-px, {
26
26
 
27
27
  // gap pct
28
28
  each(@spacings-pct, {
29
- // x & y
30
- // .gap-@{key}@{suffix} {
31
- // gap: @value !important;
32
- // }
33
29
  // x
34
30
  .column-gap-@{key}@{suffix} {
35
31
  column-gap: @value !important;
36
32
  }
37
- // y
38
- // .row-gap-@{key}@{suffix} {
39
- // row-gap: @value !important;
40
- // }
41
33
  })
@@ -0,0 +1,12 @@
1
+ // spacing px
2
+ each(@spacings-px, {
3
+ .space-x-@{key}@{suffix} > :not([hidden]) ~ :not([hidden]) {
4
+ margin-left: @value !important;
5
+ margin-right: 0 !important;
6
+ }
7
+
8
+ .space-y-@{key}@{suffix} > :not([hidden]) ~ :not([hidden]) {
9
+ margin-top: @value !important;
10
+ margin-bottom: 0 !important;
11
+ }
12
+ })
@@ -42,6 +42,7 @@
42
42
  @import (less) './design/aspect-ratio.less';
43
43
  @import (less) './design/colors.less';
44
44
  @import (less) './design/border.less';
45
+ @import (less) './design/divide.less';
45
46
  @import (less) './design/cursors.less';
46
47
  @import (less) './design/custom.less';
47
48
  @import (less) './design/ellipsis.less';
@@ -52,12 +52,12 @@
52
52
  @color-map-marker-route: #3690ae;
53
53
  @color-map-marker-text: #ffffff;
54
54
 
55
- @color-map-marker-active-night: #79e703;
56
- @color-map-marker-asset-night: #0e8a14;
57
- @color-map-marker-poi-night: #d212be;
58
- @color-map-marker-geofence-night: #d7b269;
59
- @color-map-marker-route-night: #750666;
60
- @color-map-marker-text-night: #f7ff13;
55
+ @color-map-marker-active-night: #ededed;
56
+ @color-map-marker-asset-night: #6e757a;
57
+ @color-map-marker-poi-night: #b23672;
58
+ @color-map-marker-geofence-night: #79619f;
59
+ @color-map-marker-route-night: #3b9fc1;
60
+ @color-map-marker-text-night: #ededed;
61
61
 
62
62
  // Color - Rating
63
63
  @color-rating-1: #d90000;
@@ -1,24 +1,31 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useState, useRef, useEffect, useCallback } from 'react';
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["homeRoute", "className", "appNavigator", "appNavigatorClassName", "appMenuItems", "navItems", "actionBarItems"];
5
+ import React, { useState, useRef, forwardRef, useCallback, useImperativeHandle } from 'react';
3
6
  import PropTypes from 'prop-types';
4
7
  import isEmpty from 'lodash/fp/isEmpty';
5
8
  import classname from 'classnames';
6
9
  import { ApplicationActionBar } from '../../../../components/applicationHeader/ApplicationActionBar';
7
10
  import useResizeObserver from '../../../../hooks/useResizeObserver';
8
11
  import modulePropTypes from './modulePropTypes';
9
- export var VolkswagenApplicationHeader = function VolkswagenApplicationHeader(props) {
12
+ export var VolkswagenApplicationHeader = /*#__PURE__*/forwardRef(function (props, ref) {
10
13
  var homeRoute = props.homeRoute,
11
14
  className = props.className,
12
15
  appNavigator = props.appNavigator,
13
16
  appNavigatorClassName = props.appNavigatorClassName,
14
17
  appMenuItems = props.appMenuItems,
15
18
  navItems = props.navItems,
16
- actionBarItems = props.actionBarItems;
19
+ actionBarItems = props.actionBarItems,
20
+ remainingProps = _objectWithoutProperties(props, _excluded);
17
21
  var actionBarRef = useRef();
18
22
  var _useResizeObserver = useResizeObserver(),
19
23
  _useResizeObserver2 = _slicedToArray(_useResizeObserver, 2),
20
24
  navRef = _useResizeObserver2[0],
21
25
  contentRect = _useResizeObserver2[1].contentRect;
26
+ useImperativeHandle(ref, function () {
27
+ return navRef;
28
+ }, []);
22
29
 
23
30
  // const getContentRect = useCallback(key => contentRect && Math.round(contentRect[key]), [contentRect]);
24
31
  // const containerWidth = getContentRect('width') || 0;
@@ -27,9 +34,11 @@ export var VolkswagenApplicationHeader = function VolkswagenApplicationHeader(pr
27
34
  // const hasActionBarItems = !isEmpty(actionBarItems);
28
35
 
29
36
  var classNames = classname('ApplicationHeader VolkswagenApplicationHeader', 'user-select-none', className && className);
30
- return /*#__PURE__*/React.createElement("nav", {
37
+ return /*#__PURE__*/React.createElement("nav", _extends({}, remainingProps, {
31
38
  className: classNames,
32
39
  ref: navRef
40
+ }), /*#__PURE__*/React.createElement("div", {
41
+ className: "width-100pct"
33
42
  }, /*#__PURE__*/React.createElement("div", {
34
43
  className: "brand"
35
44
  }, /*#__PURE__*/React.createElement("div", {
@@ -47,8 +56,8 @@ export var VolkswagenApplicationHeader = function VolkswagenApplicationHeader(pr
47
56
  })), /*#__PURE__*/React.createElement(ApplicationActionBar, {
48
57
  nodeRef: actionBarRef,
49
58
  items: actionBarItems
50
- }));
51
- };
59
+ })));
60
+ });
52
61
  export default VolkswagenApplicationHeader;
53
62
  VolkswagenApplicationHeader.defaultProps = {
54
63
  homeRoute: '',
package/types.ts CHANGED
@@ -421,8 +421,7 @@ export interface ClusterMapMarkerProps {
421
421
  exceptionCount?: number;
422
422
  active?: boolean;
423
423
  clickable?: boolean;
424
- iconNames?: string;
425
- colorClass?: string;
424
+ iconName?: string;
426
425
  markerColor?: markerColor;
427
426
  }
428
427
 
@@ -833,6 +832,7 @@ export enum MapType {
833
832
  TYPE_FLEET_STYLE = 'FLEET_STYLE',
834
833
  TYPE_SATELLITE = 'SATELLITE',
835
834
  TYPE_TERRAIN = 'TERRAIN',
835
+ TYPE_NIGHT = 'NIGHT',
836
836
  }
837
837
 
838
838
  export interface MapProps {
@@ -858,10 +858,12 @@ export interface MapProps {
858
858
  | MapType.TYPE_FLEET_STYLE
859
859
  | MapType.TYPE_SATELLITE
860
860
  | MapType.TYPE_TERRAIN
861
+ | MapType.TYPE_NIGHT
861
862
  | 'DEFAULT'
862
863
  | 'FLEET_STYLE'
863
864
  | 'SATELLITE'
864
- | 'TERRAIN';
865
+ | 'TERRAIN'
866
+ | 'NIGHT';
865
867
  mapLayer?: string[];
866
868
  showCluster?: boolean;
867
869
  showScaleBar?: boolean;
@@ -969,6 +971,7 @@ export interface MapSettingsTileProps {
969
971
 
970
972
  export interface MapTypeSettingsProps {
971
973
  mapType?: string;
974
+ enableNightMap?: boolean;
972
975
  onMapTypeChange?: () => string;
973
976
  }
974
977
 
@@ -1603,7 +1606,6 @@ export interface SingleMapMarkerProps {
1603
1606
  moving?: boolean;
1604
1607
  clickable?: boolean;
1605
1608
  iconNames?: string[];
1606
- colorClass?: string;
1607
1609
  markerColor?: markerColor;
1608
1610
  }
1609
1611
 
package/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.16.2-beta.14"
2
+ "version": "0.16.2-beta.16"
3
3
  }
Binary file
Binary file
Binary file
@@ -1,20 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /* eslint-disable camelcase */
3
-
4
- import React from 'react';
5
- import { FORMAT, TILE_SIZE } from '../../constants';
6
- import Layer from './Layer';
7
- var createTruckLayer = function createTruckLayer(api, language) {
8
- return api.platform.getMapTileService({
9
- type: 'base'
10
- }).createTileLayer('truckonlytile', 'normal.day', TILE_SIZE, FORMAT, {
11
- style: 'default',
12
- lg: language
13
- });
14
- };
15
- var TruckLayer = function TruckLayer(props) {
16
- return /*#__PURE__*/React.createElement(Layer, _extends({}, props, {
17
- createLayer: createTruckLayer
18
- }));
19
- };
20
- export default TruckLayer;
@@ -1,33 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import { useState, useEffect } from 'react';
3
- import PropTypes from 'prop-types';
4
- import mapProps from '../../../../utils/proptypes';
5
- import { mapToLongLocale } from '../../../../utils/localization';
6
- var BaseLayer = function BaseLayer(props) {
7
- var api = props.api,
8
- createBaseLayer = props.createBaseLayer,
9
- language = props.language,
10
- showTraffic = props.showTraffic;
11
- var _useState = useState(),
12
- _useState2 = _slicedToArray(_useState, 2),
13
- baseLayer = _useState2[0],
14
- setBaseLayer = _useState2[1];
15
- useEffect(function () {
16
- if (!baseLayer) {
17
- var lang = mapToLongLocale(language);
18
- var newBaseLayer = createBaseLayer(api, lang, showTraffic);
19
- setBaseLayer(newBaseLayer);
20
- setTimeout(function () {
21
- return api.map.setBaseLayer(newBaseLayer);
22
- }, 100);
23
- }
24
- });
25
- return null;
26
- };
27
- BaseLayer.propTypes = {
28
- api: mapProps.api,
29
- createBaseLayer: PropTypes.func.isRequired,
30
- showTraffic: PropTypes.bool,
31
- language: PropTypes.string
32
- };
33
- export default BaseLayer;
@@ -1,23 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import { FORMAT, TILE_SIZE } from '../../../constants';
4
- import BaseLayer from './BaseLayer';
5
-
6
- // old Fleetadmin map type = 'normal.day.grey'
7
-
8
- var createDefaultLayer = function createDefaultLayer(api, language, showTraffic) {
9
- var type = showTraffic ? 'traffic' : 'base';
10
- var tileType = showTraffic ? 'traffictile' : 'maptile';
11
- return api.platform.getMapTileService({
12
- type: type
13
- }).createTileLayer(tileType, 'normal.day', TILE_SIZE, FORMAT, {
14
- style: 'alps',
15
- lg: language
16
- });
17
- };
18
- var DefaultLayer = function DefaultLayer(props) {
19
- return /*#__PURE__*/React.createElement(BaseLayer, _extends({}, props, {
20
- createBaseLayer: createDefaultLayer
21
- }));
22
- };
23
- export default DefaultLayer;
@@ -1,23 +0,0 @@
1
- import { useScripts } from './useScripts';
2
-
3
- const DEFAULT_BASE_URL = 'https://js.api.here.com/v3/3.1.20.0/';
4
-
5
- const HERE_EXTERNALS = [
6
- 'mapsjs-core.js',
7
- 'mapsjs-core-legacy.js',
8
- 'mapsjs-service.js',
9
- 'mapsjs-service-legacy.js',
10
- 'mapsjs-mapevents.js',
11
- 'mapsjs-ui.js',
12
- 'mapsjs-clustering.js',
13
- ];
14
-
15
- const getExternals = (scriptList: string[], baseUrl: string): string[] =>
16
- scriptList.map((script) => `${baseUrl}${script}`);
17
-
18
- const sanitizeBaseUrl = (url: string) => (url.endsWith('/') ? url : `${url}/`);
19
-
20
- export const useHereMap = (baseUrl?: string) => {
21
- const hereScripts = getExternals(HERE_EXTERNALS, sanitizeBaseUrl(baseUrl || DEFAULT_BASE_URL));
22
- return useScripts(hereScripts, false);
23
- };
@@ -1,52 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
-
3
- const hasScriptsInHead = (src: string) => document.head.querySelectorAll(`script[src*="${src}"]`).length > 0;
4
-
5
- export const useScripts = (scripts: string[], loadAsync: boolean = false) => {
6
- const [isLoading, setIsLoading] = useState<boolean>(false);
7
- const [hasLoaded, setHasLoaded] = useState<boolean>(false);
8
- const [error, setError] = useState<Error | undefined>();
9
-
10
- const promises = new Set();
11
-
12
- useEffect(() => {
13
- const [firstScript] = scripts;
14
-
15
- if (hasScriptsInHead(firstScript)) {
16
- setHasLoaded(true);
17
- return;
18
- }
19
-
20
- setIsLoading(true);
21
-
22
- scripts.map((external) => {
23
- promises.add(
24
- new Promise<void>((resolve, reject) => {
25
- const script = document.createElement('script');
26
- script.async = loadAsync;
27
- script.src = external;
28
-
29
- script.onload = () => {
30
- console.debug(`loaded ${external}`);
31
- resolve();
32
- };
33
-
34
- script.onerror = () => {
35
- console.debug(`failed to load ${external}`);
36
- setError(new Error(`failed to load ${external}`));
37
- reject();
38
- };
39
-
40
- document.head.appendChild(script);
41
- })
42
- );
43
- });
44
-
45
- Promise.all([...promises]).then(() => {
46
- setIsLoading(false);
47
- setHasLoaded(true);
48
- });
49
- }, []);
50
-
51
- return { isLoading, error, hasLoaded };
52
- };
package/lib/.DS_Store DELETED
Binary file
package/lib/es/.DS_Store DELETED
Binary file
Binary file
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _constants = require("../../constants");
11
- var _Layer = _interopRequireDefault(require("./Layer"));
12
- /* eslint-disable camelcase */
13
-
14
- var createTruckLayer = function createTruckLayer(api, language) {
15
- return api.platform.getMapTileService({
16
- type: 'base'
17
- }).createTileLayer('truckonlytile', 'normal.day', _constants.TILE_SIZE, _constants.FORMAT, {
18
- style: 'default',
19
- lg: language
20
- });
21
- };
22
- var TruckLayer = function TruckLayer(props) {
23
- return /*#__PURE__*/_react["default"].createElement(_Layer["default"], (0, _extends2["default"])({}, props, {
24
- createLayer: createTruckLayer
25
- }));
26
- };
27
- var _default = TruckLayer;
28
- exports["default"] = _default;
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _react = require("react");
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
- var _proptypes = _interopRequireDefault(require("../../../../utils/proptypes"));
12
- var _localization = require("../../../../utils/localization");
13
- var BaseLayer = function BaseLayer(props) {
14
- var api = props.api,
15
- createBaseLayer = props.createBaseLayer,
16
- language = props.language,
17
- showTraffic = props.showTraffic;
18
- var _useState = (0, _react.useState)(),
19
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
20
- baseLayer = _useState2[0],
21
- setBaseLayer = _useState2[1];
22
- (0, _react.useEffect)(function () {
23
- if (!baseLayer) {
24
- var lang = (0, _localization.mapToLongLocale)(language);
25
- var newBaseLayer = createBaseLayer(api, lang, showTraffic);
26
- setBaseLayer(newBaseLayer);
27
- setTimeout(function () {
28
- return api.map.setBaseLayer(newBaseLayer);
29
- }, 100);
30
- }
31
- });
32
- return null;
33
- };
34
- BaseLayer.propTypes = {
35
- api: _proptypes["default"].api,
36
- createBaseLayer: _propTypes["default"].func.isRequired,
37
- showTraffic: _propTypes["default"].bool,
38
- language: _propTypes["default"].string
39
- };
40
- var _default = BaseLayer;
41
- exports["default"] = _default;
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _constants = require("../../../constants");
11
- var _BaseLayer = _interopRequireDefault(require("./BaseLayer"));
12
- // old Fleetadmin map type = 'normal.day.grey'
13
-
14
- var createDefaultLayer = function createDefaultLayer(api, language, showTraffic) {
15
- var type = showTraffic ? 'traffic' : 'base';
16
- var tileType = showTraffic ? 'traffictile' : 'maptile';
17
- return api.platform.getMapTileService({
18
- type: type
19
- }).createTileLayer(tileType, 'normal.day', _constants.TILE_SIZE, _constants.FORMAT, {
20
- style: 'alps',
21
- lg: language
22
- });
23
- };
24
- var DefaultLayer = function DefaultLayer(props) {
25
- return /*#__PURE__*/_react["default"].createElement(_BaseLayer["default"], (0, _extends2["default"])({}, props, {
26
- createBaseLayer: createDefaultLayer
27
- }));
28
- };
29
- var _default = DefaultLayer;
30
- exports["default"] = _default;
@@ -1,23 +0,0 @@
1
- import { useScripts } from './useScripts';
2
-
3
- const DEFAULT_BASE_URL = 'https://js.api.here.com/v3/3.1.20.0/';
4
-
5
- const HERE_EXTERNALS = [
6
- 'mapsjs-core.js',
7
- 'mapsjs-core-legacy.js',
8
- 'mapsjs-service.js',
9
- 'mapsjs-service-legacy.js',
10
- 'mapsjs-mapevents.js',
11
- 'mapsjs-ui.js',
12
- 'mapsjs-clustering.js',
13
- ];
14
-
15
- const getExternals = (scriptList: string[], baseUrl: string): string[] =>
16
- scriptList.map((script) => `${baseUrl}${script}`);
17
-
18
- const sanitizeBaseUrl = (url: string) => (url.endsWith('/') ? url : `${url}/`);
19
-
20
- export const useHereMap = (baseUrl?: string) => {
21
- const hereScripts = getExternals(HERE_EXTERNALS, sanitizeBaseUrl(baseUrl || DEFAULT_BASE_URL));
22
- return useScripts(hereScripts, false);
23
- };