@synerise/ds-list 0.6.2 → 0.6.3

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,14 @@
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.6.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list@0.6.2...@synerise/ds-list@0.6.3) (2021-11-22)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-list
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.6.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list@0.6.1...@synerise/ds-list@0.6.2) (2021-11-16)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-list
@@ -19,9 +19,9 @@ export var Wrapper = styled.li.withConfig({
19
19
  }, function (props) {
20
20
  return props.size === 'medium' && css(["padding:12px;padding-left:", ";"], props.icon ? '12px' : '16px');
21
21
  }, IconWrapper, function (props) {
22
- return !props.disabled && "\n fill: ".concat(props.danger ? props.theme.palette['red-600'] : props.theme.palette['grey-600'], ";\n ");
22
+ return !props.disabled && "\n fill: " + (props.danger ? props.theme.palette['red-600'] : props.theme.palette['grey-600']) + ";\n ";
23
23
  }, function (props) {
24
- return !props.disabled && "\n ".concat(IconWrapper, " {\n svg {\n fill: ").concat(props.danger ? props.theme.palette['red-600'] : props.theme.palette['blue-600'], ";\n }\n }\n color: ").concat(props.danger ? props.theme.palette['red-600'] : props.theme.palette['blue-600'], ";\n background: ").concat(props.danger ? props.theme.palette['red-050'] : props.theme.palette['grey-050'], ";\n ");
24
+ return !props.disabled && "\n " + IconWrapper + " {\n svg {\n fill: " + (props.danger ? props.theme.palette['red-600'] : props.theme.palette['blue-600']) + ";\n }\n }\n color: " + (props.danger ? props.theme.palette['red-600'] : props.theme.palette['blue-600']) + ";\n background: " + (props.danger ? props.theme.palette['red-050'] : props.theme.palette['grey-050']) + ";\n ";
25
25
  }, function (_ref) {
26
26
  var theme = _ref.theme;
27
27
  return theme.palette['blue-600'];
package/dist/List.js CHANGED
@@ -1,32 +1,14 @@
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
  var _excluded = ["dataSource", "radio", "options", "dashed"];
4
2
 
5
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
4
 
7
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
8
-
9
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
6
 
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
-
13
- 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); } }
14
-
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
16
-
17
- 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); }
18
-
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
-
21
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
22
-
23
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
24
-
25
7
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
8
 
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
28
10
 
29
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
11
+ 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; }
30
12
 
31
13
  import * as React from 'react';
32
14
  import { v4 as uuid } from 'uuid';
@@ -48,78 +30,78 @@ export var isNestedArray = function isNestedArray(array) {
48
30
  };
49
31
 
