@hipay/hipay-material-ui 3.4.0 → 3.4.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.
|
@@ -378,8 +378,8 @@ function (_React$Component) {
|
|
|
378
378
|
});
|
|
379
379
|
|
|
380
380
|
if (selectedOption) {
|
|
381
|
-
this.props.onChange('from',
|
|
382
|
-
this.props.onChange('to',
|
|
381
|
+
this.props.onChange('from', selectedOption.from.toDate());
|
|
382
|
+
this.props.onChange('to', selectedOption.to.toDate());
|
|
383
383
|
this.props.onChange('fromError', false);
|
|
384
384
|
this.props.onChange('toError', false);
|
|
385
385
|
}
|
package/HiSelect/HiSelect.js
CHANGED
|
@@ -9,10 +9,12 @@ exports.default = exports.styles = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
|
13
|
-
|
|
14
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
15
13
|
|
|
14
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
|
15
|
+
|
|
16
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
|
17
|
+
|
|
16
18
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
17
19
|
|
|
18
20
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
@@ -206,13 +208,24 @@ function (_React$PureComponent) {
|
|
|
206
208
|
if (item === undefined) {
|
|
207
209
|
inputValue = translations.one_item_selected;
|
|
208
210
|
} else if (type === 'icon' || item.type === 'icon') {
|
|
211
|
+
var iconProps = {
|
|
212
|
+
className: classes.labelIcon,
|
|
213
|
+
color: item.color
|
|
214
|
+
};
|
|
215
|
+
var icon;
|
|
216
|
+
|
|
217
|
+
if (typeof item.icon === 'string') {
|
|
218
|
+
icon = _react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
|
219
|
+
icon: item.icon
|
|
220
|
+
}, iconProps));
|
|
221
|
+
} else if ((0, _typeof2.default)(item.icon) === 'object') {
|
|
222
|
+
icon = (0, _objectSpread2.default)({}, item.icon);
|
|
223
|
+
icon.props = (0, _objectSpread2.default)({}, icon.props, {}, iconProps);
|
|
224
|
+
}
|
|
225
|
+
|
|
209
226
|
inputValue = _react.default.createElement("span", {
|
|
210
227
|
className: classes.selectIconLabel
|
|
211
|
-
},
|
|
212
|
-
className: classes.labelIcon,
|
|
213
|
-
color: item.color,
|
|
214
|
-
icon: item.icon
|
|
215
|
-
}), item.label);
|
|
228
|
+
}, icon, item.label);
|
|
216
229
|
} else if (type === 'image' || item.type === 'image') {
|
|
217
230
|
inputValue = _react.default.createElement("span", {
|
|
218
231
|
className: classes.selectIconLabel
|
|
@@ -378,8 +378,8 @@ function (_React$Component) {
|
|
|
378
378
|
});
|
|
379
379
|
|
|
380
380
|
if (selectedOption) {
|
|
381
|
-
this.props.onChange('from',
|
|
382
|
-
this.props.onChange('to',
|
|
381
|
+
this.props.onChange('from', selectedOption.from.toDate());
|
|
382
|
+
this.props.onChange('to', selectedOption.to.toDate());
|
|
383
383
|
this.props.onChange('fromError', false);
|
|
384
384
|
this.props.onChange('toError', false);
|
|
385
385
|
}
|
package/es/HiSelect/HiSelect.js
CHANGED
|
@@ -9,10 +9,12 @@ exports.default = exports.styles = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
|
13
|
-
|
|
14
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
15
13
|
|
|
14
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
|
15
|
+
|
|
16
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
|
17
|
+
|
|
16
18
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
17
19
|
|
|
18
20
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
@@ -206,13 +208,24 @@ function (_React$PureComponent) {
|
|
|
206
208
|
if (item === undefined) {
|
|
207
209
|
inputValue = translations.one_item_selected;
|
|
208
210
|
} else if (type === 'icon' || item.type === 'icon') {
|
|
211
|
+
var iconProps = {
|
|
212
|
+
className: classes.labelIcon,
|
|
213
|
+
color: item.color
|
|
214
|
+
};
|
|
215
|
+
var icon;
|
|
216
|
+
|
|
217
|
+
if (typeof item.icon === 'string') {
|
|
218
|
+
icon = _react.default.createElement(_HiIcon.default, (0, _extends2.default)({
|
|
219
|
+
icon: item.icon
|
|
220
|
+
}, iconProps));
|
|
221
|
+
} else if ((0, _typeof2.default)(item.icon) === 'object') {
|
|
222
|
+
icon = (0, _objectSpread2.default)({}, item.icon);
|
|
223
|
+
icon.props = (0, _objectSpread2.default)({}, icon.props, {}, iconProps);
|
|
224
|
+
}
|
|
225
|
+
|
|
209
226
|
inputValue = _react.default.createElement("span", {
|
|
210
227
|
className: classes.selectIconLabel
|
|
211
|
-
},
|
|
212
|
-
className: classes.labelIcon,
|
|
213
|
-
color: item.color,
|
|
214
|
-
icon: item.icon
|
|
215
|
-
}), item.label);
|
|
228
|
+
}, icon, item.label);
|
|
216
229
|
} else if (type === 'image' || item.type === 'image') {
|
|
217
230
|
inputValue = _react.default.createElement("span", {
|
|
218
231
|
className: classes.selectIconLabel
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hipay/hipay-material-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.2",
|
|
5
5
|
"description": "React components that implement Google's Material Design.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
},
|
|
69
69
|
"main": "./index.js",
|
|
70
70
|
"module": "./esm/index.js"
|
|
71
|
-
}
|
|
71
|
+
}
|