tg-core-components 5.4.3-bethard → 5.5.0-bethard
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.
|
@@ -10,7 +10,9 @@ import cn from 'classnames';
|
|
|
10
10
|
var PhoneNumberInput = function PhoneNumberInput(props) {
|
|
11
11
|
var val = props.value || '';
|
|
12
12
|
|
|
13
|
-
var callingCodeValue = ((props.callingCodes || []).
|
|
13
|
+
var callingCodeValue = ((props.callingCodes || []).slice().sort(function (a, b) {
|
|
14
|
+
return b.value - a.value;
|
|
15
|
+
}).find(function (c) {
|
|
14
16
|
return val.startsWith(c.value);
|
|
15
17
|
}) || (props.callingCodes || [])[0] || {}).value || '';
|
|
16
18
|
var phoneNumberValue = callingCodeValue ? val.replace(new RegExp('^' + callingCodeValue), '').replace(/^0*/, '') : val;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import Icon from '../../components/Icon';
|
|
3
4
|
|
|
4
5
|
var ListItem = function ListItem(_ref) {
|
|
5
6
|
var id = _ref.id,
|
|
@@ -23,7 +24,12 @@ var ListItem = function ListItem(_ref) {
|
|
|
23
24
|
{ className: 'info-item' },
|
|
24
25
|
i
|
|
25
26
|
);
|
|
26
|
-
})
|
|
27
|
+
}),
|
|
28
|
+
React.createElement(
|
|
29
|
+
'div',
|
|
30
|
+
{ className: 'info-expand-icon' },
|
|
31
|
+
React.createElement(Icon, { icon: 'angle-down' })
|
|
32
|
+
)
|
|
27
33
|
),
|
|
28
34
|
detail && React.createElement(
|
|
29
35
|
'div',
|
|
@@ -27,7 +27,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
27
27
|
var PhoneNumberInput = function PhoneNumberInput(props) {
|
|
28
28
|
var val = props.value || '';
|
|
29
29
|
|
|
30
|
-
var callingCodeValue = ((props.callingCodes || []).
|
|
30
|
+
var callingCodeValue = ((props.callingCodes || []).slice().sort(function (a, b) {
|
|
31
|
+
return b.value - a.value;
|
|
32
|
+
}).find(function (c) {
|
|
31
33
|
return val.startsWith(c.value);
|
|
32
34
|
}) || (props.callingCodes || [])[0] || {}).value || '';
|
|
33
35
|
var phoneNumberValue = callingCodeValue ? val.replace(new RegExp('^' + callingCodeValue), '').replace(/^0*/, '') : val;
|
|
@@ -12,6 +12,10 @@ var _classnames = require('classnames');
|
|
|
12
12
|
|
|
13
13
|
var _classnames2 = _interopRequireDefault(_classnames);
|
|
14
14
|
|
|
15
|
+
var _Icon = require('../../components/Icon');
|
|
16
|
+
|
|
17
|
+
var _Icon2 = _interopRequireDefault(_Icon);
|
|
18
|
+
|
|
15
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
20
|
|
|
17
21
|
var ListItem = function ListItem(_ref) {
|
|
@@ -36,7 +40,12 @@ var ListItem = function ListItem(_ref) {
|
|
|
36
40
|
{ className: 'info-item' },
|
|
37
41
|
i
|
|
38
42
|
);
|
|
39
|
-
})
|
|
43
|
+
}),
|
|
44
|
+
_react2.default.createElement(
|
|
45
|
+
'div',
|
|
46
|
+
{ className: 'info-expand-icon' },
|
|
47
|
+
_react2.default.createElement(_Icon2.default, { icon: 'angle-down' })
|
|
48
|
+
)
|
|
40
49
|
),
|
|
41
50
|
detail && _react2.default.createElement(
|
|
42
51
|
'div',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-core-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0-bethard",
|
|
4
4
|
"description": "tg-core-components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"webpack": "^3.0.0",
|
|
77
77
|
"webpack-blocks": "^1.0.0"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "6152a92217eebff8e197cc7c7e61a48d2a7d7140"
|
|
80
80
|
}
|