@rio-cloud/rio-uikit 0.16.2-beta.10 → 0.16.2-beta.12

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 (41) hide show
  1. package/components/filepicker/FilePicker.js +1 -1
  2. package/components/map/components/Map.js +1 -1
  3. package/components/map/components/features/layers/MarkerLayer.js +3 -1
  4. package/components/map/components/features/layers/clustering/ClusterLayer.js +19 -4
  5. package/components/mapMarker/ClusterMapMarker.js +1 -1
  6. package/components/mapMarker/SingleMapMarker.js +1 -7
  7. package/components/numberControl/NumberControl.js +13 -7
  8. package/components/numberInput/NumberInput.js +30 -12
  9. package/hooks/useScrollPosition.js +2 -2
  10. package/lib/es/components/filepicker/FilePicker.js +1 -1
  11. package/lib/es/components/map/components/Map.js +1 -1
  12. package/lib/es/components/map/components/features/layers/MarkerLayer.js +3 -1
  13. package/lib/es/components/map/components/features/layers/clustering/ClusterLayer.js +19 -4
  14. package/lib/es/components/mapMarker/ClusterMapMarker.js +1 -1
  15. package/lib/es/components/mapMarker/SingleMapMarker.js +1 -7
  16. package/lib/es/components/numberControl/NumberControl.js +13 -7
  17. package/lib/es/components/numberInput/NumberInput.js +31 -12
  18. package/lib/es/hooks/useScrollPosition.js +2 -2
  19. package/lib/es/styles/design/border.less +6 -0
  20. package/lib/es/styles/design/colors.less +9 -1
  21. package/lib/es/styles/design/text.less +10 -1
  22. package/lib/es/styles/mapping/color-map.less +10 -0
  23. package/lib/es/styles/variables/concated_css_variables.less +6 -0
  24. package/lib/es/styles/variables/dark_colors.less +7 -0
  25. package/lib/es/styles/variables/dark_css_variables_map.less +7 -0
  26. package/lib/es/styles/variables/light_colors.less +7 -0
  27. package/lib/es/styles/variables/light_css_variables_map.less +7 -0
  28. package/lib/es/types.ts +9 -0
  29. package/lib/es/version.json +1 -1
  30. package/package.json +1 -1
  31. package/styles/design/border.less +6 -0
  32. package/styles/design/colors.less +9 -1
  33. package/styles/design/text.less +10 -1
  34. package/styles/mapping/color-map.less +10 -0
  35. package/styles/variables/concated_css_variables.less +6 -0
  36. package/styles/variables/dark_colors.less +7 -0
  37. package/styles/variables/dark_css_variables_map.less +7 -0
  38. package/styles/variables/light_colors.less +7 -0
  39. package/styles/variables/light_css_variables_map.less +7 -0
  40. package/types.ts +9 -0
  41. package/version.json +1 -1
