cloud-b2b 1.1.85 → 1.1.87

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 +48 -23
  2. package/es/CodeInput/CodeInput.js +16 -19
  3. package/es/Enhance/Dialogs.js +11 -14
  4. package/es/Enhance/Loading.js +15 -18
  5. package/es/Header/Header.js +17 -20
  6. package/es/Header/Vertical.js +11 -14
  7. package/es/ImageView/ImageView.js +10 -13
  8. package/es/InpurCascader/InputCascader.js +11 -14
  9. package/es/InputEditor/InputEditor.js +16 -18
  10. package/es/InputSearch/InputSearch.js +20 -23
  11. package/es/InputSelect/InputSelect.js +14 -17
  12. package/es/InputTreeSelect/InputTreeSelect.js +10 -13
  13. package/es/InputWriting/InputWriting.js +12 -15
  14. package/es/Layout/Layout.js +14 -17
  15. package/es/Link/Link.js +7 -10
  16. package/es/NumberInput/NumberInput.js +13 -16
  17. package/es/Search/Search.js +52 -55
  18. package/es/Search2/Search.js +83 -86
  19. package/es/Search2/Search.less +64 -64
  20. package/es/Search2/package.json +6 -6
  21. package/es/Sidebar/Sidebar.js +11 -14
  22. package/es/Sidebar2/Sidebar.js +13 -16
  23. package/es/SuperForm/SuperForm.js +74 -79
  24. package/es/SuperForm2/SuperForm.js +112 -114
  25. package/es/SuperPagination/SuperPagination.js +8 -11
  26. package/es/SuperTab/SuperTab.js +12 -15
  27. package/es/SuperTab2/SuperTab2.js +13 -16
  28. package/es/SuperTable/DragSortRow.js +12 -15
  29. package/es/SuperTable/FilterDropDown.js +11 -14
  30. package/es/SuperTable/SuperTable.js +139 -94
  31. package/es/SuperTable/SuperTable.less +11 -0
  32. package/es/SuperTable2/SuperTable2.js +89 -92
  33. package/es/SuperTable2/SuperTableCell.js +27 -30
  34. package/es/SuperTable3/FilterDropDown.js +11 -14
  35. package/es/SuperTable3/SuperTable.js +58 -61
  36. package/es/SuperToolbar/SuperToolbar.js +12 -15
  37. package/es/SuperUpload/SuperUpload.js +38 -38
  38. package/es/Viewer/ImageViews.js +16 -19
  39. package/es/Viewer/Viewer.js +11 -14
  40. package/es/helper.js +18 -17
  41. package/lib/Area/Area.js +49 -25
  42. package/lib/CodeInput/CodeInput.js +16 -19
  43. package/lib/Enhance/Dialogs.js +11 -14
  44. package/lib/Enhance/Loading.js +15 -18
  45. package/lib/Header/Header.js +17 -20
  46. package/lib/Header/Vertical.js +11 -14
  47. package/lib/ImageView/ImageView.js +10 -13
  48. package/lib/InpurCascader/InputCascader.js +11 -14
  49. package/lib/InputEditor/InputEditor.js +16 -18
  50. package/lib/InputSearch/InputSearch.js +20 -23
  51. package/lib/InputSelect/InputSelect.js +14 -17
  52. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  53. package/lib/InputWriting/InputWriting.js +12 -15
  54. package/lib/Layout/Layout.js +14 -17
  55. package/lib/LayoutLink/LayoutLink.js +1 -2
  56. package/lib/Link/Link.js +7 -10
  57. package/lib/NumberInput/NumberInput.js +13 -16
  58. package/lib/Search/Search.js +53 -57
  59. package/lib/Search2/Search.js +84 -88
  60. package/lib/Search2/Search.less +64 -64
  61. package/lib/Search2/package.json +6 -6
  62. package/lib/Sidebar/Sidebar.js +11 -14
  63. package/lib/Sidebar2/Sidebar.js +13 -16
  64. package/lib/SuperForm/SuperForm.js +75 -81
  65. package/lib/SuperForm2/SuperForm.js +113 -116
  66. package/lib/SuperPagination/SuperPagination.js +8 -11
  67. package/lib/SuperTab/SuperTab.js +12 -15
  68. package/lib/SuperTab2/SuperTab2.js +13 -16
  69. package/lib/SuperTable/DragSortRow.js +12 -15
  70. package/lib/SuperTable/FilterDropDown.js +11 -14
  71. package/lib/SuperTable/SuperTable.js +139 -94
  72. package/lib/SuperTable/SuperTable.less +11 -0
  73. package/lib/SuperTable2/SuperTable2.js +90 -94
  74. package/lib/SuperTable2/SuperTableCell.js +27 -30
  75. package/lib/SuperTable3/FilterDropDown.js +11 -14
  76. package/lib/SuperTable3/SuperTable.js +58 -61
  77. package/lib/SuperToolbar/SuperToolbar.js +12 -15
  78. package/lib/SuperUpload/SuperUpload.js +39 -40
  79. package/lib/Viewer/ImageViews.js +16 -19
  80. package/lib/Viewer/Viewer.js +11 -14
  81. package/lib/helper.js +18 -17
  82. package/package.json +1 -1
