cloud-b2b 1.1.80 → 1.1.82

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.
Files changed (82) hide show
  1. package/es/Area/Area.js +16 -11
  2. package/es/CodeInput/CodeInput.js +19 -16
  3. package/es/Control/Control.js +4 -1
  4. package/es/Enhance/Dialogs.js +14 -11
  5. package/es/Enhance/Loading.js +18 -15
  6. package/es/Header/Header.js +20 -17
  7. package/es/Header/Vertical.js +14 -11
  8. package/es/ImageView/ImageView.js +13 -10
  9. package/es/InpurCascader/InputCascader.js +14 -11
  10. package/es/InputEditor/InputEditor.js +18 -16
  11. package/es/InputSearch/InputSearch.js +23 -20
  12. package/es/InputSelect/InputSelect.js +17 -14
  13. package/es/InputTreeSelect/InputTreeSelect.js +13 -10
  14. package/es/InputWriting/InputWriting.js +15 -12
  15. package/es/Layout/Layout.js +17 -14
  16. package/es/Link/Link.js +10 -7
  17. package/es/NumberInput/NumberInput.js +16 -13
  18. package/es/Search/Search.js +55 -52
  19. package/es/Search2/Search.js +86 -83
  20. package/es/Search2/Search.less +64 -64
  21. package/es/Search2/package.json +6 -6
  22. package/es/Sidebar/Sidebar.js +14 -11
  23. package/es/Sidebar2/Sidebar.js +16 -13
  24. package/es/SuperForm/SuperForm.js +79 -74
  25. package/es/SuperForm2/SuperForm.js +114 -108
  26. package/es/SuperPagination/SuperPagination.js +11 -8
  27. package/es/SuperTab/SuperTab.js +15 -12
  28. package/es/SuperTab2/SuperTab2.js +16 -13
  29. package/es/SuperTable/DragSortRow.js +15 -12
  30. package/es/SuperTable/FilterDropDown.js +14 -11
  31. package/es/SuperTable/SuperTable.js +73 -70
  32. package/es/SuperTable2/SuperTable2.js +92 -89
  33. package/es/SuperTable2/SuperTableCell.js +30 -27
  34. package/es/SuperTable3/FilterDropDown.js +14 -11
  35. package/es/SuperTable3/SuperTable.js +61 -58
  36. package/es/SuperToolbar/SuperToolbar.js +15 -12
  37. package/es/SuperUpload/SuperUpload.js +38 -38
  38. package/es/Viewer/ImageViews.js +19 -16
  39. package/es/Viewer/Viewer.js +14 -11
  40. package/es/helper.js +17 -18
  41. package/lib/Area/Area.js +16 -11
  42. package/lib/CodeInput/CodeInput.js +19 -16
  43. package/lib/Control/Control.js +4 -1
  44. package/lib/Enhance/Dialogs.js +14 -11
  45. package/lib/Enhance/Loading.js +18 -15
  46. package/lib/Header/Header.js +20 -17
  47. package/lib/Header/Vertical.js +14 -11
  48. package/lib/ImageView/ImageView.js +13 -10
  49. package/lib/InpurCascader/InputCascader.js +14 -11
  50. package/lib/InputEditor/InputEditor.js +18 -16
  51. package/lib/InputSearch/InputSearch.js +23 -20
  52. package/lib/InputSelect/InputSelect.js +17 -14
  53. package/lib/InputTreeSelect/InputTreeSelect.js +13 -10
  54. package/lib/InputWriting/InputWriting.js +15 -12
  55. package/lib/Layout/Layout.js +17 -14
  56. package/lib/LayoutLink/LayoutLink.js +2 -1
  57. package/lib/Link/Link.js +10 -7
  58. package/lib/NumberInput/NumberInput.js +16 -13
  59. package/lib/Search/Search.js +57 -53
  60. package/lib/Search2/Search.js +88 -84
  61. package/lib/Search2/Search.less +64 -64
  62. package/lib/Search2/package.json +6 -6
  63. package/lib/Sidebar/Sidebar.js +14 -11
  64. package/lib/Sidebar2/Sidebar.js +16 -13
  65. package/lib/SuperForm/SuperForm.js +81 -75
  66. package/lib/SuperForm2/SuperForm.js +116 -109
  67. package/lib/SuperPagination/SuperPagination.js +11 -8
  68. package/lib/SuperTab/SuperTab.js +15 -12
  69. package/lib/SuperTab2/SuperTab2.js +16 -13
  70. package/lib/SuperTable/DragSortRow.js +15 -12
  71. package/lib/SuperTable/FilterDropDown.js +14 -11
  72. package/lib/SuperTable/SuperTable.js +73 -70
  73. package/lib/SuperTable2/SuperTable2.js +94 -90
  74. package/lib/SuperTable2/SuperTableCell.js +30 -27
  75. package/lib/SuperTable3/FilterDropDown.js +14 -11
  76. package/lib/SuperTable3/SuperTable.js +61 -58
  77. package/lib/SuperToolbar/SuperToolbar.js +15 -12
  78. package/lib/SuperUpload/SuperUpload.js +40 -39
  79. package/lib/Viewer/ImageViews.js +19 -16
  80. package/lib/Viewer/Viewer.js +14 -11
  81. package/lib/helper.js +17 -18
  82. package/package.json +1 -1
