cloud-b2b 1.1.62 → 1.1.64

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 (80) hide show
  1. package/es/Area/Area.js +8 -11
  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 +19 -22
  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 +85 -88
  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 +95 -101
  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 +68 -71
  31. package/es/SuperTable2/SuperTable2.js +85 -88
  32. package/es/SuperTable2/SuperTableCell.js +27 -30
  33. package/es/SuperTable3/FilterDropDown.js +11 -14
  34. package/es/SuperTable3/SuperTable.js +58 -61
  35. package/es/SuperToolbar/SuperToolbar.js +11 -14
  36. package/es/SuperUpload/SuperUpload.js +107 -91
  37. package/es/Viewer/ImageViews.js +16 -19
  38. package/es/Viewer/Viewer.js +11 -14
  39. package/es/helper.js +18 -17
  40. package/lib/Area/Area.js +8 -11
  41. package/lib/CodeInput/CodeInput.js +16 -19
  42. package/lib/Enhance/Dialogs.js +11 -14
  43. package/lib/Enhance/Loading.js +15 -18
  44. package/lib/Header/Header.js +17 -20
  45. package/lib/Header/Vertical.js +11 -14
  46. package/lib/ImageView/ImageView.js +10 -13
  47. package/lib/InpurCascader/InputCascader.js +11 -14
  48. package/lib/InputEditor/InputEditor.js +16 -18
  49. package/lib/InputSearch/InputSearch.js +19 -22
  50. package/lib/InputSelect/InputSelect.js +14 -17
  51. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  52. package/lib/InputWriting/InputWriting.js +12 -15
  53. package/lib/Layout/Layout.js +14 -17
  54. package/lib/LayoutLink/LayoutLink.js +1 -2
  55. package/lib/Link/Link.js +7 -10
  56. package/lib/NumberInput/NumberInput.js +13 -16
  57. package/lib/Search/Search.js +53 -57
  58. package/lib/Search2/Search.js +86 -90
  59. package/lib/Search2/Search.less +64 -64
  60. package/lib/Search2/package.json +6 -6
  61. package/lib/Sidebar/Sidebar.js +11 -14
  62. package/lib/Sidebar2/Sidebar.js +13 -16
  63. package/lib/SuperForm/SuperForm.js +75 -81
  64. package/lib/SuperForm2/SuperForm.js +96 -103
  65. package/lib/SuperPagination/SuperPagination.js +8 -11
  66. package/lib/SuperTab/SuperTab.js +12 -15
  67. package/lib/SuperTab2/SuperTab2.js +13 -16
  68. package/lib/SuperTable/DragSortRow.js +12 -15
  69. package/lib/SuperTable/FilterDropDown.js +11 -14
  70. package/lib/SuperTable/SuperTable.js +68 -71
  71. package/lib/SuperTable2/SuperTable2.js +86 -90
  72. package/lib/SuperTable2/SuperTableCell.js +27 -30
  73. package/lib/SuperTable3/FilterDropDown.js +11 -14
  74. package/lib/SuperTable3/SuperTable.js +58 -61
  75. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  76. package/lib/SuperUpload/SuperUpload.js +96 -81
  77. package/lib/Viewer/ImageViews.js +16 -19
  78. package/lib/Viewer/Viewer.js +11 -14
  79. package/lib/helper.js +18 -17
  80. package/package.json +1 -1
@@ -31,10 +31,9 @@ var _icon = _interopRequireDefault(require("antd/lib/icon"));
31
31
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
32
32
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
33
33
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
34
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
35
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
36
34
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
37
35
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
36
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
38
37
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
39
38
  var _form = _interopRequireDefault(require("antd/lib/form"));
40
39
  var _react = _interopRequireDefault(require("react"));
@@ -43,12 +42,11 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
43
42
  var _helper = _interopRequireDefault(require("../helper"));
44
43
  var _Control = _interopRequireWildcard(require("../Control"));
