@synerise/ds-core 0.30.14 → 0.31.2

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.31.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@0.31.1...@synerise/ds-core@0.31.2) (2021-11-22)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-core
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.31.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@0.30.14...@synerise/ds-core@0.31.1) (2021-11-09)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-core
17
+
18
+
19
+
20
+
21
+
22
+ # [0.31.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@0.30.14...@synerise/ds-core@0.31.0) (2021-11-09)
23
+
24
+ **Note:** Version bump only for package @synerise/ds-core
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.30.15](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@0.30.14-alpha.3...@synerise/ds-core@0.30.15) (2021-11-05)
31
+
32
+ **Note:** Version bump only for package @synerise/ds-core
33
+
34
+
35
+
36
+
37
+
6
38
  ## [0.30.14](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@0.30.13...@synerise/ds-core@0.30.14) (2021-09-21)
7
39
 
8
40
  **Note:** Version bump only for package @synerise/ds-core
@@ -9,11 +9,11 @@ var DSProvider = function DSProvider(props) {
9
9
  timeZone = props.timeZone,
10
10
  children = props.children,
11
11
  theme = props.theme;
12
- return React.createElement(LocaleProvider, {
12
+ return /*#__PURE__*/React.createElement(LocaleProvider, {
13
13
  locale: locale,
14
14
  messages: messages,
15
15
  timeZone: timeZone
16
- }, React.createElement(ThemeProvider, {
16
+ }, /*#__PURE__*/React.createElement(ThemeProvider, {
17
17
  theme: theme
18
18
  }, children));
19
19
  };
@@ -1,30 +1,12 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
-
3
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4
2
 
5
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6
4
 
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
-
9
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
-
11
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
12
-
13
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
14
-
15
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
-
17
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18
-
19
- function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
20
-
21
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
22
-
23
5
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
6
 
25
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
7
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
26
8
 
27
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
28
10
 
29
11
  import * as React from 'react';
30
12
  import { IntlProvider } from 'react-intl';
@@ -35,78 +17,74 @@ import antMessages from './antLocales';
35
17
  var DEFAULT_LANG = 'en-US';
36
18
 
37
19
  var LocaleProvider = /*#__PURE__*/function (_React$Component) {
38
- _inherits(LocaleProvider, _React$Component);
39
-
40
- var _super = _createSuper(LocaleProvider);
20
+ _inheritsLoose(LocaleProvider, _React$Component);
41
21
 
42
22
  function LocaleProvider() {
43
23
  var _this;
44
24
 
45
- _classCallCheck(this, LocaleProvider);
46
-
47
25
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48
26
  args[_key] = arguments[_key];
49
27
  }
50
28
 
51
- _this = _super.call.apply(_super, [this].concat(args));
52
- _this.state = {
29
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
30
+
31
+ _defineProperty(_assertThisInitialized(_this), "state", {
53
32
  dsLocales: {}
54
- };
33
+ });
55
34
 
56
- _this.getLangForCode = function (code) {
35
+ _defineProperty(_assertThisInitialized(_this), "getLangForCode", function (code) {
57
36
  return code.substring(0, 2);
58
- };
37
+ });
59
38
 
60
39
  return _this;
61
40
  }
62
41
 
63
- _createClass(LocaleProvider, [{
64
- key: "componentDidMount",
65
- value: function componentDidMount() {
66
- var _this2 = this;
67
-
68
- var locale = this.props.locale;
69
- var lang = this.getLangForCode(locale || DEFAULT_LANG);
70
- import("../../../i18n/".concat(lang, ".json")).then(function (dsLocales) {
71
- return _this2.setState({
72
- dsLocales: dsLocales
73
- });
42
+ var _proto = LocaleProvider.prototype;
43
+
44
+ _proto.componentDidMount = function componentDidMount() {
45
+ var _this2 = this;
46
+
47
+ var locale = this.props.locale;
48
+ var lang = this.getLangForCode(locale || DEFAULT_LANG);
49
+ import("../../../i18n/" + lang + ".json").then(function (dsLocales) {
50
+ return _this2.setState({
51
+ dsLocales: dsLocales
74
52
  });
75
- }
76
- }, {
77
- key: "render",
78
- value: function render() {
79
- var _this$props = this.props,
80
- _this$props$defaultMe = _this$props.defaultMessages,
81
- defaultMessages = _this$props$defaultMe === void 0 ? {} : _this$props$defaultMe,
82
- _this$props$messages = _this$props.messages,
83
- messages = _this$props$messages === void 0 ? {} : _this$props$messages,
84
- locale = _this$props.locale,
85
- timeZone = _this$props.timeZone,
86
- children = _this$props.children;
87
- var dsLocales = this.state.dsLocales;
88
- var code = locale || DEFAULT_LANG;
89
- var lang = this.getLangForCode(code);
90
- var localeData = messages || {};
91
- var localeDataForLang = localeData[lang] || {};
92
- var antLocale = Object.prototype.hasOwnProperty.call(antMessages, lang) ? antMessages[lang] : antMessages["default"];
93
- var currentMessages = flatten(_objectSpread({}, dsLocales, {}, merge.all([defaultMessages, localeDataForLang])));
94
- return React.createElement(AntConfigProvider, {
95
- locale: antLocale
96
- }, React.createElement(IntlProvider, {
97
- textComponent: "span",
98
- locale: code,
99
- messages: currentMessages,
100
- timeZone: timeZone
101
- }, children));
102
- }
103
- }]);
53
+ });
54
+ };
55
+
56
+ _proto.render = function render() {
57
+ var _this$props = this.props,
58
+ _this$props$defaultMe = _this$props.defaultMessages,
59
+ defaultMessages = _this$props$defaultMe === void 0 ? {} : _this$props$defaultMe,
60
+ _this$props$messages = _this$props.messages,
61
+ messages = _this$props$messages === void 0 ? {} : _this$props$messages,
62
+ locale = _this$props.locale,
63
+ timeZone = _this$props.timeZone,
64
+ children = _this$props.children;
65
+ var dsLocales = this.state.dsLocales;
66
+ var code = locale || DEFAULT_LANG;
67
+ var lang = this.getLangForCode(code);
68
+ var localeData = messages || {};
69
+ var localeDataForLang = localeData[lang] || {};
70
+ var antLocale = Object.prototype.hasOwnProperty.call(antMessages, lang) ? antMessages[lang] : antMessages["default"];
71
+ var currentMessages = flatten(_objectSpread({}, dsLocales, {}, merge.all([defaultMessages, localeDataForLang])));
72
+ return /*#__PURE__*/React.createElement(AntConfigProvider, {
73
+ locale: antLocale
74
+ }, /*#__PURE__*/React.createElement(IntlProvider, {
75
+ textComponent: "span",
76
+ locale: code,
77
+ messages: currentMessages,
78
+ timeZone: timeZone
79
+ }, children));
80
+ };
104
81
 
105
82
  return LocaleProvider;
106
83
  }(React.Component);
107
84
 
108
- LocaleProvider.defaultProps = {
85
+ _defineProperty(LocaleProvider, "defaultProps", {
109
86
  locale: DEFAULT_LANG,
110
87
  localeData: {}
111
- };
88
+ });
89
+
112
90
  export { LocaleProvider as default };
@@ -11,9 +11,9 @@ import dsTheme from './theme';
11
11
  var ThemeProvider = function ThemeProvider(props) {
12
12
  var theme = props.theme,
13
13
  children = props.children;
14
- return React.createElement(ThemeProviderBase, {
14
+ return /*#__PURE__*/React.createElement(ThemeProviderBase, {
15
15
  theme: _objectSpread({}, dsTheme, {}, theme)
16
- }, React.createElement(React.Fragment, null, children));
16
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
17
17
  };
18
18
 
19
19
  ThemeProvider.defaultProps = {
@@ -5,7 +5,7 @@ import breakpoints from './breakpoints';
5
5
 
6
6
  var getBreakpoints = function getBreakpoints() {
7
7
  return [breakpoints.small.max, breakpoints.medium.max, breakpoints.large.max].map(function (item) {
8
- return "".concat(item, "px");
8
+ return item + "px";
9
9
  });
10
10
  };
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-core",
3
- "version": "0.30.14",
3
+ "version": "0.31.2",
4
4
  "description": "Core Components for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -42,5 +42,5 @@
42
42
  "less-vars-loader": "1.1.0",
43
43
  "webpack": "4.42.0"
44
44
  },
45
- "gitHead": "a9b2577e3c7e6b51625ab3ecca84600819ad0eeb"
45
+ "gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
46
46
  }