@@ -22,7 +22,7 @@ var FilePicker = function FilePicker(props) {
22
22
  var showButton = isButton || isFull;
23
23
  var showDropzone = isDropzone || isFull;
24
24
  var handleDrop = useCallback(function (acceptedFiles, rejectedFiles) {
25
- var hasImagesType = Object.keys(accept).some(function (mimeType) {
25
+ var hasImagesType = accept && Object.keys(accept).some(function (mimeType) {
26
26
  return mimeType.startsWith('image');
27
27
  });
28
28
  var files = hasImagesType ? acceptedFiles.map(function (file) {
@@ -417,7 +417,7 @@ Map.defaultProps = {
417
417
  onShowClusterChange: function onShowClusterChange() {},
418
418
  onZoomIn: function onZoomIn() {},
419
419
  onZoomOut: function onZoomOut() {},
420
- useWebGL: false,
420
+ useWebGL: true,
421
421
  darkMode: false
422
422
  };
423
423
  Map.propTypes = {
@@ -33,6 +33,8 @@ var MarkerLayer = function MarkerLayer(props) {
33
33
  MarkerLayer.propTypes = {
34
34
  // api: mapProps.api,
35
35
  simpleTheme: mapProps.clusterTheme,
36
- clusterDissolvable: PropTypes.bool
36
+ clusterDissolvable: PropTypes.bool,
37
+ clusterStrategy: PropTypes.oneOf(['FASTGRID', 'GRID', 'DYNAMICGRID']),
38
+ eps: PropTypes.number
37
39
  };
38
40
  export default MarkerLayer;
@@ -12,6 +12,16 @@ var convertData = function convertData(data, converterFunc) {
12
12
  return data.map(converterFunc ? converterFunc : DEFAULT_DATA_CONVERTER);
13
13
  };
14
14
  var DEFAULT_CLUSTER_THEME = new H.clustering.Provider([]).getTheme();
15
+ var getClusterStrategy = function getClusterStrategy(strategy) {
16
+ switch (strategy) {
17
+ case 'GRID':
18
+ return H.clustering.Provider.Strategy.GRID;
19
+ case 'DYNAMICGRID':
20
+ return H.clustering.Provider.Strategy.DYNAMICGRID;
21
+ default:
22
+ return H.clustering.Provider.Strategy.FASTGRID;
23
+ }
24
+ };
15
25
  var ClusterLayer = function ClusterLayer(_ref) {
16
26
  var data = _ref.data,
17
27
  dataConverter = _ref.dataConverter,
@@ -20,7 +30,10 @@ var ClusterLayer = function ClusterLayer(_ref) {
20
30
  maxZoom = _ref.maxZoom,
21
31
  _ref$clusterTheme = _ref.clusterTheme,
22
32
  clusterTheme = _ref$clusterTheme === void 0 ? DEFAULT_CLUSTER_THEME : _ref$clusterTheme,
23
- eventListenerMap = _ref.eventListenerMap;
33
+ eventListenerMap = _ref.eventListenerMap,
34
+ clusterStrategy = _ref.clusterStrategy,
35
+ _ref$eps = _ref.eps,
36
+ eps = _ref$eps === void 0 ? 100 : _ref$eps;
24
37
  var context = useContext(MapContext);
25
38
  var _useState = useState(),
26
39
  _useState2 = _slicedToArray(_useState, 2),
@@ -29,8 +42,8 @@ var ClusterLayer = function ClusterLayer(_ref) {
29
42
  useEffect(function () {
30
43
  var newProviderOptions = {
31
44
  clusteringOptions: {
32
- strategy: H.clustering.Provider.Strategy.DYNAMICGRID,
33
- eps: 100,
45
+ strategy: getClusterStrategy(clusterStrategy),
46
+ eps: eps,
34
47
  minWeight: minWeight ? parseInt(minWeight, 10) : 2
35
48
  },
36
49
  min: minZoom ? parseInt(minZoom, 10) : 0,
@@ -67,6 +80,8 @@ ClusterLayer.propTpyes = {
67
80
  minZoom: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
68
81
  maxZoom: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
69
82
  clusterTheme: mapProps.clusterTheme,
70
- eventListenerMap: PropTypes.object
83
+ eventListenerMap: PropTypes.object,
84
+ clusterStrategy: PropTypes.oneOf(['FASTGRID', 'GRID', 'DYNAMICGRID']),
85
+ eps: PropTypes.number
71
86
  };
72
87
  export default ClusterLayer;
@@ -28,7 +28,7 @@ var ClusterMapMarker = function ClusterMapMarker(props) {
28
28
  var baseColor = getColorMapping(colorClass) || markerColor;
29
29
  var markerBackgroundColor = active ? 'bg-map-marker-active' : baseColor;
30
30
  var markerBorderColor = baseColor.replace('bg-', 'border-color-');
31
- var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'color-map-marker-text';
31
+ var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'text-color-map-marker-text';
32
32
  return /*#__PURE__*/React.createElement("div", {
33
33
  className: classes
34
34
  }, /*#__PURE__*/React.createElement("div", {
@@ -42,9 +42,6 @@ var SingleMapMarker = function SingleMapMarker(props) {
42
42
  textColor = props.textColor,
43
43
  warningCount = props.warningCount,
44
44
  fixed = props.fixed;
45
-
46
- // TODO: check if we still need "colorClass"
47
-
48
45
  if (colorClass) {
49
46
  // warnung
50
47
  }
@@ -55,12 +52,9 @@ var SingleMapMarker = function SingleMapMarker(props) {
55
52
  };
56
53
  var mapDirection = getMapDirection(moving, bearing, rotationStyle);
57
54
  var baseColor = getColorMapping(colorClass, markerColor);
58
-
59
- // const baseColorWithMode = isDarkMode ?
60
-
61
55
  var markerBackgroundColor = active ? 'bg-map-marker-active' : baseColor;
62
56
  var markerBorderColor = baseColor.replace('bg-', 'border-color-');
63
- var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'color-map-marker-text';
57
+ var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'text-color-map-marker-text';
64
58
  return /*#__PURE__*/React.createElement("div", {
65
59
  className: classes
66
60
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,13 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["min", "max", "step", "value", "onValueChanged", "disabled", "bsSize", "className", "unit", "inputAddon", "digitPrecision", "placeholder"];
4
+ var _excluded = ["min", "max", "step", "value", "onChange", "onValueChanged", "disabled", "bsSize", "className", "unit", "inputAddon", "digitPrecision", "placeholder"];
5
5
  import React, { useState, useRef, useEffect, forwardRef } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classNames from 'classnames';
8
8
  import NumberInput, { defaultProps, convertNonIntegerToDefault } from '../numberInput/NumberInput';
9
9
  var INITIAL_TICK = 700;
10
10
  var TICK_TIME = 50;
11
+ var DEFAULT_DIGIT_PRECISION = 3;
11
12
  var NumberControl = /*#__PURE__*/forwardRef(function (props, ref) {
12
13
  var _props$min = props.min,
13
14
  min = _props$min === void 0 ? defaultProps.min : _props$min,
@@ -15,8 +16,8 @@ var NumberControl = /*#__PURE__*/forwardRef(function (props, ref) {
15
16
  max = _props$max === void 0 ? defaultProps.max : _props$max,
16
17
  _props$step = props.step,
17
18
  step = _props$step === void 0 ? defaultProps.step : _props$step,
18
- _props$value = props.value,
19
- value = _props$value === void 0 ? defaultProps.value : _props$value,
19
+ value = props.value,
20
+ onChange = props.onChange,
20
21
  _props$onValueChanged = props.onValueChanged,
21
22
  onValueChanged = _props$onValueChanged === void 0 ? function () {} : _props$onValueChanged,
22
23
  disabled = props.disabled,
@@ -25,9 +26,12 @@ var NumberControl = /*#__PURE__*/forwardRef(function (props, ref) {
25
26
  unit = props.unit,
26
27
  inputAddon = props.inputAddon,
27
28
  _props$digitPrecision = props.digitPrecision,
28
- digitPrecision = _props$digitPrecision === void 0 ? 3 : _props$digitPrecision,
29
+ digitPrecision = _props$digitPrecision === void 0 ? DEFAULT_DIGIT_PRECISION : _props$digitPrecision,
29
30
  placeholder = props.placeholder,
30
31
  remainingProps = _objectWithoutProperties(props, _excluded);
32
+
33
+ // Note, "onChange" should replace "onValueChanged" in the future but it's widely used
34
+ var callback = onChange || onValueChanged;
31
35
  var timeout = useRef();
32
36
  var _useState = useState(false),
33
37
  _useState2 = _slicedToArray(_useState, 2),
@@ -63,7 +67,7 @@ var NumberControl = /*#__PURE__*/forwardRef(function (props, ref) {
63
67
  // Notify external component if internal value has changed
64
68
  useEffect(function () {
65
69
  if (internalValue !== value) {
66
- onValueChanged(internalValue);
70
+ callback(internalValue);
67
71
  }
68
72
  }, [internalValue]);
69
73
  useEffect(function () {
@@ -132,7 +136,7 @@ var NumberControl = /*#__PURE__*/forwardRef(function (props, ref) {
132
136
  if (value !== undefined && !(isHoldingDownDec && isHoldingDownInc)) {
133
137
  setInternalValue(Number(value));
134
138
  }
135
- onValueChanged(value);
139
+ callback(value);
136
140
  };
137
141
  var classes = classNames('NumberControl', 'form-group', className);
138
142
  var inputGroupClassNames = classNames('input-group', bsSize === 'sm' && 'input-group-sm', bsSize === 'lg' && 'input-group-lg');
@@ -151,7 +155,8 @@ var NumberControl = /*#__PURE__*/forwardRef(function (props, ref) {
151
155
  value: internalValue,
152
156
  step: step,
153
157
  disabled: disabled,
154
- onValueChanged: handleUpdatedNumberInputValue,
158
+ onChange: handleUpdatedNumberInputValue,
159
+ digitPrecision: digitPrecision,
155
160
  placeholder: placeholder
156
161
  }), /*#__PURE__*/React.createElement("div", {
157
162
  className: 'input-group-addon'
@@ -181,6 +186,7 @@ NumberControl.propTypes = {
181
186
  value: PropTypes.number,
182
187
  step: PropTypes.number,
183
188
  disabled: PropTypes.bool,
189
+ onChange: PropTypes.func,
184
190
  onValueChanged: PropTypes.func,
185
191
  bsSize: PropTypes.string,
186
192
  className: PropTypes.string,
@@ -1,11 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["unit", "inputAddon", "className", "bsSize", "disabled", "onValueChanged", "min", "max", "value", "step", "placeholder"];
4
+ var _excluded = ["unit", "inputAddon", "className", "bsSize", "disabled", "onChange", "onValueChanged", "min", "max", "value", "step", "digitPrecision", "placeholder"];
5
5
  import React, { useEffect, useState } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classNames from 'classnames';
8
8
  import useAfterMount from '../../hooks/useAfterMount';
9
+ var DEFAULT_DIGIT_PRECISION = 3;
10
+ var DEFAULT_VALUE = 0;
11
+ var DEFAULT_STEP = 1;
9
12
 
10
13
  // Note: even if limits are set and input type is number, many browsers allow to enter invalid data
11
14
  // like entering characters or values outside the boundaries, hence we have to check the input here
@@ -14,9 +17,8 @@ import useAfterMount from '../../hooks/useAfterMount';
14
17
  export var defaultProps = {
15
18
  min: 0,
16
19
  max: Number.MAX_VALUE,
17
- step: 1
20
+ step: DEFAULT_STEP
18
21
  };
19
- var DEFAULT_VALUE = 0;
20
22
  var getValueFromProps = function getValueFromProps(val, min, max, placeholder) {
21
23
  // Show placeholders if given instead of 0
22
24
  if (val === undefined && placeholder) {
@@ -45,15 +47,21 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
45
47
  className = props.className,
46
48
  bsSize = props.bsSize,
47
49
  disabled = props.disabled,
50
+ onChange = props.onChange,
48
51
  _props$onValueChanged = props.onValueChanged,
49
52
  onValueChanged = _props$onValueChanged === void 0 ? function () {} : _props$onValueChanged,
50
53
  propMin = props.min,
51
54
  propMax = props.max,
52
55
  propValue = props.value,
53
56
  _props$step = props.step,
54
- step = _props$step === void 0 ? 1 : _props$step,
57
+ step = _props$step === void 0 ? DEFAULT_STEP : _props$step,
58
+ _props$digitPrecision = props.digitPrecision,
59
+ digitPrecision = _props$digitPrecision === void 0 ? DEFAULT_DIGIT_PRECISION : _props$digitPrecision,
55
60
  placeholder = props.placeholder,
56
61
  remainingProps = _objectWithoutProperties(props, _excluded);
62
+
63
+ // Note, "onChange" should replace "onValueChanged" in the future but it's widely used
64
+ var callback = onChange || onValueChanged;
57
65
  var min = Number.isFinite(propMin) ? propMin : defaultProps.min;
58
66
  var max = Number.isFinite(propMax) ? propMax : defaultProps.max;
59
67
  var value = getValueFromProps(propValue, min, max, placeholder);
@@ -95,25 +103,32 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
95
103
  });
96
104
 
97
105
  // Only call back the caller for valid values
98
- isValid && onValueChanged(newValidValue);
106
+ isValid && callback(newValidValue);
99
107
  };
100
108
  var handleOnChange = function handleOnChange(event) {
101
- return applyValue(event.target.value);
109
+ applyValue(event.target.value);
102
110
  };
103
- var handleBlur = function handleBlur(event) {
104
- // console.log({enteredValue: state.enteredValue, event: Number(event.target.value)});
105
111
 
106
- // When the value is removed, keep the input empty but trigger the onValueChanged callback
112
+ // Prevent entering exponent to avoide side effects
113
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1398528
114
+ var handleKeyDown = function handleKeyDown(event) {
115
+ if (event.key === 'e' || event.key === 'E') {
116
+ event.preventDefault();
117
+ }
118
+ };
119
+ var handleBlur = function handleBlur(event) {
120
+ // When the value is removed, keep the input empty but trigger the outside callback
107
121
  // since the user has finished his input
108
122
  var lastEnteredValue = state.enteredValue;
109
123
  if (lastEnteredValue === '') {
110
- onValueChanged(lastEnteredValue);
124
+ callback(lastEnteredValue);
111
125
  return;
112
126
  }
113
127
 
114
- // Otherwise, validate the input and clamp it if the entered value exeeds the limitations
128
+ // Otherwise, validate the input, round it according to digitPrecision,
129
+ // and clamp the value if the entered value exeeds the limitations
115
130
  var convertedEnteredValue = convertNonIntegerToDefault(Number(lastEnteredValue));
116
- var validNumber = clampNumber(convertedEnteredValue, min, max);
131
+ var validNumber = clampNumber(Number(convertedEnteredValue).toFixed(digitPrecision), min, max);
117
132
  applyValue(validNumber);
118
133
  };
119
134
  var inputGroupClassNames = classNames('input-group', bsSize === 'sm' && 'input-group-sm', bsSize === 'lg' && 'input-group-lg');
@@ -128,6 +143,7 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
128
143
  disabled: disabled,
129
144
  onBlur: handleBlur,
130
145
  onChange: handleOnChange,
146
+ onKeyDown: handleKeyDown,
131
147
  ref: ref,
132
148
  "aria-label": "number-input",
133
149
  placeholder: placeholder,
@@ -151,11 +167,13 @@ NumberInput.propTypes = {
151
167
  value: PropTypes.number,
152
168
  step: PropTypes.number,
153
169
  disabled: PropTypes.bool,
170
+ onChange: PropTypes.func,
154
171
  onValueChanged: PropTypes.func,
155
172
  bsSize: PropTypes.oneOf(['sm', 'lg', 'small', 'large']),
156
173
  className: PropTypes.string,
157
174
  unit: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
158
175
  inputAddon: PropTypes.string,
176
+ digitPrecision: PropTypes.number,
159
177
  placeholder: PropTypes.string
160
178
  };
161
179
  export default NumberInput;
@@ -42,8 +42,8 @@ var useScrollPosition = function useScrollPosition(target) {
42
42
  else {
43
43
  setTargetElement(target);
44
44
  }
45
- return {
46
- "if": function _if(checkForModuleContent) {
45
+ return function () {
46
+ if (checkForModuleContent) {
47
47
  clearInterval(check);
48
48
  }
49
49
  };
@@ -32,7 +32,7 @@ var FilePicker = function FilePicker(props) {
32
32
  var showButton = isButton || isFull;
33
33
  var showDropzone = isDropzone || isFull;
34
34
  var handleDrop = (0, _react.useCallback)(function (acceptedFiles, rejectedFiles) {
35
- var hasImagesType = Object.keys(accept).some(function (mimeType) {
35
+ var hasImagesType = accept && Object.keys(accept).some(function (mimeType) {
36
36
  return mimeType.startsWith('image');
37
37
  });
38
38
  var files = hasImagesType ? acceptedFiles.map(function (file) {
@@ -428,7 +428,7 @@ Map.defaultProps = {
428
428
  onShowClusterChange: function onShowClusterChange() {},
429
429
  onZoomIn: function onZoomIn() {},
430
430
  onZoomOut: function onZoomOut() {},
431
- useWebGL: false,
431
+ useWebGL: true,
432
432
  darkMode: false
433
433
  };
434
434
  Map.propTypes = {
@@ -42,7 +42,9 @@ var MarkerLayer = function MarkerLayer(props) {
42
42
  MarkerLayer.propTypes = {
43
43
  // api: mapProps.api,
44
44
  simpleTheme: _proptypes["default"].clusterTheme,
45
- clusterDissolvable: _propTypes["default"].bool
45
+ clusterDissolvable: _propTypes["default"].bool,
46
+ clusterStrategy: _propTypes["default"].oneOf(['FASTGRID', 'GRID', 'DYNAMICGRID']),
47
+ eps: _propTypes["default"].number
46
48
  };
47
49
  var _default = MarkerLayer;
48
50
  exports["default"] = _default;
@@ -20,6 +20,16 @@ var convertData = function convertData(data, converterFunc) {
20
20
  return data.map(converterFunc ? converterFunc : DEFAULT_DATA_CONVERTER);
21
21
  };
22
22
  var DEFAULT_CLUSTER_THEME = new H.clustering.Provider([]).getTheme();
23
+ var getClusterStrategy = function getClusterStrategy(strategy) {
24
+ switch (strategy) {
25
+ case 'GRID':
26
+ return H.clustering.Provider.Strategy.GRID;
27
+ case 'DYNAMICGRID':
28
+ return H.clustering.Provider.Strategy.DYNAMICGRID;
29
+ default:
30
+ return H.clustering.Provider.Strategy.FASTGRID;
31
+ }
32
+ };
23
33
  var ClusterLayer = function ClusterLayer(_ref) {
24
34
  var data = _ref.data,
25
35
  dataConverter = _ref.dataConverter,
@@ -28,7 +38,10 @@ var ClusterLayer = function ClusterLayer(_ref) {
28
38
  maxZoom = _ref.maxZoom,
29
39
  _ref$clusterTheme = _ref.clusterTheme,
30
40
  clusterTheme = _ref$clusterTheme === void 0 ? DEFAULT_CLUSTER_THEME : _ref$clusterTheme,
31
- eventListenerMap = _ref.eventListenerMap;
41
+ eventListenerMap = _ref.eventListenerMap,
42
+ clusterStrategy = _ref.clusterStrategy,
43
+ _ref$eps = _ref.eps,
44
+ eps = _ref$eps === void 0 ? 100 : _ref$eps;
32
45
  var context = (0, _react.useContext)(_context.MapContext);
33
46
  var _useState = (0, _react.useState)(),
34
47
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
@@ -37,8 +50,8 @@ var ClusterLayer = function ClusterLayer(_ref) {
37
50
  (0, _react.useEffect)(function () {
38
51
  var newProviderOptions = {
39
52
  clusteringOptions: {
40
- strategy: H.clustering.Provider.Strategy.DYNAMICGRID,
41
- eps: 100,
53
+ strategy: getClusterStrategy(clusterStrategy),
54
+ eps: eps,
42
55
  minWeight: minWeight ? parseInt(minWeight, 10) : 2
43
56
  },
44
57
  min: minZoom ? parseInt(minZoom, 10) : 0,
@@ -75,7 +88,9 @@ ClusterLayer.propTpyes = {
75
88
  minZoom: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
76
89
  maxZoom: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
77
90
  clusterTheme: _proptypes["default"].clusterTheme,
78
- eventListenerMap: _propTypes["default"].object
91
+ eventListenerMap: _propTypes["default"].object,
92
+ clusterStrategy: _propTypes["default"].oneOf(['FASTGRID', 'GRID', 'DYNAMICGRID']),
93
+ eps: _propTypes["default"].number
79
94
  };
80
95
  var _default = ClusterLayer;
81
96
  exports["default"] = _default;
@@ -35,7 +35,7 @@ var ClusterMapMarker = function ClusterMapMarker(props) {
35
35
  var baseColor = getColorMapping(colorClass) || markerColor;
36
36
  var markerBackgroundColor = active ? 'bg-map-marker-active' : baseColor;
37
37
  var markerBorderColor = baseColor.replace('bg-', 'border-color-');
38
- var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'color-map-marker-text';
38
+ var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'text-color-map-marker-text';
39
39
  return /*#__PURE__*/_react["default"].createElement("div", {
40
40
  className: classes
41
41
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -49,9 +49,6 @@ var SingleMapMarker = function SingleMapMarker(props) {
49
49
  textColor = props.textColor,
50
50
  warningCount = props.warningCount,
51
51
  fixed = props.fixed;
52
-
53
- // TODO: check if we still need "colorClass"
54
-
55
52
  if (colorClass) {
56
53
  // warnung
57
54
  }
@@ -62,12 +59,9 @@ var SingleMapMarker = function SingleMapMarker(props) {
62
59
  };
63
60
  var mapDirection = getMapDirection(moving, bearing, rotationStyle);
64
61
  var baseColor = getColorMapping(colorClass, markerColor);
65
-
66
- // const baseColorWithMode = isDarkMode ?
67
-
68
62
  var markerBackgroundColor = active ? 'bg-map-marker-active' : baseColor;
69
63
  var markerBorderColor = baseColor.replace('bg-', 'border-color-');
70
- var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'color-map-marker-text';
64
+ var markerTextColor = active ? baseColor.replace('bg-', 'text-color-') : 'text-color-map-marker-text';
71
65
  return /*#__PURE__*/_react["default"].createElement("div", {
72
66
  className: classes
73
67
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -13,11 +13,12 @@ var _react = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
  var _NumberInput = _interopRequireWildcard(require("../numberInput/NumberInput"));
16
- var _excluded = ["min", "max", "step", "value", "onValueChanged", "disabled", "bsSize", "className", "unit", "inputAddon", "digitPrecision", "placeholder"];
16
+ var _excluded = ["min", "max", "step", "value", "onChange", "onValueChanged", "disabled", "bsSize", "className", "unit", "inputAddon", "digitPrecision", "placeholder"];
17
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
19
  var INITIAL_TICK = 700;
20
20
  var TICK_TIME = 50;
21
+ var DEFAULT_DIGIT_PRECISION = 3;
21
22
  var NumberControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
22
23
  var _props$min = props.min,
23
24
  min = _props$min === void 0 ? _NumberInput.defaultProps.min : _props$min,
@@ -25,8 +26,8 @@ var NumberControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
25
26
  max = _props$max === void 0 ? _NumberInput.defaultProps.max : _props$max,
26
27
  _props$step = props.step,
27
28
  step = _props$step === void 0 ? _NumberInput.defaultProps.step : _props$step,
28
- _props$value = props.value,
29
- value = _props$value === void 0 ? _NumberInput.defaultProps.value : _props$value,
29
+ value = props.value,
30
+ onChange = props.onChange,
30
31
  _props$onValueChanged = props.onValueChanged,
31
32
  onValueChanged = _props$onValueChanged === void 0 ? function () {} : _props$onValueChanged,
32
33
  disabled = props.disabled,
@@ -35,9 +36,12 @@ var NumberControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
35
36
  unit = props.unit,
36
37
  inputAddon = props.inputAddon,
37
38
  _props$digitPrecision = props.digitPrecision,
38
- digitPrecision = _props$digitPrecision === void 0 ? 3 : _props$digitPrecision,
39
+ digitPrecision = _props$digitPrecision === void 0 ? DEFAULT_DIGIT_PRECISION : _props$digitPrecision,
39
40
  placeholder = props.placeholder,
40
41
  remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
42
+
43
+ // Note, "onChange" should replace "onValueChanged" in the future but it's widely used
44
+ var callback = onChange || onValueChanged;
41
45
  var timeout = (0, _react.useRef)();
42
46
  var _useState = (0, _react.useState)(false),
43
47
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
@@ -73,7 +77,7 @@ var NumberControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
73
77
  // Notify external component if internal value has changed
74
78
  (0, _react.useEffect)(function () {
75
79
  if (internalValue !== value) {
76
- onValueChanged(internalValue);
80
+ callback(internalValue);
77
81
  }
78
82
  }, [internalValue]);
79
83
  (0, _react.useEffect)(function () {
@@ -142,7 +146,7 @@ var NumberControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
142
146
  if (value !== undefined && !(isHoldingDownDec && isHoldingDownInc)) {
143
147
  setInternalValue(Number(value));
144
148
  }
145
- onValueChanged(value);
149
+ callback(value);
146
150
  };
147
151
  var classes = (0, _classnames["default"])('NumberControl', 'form-group', className);
148
152
  var inputGroupClassNames = (0, _classnames["default"])('input-group', bsSize === 'sm' && 'input-group-sm', bsSize === 'lg' && 'input-group-lg');
@@ -161,7 +165,8 @@ var NumberControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
161
165
  value: internalValue,
162
166
  step: step,
163
167
  disabled: disabled,
164
- onValueChanged: handleUpdatedNumberInputValue,
168
+ onChange: handleUpdatedNumberInputValue,
169
+ digitPrecision: digitPrecision,
165
170
  placeholder: placeholder
166
171
  }), /*#__PURE__*/_react["default"].createElement("div", {
167
172
  className: 'input-group-addon'
@@ -191,6 +196,7 @@ NumberControl.propTypes = {
191
196
  value: _propTypes["default"].number,
192
197
  step: _propTypes["default"].number,
193
198
  disabled: _propTypes["default"].bool,
199
+ onChange: _propTypes["default"].func,
194
200
  onValueChanged: _propTypes["default"].func,
195
201
  bsSize: _propTypes["default"].string,
196
202
  className: _propTypes["default"].string,
@@ -13,9 +13,13 @@ var _react = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
  var _useAfterMount = _interopRequireDefault(require("../../hooks/useAfterMount"));
16
- var _excluded = ["unit", "inputAddon", "className", "bsSize", "disabled", "onValueChanged", "min", "max", "value", "step", "placeholder"];
16
+ var _excluded = ["unit", "inputAddon", "className", "bsSize", "disabled", "onChange", "onValueChanged", "min", "max", "value", "step", "digitPrecision", "placeholder"];
17
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+ var DEFAULT_DIGIT_PRECISION = 3;
20
+ var DEFAULT_VALUE = 0;
21
+ var DEFAULT_STEP = 1;
22
+
19
23
  // Note: even if limits are set and input type is number, many browsers allow to enter invalid data
20
24
  // like entering characters or values outside the boundaries, hence we have to check the input here
21
25
  // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
@@ -23,10 +27,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
27
  var defaultProps = {
24
28
  min: 0,
25
29
  max: Number.MAX_VALUE,
26
- step: 1
30
+ step: DEFAULT_STEP
27
31
  };
28
32
  exports.defaultProps = defaultProps;
29
- var DEFAULT_VALUE = 0;
30
33
  var getValueFromProps = function getValueFromProps(val, min, max, placeholder) {
31
34
  // Show placeholders if given instead of 0
32
35
  if (val === undefined && placeholder) {
@@ -56,15 +59,21 @@ var NumberInput = /*#__PURE__*/_react["default"].forwardRef(function (props, ref
56
59
  className = props.className,
57
60
  bsSize = props.bsSize,
58
61
  disabled = props.disabled,
62
+ onChange = props.onChange,
59
63
  _props$onValueChanged = props.onValueChanged,
60
64
  onValueChanged = _props$onValueChanged === void 0 ? function () {} : _props$onValueChanged,
61
65
  propMin = props.min,
62
66
  propMax = props.max,
63
67
  propValue = props.value,
64
68
  _props$step = props.step,
65
- step = _props$step === void 0 ? 1 : _props$step,
69
+ step = _props$step === void 0 ? DEFAULT_STEP : _props$step,
70
+ _props$digitPrecision = props.digitPrecision,
71
+ digitPrecision = _props$digitPrecision === void 0 ? DEFAULT_DIGIT_PRECISION : _props$digitPrecision,
66
72
  placeholder = props.placeholder,
67
73
  remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
74
+
75
+ // Note, "onChange" should replace "onValueChanged" in the future but it's widely used
76
+ var callback = onChange || onValueChanged;
68
77
  var min = Number.isFinite(propMin) ? propMin : defaultProps.min;
69
78
  var max = Number.isFinite(propMax) ? propMax : defaultProps.max;
70
79
  var value = getValueFromProps(propValue, min, max, placeholder);
@@ -106,25 +115,32 @@ var NumberInput = /*#__PURE__*/_react["default"].forwardRef(function (props, ref
106
115
  });
107
116
 
108
117
  // Only call back the caller for valid values
109
- isValid && onValueChanged(newValidValue);
118
+ isValid && callback(newValidValue);
110
119
  };
111
120
  var handleOnChange = function handleOnChange(event) {
112
- return applyValue(event.target.value);
121
+ applyValue(event.target.value);
113
122
  };
114
- var handleBlur = function handleBlur(event) {
115
- // console.log({enteredValue: state.enteredValue, event: Number(event.target.value)});
116
123
 
117
- // When the value is removed, keep the input empty but trigger the onValueChanged callback
124
+ // Prevent entering exponent to avoide side effects
125
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1398528
126
+ var handleKeyDown = function handleKeyDown(event) {
127
+ if (event.key === 'e' || event.key === 'E') {
128
+ event.preventDefault();
129
+ }
130
+ };
131
+ var handleBlur = function handleBlur(event) {
132
+ // When the value is removed, keep the input empty but trigger the outside callback
118
133
  // since the user has finished his input
119
134
  var lastEnteredValue = state.enteredValue;
120
135
  if (lastEnteredValue === '') {
121
- onValueChanged(lastEnteredValue);
136
+ callback(lastEnteredValue);
122
137
  return;
123
138
  }
124
139
 
125
- // Otherwise, validate the input and clamp it if the entered value exeeds the limitations
140
+ // Otherwise, validate the input, round it according to digitPrecision,
141
+ // and clamp the value if the entered value exeeds the limitations
126
142
  var convertedEnteredValue = convertNonIntegerToDefault(Number(lastEnteredValue));
127
- var validNumber = clampNumber(convertedEnteredValue, min, max);
143
+ var validNumber = clampNumber(Number(convertedEnteredValue).toFixed(digitPrecision), min, max);
128
144
  applyValue(validNumber);
129
145
  };
130
146
  var inputGroupClassNames = (0, _classnames["default"])('input-group', bsSize === 'sm' && 'input-group-sm', bsSize === 'lg' && 'input-group-lg');
@@ -139,6 +155,7 @@ var NumberInput = /*#__PURE__*/_react["default"].forwardRef(function (props, ref
139
155
  disabled: disabled,
140
156
  onBlur: handleBlur,
141
157
  onChange: handleOnChange,
158
+ onKeyDown: handleKeyDown,
142
159
  ref: ref,
143
160
  "aria-label": "number-input",
144
161
  placeholder: placeholder,
@@ -162,11 +179,13 @@ NumberInput.propTypes = {
162
179
  value: _propTypes["default"].number,
163
180
  step: _propTypes["default"].number,
164
181
  disabled: _propTypes["default"].bool,
182
+ onChange: _propTypes["default"].func,
165
183
  onValueChanged: _propTypes["default"].func,
166
184
  bsSize: _propTypes["default"].oneOf(['sm', 'lg', 'small', 'large']),
167
185
  className: _propTypes["default"].string,
168
186
  unit: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
169
187
  inputAddon: _propTypes["default"].string,
188
+ digitPrecision: _propTypes["default"].number,
170
189
  placeholder: _propTypes["default"].string
171
190
  };
172
191
  var _default = NumberInput;
@@ -49,8 +49,8 @@ var useScrollPosition = function useScrollPosition(target) {
49
49
  else {
50
50
  setTargetElement(target);
51
51
  }
52
- return {
53
- "if": function _if(checkForModuleContent) {
52
+ return function () {
53
+ if (checkForModuleContent) {
54
54
  clearInterval(check);
55
55
  }
56
56
  };
@@ -122,6 +122,12 @@ each(@colors-map-marker-map, {
122
122
  }
123
123
  })
124
124
 
125
+ each(@colors-map-marker-night-map, {
126
+ .border-color-@{key} {
127
+ border-color: @value !important;
128
+ }
129
+ })
130
+
125
131
  // rating-1
126
132
  // rating-2
127
133
  // rating-3
@@ -72,7 +72,6 @@ each(@colors-gray-map, {
72
72
  // map-marker-route
73
73
  each(@colors-map-marker-map, {
74
74
  .bg-@{key} {
75
- color: var(--color-white) !important;
76
75
  background-color: @value !important;
77
76
  }
78
77
  .hover-bg-@{key}:hover {
@@ -83,6 +82,15 @@ each(@colors-map-marker-map, {
83
82
  }
84
83
  })
85
84
 
85
+ each(@colors-map-marker-night-map, {
86
+ .bg-@{key} {
87
+ background-color: @value !important;
88
+ }
89
+ .hover-bg-@{key}:hover {
90
+ background-color: @value !important;
91
+ }
92
+ })
93
+
86
94
  // rating-1
87
95
  // rating-2
88
96
  // rating-3
@@ -55,7 +55,6 @@ each(@colors-gray-map, {
55
55
  // map-marker-poi
56
56
  // map-marker-geofence
57
57
  // map-marker-route
58
- .color-map-marker-text { color: var(--color-map-marker-text) !important }
59
58
  each(@colors-map-marker-map, {
60
59
  .text-color-@{key},
61
60
  .hover-text-color-@{key}:hover {
@@ -63,6 +62,16 @@ each(@colors-map-marker-map, {
63
62
  }
64
63
  })
65
64
 
65
+ each(@colors-map-marker-night-map, {
66
+ .text-color-@{key},
67
+ .hover-text-color-@{key}:hover {
68
+ color: @value !important;
69
+ }
70
+ })
71
+
72
+ // .text-color-map-marker-text { color: var(--color-map-marker-text) !important }
73
+ // .text-color-map-marker-text-night { color: var(--color-map-marker-text-night) !important }
74
+
66
75
  // rating-1
67
76
  // rating-2
68
77
  // rating-3
@@ -115,6 +115,7 @@
115
115
  // map-marker-geofence
116
116
  // map-marker-route
117
117
  @colors-map-marker-map: {
118
+ map-marker-text: var(--color-map-marker-text);
118
119
  map-marker-active: var(--color-map-marker-active);
119
120
  map-marker-asset: var(--color-map-marker-asset);
120
121
  map-marker-poi: var(--color-map-marker-poi);
@@ -122,6 +123,15 @@
122
123
  map-marker-route: var(--color-map-marker-route);
123
124
  }
124
125
 
126
+ @colors-map-marker-night-map: {
127
+ map-marker-text-night: var(--color-map-marker-text-night);
128
+ map-marker-active-night: var(--color-map-marker-active-night);
129
+ map-marker-asset-night: var(--color-map-marker-asset-night);
130
+ map-marker-poi-night: var(--color-map-marker-poi-night);
131
+ map-marker-geofence-night: var(--color-map-marker-geofence-night);
132
+ map-marker-route-night: var(--color-map-marker-route-night);
133
+ }
134
+
125
135
  // Color Map - Rating
126
136
  // rating-1
127
137
  // rating-2
@@ -33,6 +33,12 @@
33
33
  @color-map-marker-geofence-hsl: var(--color-map-marker-geofence-h), var(--color-map-marker-geofence-s), var(--color-map-marker-geofence-l);
34
34
  @color-map-marker-route-hsl: var(--color-map-marker-route-h), var(--color-map-marker-route-s), var(--color-map-marker-route-l);
35
35
  @color-map-marker-text-hsl: var(--color-map-marker-text-h), var(--color-map-marker-text-s), var(--color-map-marker-text-l);
36
+ @color-map-marker-active-night-hsl: var(--color-map-marker-active-night-h), var(--color-map-marker-active-night-s), var(--color-map-marker-active-night-l);
37
+ @color-map-marker-asset-night-hsl: var(--color-map-marker-asset-night-h), var(--color-map-marker-asset-night-s), var(--color-map-marker-asset-night-l);
38
+ @color-map-marker-poi-night-hsl: var(--color-map-marker-poi-night-h), var(--color-map-marker-poi-night-s), var(--color-map-marker-poi-night-l);
39
+ @color-map-marker-geofence-night-hsl: var(--color-map-marker-geofence-night-h), var(--color-map-marker-geofence-night-s), var(--color-map-marker-geofence-night-l);
40
+ @color-map-marker-route-night-hsl: var(--color-map-marker-route-night-h), var(--color-map-marker-route-night-s), var(--color-map-marker-route-night-l);
41
+ @color-map-marker-text-night-hsl: var(--color-map-marker-text-night-h), var(--color-map-marker-text-night-s), var(--color-map-marker-text-night-l);
36
42
  @color-highlight-darkest-hsl: var(--color-highlight-darkest-h), var(--color-highlight-darkest-s), var(--color-highlight-darkest-l);
37
43
  @color-highlight-darker-hsl: var(--color-highlight-darker-h), var(--color-highlight-darker-s), var(--color-highlight-darker-l);
38
44
  @color-highlight-dark-hsl: var(--color-highlight-dark-h), var(--color-highlight-dark-s), var(--color-highlight-dark-l);
@@ -48,6 +48,13 @@
48
48
  @dark-color-map-marker-route: @color-map-marker-route;
49
49
  @dark-color-map-marker-text: @color-map-marker-text;
50
50
 
51
+ @dark-color-map-marker-active-night: @color-map-marker-active-night;
52
+ @dark-color-map-marker-asset-night: @color-map-marker-asset-night;
53
+ @dark-color-map-marker-poi-night: @color-map-marker-poi-night;
54
+ @dark-color-map-marker-geofence-night: @color-map-marker-geofence-night;
55
+ @dark-color-map-marker-route-night: @color-map-marker-route-night;
56
+ @dark-color-map-marker-text-night: @color-map-marker-text-night;
57
+
51
58
  // Color - Rating // CURRENTLY NO DIFFERENCES TO THE LIGHT THEME
52
59
  @dark-color-rating-1: @color-rating-1;
53
60
  @dark-color-rating-2: @color-rating-2;
@@ -49,6 +49,13 @@
49
49
  // color-map-marker-route: @dark-color-map-marker-route;
50
50
  // color-map-marker-text: @dark-color-map-marker-text;
51
51
 
52
+ // color-map-marker-active-night: @dark-color-map-marker-active-night;
53
+ // color-map-marker-asset-night: @dark-color-map-marker-asset-night;
54
+ // color-map-marker-poi-night: @dark-color-map-marker-poi-night;
55
+ // color-map-marker-geofence-night: @dark-color-map-marker-geofence-night;
56
+ // color-map-marker-route-night: @dark-color-map-marker-route-night;
57
+ // color-map-marker-text-night: @dark-color-map-marker-text-night;
58
+
52
59
  // Color - Highlight
53
60
  color-highlight-darkest: @dark-color-highlight-darkest;
54
61
  color-highlight-darker: @dark-color-highlight-darker;
@@ -52,6 +52,13 @@
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;
61
+
55
62
  // Color - Rating
56
63
  @color-rating-1: #d90000;
57
64
  @color-rating-2: #ff8e3c;
@@ -53,6 +53,13 @@
53
53
  color-map-marker-route: @color-map-marker-route;
54
54
  color-map-marker-text: @color-map-marker-text;
55
55
 
56
+ color-map-marker-active-night: @color-map-marker-active-night;
57
+ color-map-marker-asset-night: @color-map-marker-asset-night;
58
+ color-map-marker-poi-night: @color-map-marker-poi-night;
59
+ color-map-marker-geofence-night: @color-map-marker-geofence-night;
60
+ color-map-marker-route-night: @color-map-marker-route-night;
61
+ color-map-marker-text-night: @color-map-marker-text-night;
62
+
56
63
  // Color - Highlight
57
64
  color-highlight-darkest: @color-highlight-darkest;
58
65
  color-highlight-darker: @color-highlight-darker;
package/lib/es/types.ts CHANGED
@@ -411,6 +411,8 @@ export interface ClusterLayerProps {
411
411
  maxZoom?: string | number;
412
412
  clusterTheme?: ClusterTheme;
413
413
  eventListenerMap: EventListenerMap;
414
+ clusterStrategy?: 'FASTGRID' | 'GRID' | 'DYNAMICGRID';
415
+ eps?: number;
414
416
  }
415
417
 
416
418
  export interface ClusterMapMarkerProps {
@@ -871,6 +873,8 @@ export interface MapProps {
871
873
  getApi?: Function;
872
874
  mapSettingsTooltip?: string | React.ReactNode;
873
875
  mapSettings?: React.ReactNode;
876
+ useWebGl?: boolean;
877
+ children?: any;
874
878
  }
875
879
 
876
880
  export interface MapBoundingBoxButtonProps {
@@ -983,6 +987,8 @@ export interface MarkerProps {
983
987
  export interface MarkerLayerProps {
984
988
  simpleTheme?: ClusterTheme;
985
989
  clusterDissolvable?: boolean;
990
+ clusterStrategy?: 'FASTGRID' | 'GRID' | 'DYNAMICGRID';
991
+ eps?: number;
986
992
  }
987
993
 
988
994
  export interface MenuItem {
@@ -1083,6 +1089,7 @@ export interface NumberControlProps {
1083
1089
  value?: number;
1084
1090
  step?: number;
1085
1091
  disabled?: boolean;
1092
+ onChange?: (value: number) => void;
1086
1093
  onValueChanged?: (value: number) => void;
1087
1094
  bsSize?: 'sm' | 'lg';
1088
1095
  className?: string;
@@ -1099,12 +1106,14 @@ export interface NumberInputProps {
1099
1106
  value?: number;
1100
1107
  step?: number;
1101
1108
  disabled?: boolean;
1109
+ onChange?: (value: number) => void;
1102
1110
  onValueChanged?: (value: number) => void;
1103
1111
  bsSize?: 'sm' | 'lg';
1104
1112
  className?: string;
1105
1113
  unit?: string | React.ReactNode;
1106
1114
  inputAddon?: string;
1107
1115
  placeholder?: string;
1116
+ digitPrecision?: number;
1108
1117
  ref?: React.MutableRefObject<object>;
1109
1118
  }
1110
1119
 
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.16.2-beta.10"
2
+ "version": "0.16.2-beta.12"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rio-cloud/rio-uikit",
3
- "version": "0.16.2-beta.10",
3
+ "version": "0.16.2-beta.12",
4
4
  "description": "The RIO UIKIT component library",
5
5
  "repository": "https://collaboration.msi.audi.com/stash/projects/RIOFRONT/repos/uikit-web/browse",
6
6
  "scripts": {
@@ -122,6 +122,12 @@ each(@colors-map-marker-map, {
122
122
  }
123
123
  })
124
124
 
125
+ each(@colors-map-marker-night-map, {
126
+ .border-color-@{key} {
127
+ border-color: @value !important;
128
+ }
129
+ })
130
+
125
131
  // rating-1
126
132
  // rating-2
127
133
  // rating-3
@@ -72,7 +72,6 @@ each(@colors-gray-map, {
72
72
  // map-marker-route
73
73
  each(@colors-map-marker-map, {
74
74
  .bg-@{key} {
75
- color: var(--color-white) !important;
76
75
  background-color: @value !important;
77
76
  }
78
77
  .hover-bg-@{key}:hover {
@@ -83,6 +82,15 @@ each(@colors-map-marker-map, {
83
82
  }
84
83
  })
85
84
 
85
+ each(@colors-map-marker-night-map, {
86
+ .bg-@{key} {
87
+ background-color: @value !important;
88
+ }
89
+ .hover-bg-@{key}:hover {
90
+ background-color: @value !important;
91
+ }
92
+ })
93
+
86
94
  // rating-1
87
95
  // rating-2
88
96
  // rating-3
@@ -55,7 +55,6 @@ each(@colors-gray-map, {
55
55
  // map-marker-poi
56
56
  // map-marker-geofence
57
57
  // map-marker-route
58
- .color-map-marker-text { color: var(--color-map-marker-text) !important }
59
58
  each(@colors-map-marker-map, {
60
59
  .text-color-@{key},
61
60
  .hover-text-color-@{key}:hover {
@@ -63,6 +62,16 @@ each(@colors-map-marker-map, {
63
62
  }
64
63
  })
65
64
 
65
+ each(@colors-map-marker-night-map, {
66
+ .text-color-@{key},
67
+ .hover-text-color-@{key}:hover {
68
+ color: @value !important;
69
+ }
70
+ })
71
+
72
+ // .text-color-map-marker-text { color: var(--color-map-marker-text) !important }
73
+ // .text-color-map-marker-text-night { color: var(--color-map-marker-text-night) !important }
74
+
66
75
  // rating-1
67
76
  // rating-2
68
77
  // rating-3
@@ -115,6 +115,7 @@
115
115
  // map-marker-geofence
116
116
  // map-marker-route
117
117
  @colors-map-marker-map: {
118
+ map-marker-text: var(--color-map-marker-text);
118
119
  map-marker-active: var(--color-map-marker-active);
119
120
  map-marker-asset: var(--color-map-marker-asset);
120
121
  map-marker-poi: var(--color-map-marker-poi);
@@ -122,6 +123,15 @@
122
123
  map-marker-route: var(--color-map-marker-route);
123
124
  }
124
125
 
126
+ @colors-map-marker-night-map: {
127
+ map-marker-text-night: var(--color-map-marker-text-night);
128
+ map-marker-active-night: var(--color-map-marker-active-night);
129
+ map-marker-asset-night: var(--color-map-marker-asset-night);
130
+ map-marker-poi-night: var(--color-map-marker-poi-night);
131
+ map-marker-geofence-night: var(--color-map-marker-geofence-night);
132
+ map-marker-route-night: var(--color-map-marker-route-night);
133
+ }
134
+
125
135
  // Color Map - Rating
126
136
  // rating-1
127
137
  // rating-2
@@ -33,6 +33,12 @@
33
33
  @color-map-marker-geofence-hsl: var(--color-map-marker-geofence-h), var(--color-map-marker-geofence-s), var(--color-map-marker-geofence-l);
34
34
  @color-map-marker-route-hsl: var(--color-map-marker-route-h), var(--color-map-marker-route-s), var(--color-map-marker-route-l);
35
35
  @color-map-marker-text-hsl: var(--color-map-marker-text-h), var(--color-map-marker-text-s), var(--color-map-marker-text-l);
36
+ @color-map-marker-active-night-hsl: var(--color-map-marker-active-night-h), var(--color-map-marker-active-night-s), var(--color-map-marker-active-night-l);
37
+ @color-map-marker-asset-night-hsl: var(--color-map-marker-asset-night-h), var(--color-map-marker-asset-night-s), var(--color-map-marker-asset-night-l);
38
+ @color-map-marker-poi-night-hsl: var(--color-map-marker-poi-night-h), var(--color-map-marker-poi-night-s), var(--color-map-marker-poi-night-l);
39
+ @color-map-marker-geofence-night-hsl: var(--color-map-marker-geofence-night-h), var(--color-map-marker-geofence-night-s), var(--color-map-marker-geofence-night-l);
40
+ @color-map-marker-route-night-hsl: var(--color-map-marker-route-night-h), var(--color-map-marker-route-night-s), var(--color-map-marker-route-night-l);
41
+ @color-map-marker-text-night-hsl: var(--color-map-marker-text-night-h), var(--color-map-marker-text-night-s), var(--color-map-marker-text-night-l);
36
42
  @color-highlight-darkest-hsl: var(--color-highlight-darkest-h), var(--color-highlight-darkest-s), var(--color-highlight-darkest-l);
37
43
  @color-highlight-darker-hsl: var(--color-highlight-darker-h), var(--color-highlight-darker-s), var(--color-highlight-darker-l);
38
44
  @color-highlight-dark-hsl: var(--color-highlight-dark-h), var(--color-highlight-dark-s), var(--color-highlight-dark-l);
@@ -48,6 +48,13 @@
48
48
  @dark-color-map-marker-route: @color-map-marker-route;
49
49
  @dark-color-map-marker-text: @color-map-marker-text;
50
50
 
51
+ @dark-color-map-marker-active-night: @color-map-marker-active-night;
52
+ @dark-color-map-marker-asset-night: @color-map-marker-asset-night;
53
+ @dark-color-map-marker-poi-night: @color-map-marker-poi-night;
54
+ @dark-color-map-marker-geofence-night: @color-map-marker-geofence-night;
55
+ @dark-color-map-marker-route-night: @color-map-marker-route-night;
56
+ @dark-color-map-marker-text-night: @color-map-marker-text-night;
57
+
51
58
  // Color - Rating // CURRENTLY NO DIFFERENCES TO THE LIGHT THEME
52
59
  @dark-color-rating-1: @color-rating-1;
53
60
  @dark-color-rating-2: @color-rating-2;
@@ -49,6 +49,13 @@
49
49
  // color-map-marker-route: @dark-color-map-marker-route;
50
50
  // color-map-marker-text: @dark-color-map-marker-text;
51
51
 
52
+ // color-map-marker-active-night: @dark-color-map-marker-active-night;
53
+ // color-map-marker-asset-night: @dark-color-map-marker-asset-night;
54
+ // color-map-marker-poi-night: @dark-color-map-marker-poi-night;
55
+ // color-map-marker-geofence-night: @dark-color-map-marker-geofence-night;
56
+ // color-map-marker-route-night: @dark-color-map-marker-route-night;
57
+ // color-map-marker-text-night: @dark-color-map-marker-text-night;
58
+
52
59
  // Color - Highlight
53
60
  color-highlight-darkest: @dark-color-highlight-darkest;
54
61
  color-highlight-darker: @dark-color-highlight-darker;
@@ -52,6 +52,13 @@
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;
61
+
55
62
  // Color - Rating
56
63
  @color-rating-1: #d90000;
57
64
  @color-rating-2: #ff8e3c;
@@ -53,6 +53,13 @@
53
53
  color-map-marker-route: @color-map-marker-route;
54
54
  color-map-marker-text: @color-map-marker-text;
55
55
 
56
+ color-map-marker-active-night: @color-map-marker-active-night;
57
+ color-map-marker-asset-night: @color-map-marker-asset-night;
58
+ color-map-marker-poi-night: @color-map-marker-poi-night;
59
+ color-map-marker-geofence-night: @color-map-marker-geofence-night;
60
+ color-map-marker-route-night: @color-map-marker-route-night;
61
+ color-map-marker-text-night: @color-map-marker-text-night;
62
+
56
63
  // Color - Highlight
57
64
  color-highlight-darkest: @color-highlight-darkest;
58
65
  color-highlight-darker: @color-highlight-darker;
package/types.ts CHANGED
@@ -411,6 +411,8 @@ export interface ClusterLayerProps {
411
411
  maxZoom?: string | number;
412
412
  clusterTheme?: ClusterTheme;
413
413
  eventListenerMap: EventListenerMap;
414
+ clusterStrategy?: 'FASTGRID' | 'GRID' | 'DYNAMICGRID';
415
+ eps?: number;
414
416
  }
415
417
 
416
418
  export interface ClusterMapMarkerProps {
@@ -871,6 +873,8 @@ export interface MapProps {
871
873
  getApi?: Function;
872
874
  mapSettingsTooltip?: string | React.ReactNode;
873
875
  mapSettings?: React.ReactNode;
876
+ useWebGl?: boolean;
877
+ children?: any;
874
878
  }
875
879
 
876
880
  export interface MapBoundingBoxButtonProps {
@@ -983,6 +987,8 @@ export interface MarkerProps {
983
987
  export interface MarkerLayerProps {
984
988
  simpleTheme?: ClusterTheme;
985
989
  clusterDissolvable?: boolean;
990
+ clusterStrategy?: 'FASTGRID' | 'GRID' | 'DYNAMICGRID';
991
+ eps?: number;
986
992
  }
987
993
 
988
994
  export interface MenuItem {
@@ -1083,6 +1089,7 @@ export interface NumberControlProps {
1083
1089
  value?: number;
1084
1090
  step?: number;
1085
1091
  disabled?: boolean;
1092
+ onChange?: (value: number) => void;
1086
1093
  onValueChanged?: (value: number) => void;
1087
1094
  bsSize?: 'sm' | 'lg';
1088
1095
  className?: string;
@@ -1099,12 +1106,14 @@ export interface NumberInputProps {
1099
1106
  value?: number;
1100
1107
  step?: number;
1101
1108
  disabled?: boolean;
1109
+ onChange?: (value: number) => void;
1102
1110
  onValueChanged?: (value: number) => void;
1103
1111
  bsSize?: 'sm' | 'lg';
1104
1112
  className?: string;
1105
1113
  unit?: string | React.ReactNode;
1106
1114
  inputAddon?: string;
1107
1115
  placeholder?: string;
1116
+ digitPrecision?: number;
1108
1117
  ref?: React.MutableRefObject<object>;
1109
1118
  }
1110
1119
 
package/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.16.2-beta.10"
2
+ "version": "0.16.2-beta.12"
3
3
  }