45
44
  var _variables = _interopRequireDefault(require("../variables"));
46
- function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
47
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
45
+ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
48
46
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
49
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context17, _context18; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context17 = ownKeys(Object(t), !0)).call(_context17, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context18 = ownKeys(Object(t))).call(_context18, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
50
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
51
- 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; } }
47
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context15, _context16; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context15 = ownKeys(Object(t), !0)).call(_context15, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context16 = ownKeys(Object(t))).call(_context16, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
48
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
49
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
52
50
  var FormItem = _form["default"].Item;
53
51
  var defaultSize = 'small';
54
52
  var defaultColNum = 4;
@@ -78,13 +76,11 @@ var ControlType = {
78
76
  props: _propTypes["default"].object
79
77
  };
80
78
  var Controlled = /*#__PURE__*/function (_React$Component) {
81
- (0, _inherits2["default"])(Controlled, _React$Component);
82
- var _super = _createSuper(Controlled);
83
79
  function Controlled(props) {
84
80
  var _this;
85
81
  (0, _classCallCheck2["default"])(this, Controlled);
86
- _this = _super.call(this, props);
87
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (value) {
82
+ _this = _callSuper(this, Controlled, [props]);
83
+ (0, _defineProperty2["default"])(_this, "onChange", function (value) {
88
84
  var onChange = _this.props.onChange;
89
85
  _this.setState({
90
86
  value: value
@@ -96,7 +92,8 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
96
92
  };
97
93
  return _this;
98
94
  }
99
- (0, _createClass2["default"])(Controlled, [{
95
+ (0, _inherits2["default"])(Controlled, _React$Component);
96
+ return (0, _createClass2["default"])(Controlled, [{
100
97
  key: "componentWillReceiveProps",
101
98
  value: function componentWillReceiveProps(nextProps) {
102
99
  if (this.props.value !== nextProps.value) {
@@ -115,7 +112,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
115
112
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
116
113
  }
117
114
  }]);
118
- return Controlled;
119
115
  }(_react["default"].Component);
120
116
  /**
121
117
  * colNum:[可选],表单的列数,默认为4
@@ -131,8 +127,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
131
127
  * OnFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
132
128
  */
133
129
  var SuperForm = /*#__PURE__*/function (_React$Component2) {
134
- (0, _inherits2["default"])(SuperForm, _React$Component2);
135
- var _super2 = _createSuper(SuperForm);
136
130
  function SuperForm() {
137
131
  var _context;
138
132
  var _this2;
@@ -140,31 +134,31 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
140
134
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
141
135
  args[_key] = arguments[_key];
142
136
  }
143
- _this2 = _super2.call.apply(_super2, (0, _concat["default"])(_context = [this]).call(_context, args));
144
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onAdd", function (key, title) {
137
+ _this2 = _callSuper(this, SuperForm, (0, _concat["default"])(_context = []).call(_context, args));
138
+ (0, _defineProperty2["default"])(_this2, "onAdd", function (key, title) {
145
139
  var onAdd = _this2.props.onAdd;
146
140
  onAdd && onAdd(key, title);
147
141
  });
148
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onChange", function (key, value) {
142
+ (0, _defineProperty2["default"])(_this2, "onChange", function (key, value) {
149
143
  var onChange = _this2.props.onChange;
150
144
  if (onChange) {
151
145
  _this2.onExitValid(key);
152
146
  onChange(key, value);
153
147
  }
154
148
  });
155
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onBlur", function (key, value) {
149
+ (0, _defineProperty2["default"])(_this2, "onBlur", function (key, value) {
156
150
  var onChange = _this2.props.onChange;
157
151
  if (onChange) {
158
152
  _this2.onExitValid(key);
159
153
  onChange(key, value);
160
154
  }
161
155
  });
162
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onFileChange", function (_ref, file) {
156
+ (0, _defineProperty2["default"])(_this2, "onFileChange", function (_ref, file) {
163
157
  var key = _ref.key;
164
158
  var onFileChange = _this2.props.onFileChange;
165
159
  onFileChange && onFileChange(key, file);
166
160
  });
167
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onExitValid", function (key, value) {
161
+ (0, _defineProperty2["default"])(_this2, "onExitValid", function (key, value) {
168
162
  if (key === _this2.validKey) {
169
163
  _this2.validKey = '';
170
164
  _this2.props.onExitValid();
@@ -172,7 +166,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
172
166
  _this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
173
167
  });
174
168
  // 动态生成getValidState方法
175
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "initValidState", function () {
169
+ (0, _defineProperty2["default"])(_this2, "initValidState", function () {
176
170
  var _this2$props = _this2.props,
177
171
  value = _this2$props.value,
178
172
  valid = _this2$props.valid;
@@ -193,7 +187,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
193
187
  };
194
188
  _this2.getValidState = valid ? _valid : invalid;
195
189
  });
196
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "validDate", function (_ref3) {
190
+ (0, _defineProperty2["default"])(_this2, "validDate", function (_ref3) {
197
191
  var key = _ref3.key,
198
192
  type = _ref3.type;
199
193
  return function (date) {
@@ -212,25 +206,25 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
212
206
  }
213
207
  };
214
208
  });
215
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getPopupContainer", function () {
209
+ (0, _defineProperty2["default"])(_this2, "getPopupContainer", function () {
216
210
  var container = _this2.props.container;
217
211
  if (typeof container === 'undefined') {
218
- return _reactDom["default"].findDOMNode((0, _assertThisInitialized2["default"])(_this2));
212
+ return _reactDom["default"].findDOMNode(_this2);
219
213
  } else if (typeof container === 'boolean') {
220
214
  return document.body;
221
215
  } else {
222
216
  return _reactDom["default"].findDOMNode(container);
223
217
  }
224
218
  });
225
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getMaxWidth", function () {
219
+ (0, _defineProperty2["default"])(_this2, "getMaxWidth", function () {
226
220
  var _this2$props$colNum = _this2.props.colNum,
227
221
  colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
228
222
  return colNum * 250;
229
223
  });
230
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getContainer", function () {
224
+ (0, _defineProperty2["default"])(_this2, "getContainer", function () {
231
225
  return _this2.props.getContainer;
232
226
  });
233
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getControls", function () {
227
+ (0, _defineProperty2["default"])(_this2, "getControls", function () {
234
228
  var _this2$props2 = _this2.props,
235
229
  hideControls = _this2$props2.hideControls,
236
230
  controls = _this2$props2.controls;
@@ -244,7 +238,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
244
238
  });
245
239
  }
246
240
  });
247
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getType", function (_ref4) {
241
+ (0, _defineProperty2["default"])(_this2, "getType", function (_ref4) {
248
242
  var _context2;
249
243
  var key = _ref4.key,
250
244
  type = _ref4.type;
@@ -263,7 +257,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
263
257
  return type;
264
258
  }
265
259
  });
266
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "specialProps", function (type, _ref5) {
260
+ (0, _defineProperty2["default"])(_this2, "specialProps", function (type, _ref5) {
267
261
  var key = _ref5.key,
268
262
  _ref5$props = _ref5.props,
269
263
  props = _ref5$props === void 0 ? {} : _ref5$props,
@@ -283,48 +277,48 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
283
277
  type: 'textArea',
284
278
  readonly: true,
285
279
  style: style,
286
- onBlur: (0, _bind["default"])(_context3 = _this2.onExitValid).call(_context3, (0, _assertThisInitialized2["default"])(_this2), key)
280
+ onBlur: (0, _bind["default"])(_context3 = _this2.onExitValid).call(_context3, _this2, key)
287
281
  };
288
282
  } else {
289
283
  var _context4;
290
284
  return {
291
285
  style: style,
292
- onBlur: (0, _bind["default"])(_context4 = _this2.onExitValid).call(_context4, (0, _assertThisInitialized2["default"])(_this2), key)
286
+ onBlur: (0, _bind["default"])(_context4 = _this2.onExitValid).call(_context4, _this2, key)
293
287
  };
294
288
  }
295
289
  } else if (type === 'text' || type === 'textArea') {
296
290
  var _context5, _context6;
297
291
  return _objectSpread(_objectSpread({}, props), {}, {
298
- onChange: (0, _bind["default"])(_context5 = _this2.onExitValid).call(_context5, (0, _assertThisInitialized2["default"])(_this2), key),
299
- onBlur: (0, _bind["default"])(_context6 = _this2.onChange).call(_context6, (0, _assertThisInitialized2["default"])(_this2), key)
292
+ onChange: (0, _bind["default"])(_context5 = _this2.onExitValid).call(_context5, _this2, key),
293
+ onBlur: (0, _bind["default"])(_context6 = _this2.onChange).call(_context6, _this2, key)
300
294
  });
301
295
  } else if (type === 'date') {
302
296
  var _context7, _context8;
303
297
  var propsObj = _objectSpread(_objectSpread({}, props), {}, {
304
- onChange: (0, _bind["default"])(_context7 = _this2.onBlur).call(_context7, (0, _assertThisInitialized2["default"])(_this2), key),
305
- onBlur: (0, _bind["default"])(_context8 = _this2.onExitValid).call(_context8, (0, _assertThisInitialized2["default"])(_this2), key)
298
+ onChange: (0, _bind["default"])(_context7 = _this2.onBlur).call(_context7, _this2, key),
299
+ onBlur: (0, _bind["default"])(_context8 = _this2.onExitValid).call(_context8, _this2, key)
306
300
  });
307
301
  if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
308
302
  var _context9;
309
- propsObj.onOpenChange = (0, _bind["default"])(_context9 = _this2.props.onOpenChange).call(_context9, (0, _assertThisInitialized2["default"])(_this2), key);
303
+ propsObj.onOpenChange = (0, _bind["default"])(_context9 = _this2.props.onOpenChange).call(_context9, _this2, key);
310
304
  }
311
305
  return propsObj;
312
306
  } else if (type === 'area') {
313
- var _context10, _context11;
307
+ var _context0, _context1;
314
308
  return _objectSpread(_objectSpread({}, props), {}, {
315
- onChange: (0, _bind["default"])(_context10 = _this2.onBlur).call(_context10, (0, _assertThisInitialized2["default"])(_this2), key),
316
- onBlur: (0, _bind["default"])(_context11 = _this2.onExitValid).call(_context11, (0, _assertThisInitialized2["default"])(_this2), key),
309
+ onChange: (0, _bind["default"])(_context0 = _this2.onBlur).call(_context0, _this2, key),
310
+ onBlur: (0, _bind["default"])(_context1 = _this2.onExitValid).call(_context1, _this2, key),
317
311
  onAreaSearch: _this2.props.onAreaSearch
318
312
  });
319
313
  } else {
320
- var _context12, _context13;
314
+ var _context10, _context11;
321
315
  return _objectSpread(_objectSpread({}, props), {}, {
322
- onChange: (0, _bind["default"])(_context12 = _this2.onBlur).call(_context12, (0, _assertThisInitialized2["default"])(_this2), key),
323
- onBlur: (0, _bind["default"])(_context13 = _this2.onExitValid).call(_context13, (0, _assertThisInitialized2["default"])(_this2), key)
316
+ onChange: (0, _bind["default"])(_context10 = _this2.onBlur).call(_context10, _this2, key),
317
+ onBlur: (0, _bind["default"])(_context11 = _this2.onExitValid).call(_context11, _this2, key)
324
318
  });
325
319
  }
326
320
  });
327
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getControlProps", function (control, status) {
321
+ (0, _defineProperty2["default"])(_this2, "getControlProps", function (control, status) {
328
322
  var _this2$props$value2 = _this2.props.value,
329
323
  value = _this2$props$value2 === void 0 ? {} : _this2$props$value2;
330
324
  var type = _this2.getType(control);
@@ -337,25 +331,25 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
337
331
  value: (0, _Control.makeString)(value[control.key])
338
332
  });
339
333
  });
340
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getOptions", function (key, options) {
334
+ (0, _defineProperty2["default"])(_this2, "getOptions", function (key, options) {
341
335
  var higher = _this2.props.options || {};
342
336
  return higher[key] || options;
343
337
  });
344
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toEmpty", function (props) {});
345
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toText", function (props) {
338
+ (0, _defineProperty2["default"])(_this2, "toEmpty", function (props) {});
339
+ (0, _defineProperty2["default"])(_this2, "toText", function (props) {
346
340
  return /*#__PURE__*/_react["default"].createElement(Controlled, props);
347
341
  });
348
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toPassword", function (props) {
342
+ (0, _defineProperty2["default"])(_this2, "toPassword", function (props) {
349
343
  return /*#__PURE__*/_react["default"].createElement(Controlled, props);
350
344
  });
351
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toEditor", function (props, control) {
345
+ (0, _defineProperty2["default"])(_this2, "toEditor", function (props, control) {
352
346
  props.inputKey = control.key;
353
347
  return /*#__PURE__*/_react["default"].createElement(Controlled, props);
354
348
  });
355
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toSelectWriting", function (props, control) {
349
+ (0, _defineProperty2["default"])(_this2, "toSelectWriting", function (props, control) {
356
350
  return /*#__PURE__*/_react["default"].createElement(Controlled, props);
357
351
  });
358
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toTextArea", function (props, control) {
352
+ (0, _defineProperty2["default"])(_this2, "toTextArea", function (props, control) {
359
353
  if (control.allFullFather) {
360
354
  props.rows = control.rows;
361
355
  props.maxLength = control.maxLength;
@@ -370,12 +364,12 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
370
364
  }
371
365
  return /*#__PURE__*/_react["default"].createElement(Controlled, props);
372
366
  });
373
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toNumber", function (props) {
367
+ (0, _defineProperty2["default"])(_this2, "toNumber", function (props) {
374
368
  props.defaultValue = props.value;
375
369
  delete props.value;
376
370
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
377
371
  });
378
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toSelect", function (props, _ref6) {
372
+ (0, _defineProperty2["default"])(_this2, "toSelect", function (props, _ref6) {
379
373
  var options = _ref6.options,
380
374
  key = _ref6.key;
381
375
  props.getPopupContainer = _this2.getPopupContainer;
@@ -383,7 +377,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
383
377
  props.dropdownMatchSelectWidth = false;
384
378
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
385
379
  });
386
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "createSearchEvent", function (control) {
380
+ (0, _defineProperty2["default"])(_this2, "createSearchEvent", function (control) {
387
381
  if (_this2.props.onSearch) {
388
382
  return function (value) {
389
383
  return _this2.props.onSearch(control.key, value, control);
@@ -392,14 +386,14 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
392
386
  return null;
393
387
  }
394
388
  });
395
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toSearch", function (props, control) {
389
+ (0, _defineProperty2["default"])(_this2, "toSearch", function (props, control) {
396
390
  props.getPopupContainer = _this2.getPopupContainer;
397
391
  props.options = _this2.getOptions(control.key, control.options);
398
392
  props.onSearch = _this2.createSearchEvent(control);
399
393
  props.dropdownMatchSelectWidth = false;
400
394
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
401
395
  });
402
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toDate", function (props, _ref7) {
396
+ (0, _defineProperty2["default"])(_this2, "toDate", function (props, _ref7) {
403
397
  var rule = _ref7.rule;
404
398
  props.getCalendarContainer = _this2.getPopupContainer;
405
399
  props.style = {
@@ -408,28 +402,28 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
408
402
  rule && (props.disabledDate = _this2.validDate(rule));
409
403
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
410
404
  });
411
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toRadioGroup", function (props, _ref8) {
405
+ (0, _defineProperty2["default"])(_this2, "toRadioGroup", function (props, _ref8) {
412
406
  var key = _ref8.key,
413
407
  options = _ref8.options;
414
408
  props.options = _this2.getOptions(key, options);
415
409
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
416
410
  });
417
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toReadonly", function (props, _ref9) {
411
+ (0, _defineProperty2["default"])(_this2, "toReadonly", function (props, _ref9) {
418
412
  var options = _ref9.options,
419
413
  key = _ref9.key;
420
414
  props.value = (0, _Control.getTitle)(props.value, _this2.getOptions(key, options));
421
415
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
422
416
  });
423
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "selectSearch", function (props, control) {
417
+ (0, _defineProperty2["default"])(_this2, "selectSearch", function (props, control) {
424
418
  props.getPopupContainer = _this2.getPopupContainer;
425
419
  props.options = _this2.getOptions(control.key, control.options);
426
420
  props.onSearch = _this2.createSearchEvent(control);
427
421
  props.dropdownMatchSelectWidth = false;
428
422
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
429
423
  });
430
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "area", function (props, _ref10) {
431
- var key = _ref10.key,
432
- options = _ref10.options;
424
+ (0, _defineProperty2["default"])(_this2, "area", function (props, _ref0) {
425
+ var key = _ref0.key,
426
+ options = _ref0.options;
433
427
  var readonly = _this2.props.readonly;
434
428
  props.parentKey = key;
435
429
  props.options = _this2.getOptions(key, options);
@@ -439,17 +433,17 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
439
433
  }) ? true : false;
440
434
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
441
435
  });
442
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "uploadImg", function (props, control) {
443
- var _context14;
436
+ (0, _defineProperty2["default"])(_this2, "uploadImg", function (props, control) {
437
+ var _context12;
444
438
  var readonly = _this2.props.readonly;
445
439
  props.required = control.required || false;
446
- props.onFileChange = (0, _bind["default"])(_context14 = _this2.onFileChange).call(_context14, (0, _assertThisInitialized2["default"])(_this2), control);
440
+ props.onFileChange = (0, _bind["default"])(_context12 = _this2.onFileChange).call(_context12, _this2, control);
447
441
  props.readonly = readonly === true || (0, _isArray["default"])(readonly) && (0, _some["default"])(readonly).call(readonly, function (readonlyKey) {
448
442
  return readonlyKey === control.key;
449
443
  }) ? true : false;
450
444
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
451
445
  });
452
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCascader", function (props, control) {
446
+ (0, _defineProperty2["default"])(_this2, "toCascader", function (props, control) {
453
447
  var container = _this2.getContainer();
454
448
  container && (props.getPopupContainer = container);
455
449
  props.options = control.options || [];
@@ -458,7 +452,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
458
452
  props.loadData = _this2.createSearchEvent(control);
459
453
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
460
454
  });
461
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toTreeSelect", function (props, filter) {
455
+ (0, _defineProperty2["default"])(_this2, "toTreeSelect", function (props, filter) {
462
456
  var container = _this2.getContainer();
463
457
  container && (props.getPopupContainer = container);
464
458
  props.options = _this2.getOptions(filter);
@@ -466,7 +460,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
466
460
  props.placeholder = filter.placeholder || '';
467
461
  return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
468
462
  });
469
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toControl", function (props, control) {
463
+ (0, _defineProperty2["default"])(_this2, "toControl", function (props, control) {
470
464
  switch (props.type) {
471
465
  case 'readonly':
472
466
  return _this2.toReadonly(props, control);
@@ -508,13 +502,13 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
508
502
  return 'type error';
509
503
  }
510
504
  });
511
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toLabel", function (_ref11, type) {
512
- var title = _ref11.title,
513
- showAdd = _ref11.showAdd,
514
- key = _ref11.key;
505
+ (0, _defineProperty2["default"])(_this2, "toLabel", function (_ref1, type) {
506
+ var title = _ref1.title,
507
+ showAdd = _ref1.showAdd,
508
+ key = _ref1.key;
515
509
  if (showAdd && type !== 'readonly') {
516
- var _context15;
517
- var onClick = (0, _bind["default"])(_context15 = _this2.onAdd).call(_context15, (0, _assertThisInitialized2["default"])(_this2), key, title);
510
+ var _context13;
511
+ var onClick = (0, _bind["default"])(_context13 = _this2.onAdd).call(_context13, _this2, key, title);
518
512
  return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
519
513
  role: "add",
520
514
  type: "plus-circle-o",
@@ -524,7 +518,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
524
518
  return title;
525
519
  }
526
520
  });
527
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCol", function (span, control) {
521
+ (0, _defineProperty2["default"])(_this2, "toCol", function (span, control) {
528
522
  var factor = control.span || 1;
529
523
  var status = _this2.getValidState(control);
530
524
  var controlProps = _this2.getControlProps(control, status);
@@ -541,7 +535,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
541
535
  key: control.key
542
536
  }, checkable && /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
543
537
  className: (0, _variables["default"])('SuperForm').checkbox,
544
- onChange: (0, _bind["default"])(onCheckItem).call(onCheckItem, (0, _assertThisInitialized2["default"])(_this2), control),
538
+ onChange: (0, _bind["default"])(onCheckItem).call(onCheckItem, _this2, control),
545
539
  checked: control.checked
546
540
  }), /*#__PURE__*/_react["default"].createElement(FormItem, (0, _extends2["default"])({}, itemProps, {
547
541
  className: checkable ? (0, _variables["default"])('SuperForm').formItemWithCheckbox : ''
@@ -553,8 +547,8 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
553
547
  }
554
548
  });
555
549
  });
556
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCols", function () {
557
- var _context16;
550
+ (0, _defineProperty2["default"])(_this2, "toCols", function () {
551
+ var _context14;
558
552
  var _this2$props4 = _this2.props,
559
553
  _this2$props4$colNum = _this2$props4.colNum,
560
554
  colNum = _this2$props4$colNum === void 0 ? defaultColNum : _this2$props4$colNum,
@@ -563,7 +557,7 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
563
557
  colNum = 1;
564
558
  }
565
559
  var span = 24 / colNum;
566
- return (0, _map["default"])(_context16 = _this2.getControls()).call(_context16, function (control) {
560
+ return (0, _map["default"])(_context14 = _this2.getControls()).call(_context14, function (control) {
567
561
  if (allFullFather) {
568
562
  control.allFullFather = allFullFather;
569
563
  }
@@ -572,7 +566,8 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
572
566
  });
573
567
  return _this2;
574
568
  }
575
- (0, _createClass2["default"])(SuperForm, [{
569
+ (0, _inherits2["default"])(SuperForm, _React$Component2);
570
+ return (0, _createClass2["default"])(SuperForm, [{
576
571
  key: "render",
577
572
  value: function render() {
578
573
  this.initValidState();
@@ -588,7 +583,6 @@ var SuperForm = /*#__PURE__*/function (_React$Component2) {
588
583
  }, this.toCols())));
589
584
  }
590
585
  }]);
591
- return SuperForm;
592
586
  }(_react["default"].Component);
593
587
  (0, _defineProperty2["default"])(SuperForm, "propTypes", {
594
588
  controls: _propTypes["default"].arrayOf(_propTypes["default"].shape(ControlType)).isRequired,