@@ -2,18 +2,21 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
2
2
  import _extends from "@babel/runtime-corejs3/helpers/extends";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
5
7
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
6
8
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
10
  import _Select from "antd/es/select";
10
11
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
12
  import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
12
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
+ 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); }; }
14
+ 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; } }
14
15
  import React from 'react';
15
16
  var Option = _Select.Option;
16
17
  var InputWriting = /*#__PURE__*/function (_React$Component) {
18
+ _inherits(InputWriting, _React$Component);
19
+ var _super = _createSuper(InputWriting);
17
20
  function InputWriting() {
18
21
  var _context;
19
22
  var _this;
@@ -21,13 +24,13 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
21
24
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22
25
  args[_key] = arguments[_key];
23
26
  }
24
- _this = _callSuper(this, InputWriting, _concatInstanceProperty(_context = []).call(_context, args));
25
- _defineProperty(_this, "state", {
27
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
28
+ _defineProperty(_assertThisInitialized(_this), "state", {
26
29
  options: [],
27
30
  value: [],
28
31
  fetching: false
29
32
  });
30
- _defineProperty(_this, "onClick", function (e) {
33
+ _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
31
34
  var _this$props = _this.props,
32
35
  _this$props$options = _this$props.options,
33
36
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -37,21 +40,21 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
37
40
  onSearch(e.target.value);
38
41
  }
39
42
  });
40
- _defineProperty(_this, "onSearch", function (value) {
43
+ _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
41
44
  var onSearch = _this.props.onSearch;
42
45
  onSearch && onSearch(value);
43
46
  });
44
- _defineProperty(_this, "isMatch", function (inputValue, option) {
47
+ _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
45
48
  var _context2;
46
49
  return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
47
50
  });
48
- _defineProperty(_this, "toOption", function (option, index) {
51
+ _defineProperty(_assertThisInitialized(_this), "toOption", function (option, index) {
49
52
  return /*#__PURE__*/React.createElement(SelectOption, {
50
53
  key: index,
51
54
  value: String(option.value)
52
55
  }, option.title);
53
56
  });
54
- _defineProperty(_this, "onChange", function (keyValue) {
57
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (keyValue) {
55
58
  var _this$props2 = _this.props,
56
59
  onChange = _this$props2.onChange,
57
60
  value = _this$props2.value;
@@ -59,8 +62,7 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
59
62
  });
60
63
  return _this;
61
64
  }
62
- _inherits(InputWriting, _React$Component);
63
- return _createClass(InputWriting, [{
65
+ _createClass(InputWriting, [{
64
66
  key: "render",
65
67
  value: function render() {
66
68
  var value = this.props.value;
@@ -83,5 +85,6 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
83
85
  })));
84
86
  }
85
87
  }]);
88
+ return InputWriting;
86
89
  }(React.Component);
87
90
  export default InputWriting;
@@ -2,12 +2,13 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
2
2
  import _Button from "antd/es/button";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
5
7
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
6
8
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
+ 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); }; }
11
+ 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; } }
11
12
  import _Object$keys2 from "@babel/runtime-corejs3/core-js-stable/object/keys";
