@rio-cloud/rio-uikit 0.16.2-beta.7 → 0.16.2-beta.9

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.
@@ -136,7 +136,8 @@ var ClearableInput = /*#__PURE__*/function (_React$Component) {
136
136
  value: inputValue,
137
137
  onChange: this.handleChange,
138
138
  onKeyPress: this.handleKeyPress,
139
- ref: inputRef,
139
+ // ref={this.props.innerRef} is the equivalent of forwardRef
140
+ ref: inputRef || this.props.innerRef,
140
141
  autoComplete: autoComplete
141
142
  });
142
143
  return /*#__PURE__*/React.createElement("div", {
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _typeof from "@babel/runtime/helpers/typeof";
5
5
  var _excluded = ["dropup", "alignRight", "onChange", "className", "mandatory", "dateValidation"];
6
- import React, { useState } from 'react';
6
+ import React, { useState, forwardRef } from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import classNames from 'classnames';
9
9
 
@@ -14,7 +14,7 @@ var Datetime = RDT["default"] ? RDT["default"] : RDT;
14
14
  var isValidDate = function isValidDate(date) {
15
15
  return _typeof(date) === 'object';
16
16
  };
17
- var DatePicker = function DatePicker(props) {
17
+ var DatePicker = /*#__PURE__*/forwardRef(function (props, ref) {
18
18
  var dropup = props.dropup,
19
19
  alignRight = props.alignRight,
20
20
  onChange = props.onChange,
@@ -35,11 +35,15 @@ var DatePicker = function DatePicker(props) {
35
35
  onChange(date, isValid);
36
36
  };
37
37
  var classes = classNames('DatePicker', 'form-group', hasError && 'has-error', dropup && 'dropup', alignRight && 'align-right', className && className);
38
- return /*#__PURE__*/React.createElement(Datetime, _extends({}, remainingProp, {
38
+
39
+ // TODO: add support for setting ref to the input. Maybe add a "inputRef" prop to react-datetime
40
+ return /*#__PURE__*/React.createElement(Datetime, _extends({
41
+ ref: ref
42
+ }, remainingProp, {
39
43
  onChange: handleChange,
40
44
  className: classes
41
45
  }));
42
- };
46
+ });
43
47
  DatePicker.defaultProps = {
44
48
  closeOnSelect: true,
45
49
  dropup: false,
@@ -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 = {
@@ -15,7 +15,6 @@ export var MISSING_POSITIONS_EXCEPTION_MSG = 'Route requires a minimum of 1 posi
15
15
  export var TO_LESS_LINE_WIDTH_EXCEPTION_MSG = 'If isBorderIncludedInWidth is set to true than width has to be greater than twice of borderWidth';
16
16
  var LINE_STROKE_COLOR = 'rgba(48, 194, 255, 1)';
17
17
  var LINE_STROKE_COLOR_REDUCED = 'rgba(48, 194, 255, 0.5)';
18
- var BORDER_STROKE_COLOR = 'rgba(255, 255, 255, 1)';
19
18
  var BORDER_STROKE_COLOR_REDUCED = 'rgba(255, 255, 255, 0)';
20
19
  var defaultStyle = {
21
20
  width: 5,
@@ -25,12 +24,12 @@ var defaultStyle = {
25
24
  isBorderIncludedInWidth: false
26
25
  };
27
26
  var defaultArrowStyle = {
28
- lineWidth: 10,
29
- fillColor: 'rgba(42, 55, 64, 1)',
30
- strokeColor: BORDER_STROKE_COLOR,
31
- lineDash: [0, 6],
32
- lineTailCap: 'arrow-tail',
33
- lineHeadCap: 'arrow-head'
27
+ // lineWidth: 12,
28
+ // strokeColor: 'rgba(0, 0, 0, 0.8)',
29
+ // lineDash: [0, 3],
30
+ // lineDashOffset: 2,
31
+ // lineTailCap: 'arrow-tail',
32
+ // lineHeadCap: 'arrow-head',
34
33
  };
35
34
  var alternativeRouteStyle = _objectSpread(_objectSpread({}, defaultStyle), {}, {
36
35
  color: 'rgb(218,253,255)'
@@ -1,4 +1,7 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2
5
  /* eslint-disable no-undef */
3
6
  import { useState, useEffect, useContext } from 'react';
4
7
  import PropTypes from 'prop-types';
@@ -35,15 +38,17 @@ var Polyline = function Polyline(_ref) {
35
38
  // Create a patterned polyline:
36
39
 
37
40
  // Non-legacy version:
38
- var arrowLineStyle = new H.map.SpatialStyle({
39
- width: 5,
41
+ var arrowLineStyle = new H.map.SpatialStyle(_objectSpread(_objectSpread({}, arrowStyle), {}, {
40
42
  lineWidth: 10,
41
- strokeColor: 'rgba(255, 255, 255, 0)'
42
- });
43
+ strokeColor: 'rgba(0, 0, 0, 0.8)',
44
+ lineDash: [0, 3],
45
+ lineDashOffset: 1.6,
46
+ lineTailCap: 'arrow-tail',
47
+ lineHeadCap: 'arrow-head'
48
+ }));
43
49
  var routeArrows = new H.map.Polyline(geometry, {
44
50
  style: arrowLineStyle
45
51
  });
46
- routeArrows.setArrows(arrowStyle);
47
52
 
48
53
  // create a group that represents the route line and contains
49
54
  // outline and the pattern
@@ -145,7 +145,8 @@ var ClearableInput = /*#__PURE__*/function (_React$Component) {
145
145
  value: inputValue,
146
146
  onChange: this.handleChange,
147
147
  onKeyPress: this.handleKeyPress,
148
- ref: inputRef,
148
+ // ref={this.props.innerRef} is the equivalent of forwardRef
149
+ ref: inputRef || this.props.innerRef,
149
150
  autoComplete: autoComplete
150
151
  });
151
152
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -21,7 +21,7 @@ var Datetime = _reactDatetime["default"]["default"] ? _reactDatetime["default"][
21
21
  var isValidDate = function isValidDate(date) {
22
22
  return (0, _typeof2["default"])(date) === 'object';
23
23
  };
24
- var DatePicker = function DatePicker(props) {
24
+ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
25
25
  var dropup = props.dropup,
26
26
  alignRight = props.alignRight,
27
27
  onChange = props.onChange,
@@ -42,11 +42,15 @@ var DatePicker = function DatePicker(props) {
42
42
  onChange(date, isValid);
43
43
  };
44
44
  var classes = (0, _classnames["default"])('DatePicker', 'form-group', hasError && 'has-error', dropup && 'dropup', alignRight && 'align-right', className && className);
45
- return /*#__PURE__*/_react["default"].createElement(Datetime, (0, _extends2["default"])({}, remainingProp, {
45
+
46
+ // TODO: add support for setting ref to the input. Maybe add a "inputRef" prop to react-datetime
47
+ return /*#__PURE__*/_react["default"].createElement(Datetime, (0, _extends2["default"])({
48
+ ref: ref
49
+ }, remainingProp, {
46
50
  onChange: handleChange,
47
51
  className: classes
48
52
  }));
49
- };
53
+ });
50
54
  DatePicker.defaultProps = {
51
55
  closeOnSelect: true,
52
56
  dropup: false,
@@ -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 = {
@@ -26,7 +26,6 @@ var TO_LESS_LINE_WIDTH_EXCEPTION_MSG = 'If isBorderIncludedInWidth is set to tru
26
26
  exports.TO_LESS_LINE_WIDTH_EXCEPTION_MSG = TO_LESS_LINE_WIDTH_EXCEPTION_MSG;
27
27
  var LINE_STROKE_COLOR = 'rgba(48, 194, 255, 1)';
28
28
  var LINE_STROKE_COLOR_REDUCED = 'rgba(48, 194, 255, 0.5)';
29
- var BORDER_STROKE_COLOR = 'rgba(255, 255, 255, 1)';
30
29
  var BORDER_STROKE_COLOR_REDUCED = 'rgba(255, 255, 255, 0)';
31
30
  var defaultStyle = {
32
31
  width: 5,
@@ -36,12 +35,12 @@ var defaultStyle = {
36
35
  isBorderIncludedInWidth: false
37
36
  };
38
37
  var defaultArrowStyle = {
39
- lineWidth: 10,
40
- fillColor: 'rgba(42, 55, 64, 1)',
41
- strokeColor: BORDER_STROKE_COLOR,
42
- lineDash: [0, 6],
43
- lineTailCap: 'arrow-tail',
44
- lineHeadCap: 'arrow-head'
38
+ // lineWidth: 12,
39
+ // strokeColor: 'rgba(0, 0, 0, 0.8)',
40
+ // lineDash: [0, 3],
41
+ // lineDashOffset: 2,
42
+ // lineTailCap: 'arrow-tail',
43
+ // lineHeadCap: 'arrow-head',
45
44
  };
46
45
  var alternativeRouteStyle = _objectSpread(_objectSpread({}, defaultStyle), {}, {
47
46
  color: 'rgb(218,253,255)'
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports["default"] = exports.WRONG_GEOMETRY_PROPS_EXCEPTION_MSG = exports.MISSING_GEOMETRY_PROPS_EXCEPTION_MSG = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
10
  var _react = require("react");
10
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -12,8 +13,8 @@ var _context = require("../../context");
12
13
  var _MapException = _interopRequireDefault(require("../../../exceptions/MapException"));
13
14
  var _hooks = require("../../../utils/hooks");
14
15
  var _eventHandling = require("../../../utils/eventHandling");
15
- /* eslint-disable no-undef */
16
-
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
18
  var MISSING_GEOMETRY_PROPS_EXCEPTION_MSG = 'Error in Polyline: Polyline without geometry makes no sense';
18
19
  exports.MISSING_GEOMETRY_PROPS_EXCEPTION_MSG = MISSING_GEOMETRY_PROPS_EXCEPTION_MSG;
19
20
  var WRONG_GEOMETRY_PROPS_EXCEPTION_MSG = 'Error in Polyline: property geometry must be of type H.geo.LineString';
@@ -45,15 +46,17 @@ var Polyline = function Polyline(_ref) {
45
46
  // Create a patterned polyline:
46
47
 
47
48
  // Non-legacy version:
48
- var arrowLineStyle = new H.map.SpatialStyle({
49
- width: 5,
49
+ var arrowLineStyle = new H.map.SpatialStyle(_objectSpread(_objectSpread({}, arrowStyle), {}, {
50
50
  lineWidth: 10,
51
- strokeColor: 'rgba(255, 255, 255, 0)'
52
- });
51
+ strokeColor: 'rgba(0, 0, 0, 0.8)',
52
+ lineDash: [0, 3],
53
+ lineDashOffset: 1.6,
54
+ lineTailCap: 'arrow-tail',
55
+ lineHeadCap: 'arrow-head'
56
+ }));
53
57
  var routeArrows = new H.map.Polyline(geometry, {
54
58
  style: arrowLineStyle
55
59
  });
56
- routeArrows.setArrows(arrowStyle);
57
60
 
58
61
  // create a group that represents the route line and contains
59
62
  // outline and the pattern
@@ -60,7 +60,8 @@ var readColorSchemeFromCookie = function readColorSchemeFromCookie() {
60
60
  // This should be done by a RIO service like User Profile SPA using a theme switcher component from the uikit
61
61
  // where this function is referenced
62
62
  var writeColorSchemeToCookie = function writeColorSchemeToCookie(scheme) {
63
- var isDevEnv = import.meta.env.DEV;
63
+ var _window;
64
+ var isDevEnv = (_window = window) === null || _window === void 0 ? void 0 : _window.location.host.startsWith('localhost');
64
65
  var newCookieValues = encodeURIComponent(scheme);
65
66
  var cookie = "".concat(COOKIE_NAME, "=").concat(newCookieValues, ";domain=").concat(isDevEnv ? 'localhost' : DOMAIN, ";expires=").concat(EXPIRATION_DATE, ";path=").concat(PATH);
66
67
  console.log("writeColorSchemeToCookie: ".concat(cookie));
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.16.2-beta.7"
2
+ "version": "0.16.2-beta.9"
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.7",
3
+ "version": "0.16.2-beta.9",
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": {
@@ -112,7 +112,7 @@
112
112
  "@popperjs/core": "2.11.6",
113
113
  "classnames": "2.3.2",
114
114
  "events": "3.3.0",
115
- "framer-motion": "6.5.1",
115
+ "framer-motion": "4.1.17",
116
116
  "lodash": "4.17.21",
117
117
  "moment": "2.29.4",
118
118
  "natural-orderby": "2.0.3",
@@ -46,7 +46,8 @@ var readColorSchemeFromCookie = function readColorSchemeFromCookie() {
46
46
  // This should be done by a RIO service like User Profile SPA using a theme switcher component from the uikit
47
47
  // where this function is referenced
48
48
  var writeColorSchemeToCookie = function writeColorSchemeToCookie(scheme) {
49
- var isDevEnv = import.meta.env.DEV;
49
+ var _window;
50
+ var isDevEnv = (_window = window) === null || _window === void 0 ? void 0 : _window.location.host.startsWith('localhost');
50
51
  var newCookieValues = encodeURIComponent(scheme);
51
52
  var cookie = "".concat(COOKIE_NAME, "=").concat(newCookieValues, ";domain=").concat(isDevEnv ? 'localhost' : DOMAIN, ";expires=").concat(EXPIRATION_DATE, ";path=").concat(PATH);
52
53
  console.log("writeColorSchemeToCookie: ".concat(cookie));
package/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.16.2-beta.7"
2
+ "version": "0.16.2-beta.9"
3
3
  }