50
32
  var List = /*#__PURE__*/function (_React$PureComponent) {
51
- _inherits(List, _React$PureComponent);
52
-
53
- var _super = _createSuper(List);
33
+ _inheritsLoose(List, _React$PureComponent);
54
34
 
55
35
  function List(props) {
56
36
  var _this;
57
37
 
58
- _classCallCheck(this, List);
38
+ _this = _React$PureComponent.call(this, props) || this;
39
+
40
+ _defineProperty(_assertThisInitialized(_this), "uuidKey", void 0);
59
41
 
60
- _this = _super.call(this, props);
61
- _this.uuidKey = void 0;
62
42
  _this.uuidKey = uuid();
63
43
  return _this;
64
44
  }
65
45
 
66
- _createClass(List, [{
67
- key: "render",
68
- value: function render() {
69
- var _this$props = this.props,
70
- dataSource = _this$props.dataSource,
71
- radio = _this$props.radio,
72
- options = _this$props.options,
73
- dashed = _this$props.dashed,
74
- rest = _objectWithoutProperties(_this$props, _excluded);
75
-
76
- var ReadyList;
77
-
78
- if (isNestedArray(dataSource)) {
79
- ReadyList = !!dataSource && // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
80
- // @ts-ignore
81
- dataSource.map(function (singleDataSource, index) {
82
- var isLastItem = dataSource.length === index + 1;
83
-
84
- if (index === 0) {
85
- return /*#__PURE__*/React.createElement(React.Fragment, {
86
- key: uuid()
87
- }, /*#__PURE__*/React.createElement(AntdList, _extends({}, rest, {
88
- dataSource: singleDataSource
89
- })), !isLastItem && /*#__PURE__*/React.createElement(ListDivider, {
90
- dashed: !!dashed,
91
- "data-testid": "divider"
92
- }));
93
- }
46
+ var _proto = List.prototype;
47
+
48
+ _proto.render = function render() {
49
+ var _this$props = this.props,
50
+ dataSource = _this$props.dataSource,
51
+ radio = _this$props.radio,
52
+ options = _this$props.options,
53
+ dashed = _this$props.dashed,
54
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
55
+
56
+ var ReadyList;
94
57
 
58
+ if (isNestedArray(dataSource)) {
59
+ ReadyList = !!dataSource && // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
60
+ // @ts-ignore
61
+ dataSource.map(function (singleDataSource, index) {
62
+ var isLastItem = dataSource.length === index + 1;
63
+
64
+ if (index === 0) {
95
65
  return /*#__PURE__*/React.createElement(React.Fragment, {
96
66
  key: uuid()
97
67
  }, /*#__PURE__*/React.createElement(AntdList, _extends({}, rest, {
98
- header: null,
99
68
  dataSource: singleDataSource
100
69
  })), !isLastItem && /*#__PURE__*/React.createElement(ListDivider, {
101
70
  dashed: !!dashed,
102
71
  "data-testid": "divider"
103
72
  }));
104
- });
105
- } else {
106
- ReadyList = /*#__PURE__*/React.createElement(React.Fragment, {
107
- key: this.uuidKey || uuid()
108
- }, /*#__PURE__*/React.createElement(AntdList, _extends({}, rest, {
109
- dataSource: dataSource
110
- })));
111
- }
73
+ }
112
74
 
113
- return /*#__PURE__*/React.createElement(React.Fragment, null, radio ? /*#__PURE__*/React.createElement(RadioGroupWrapper, {
114
- options: options
115
- }, ReadyList) : ReadyList);
75
+ return /*#__PURE__*/React.createElement(React.Fragment, {
76
+ key: uuid()
77
+ }, /*#__PURE__*/React.createElement(AntdList, _extends({}, rest, {
78
+ header: null,
79
+ dataSource: singleDataSource
80
+ })), !isLastItem && /*#__PURE__*/React.createElement(ListDivider, {
81
+ dashed: !!dashed,
82
+ "data-testid": "divider"
83
+ }));
84
+ });
85
+ } else {
86
+ ReadyList = /*#__PURE__*/React.createElement(React.Fragment, {
87
+ key: this.uuidKey || uuid()
88
+ }, /*#__PURE__*/React.createElement(AntdList, _extends({}, rest, {
89
+ dataSource: dataSource
90
+ })));
116
91
  }
117
- }]);
92
+
93
+ return /*#__PURE__*/React.createElement(React.Fragment, null, radio ? /*#__PURE__*/React.createElement(RadioGroupWrapper, {
94
+ options: options
95
+ }, ReadyList) : ReadyList);
96
+ };
118
97
 
119
98
  return List;
120
99
  }(React.PureComponent);
121
100
 
122
- List.ItemWrapper = ItemWrapper;
123
- List.Item = TextItem;
124
- List.Divider = ListDivider;
101
+ _defineProperty(List, "ItemWrapper", ItemWrapper);
102
+
103
+ _defineProperty(List, "Item", TextItem);
104
+
105
+ _defineProperty(List, "Divider", ListDivider);
106
+
125
107
  export default List;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-list",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "List UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,9 +32,9 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-divider": "^0.5.2",
36
- "@synerise/ds-radio": "^0.11.2",
37
- "@synerise/ds-utils": "^0.21.2",
35
+ "@synerise/ds-divider": "^0.5.3",
36
+ "@synerise/ds-radio": "^0.11.3",
37
+ "@synerise/ds-utils": "^0.21.3",
38
38
  "uuid": "^7.0.2"
39
39
  },
40
40
  "peerDependencies": {
@@ -42,5 +42,5 @@
42
42
  "antd": "^4",
43
43
  "react": ">=16.9.0 < 17.0.0"
44
44
  },
45
- "gitHead": "8e667a88a48d774c550ff4766de71c4aab01f5a9"
45
+ "gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
46
46
  }