package/es/Area/Area.js CHANGED
@@ -12,21 +12,22 @@ import _typeof from "@babel/runtime-corejs3/helpers/typeof";
12
12
  import _Icon from "antd/es/icon";
13
13
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
14
14
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
15
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
16
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
17
15
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
18
16
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
17
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
19
18
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
20
19
  import _Button from "antd/es/button";
21
20
  import _extends from "@babel/runtime-corejs3/helpers/extends";
22
21
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
23
22
  var _excluded = ["type", "children"];
24
23
  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; }
25
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
26
- 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); }; }
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; } }
24
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
26
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
27
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
29
28
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
29
+ import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
30
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
30
31
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
31
32
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
32
33
  import React from 'react';
@@ -47,6 +48,7 @@ var ButtonEx = function ButtonEx(_ref) {
47
48
  props = _objectWithoutProperties(_ref, _excluded);
48
49
  props[type === 'primary-o' ? 'data-btn-type' : 'type'] = type;
49
50
  return /*#__PURE__*/React.createElement(_Button, _extends({
51
+ disabled: true,
50
52
  style: {
51
53
  marginLeft: 2
52
54
  }
@@ -54,13 +56,11 @@ var ButtonEx = function ButtonEx(_ref) {
54
56
  };
55
57
  var PROPS_KEYS = _Object$keys(PROPS);
56
58
  var Area = /*#__PURE__*/function (_React$Component) {
57
- _inherits(Area, _React$Component);
58
- var _super = _createSuper(Area);
59
59
  function Area(_props) {
60
60
  var _this;
61
61
  _classCallCheck(this, Area);
62
- _this = _super.call(this, _props);
63
- _defineProperty(_assertThisInitialized(_this), "onChange", function (key, keyValue) {
62
+ _this = _callSuper(this, Area, [_props]);
63
+ _defineProperty(_this, "onChange", function (key, keyValue) {
64
64
  var _this$props = _this.props,
65
65
  onParentChange = _this$props.onParentChange,
66
66
  child = _this$props.child,
@@ -82,7 +82,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
82
82
  return onParentChange && onParentChange(_this.state.value);
83
83
  });
84
84
  });
85
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (key, control, parentKey, KeyValue) {
85
+ _defineProperty(_this, "onSearch", function (key, control, parentKey, KeyValue) {
86
86
  var _this$props2 = _this.props,
87
87
  onAreaSearch = _this$props2.onAreaSearch,
88
88
  child = _this$props2.child,
@@ -100,19 +100,22 @@ var Area = /*#__PURE__*/function (_React$Component) {
100
100
  });
101
101
  return flag ? onAreaSearch && onAreaSearch(key, KeyValue, parentKey) : helper.showError('请输入上级选择器');
102
102
  });
103
- _defineProperty(_assertThisInitialized(_this), "toControl", function (item, props) {
103
+ _defineProperty(_this, "toControl", function (item, props) {
104
104
  if (item.type === 'button') {
105
105
  var key = item.key,
106
106
  title = item.title,
107
107
  type = item.bsStyle,
108
108
  _item$size = item.size,
109
109
  size = _item$size === void 0 ? 'small' : _item$size;
110
- var onClick = props.onClick;
110
+ var onClick = props.onClick,
111
+ _props$btnDisabled = props.btnDisabled,
112
+ disabled = _props$btnDisabled === void 0 ? false : _props$btnDisabled;
111
113
  return /*#__PURE__*/React.createElement(ButtonEx, {
112
114
  key: key,
113
115
  size: size,
114
116
  type: type,
115
- onClick: onClick
117
+ onClick: onClick,
118
+ disabled: disabled
116
119
  }, title);
117
120
  } else if (item.type === 'icon') {
118
121
  var _onClick = props.onClick;
@@ -125,6 +128,25 @@ var Area = /*#__PURE__*/function (_React$Component) {
125
128
  style: style,
126
129
  onClick: _onClick
127
130
  });
131
+ } else if (item.type === 'link') {
132
+ var _onClick2 = props.onClick,
133
+ value = props.value;
134
+ var list = value && _Array$isArray(value) ? value : [];
135
+ return /*#__PURE__*/React.createElement("div", {
136
+ style: {
137
+ whiteSpace: 'pre-wrap'
138
+ }
139
+ }, _mapInstanceProperty(list).call(list, function (item2, index2) {
140
+ var _context;
141
+ var split = index2 === list.length - 1 ? '' : ',';
142
+ var onLink = function onLink() {
143
+ _onClick2 && _onClick2();
144
+ };
145
+ return /*#__PURE__*/React.createElement("a", {
146
+ key: index2,
147
+ onClick: onLink
148
+ }, _concatInstanceProperty(_context = "".concat(item2[item.linkTitleKey])).call(_context, split));
149
+ }));
128
150
  } else {
129
151
  if (props.type === 'readonly') {
130
152
  props.value = getTitle(props.value, props.options);
@@ -132,7 +154,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
132
154
  return /*#__PURE__*/React.createElement(Control, props);
133
155
  }
134
156
  });
135
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
157
+ _defineProperty(_this, "onClick", function (e) {
136
158
  var onClick = _this.props.onClick;
137
159
  var key = _typeof(e) === 'object' ? e.key : e;
138
160
  onClick && onClick(key);
@@ -143,7 +165,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
143
165
  };
144
166
  return _this;
145
167
  }
146
- _createClass(Area, [{
168
+ _inherits(Area, _React$Component);
169
+ return _createClass(Area, [{
147
170
  key: "componentWillReceiveProps",
148
171
  value: function componentWillReceiveProps(props) {
149
172
  if (props.value !== this.props.value) {
@@ -168,11 +191,12 @@ var Area = /*#__PURE__*/function (_React$Component) {
168
191
  _this$props3$size = _this$props3.size,
169
192
  size = _this$props3$size === void 0 ? defaultSize : _this$props3$size,
170
193
  _this$props3$required = _this$props3.requiredColor,
171
- requiredColor = _this$props3$required === void 0 ? false : _this$props3$required;
194
+ requiredColor = _this$props3$required === void 0 ? false : _this$props3$required,
195
+ btnDisabled = _this$props3.btnDisabled;
172
196
  return /*#__PURE__*/React.createElement(_Row, null, _mapInstanceProperty(child).call(child, function (item, index) {
173
- var _context, _context2, _context3, _context4;
197
+ var _context2, _context3, _context4, _context5;
174
198
  var childOptions = [];
175
- if (_includesInstanceProperty(_context = _Object$keys(options)).call(_context, item.key)) {
199
+ if (_includesInstanceProperty(_context2 = _Object$keys(options)).call(_context2, item.key)) {
176
200
  if (index === 0) {
177
201
  childOptions = options[item.key];
178
202
  } else {
@@ -180,12 +204,14 @@ var Area = /*#__PURE__*/function (_React$Component) {
180
204
  childOptions = helper.isEmpty2(value[upKey]) || _Object$keys(value[upKey]).length === 0 ? [] : options[item.key];
181
205
  }
182
206
  }
183
- var props = _objectSpread(_objectSpread({}, item), {}, {
207
+ var props = _objectSpread(_objectSpread({
208
+ btnDisabled: btnDisabled
209
+ }, item), {}, {
184
210
  size: size,
185
211
  isBgColor: item.required && requiredColor,
186
- onSearch: _bindInstanceProperty(_context2 = _this2.onSearch).call(_context2, _this2, item.key, item, parentKey),
187
- onChange: _bindInstanceProperty(_context3 = _this2.onChange).call(_context3, _this2, item.key),
188
- onClick: _bindInstanceProperty(_context4 = _this2.onClick).call(_context4, _this2, item.key),
212
+ onSearch: _bindInstanceProperty(_context3 = _this2.onSearch).call(_context3, _this2, item.key, item, parentKey),
213
+ onChange: _bindInstanceProperty(_context4 = _this2.onChange).call(_context4, _this2, item.key),
214
+ onClick: _bindInstanceProperty(_context5 = _this2.onClick).call(_context5, _this2, item.key),
189
215
  options: childOptions,
190
216
  value: value[item.key] && value[item.key].title ? value[item.key].title : value[item.key],
191
217
  type: readonly ? 'readonly' : item.type,
@@ -199,6 +225,5 @@ var Area = /*#__PURE__*/function (_React$Component) {
199
225
  }));
200
226
  }
201
227
  }]);
202
- return Area;
203
228
  }(React.Component);
204
229
  export default Area;
@@ -11,16 +11,15 @@ import _Input from "antd/es/input";
11
11
  import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
12
12
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
13
13
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
14
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
15
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
14
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
17
15
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
16
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
18
17
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
19
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; }
20
19
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
21
20
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
22
- 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); }; }
23
- 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
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
23
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
25
24
  import _setInterval from "@babel/runtime-corejs3/core-js-stable/set-interval";
26
25
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
@@ -42,30 +41,28 @@ var PROPS = {
42
41
  };
43
42
  var PROPS_KEYS = _Object$keys(PROPS);
44
43
  var CodeInput = /*#__PURE__*/function (_React$Component) {
45
- _inherits(CodeInput, _React$Component);
46
- var _super = _createSuper(CodeInput);
47
44
  function CodeInput(_props) {
48
45
  var _this;
49
46
  _classCallCheck(this, CodeInput);
50
- _this = _super.call(this, _props);
51
- _defineProperty(_assertThisInitialized(_this), "onGetCode", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
47
+ _this = _callSuper(this, CodeInput, [_props]);
48
+ _defineProperty(_this, "onGetCode", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
52
49
  var onGetCode, that, s;
53
- return _regeneratorRuntime.wrap(function _callee$(_context) {
50
+ return _regeneratorRuntime.wrap(function (_context) {
54
51
  while (1) switch (_context.prev = _context.next) {
55
52
  case 0:
56
53
  // const url = await helper.fetchJson();
57
54
  onGetCode = _this.props.onGetCode;
58
- _context.next = 3;
55
+ _context.next = 1;
59
56
  return onGetCode && onGetCode();
60
- case 3:
57
+ case 1:
61
58
  if (!_context.sent) {
62
- _context.next = 7;
59
+ _context.next = 2;
63
60
  break;
64
61
  }
65
62
  _this.setState({
66
63
  time: _this.props.time || 60
67
64
  });
68
- that = _assertThisInitialized(_this);
65
+ that = _this;
69
66
  s = _setInterval(function () {
70
67
  that.setState({
71
68
  time: that.state.time -= 1
@@ -74,15 +71,15 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
74
71
  clearInterval(s);
75
72
  }
76
73
  }, 1000);
77
- case 7:
74
+ case 2:
78
75
  ;
79
- case 8:
76
+ case 3:
80
77
  case "end":
81
78
  return _context.stop();
82
79
  }
83
80
  }, _callee);
84
81
  })));
85
- _defineProperty(_assertThisInitialized(_this), "btnProps", function (props) {
82
+ _defineProperty(_this, "btnProps", function (props) {
86
83
  var btnProps = _Object$assign(helper.getObjectExclude(props, ['onGetCode']));
87
84
  return _objectSpread(_objectSpread({}, btnProps), {}, {
88
85
  size: 'large',
@@ -90,7 +87,7 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
90
87
  onClick: _this.onGetCode
91
88
  });
92
89
  });
93
- _defineProperty(_assertThisInitialized(_this), "inputProps", function (props) {
90
+ _defineProperty(_this, "inputProps", function (props) {
94
91
  var inpPros = _Object$assign(helper.getObjectExclude(props, ['onGetCode', 'value']));
95
92
  return _objectSpread(_objectSpread({}, inpPros), {}, {
96
93
  size: 'large',
@@ -103,7 +100,8 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
103
100
  };
104
101
  return _this;
105
102
  }
106
- _createClass(CodeInput, [{
103
+ _inherits(CodeInput, _React$Component);
104
+ return _createClass(CodeInput, [{
107
105
  key: "render",
108
106
  value: function render() {
109
107
  var _this$props = this.props,
@@ -118,6 +116,5 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
118
116
  }, /*#__PURE__*/React.createElement(_Input, this.inputProps(this.props)), /*#__PURE__*/React.createElement(_Button, this.btnProps(this.props), time === 0 ? "\u83B7\u53D6\u9A8C\u8BC1\u7801" : "".concat(time, "s\u83B7\u53D6\u9A8C\u8BC1\u7801")));
119
117
  }
120
118
  }]);
121
- return CodeInput;
122
119
  }(React.Component);
123
120
  export default CodeInput;
@@ -1,43 +1,41 @@
1
1
  import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
2
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
8
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
10
9
  import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
11
- 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); }; }
12
- 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; } }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  import React from 'react';
14
13
  import { getObjectExclude } from '../helper';
15
14
  var Enhance = function Enhance(Container, keys, Dialogs) {
16
15
  var noContainer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
17
16
  return /*#__PURE__*/function (_React$Component) {
18
- _inherits(_class2, _React$Component);
19
- var _super = _createSuper(_class2);
20
- function _class2() {
17
+ function _class() {
21
18
  var _context;
22
19
  var _this;
23
- _classCallCheck(this, _class2);
20
+ _classCallCheck(this, _class);
24
21
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
22
  args[_key] = arguments[_key];
26
23
  }
27
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
28
- _defineProperty(_assertThisInitialized(_this), "toDialogs", function () {
24
+ _this = _callSuper(this, _class, _concatInstanceProperty(_context = []).call(_context, args));
25
+ _defineProperty(_this, "toDialogs", function () {
29
26
  return _reduceInstanceProperty(keys).call(keys, function (result, key, index) {
30
27
  var Dialog = Dialogs[index];
31
- _this.props[key] && result.push( /*#__PURE__*/React.createElement(Dialog, {
28
+ _this.props[key] && result.push(/*#__PURE__*/React.createElement(Dialog, {
32
29
  key: key,
33
- container: _assertThisInitialized(_this)
30
+ container: _this
34
31
  }));
35
32
  return result;
36
33
  }, []);
37
34
  });
38
35
  return _this;
39
36
  }
40
- _createClass(_class2, [{
37
+ _inherits(_class, _React$Component);
38
+ return _createClass(_class, [{
41
39
  key: "render",
42
40
  value: function render() {
43
41
  var props = getObjectExclude(this.props, keys);
@@ -46,7 +44,6 @@ var Enhance = function Enhance(Container, keys, Dialogs) {
46
44
  }, /*#__PURE__*/React.createElement(Container, props), this.toDialogs());
47
45
  }
48
46
  }]);
49
- return _class2;
50
47
  }(React.Component);
51
48
  };
52
49
  export default Enhance;
@@ -9,16 +9,15 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
9
9
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
10
10
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
11
11
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
12
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
13
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
12
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
13
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
15
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
16
  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
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
19
18
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
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; } }
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; })(); }
22
21
  import React from 'react';
23
22
  import PropTypes from 'prop-types';
24
23
  import Loading from '../Loading';
@@ -40,19 +39,17 @@ var STATUS = ['loadingWithInit',
40
39
  * onRefreshForHome:[可选],检测到来至首页时会触发该事件,原型为func()
41
40
  */
42
41
  var Enhance = function Enhance(Component) {
43
- var _class;
44
- return _class = /*#__PURE__*/function (_React$Component) {
45
- _inherits(_class, _React$Component);
46
- var _super = _createSuper(_class);
47
- function _class() {
42
+ var _Class;
43
+ return _Class = /*#__PURE__*/function (_React$Component) {
44
+ function _Class() {
48
45
  var _context;
49
46
  var _this;
50
- _classCallCheck(this, _class);
47
+ _classCallCheck(this, _Class);
51
48
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
52
49
  args[_key] = arguments[_key];
53
50
  }
54
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
55
- _defineProperty(_assertThisInitialized(_this), "triggerEvent", function () {
51
+ _this = _callSuper(this, _Class, _concatInstanceProperty(_context = []).call(_context, args));
52
+ _defineProperty(_this, "triggerEvent", function () {
56
53
  if (!global.isServer) {
57
54
  var _this$props = _this.props,
58
55
  _this$props$status = _this$props.status,
@@ -79,13 +76,13 @@ var Enhance = function Enhance(Component) {
79
76
  }
80
77
  }
81
78
  });
82
- _defineProperty(_assertThisInitialized(_this), "onRetry", function () {
79
+ _defineProperty(_this, "onRetry", function () {
83
80
  var _this$props2 = _this.props,
84
81
  status = _this$props2.status,
85
82
  onInit = _this$props2.onInit;
86
83
  onInit && onInit(status === 'retryForHome');
87
84
  });
88
- _defineProperty(_assertThisInitialized(_this), "getPageProps", function () {
85
+ _defineProperty(_this, "getPageProps", function () {
89
86
  var props = _objectSpread({}, _this.props);
90
87
  delete props.status;
91
88
  delete props.home;
@@ -95,7 +92,8 @@ var Enhance = function Enhance(Component) {
95
92
  });
96
93
  return _this;
97
94
  }
98
- _createClass(_class, [{
95
+ _inherits(_Class, _React$Component);
96
+ return _createClass(_Class, [{
99
97
  key: "componentDidMount",
100
98
  value: function componentDidMount() {
101
99
  this.triggerEvent();
@@ -120,12 +118,11 @@ var Enhance = function Enhance(Component) {
120
118
  }
121
119
  }
122
120
  }]);
123
- return _class;
124
- }(React.Component), _defineProperty(_class, "propTypes", {
121
+ }(React.Component), _defineProperty(_Class, "propTypes", {
125
122
  status: PropTypes.oneOf(STATUS),
126
123
  home: PropTypes.bool,
127
124
  onInit: PropTypes.func,
128
125
  onRefreshForHome: PropTypes.func
129
- }), _class;
126
+ }), _Class;
130
127
  };
131
128
  export default Enhance;
@@ -11,16 +11,15 @@ import _Dropdown from "antd/es/dropdown";
11
11
  import _Badge from "antd/es/badge";
12
12
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
13
13
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
14
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
15
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
14
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
17
15
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
16
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
18
17
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
19
18
  import _Menu from "antd/es/menu";
20
19
  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; }
21
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
22
- 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); }; }
23
- 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
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
23
  import React from 'react';
25
24
  import Link from '../Link';
26
25
  import SuperIcon from '../SuperIcon';
@@ -29,13 +28,11 @@ import Vertical from './Vertical';
29
28
  import variables from '../variables';
30
29
  var MenuItem = _Menu.Item;
31
30
  var Header = /*#__PURE__*/function (_React$Component) {
32
- _inherits(Header, _React$Component);
33
- var _super = _createSuper(Header);
34
31
  function Header(_props) {
35
32
  var _this;
36
33
  _classCallCheck(this, Header);
37
- _this = _super.call(this, _props);
38
- _defineProperty(_assertThisInitialized(_this), "toLogo", function () {
34
+ _this = _callSuper(this, Header, [_props]);
35
+ _defineProperty(_this, "toLogo", function () {
39
36
  var img = _this.props.logoImg || '/logo.png';
40
37
  var props = _this.getLinkProps('home', _this.state['main'] || _this.props.homeUrl || '/', {
41
38
  role: 'logo'
@@ -45,7 +42,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
45
42
  alt: "logo"
46
43
  }));
47
44
  });
48
- _defineProperty(_assertThisInitialized(_this), "toIcon", function (type) {
45
+ _defineProperty(_this, "toIcon", function (type) {
49
46
  var style = {
50
47
  fontSize: 18,
51
48
  verticalAlign: 'middle'
@@ -55,7 +52,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
55
52
  style: style
56
53
  });
57
54
  });
58
- _defineProperty(_assertThisInitialized(_this), "getLinkProps", function (key, url) {
55
+ _defineProperty(_this, "getLinkProps", function (key, url) {
59
56
  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
60
57
  return _objectSpread(_objectSpread({}, props), {}, {
61
58
  to: url,
@@ -63,7 +60,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
63
60
  'data-active': _this.props.selectKey === key ? 'true' : null
64
61
  });
65
62
  });
66
- _defineProperty(_assertThisInitialized(_this), "toSetting", function (settingUrl) {
63
+ _defineProperty(_this, "toSetting", function (settingUrl) {
67
64
  if (settingUrl) {
68
65
  var props = _this.getLinkProps('setting', _this.state['setting'] || settingUrl);
69
66
  return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('pld-setting'));
@@ -71,7 +68,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
71
68
  return null;
72
69
  }
73
70
  });
74
- _defineProperty(_assertThisInitialized(_this), "toMessage", function (messageUrl) {
71
+ _defineProperty(_this, "toMessage", function (messageUrl) {
75
72
  var count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
76
73
  if (messageUrl) {
77
74
  var props = _this.getLinkProps('message', _this.state['message'] || messageUrl);
@@ -87,12 +84,12 @@ var Header = /*#__PURE__*/function (_React$Component) {
87
84
  return null;
88
85
  }
89
86
  });
90
- _defineProperty(_assertThisInitialized(_this), "onMenuItemClick", function (_ref) {
87
+ _defineProperty(_this, "onMenuItemClick", function (_ref) {
91
88
  var key = _ref.key;
92
89
  var onMenuClick = _this.props.onMenuClick;
93
90
  onMenuClick && onMenuClick(key);
94
91
  });
95
- _defineProperty(_assertThisInitialized(_this), "menu", function (hasImport) {
92
+ _defineProperty(_this, "menu", function (hasImport) {
96
93
  return /*#__PURE__*/React.createElement(_Menu, {
97
94
  className: variables('Header').menu,
98
95
  onClick: _this.onMenuItemClick
@@ -104,7 +101,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
104
101
  key: "modify"
105
102
  }, "\u4FEE\u6539\u5BC6\u7801"));
106
103
  });
107
- _defineProperty(_assertThisInitialized(_this), "avatar", function (hasImport) {
104
+ _defineProperty(_this, "avatar", function (hasImport) {
108
105
  return /*#__PURE__*/React.createElement(_Dropdown, {
109
106
  placement: "bottomRight",
110
107
  overlay: _this.menu(hasImport)
@@ -115,13 +112,13 @@ var Header = /*#__PURE__*/function (_React$Component) {
115
112
  }
116
113
  }, _this.toIcon(_this.props.userIcon)));
117
114
  });
118
- _defineProperty(_assertThisInitialized(_this), "toPerson", function () {
115
+ _defineProperty(_this, "toPerson", function () {
119
116
  var hasImport = _this.props.hasImport || true;
120
117
  return /*#__PURE__*/React.createElement("div", {
121
118
  role: "person"
122
119
  }, /*#__PURE__*/React.createElement("div", null), _this.avatar(hasImport), /*#__PURE__*/React.createElement("span", null, _this.props.userName));
123
120
  });
124
- _defineProperty(_assertThisInitialized(_this), "toLogout", function () {
121
+ _defineProperty(_this, "toLogout", function () {
125
122
  var props = {
126
123
  to: _this.props.loginUrl,
127
124
  'data-role': 'block',
@@ -129,7 +126,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
129
126
  };
130
127
  return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('logout'), /*#__PURE__*/React.createElement("span", null, "\u9000\u51FA"));
131
128
  });
132
- _defineProperty(_assertThisInitialized(_this), "toTail", function () {
129
+ _defineProperty(_this, "toTail", function () {
133
130
  var _this$props = _this.props,
134
131
  settingUrl = _this$props.settingUrl,
135
132
  messageUrl = _this$props.messageUrl,
@@ -141,7 +138,8 @@ var Header = /*#__PURE__*/function (_React$Component) {
141
138
  }
142
139
  return _this;
143
140
  }
144
- _createClass(Header, [{
141
+ _inherits(Header, _React$Component);
142
+ return _createClass(Header, [{
145
143
  key: "componentWillReceiveProps",
146
144
  value: function componentWillReceiveProps(props) {
147
145
  if (props.selectUrl) {
@@ -156,7 +154,6 @@ var Header = /*#__PURE__*/function (_React$Component) {
156
154
  }, this.toLogo(), this.toTail());
157
155
  }
158
156
  }]);
159
- return Header;
160
157
  }(React.Component);
161
158
  _defineProperty(Header, "Vertical", Vertical);
162
159
  export default Header;