12
13
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
13
14
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
@@ -41,17 +42,19 @@ var getCurrentSideKey = function getCurrentSideKey() {
41
42
  }
42
43
  };
43
44
  var Layout = /*#__PURE__*/function (_React$Component) {
45
+ _inherits(Layout, _React$Component);
46
+ var _super = _createSuper(Layout);
44
47
  function Layout(props) {
45
48
  var _this;
46
49
  _classCallCheck(this, Layout);
47
- _this = _callSuper(this, Layout, [props]);
48
- _defineProperty(_this, "onOpenChange", function (sideKey, openKeys) {
50
+ _this = _super.call(this, props);
51
+ _defineProperty(_assertThisInitialized(_this), "onOpenChange", function (sideKey, openKeys) {
49
52
  var onOpenChange = _this.props.onOpenChange;
50
53
  if (onOpenChange) {
51
54
  onOpenChange(sideKey, openKeys);
52
55
  }
53
56
  });
54
- _defineProperty(_this, "getSidebarProps", function (sideKey) {
57
+ _defineProperty(_assertThisInitialized(_this), "getSidebarProps", function (sideKey) {
55
58
  var _context3;
56
59
  var _this$props = _this.props,
57
60
  sidebars = _this$props.sidebars,
@@ -68,7 +71,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
68
71
  activeKey: nav2,
69
72
  items: sides,
70
73
  openKeys: openKeys[sideKey] || [],
71
- onOpenChange: _bindInstanceProperty(_context3 = _this.onOpenChange).call(_context3, _this, sideKey),
74
+ onOpenChange: _bindInstanceProperty(_context3 = _this.onOpenChange).call(_context3, _assertThisInitialized(_this), sideKey),
72
75
  onModeChange: function onModeChange(mode) {
73
76
  return _this.setState({
74
77
  mode: mode
@@ -76,7 +79,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
76
79
  }
77
80
  };
78
81
  });
79
- _defineProperty(_this, "toSidebar", function (sideKey) {
82
+ _defineProperty(_assertThisInitialized(_this), "toSidebar", function (sideKey) {
80
83
  var hasHeaderV = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
81
84
  if (!sideKey) {
82
85
  return null;
@@ -88,7 +91,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
88
91
  }, /*#__PURE__*/React.createElement(Sidebar, _this.getSidebarProps(sideKey)));
89
92
  }
90
93
  });
91
- _defineProperty(_this, "toHeader", function () {
94
+ _defineProperty(_assertThisInitialized(_this), "toHeader", function () {
92
95
  var _context4, _context5;
93
96
  var _this$props2 = _this.props,
94
97
  loading = _this$props2.loading,
@@ -120,7 +123,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
120
123
  onLogout: onLogout
121
124
  });
122
125
  });
123
- _defineProperty(_this, "headerVProps", function (selectKey) {
126
+ _defineProperty(_assertThisInitialized(_this), "headerVProps", function (selectKey) {
124
127
  var _context6;
125
128
  var keys = ['setting', 'message'];
126
129
  return {
@@ -137,8 +140,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
137
140
  };
138
141
  return _this;
139
142
  }
140
- _inherits(Layout, _React$Component);
141
- return _createClass(Layout, [{
143
+ _createClass(Layout, [{
142
144
  key: "componentWillReceiveProps",
143
145
  value: function componentWillReceiveProps(props) {
144
146
  if (!props.loading) {
@@ -151,7 +153,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
151
153
  }, {
152
154
  key: "render",
153
155
  value: function render() {
154
- var _context0;
156
+ var _context10;
155
157
  var _this$props3 = this.props,
156
158
  loading = _this$props3.loading,
157
159
  sidebars = _this$props3.sidebars,
@@ -167,7 +169,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
167
169
  var _context9;
168
170
  return !_includesInstanceProperty(_context9 = ['setting', 'message']).call(_context9, item.key);
169
171
  }).length > 1;
170
- var sideKey = loading || !nav2 ? '' : getCurrentSideKey(sidebars, _concatInstanceProperty(_context0 = "/".concat(nav1, "/")).call(_context0, nav2));
172
+ var sideKey = loading || !nav2 ? '' : getCurrentSideKey(sidebars, _concatInstanceProperty(_context10 = "/".concat(nav1, "/")).call(_context10, nav2));
171
173
  return noPrivilege ? /*#__PURE__*/React.createElement("div", {
172
174
  style: {
173
175
  textAlign: 'center'
@@ -186,6 +188,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
186
188
  }, this.toHeader(sideKey), loading ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement("div", null, hasV ? /*#__PURE__*/React.createElement(HeaderV, this.headerVProps(sideKey)) : null, this.toSidebar(sideKey, hasV), /*#__PURE__*/React.createElement("section", null, children)));
187
189
  }
188
190
  }]);
191
+ return Layout;
189
192
  }(React.Component);
190
193
  _defineProperty(Layout, "propTypes", {
191
194
  children: PropTypes.node.isRequired,
package/es/Link/Link.js CHANGED
@@ -3,14 +3,15 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
4
4
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
5
5
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
6
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
7
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
6
8
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
7
9
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
8
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
9
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
11
  var _excluded = ["to", "children", "disabled"];
11
12
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
12
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
+ 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); }; }
14
+ 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; } }
14
15
  import React from 'react';
15
16
  import PropTypes from 'prop-types';
16
17
  import history from '../history';
@@ -28,6 +29,8 @@ function jump(url) {
28
29
  }
29
30
  }
30
31
  var Link = /*#__PURE__*/function (_React$Component) {
32
+ _inherits(Link, _React$Component);
33
+ var _super = _createSuper(Link);
31
34
  function Link() {
32
35
  var _context;
33
36
  var _this;
@@ -35,8 +38,8 @@ var Link = /*#__PURE__*/function (_React$Component) {
35
38
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
36
39
  args[_key] = arguments[_key];
37
40
  }
38
- _this = _callSuper(this, Link, _concatInstanceProperty(_context = []).call(_context, args));
39
- _defineProperty(_this, "handleClick", function (event) {
41
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
42
+ _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
40
43
  if (_this.props.onClick) {
41
44
  _this.props.onClick(event);
42
45
  }
@@ -51,8 +54,7 @@ var Link = /*#__PURE__*/function (_React$Component) {
51
54
  });
52
55
  return _this;
53
56
  }
54
- _inherits(Link, _React$Component);
55
- return _createClass(Link, [{
57
+ _createClass(Link, [{
56
58
  key: "render",
57
59
  value: function render() {
58
60
  var _this$props = this.props,
@@ -71,6 +73,7 @@ var Link = /*#__PURE__*/function (_React$Component) {
71
73
  }
72
74
  }
73
75
  }]);
76
+ return Link;
74
77
  }(React.Component);
75
78
  _defineProperty(Link, "propTypes", {
76
79
  to: PropTypes.string,
@@ -10,14 +10,15 @@ import _Input from "antd/es/input";
10
10
  import _extends from "@babel/runtime-corejs3/helpers/extends";
11
11
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
12
12
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
13
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
13
15
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
14
16
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
15
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
17
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
18
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
19
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
20
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
20
+ 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); }; }
21
+ 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; } }
21
22
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
22
23
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
23
24
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
@@ -100,6 +101,8 @@ var PROPS = {
100
101
  };
101
102
  var PROPS_KEYS = _Object$keys(PROPS);
102
103
  var NumberInput = /*#__PURE__*/function (_React$Component) {
104
+ _inherits(NumberInput, _React$Component);
105
+ var _super = _createSuper(NumberInput);
103
106
  function NumberInput() {
104
107
  var _context2;
105
108
  var _this;
@@ -107,12 +110,12 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
107
110
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
108
111
  args[_key] = arguments[_key];
109
112
  }
110
- _this = _callSuper(this, NumberInput, _concatInstanceProperty(_context2 = []).call(_context2, args));
111
- _defineProperty(_this, "state", {
113
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context2 = [this]).call(_context2, args));
114
+ _defineProperty(_assertThisInitialized(_this), "state", {
112
115
  typo: false,
113
116
  value: ''
114
117
  });
115
- _defineProperty(_this, "onChange", function (event) {
118
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (event) {
116
119
  var value = event.target.value;
117
120
  if (!_this.hasSpecialChar(value)) {
118
121
  _this.setState({
@@ -121,7 +124,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
121
124
  });
122
125
  }
123
126
  });
124
- _defineProperty(_this, "onBlur", function (event) {
127
+ _defineProperty(_assertThisInitialized(_this), "onBlur", function (event) {
125
128
  var _this$props = _this.props,
126
129
  onBlur = _this$props.onBlur,
127
130
  onChange = _this$props.onChange,
@@ -140,7 +143,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
140
143
  onBlur && onBlur(event); //有输入才触发外部失去焦点事件,避免非必要请求
141
144
  }
142
145
  });
143
- _defineProperty(_this, "hasSpecialChar", function (value) {
146
+ _defineProperty(_assertThisInitialized(_this), "hasSpecialChar", function (value) {
144
147
  if (_includesInstanceProperty(value).call(value, '+')) {
145
148
  return true;
146
149
  } else if (!_this.props.sign && _includesInstanceProperty(value).call(value, '-')) {
@@ -149,7 +152,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
149
152
  return !_this.props.real && _includesInstanceProperty(value).call(value, '.');
150
153
  }
151
154
  });
152
- _defineProperty(_this, "format", function (value, fixed) {
155
+ _defineProperty(_assertThisInitialized(_this), "format", function (value, fixed) {
153
156
  var _this$props2 = _this.props,
154
157
  real = _this$props2.real,
155
158
  sign = _this$props2.sign,
@@ -165,7 +168,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
165
168
  big: big
166
169
  });
167
170
  });
168
- _defineProperty(_this, "getShowValue", function () {
171
+ _defineProperty(_assertThisInitialized(_this), "getShowValue", function () {
169
172
  if (_this.state.typo) {
170
173
  // 处于输入状态从state中取值
171
174
  return _this.state.value;
@@ -174,7 +177,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
174
177
  return _this.format(_this.props.defaultValue, _this.props.fixed).value;
175
178
  }
176
179
  });
177
- _defineProperty(_this, "getProps", function () {
180
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
178
181
  var props = getObjectExclude(_this.props, PROPS_KEYS);
179
182
  return _objectSpread(_objectSpread({}, props), {}, {
180
183
  type: 'text',
@@ -186,8 +189,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
186
189
  });
187
190
  return _this;
188
191
  }
189
- _inherits(NumberInput, _React$Component);
190
- return _createClass(NumberInput, [{
192
+ _createClass(NumberInput, [{
191
193
  key: "render",
192
194
  value: function render() {
193
195
  return /*#__PURE__*/React.createElement(_Input, _extends({}, this.getProps(), {
@@ -197,6 +199,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
197
199
  }));
198
200
  }
199
201
  }]);
202
+ return NumberInput;
200
203
  }(React.Component);
201
204
  _defineProperty(NumberInput, "propTypes", PROPS);
202
205
  export default NumberInput;