cloud-b2b 1.1.64 → 1.1.66

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