cloud-b2b 1.1.86 → 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 +10 -13
  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 +111 -116
  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 +11 -15
  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 +112 -118
  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
@@ -15,10 +15,9 @@ import _Checkbox from "antd/es/checkbox";
15
15
  import _typeof from "@babel/runtime-corejs3/helpers/typeof";
16
16
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
17
17
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
18
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
19
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
20
18
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
21
19
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
20
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
22
21
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
23
22
  import _Form from "antd/es/form";
24
23
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
@@ -29,9 +28,9 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
29
28
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
30
29
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
31
30
  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; }
32
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context29, _context30; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context29 = ownKeys(Object(t), !0)).call(_context29, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context30 = ownKeys(Object(t))).call(_context30, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
33
- 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); }; }
34
- 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; } }
31
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context27, _context28; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context27 = ownKeys(Object(t), !0)).call(_context27, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context28 = ownKeys(Object(t))).call(_context28, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
32
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
33
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
34
  import React from 'react';
36
35
  import PropTypes from 'prop-types';
37
36
  import ReactDOM from 'react-dom';
@@ -66,13 +65,11 @@ var ControlType = {
66
65
  props: PropTypes.object
67
66
  };
68
67
  var Controlled = /*#__PURE__*/function (_React$Component) {
69
- _inherits(Controlled, _React$Component);
70
- var _super = _createSuper(Controlled);
71
68
  function Controlled(props) {
72
69
  var _this;
73
70
  _classCallCheck(this, Controlled);
74
- _this = _super.call(this, props);
75
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
71
+ _this = _callSuper(this, Controlled, [props]);
72
+ _defineProperty(_this, "onChange", function (value) {
76
73
  var onChange = _this.props.onChange;
77
74
  _this.setState({
78
75
  value: value
@@ -84,7 +81,8 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
84
81
  };
85
82
  return _this;
86
83
  }
87
- _createClass(Controlled, [{
84
+ _inherits(Controlled, _React$Component);
85
+ return _createClass(Controlled, [{
88
86
  key: "componentWillReceiveProps",
89
87
  value: function componentWillReceiveProps(nextProps) {
90
88
  if (this.props.value !== nextProps.value) {
@@ -103,7 +101,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
103
101
  return /*#__PURE__*/React.createElement(Control, props);
104
102
  }
105
103
  }]);
106
- return Controlled;
107
104
  }(React.Component);
108
105
  /**
109
106
  * colNum:[可选],表单的列数,默认为4
@@ -119,8 +116,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
119
116
  * onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
120
117
  */
121
118
  var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
122
- _inherits(SuperForm2, _React$Component2);
123
- var _super2 = _createSuper(SuperForm2);
124
119
  function SuperForm2() {
125
120
  var _context;
126
121
  var _this2;
@@ -128,35 +123,35 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
128
123
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
129
124
  args[_key] = arguments[_key];
130
125
  }
131
- _this2 = _super2.call.apply(_super2, _concatInstanceProperty(_context = [this]).call(_context, args));
132
- _defineProperty(_assertThisInitialized(_this2), "onAdd", function (key, title) {
126
+ _this2 = _callSuper(this, SuperForm2, _concatInstanceProperty(_context = []).call(_context, args));
127
+ _defineProperty(_this2, "onAdd", function (key, title) {
133
128
  var onAdd = _this2.props.onAdd;
134
129
  onAdd && onAdd(key, title);
135
130
  });
136
- _defineProperty(_assertThisInitialized(_this2), "onFileChange", function (_ref, file) {
131
+ _defineProperty(_this2, "onFileChange", function (_ref, file) {
137
132
  var key = _ref.key;
138
133
  var onFileChange = _this2.props.onFileChange;
139
134
  onFileChange && onFileChange(key, file);
140
135
  });
141
- _defineProperty(_assertThisInitialized(_this2), "onChange", function (key, value) {
136
+ _defineProperty(_this2, "onChange", function (key, value) {
142
137
  var onChange = _this2.props.onChange;
143
138
  if (onChange) {
144
139
  _this2.onExitValid(key);
145
140
  onChange(key, value);
146
141
  }
147
142
  });
148
- _defineProperty(_assertThisInitialized(_this2), "onGetCode", function (key, value) {
143
+ _defineProperty(_this2, "onGetCode", function (key, value) {
149
144
  var onGetCode = _this2.props.onGetCode;
150
145
  onGetCode && onGetCode();
151
146
  });
152
- _defineProperty(_assertThisInitialized(_this2), "onBlur", function (key, value) {
147
+ _defineProperty(_this2, "onBlur", function (key, value) {
153
148
  var onChange = _this2.props.onChange;
154
149
  if (onChange) {
155
150
  _this2.onExitValid(key);
156
151
  onChange(key, value);
157
152
  }
158
153
  });
159
- _defineProperty(_assertThisInitialized(_this2), "onExitValid", function (key, value) {
154
+ _defineProperty(_this2, "onExitValid", function (key, value) {
160
155
  if (key === _this2.validKey) {
161
156
  _this2.validKey = '';
162
157
  _this2.props.onExitValid();
@@ -164,7 +159,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
164
159
  _this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
165
160
  });
166
161
  // 动态生成getValidState方法
167
- _defineProperty(_assertThisInitialized(_this2), "initValidState", function () {
162
+ _defineProperty(_this2, "initValidState", function () {
168
163
  var _this2$props = _this2.props,
169
164
  value = _this2$props.value,
170
165
  valid = _this2$props.valid;
@@ -185,7 +180,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
185
180
  };
186
181
  _this2.getValidState = valid ? _valid : invalid;
187
182
  });
188
- _defineProperty(_assertThisInitialized(_this2), "validDate", function (_ref3) {
183
+ _defineProperty(_this2, "validDate", function (_ref3) {
189
184
  var key = _ref3.key,
190
185
  type = _ref3.type;
191
186
  return function (date) {
@@ -204,25 +199,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
204
199
  }
205
200
  };
206
201
  });
207
- _defineProperty(_assertThisInitialized(_this2), "getPopupContainer", function () {
202
+ _defineProperty(_this2, "getPopupContainer", function () {
208
203
  var container = _this2.props.container;
209
204
  if (typeof container === 'undefined') {
210
- return ReactDOM.findDOMNode(_assertThisInitialized(_this2));
205
+ return ReactDOM.findDOMNode(_this2);
211
206
  } else if (typeof container === 'boolean') {
212
207
  return document.body;
213
208
  } else {
214
209
  return ReactDOM.findDOMNode(container);
215
210
  }
216
211
  });
217
- _defineProperty(_assertThisInitialized(_this2), "getMaxWidth", function () {
212
+ _defineProperty(_this2, "getMaxWidth", function () {
218
213
  var _this2$props$colNum = _this2.props.colNum,
219
214
  colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
220
215
  return colNum * 1200;
221
216
  });
222
- _defineProperty(_assertThisInitialized(_this2), "getContainer", function () {
217
+ _defineProperty(_this2, "getContainer", function () {
223
218
  return _this2.props.getContainer;
224
219
  });
225
- _defineProperty(_assertThisInitialized(_this2), "getControls", function () {
220
+ _defineProperty(_this2, "getControls", function () {
226
221
  var _this2$props2 = _this2.props,
227
222
  hideControls = _this2$props2.hideControls,
228
223
  controls = _this2$props2.controls;
@@ -236,7 +231,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
236
231
  });
237
232
  }
238
233
  });
239
- _defineProperty(_assertThisInitialized(_this2), "getType", function (_ref4) {
234
+ _defineProperty(_this2, "getType", function (_ref4) {
240
235
  var _context2;
241
236
  var key = _ref4.key,
242
237
  type = _ref4.type;
@@ -255,7 +250,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
255
250
  return type;
256
251
  }
257
252
  });
258
- _defineProperty(_assertThisInitialized(_this2), "specialProps", function (type, _ref5) {
253
+ _defineProperty(_this2, "specialProps", function (type, _ref5) {
259
254
  var key = _ref5.key,
260
255
  placeholder = _ref5.placeholder,
261
256
  _ref5$props = _ref5.props,
@@ -267,72 +262,72 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
267
262
  return {
268
263
  type: 'textArea',
269
264
  readonly: true,
270
- onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3, _assertThisInitialized(_this2), key)
265
+ onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3, _this2, key)
271
266
  };
272
267
  } else if (originType === 'uploadImg') {
273
268
  var _context4;
274
269
  var commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
275
270
  return _objectSpread(_objectSpread(_objectSpread({}, props), commonProps), {}, {
276
271
  readonly: true,
277
- onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4, _assertThisInitialized(_this2), key)
272
+ onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4, _this2, key)
278
273
  });
279
274
  } else {
280
275
  var _context5;
281
276
  return {
282
- onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5, _assertThisInitialized(_this2), key),
277
+ onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5, _this2, key),
283
278
  placeholder: placeholder
284
279
  };
285
280
  }
286
281
  } else if (type === 'text' || type === 'textArea') {
287
282
  var _context6, _context7;
288
283
  return _objectSpread(_objectSpread({}, props), {}, {
289
- onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6, _assertThisInitialized(_this2), key),
290
- onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7, _assertThisInitialized(_this2), key)
284
+ onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6, _this2, key),
285
+ onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7, _this2, key)
291
286
  });
292
287
  } else if (type === 'date') {
293
288
  var _context8, _context9;
294
289
  var propsObj = _objectSpread(_objectSpread({}, props), {}, {
295
- onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8, _assertThisInitialized(_this2), key),
296
- onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9, _assertThisInitialized(_this2), key)
290
+ onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8, _this2, key),
291
+ onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9, _this2, key)
297
292
  });
298
293
  if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
299
- var _context10;
300
- propsObj.onOpenChange = _bindInstanceProperty(_context10 = _this2.props.onOpenChange).call(_context10, _assertThisInitialized(_this2), key);
294
+ var _context0;
295
+ propsObj.onOpenChange = _bindInstanceProperty(_context0 = _this2.props.onOpenChange).call(_context0, _this2, key);
301
296
  }
302
297
  return propsObj;
303
298
  } else if (type === 'captcha') {
304
- var _context11, _context12, _context13;
299
+ var _context1, _context10, _context11;
305
300
  return _objectSpread(_objectSpread({}, props), {}, {
306
- onChange: _bindInstanceProperty(_context11 = _this2.onBlur).call(_context11, _assertThisInitialized(_this2), key),
307
- onBlur: _bindInstanceProperty(_context12 = _this2.onExitValid).call(_context12, _assertThisInitialized(_this2), key),
308
- onGetCode: _bindInstanceProperty(_context13 = _this2.onGetCode).call(_context13, _assertThisInitialized(_this2), key)
301
+ onChange: _bindInstanceProperty(_context1 = _this2.onBlur).call(_context1, _this2, key),
302
+ onBlur: _bindInstanceProperty(_context10 = _this2.onExitValid).call(_context10, _this2, key),
303
+ onGetCode: _bindInstanceProperty(_context11 = _this2.onGetCode).call(_context11, _this2, key)
309
304
  });
310
305
  } else if (type === 'area') {
311
- var _context14, _context15;
306
+ var _context12, _context13;
312
307
  return _objectSpread(_objectSpread({}, props), {}, {
313
- onChange: _bindInstanceProperty(_context14 = _this2.onBlur).call(_context14, _assertThisInitialized(_this2), key),
314
- onBlur: _bindInstanceProperty(_context15 = _this2.onExitValid).call(_context15, _assertThisInitialized(_this2), key),
308
+ onChange: _bindInstanceProperty(_context12 = _this2.onBlur).call(_context12, _this2, key),
309
+ onBlur: _bindInstanceProperty(_context13 = _this2.onExitValid).call(_context13, _this2, key),
315
310
  onAreaSearch: _this2.props.onAreaSearch,
316
311
  onClick: _this2.props.onAdd
317
312
  });
318
313
  } else if (type === 'uploadImg') {
319
- var _context16, _context17;
314
+ var _context14, _context15;
320
315
  var _commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
321
316
  return _objectSpread(_objectSpread(_objectSpread({}, props), _commonProps), {}, {
322
- onChange: _bindInstanceProperty(_context16 = _this2.onBlur).call(_context16, _assertThisInitialized(_this2), key),
323
- onBlur: _bindInstanceProperty(_context17 = _this2.onExitValid).call(_context17, _assertThisInitialized(_this2), key)
317
+ onChange: _bindInstanceProperty(_context14 = _this2.onBlur).call(_context14, _this2, key),
318
+ onBlur: _bindInstanceProperty(_context15 = _this2.onExitValid).call(_context15, _this2, key)
324
319
  });
325
320
  } else if (type === 'double') {
326
321
  return props;
327
322
  } else {
328
- var _context18, _context19;
323
+ var _context16, _context17;
329
324
  return _objectSpread(_objectSpread({}, props), {}, {
330
- onChange: _bindInstanceProperty(_context18 = _this2.onBlur).call(_context18, _assertThisInitialized(_this2), key),
331
- onBlur: _bindInstanceProperty(_context19 = _this2.onExitValid).call(_context19, _assertThisInitialized(_this2), key)
325
+ onChange: _bindInstanceProperty(_context16 = _this2.onBlur).call(_context16, _this2, key),
326
+ onBlur: _bindInstanceProperty(_context17 = _this2.onExitValid).call(_context17, _this2, key)
332
327
  });
333
328
  }
334
329
  });
335
- _defineProperty(_assertThisInitialized(_this2), "getControlProps", function (control, status) {
330
+ _defineProperty(_this2, "getControlProps", function (control, status) {
336
331
  var _this2$props3 = _this2.props,
337
332
  _this2$props3$value = _this2$props3.value,
338
333
  value = _this2$props3$value === void 0 ? {} : _this2$props3$value,
@@ -353,25 +348,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
353
348
  requiredColor: requiredColor
354
349
  });
355
350
  });
356
- _defineProperty(_assertThisInitialized(_this2), "getOptions", function (key, options) {
351
+ _defineProperty(_this2, "getOptions", function (key, options) {
357
352
  var higher = _this2.props.options || {};
358
353
  return higher[key] || options;
359
354
  });
360
- _defineProperty(_assertThisInitialized(_this2), "toEmpty", function (props) {});
361
- _defineProperty(_assertThisInitialized(_this2), "toText", function (props) {
355
+ _defineProperty(_this2, "toEmpty", function (props) {});
356
+ _defineProperty(_this2, "toText", function (props) {
362
357
  return /*#__PURE__*/React.createElement(Controlled, props);
363
358
  });
364
- _defineProperty(_assertThisInitialized(_this2), "toPassword", function (props) {
359
+ _defineProperty(_this2, "toPassword", function (props) {
365
360
  return /*#__PURE__*/React.createElement(Controlled, props);
366
361
  });
367
- _defineProperty(_assertThisInitialized(_this2), "toEditor", function (props, control) {
362
+ _defineProperty(_this2, "toEditor", function (props, control) {
368
363
  props.inputKey = control.key;
369
364
  return /*#__PURE__*/React.createElement(Controlled, props);
370
365
  });
371
- _defineProperty(_assertThisInitialized(_this2), "toSelectWriting", function (props, control) {
366
+ _defineProperty(_this2, "toSelectWriting", function (props, control) {
372
367
  return /*#__PURE__*/React.createElement(Controlled, props);
373
368
  });
374
- _defineProperty(_assertThisInitialized(_this2), "toTextArea", function (props, control) {
369
+ _defineProperty(_this2, "toTextArea", function (props, control) {
375
370
  if (control.allFullFather) {
376
371
  props.rows = control.rows;
377
372
  props.maxLength = control.maxLength;
@@ -386,22 +381,22 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
386
381
  }
387
382
  return /*#__PURE__*/React.createElement(Controlled, props);
388
383
  });
389
- _defineProperty(_assertThisInitialized(_this2), "toNumber", function (props) {
384
+ _defineProperty(_this2, "toNumber", function (props) {
390
385
  props.defaultValue = props.value;
391
386
  delete props.value;
392
387
  return /*#__PURE__*/React.createElement(Control, props);
393
388
  });
394
- _defineProperty(_assertThisInitialized(_this2), "toDoubleInput", function (props, control, cc) {
395
- var _context20, _context21;
389
+ _defineProperty(_this2, "toDoubleInput", function (props, control, cc) {
390
+ var _context18, _context19;
396
391
  props.defaultValue = props.value;
397
392
  props.doubleKey = props.key;
398
393
  props.doubleValue = helper.getObject(cc, props.key);
399
- props.onChangeKey1 = _bindInstanceProperty(_context20 = _this2.onChange).call(_context20, _assertThisInitialized(_this2), props.key[0]);
400
- props.onChangeKey2 = _bindInstanceProperty(_context21 = _this2.onChange).call(_context21, _assertThisInitialized(_this2), props.key[1]);
394
+ props.onChangeKey1 = _bindInstanceProperty(_context18 = _this2.onChange).call(_context18, _this2, props.key[0]);
395
+ props.onChangeKey2 = _bindInstanceProperty(_context19 = _this2.onChange).call(_context19, _this2, props.key[1]);
401
396
  delete props.value;
402
397
  return /*#__PURE__*/React.createElement(Control, props);
403
398
  });
404
- _defineProperty(_assertThisInitialized(_this2), "toSelect", function (props, _ref6) {
399
+ _defineProperty(_this2, "toSelect", function (props, _ref6) {
405
400
  var options = _ref6.options,
406
401
  key = _ref6.key;
407
402
  props.getPopupContainer = _this2.getPopupContainer;
@@ -409,14 +404,14 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
409
404
  props.dropdownMatchSelectWidth = false;
410
405
  return /*#__PURE__*/React.createElement(Control, props);
411
406
  });
412
- _defineProperty(_assertThisInitialized(_this2), "toTreeSelect", function (props, filter) {
407
+ _defineProperty(_this2, "toTreeSelect", function (props, filter) {
413
408
  var container = _this2.getContainer();
414
409
  container && (props.getPopupContainer = container);
415
410
  props.options = _this2.getOptions(filter);
416
411
  props.onSearch = _this2.createSearchEvent(filter);
417
412
  return /*#__PURE__*/React.createElement(Control, props);
418
413
  });
419
- _defineProperty(_assertThisInitialized(_this2), "createSearchEvent", function (control) {
414
+ _defineProperty(_this2, "createSearchEvent", function (control) {
420
415
  if (_this2.props.onSearch) {
421
416
  return function (value) {
422
417
  return _this2.props.onSearch(control.key, value, control);
@@ -425,7 +420,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
425
420
  return null;
426
421
  }
427
422
  });
428
- _defineProperty(_assertThisInitialized(_this2), "createGetCodeEvent", function (control) {
423
+ _defineProperty(_this2, "createGetCodeEvent", function (control) {
429
424
  if (_this2.props.onGetCode) {
430
425
  return function (value) {
431
426
  return _this2.props.onGetCode(control.key, value, control);
@@ -434,14 +429,14 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
434
429
  return null;
435
430
  }
436
431
  });
437
- _defineProperty(_assertThisInitialized(_this2), "toSearch", function (props, control) {
432
+ _defineProperty(_this2, "toSearch", function (props, control) {
438
433
  props.getPopupContainer = _this2.getPopupContainer;
439
434
  props.options = _this2.getOptions(control.key, control.options);
440
435
  props.onSearch = _this2.createSearchEvent(control);
441
436
  props.dropdownMatchSelectWidth = false;
442
437
  return /*#__PURE__*/React.createElement(Control, props);
443
438
  });
444
- _defineProperty(_assertThisInitialized(_this2), "toDate", function (props, _ref7) {
439
+ _defineProperty(_this2, "toDate", function (props, _ref7) {
445
440
  var rule = _ref7.rule;
446
441
  props.getCalendarContainer = _this2.getPopupContainer;
447
442
  props.style = {
@@ -450,7 +445,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
450
445
  rule && (props.disabledDate = _this2.validDate(rule));
451
446
  return /*#__PURE__*/React.createElement(Control, props);
452
447
  });
453
- _defineProperty(_assertThisInitialized(_this2), "toRangePicker", function (props, _ref8) {
448
+ _defineProperty(_this2, "toRangePicker", function (props, _ref8) {
454
449
  var rule = _ref8.rule;
455
450
  props.getCalendarContainer = _this2.getPopupContainer;
456
451
  props.style = {
@@ -459,34 +454,34 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
459
454
  // rule && (props.disabledDate = this.validDate(rule));
460
455
  return /*#__PURE__*/React.createElement(Control, props);
461
456
  });
462
- _defineProperty(_assertThisInitialized(_this2), "toRadioGroup", function (props, _ref9) {
457
+ _defineProperty(_this2, "toRadioGroup", function (props, _ref9) {
463
458
  var key = _ref9.key,
464
459
  options = _ref9.options;
465
460
  props.options = _this2.getOptions(key, options);
466
461
  return /*#__PURE__*/React.createElement(Control, props);
467
462
  });
468
- _defineProperty(_assertThisInitialized(_this2), "captcha", function (props, control) {
463
+ _defineProperty(_this2, "captcha", function (props, control) {
469
464
  props.onGetCode = _this2.props.onGetCode;
470
465
  return /*#__PURE__*/React.createElement(Control, props);
471
466
  });
472
- _defineProperty(_assertThisInitialized(_this2), "toReadonly", function (props, _ref10) {
473
- var options = _ref10.options,
474
- key = _ref10.key;
467
+ _defineProperty(_this2, "toReadonly", function (props, _ref0) {
468
+ var options = _ref0.options,
469
+ key = _ref0.key;
475
470
  props.value = getTitle(props.value, _this2.getOptions(key, options));
476
471
  return /*#__PURE__*/React.createElement(Control, props);
477
472
  });
478
- _defineProperty(_assertThisInitialized(_this2), "selectSearch", function (props, control) {
473
+ _defineProperty(_this2, "selectSearch", function (props, control) {
479
474
  props.getPopupContainer = _this2.getPopupContainer;
480
475
  props.options = _this2.getOptions(control.key, control.options);
481
476
  props.onSearch = _this2.createSearchEvent(control);
482
477
  props.dropdownMatchSelectWidth = false;
483
478
  return /*#__PURE__*/React.createElement(Control, props);
484
479
  });
485
- _defineProperty(_assertThisInitialized(_this2), "area", function (props, _ref11) {
486
- var key = _ref11.key,
487
- options = _ref11.options,
488
- _ref11$btnDisabled = _ref11.btnDisabled,
489
- btnDisabled = _ref11$btnDisabled === void 0 ? false : _ref11$btnDisabled;
480
+ _defineProperty(_this2, "area", function (props, _ref1) {
481
+ var key = _ref1.key,
482
+ options = _ref1.options,
483
+ _ref1$btnDisabled = _ref1.btnDisabled,
484
+ btnDisabled = _ref1$btnDisabled === void 0 ? false : _ref1$btnDisabled;
490
485
  var readonly = _this2.props.readonly;
491
486
  props.btnDisabled = btnDisabled;
492
487
  props.parentKey = key;
@@ -497,17 +492,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
497
492
  }) ? true : false;
498
493
  return /*#__PURE__*/React.createElement(Control, props);
499
494
  });
500
- _defineProperty(_assertThisInitialized(_this2), "uploadImg", function (props, control) {
501
- var _context22;
495
+ _defineProperty(_this2, "uploadImg", function (props, control) {
496
+ var _context20;
502
497
  var readonly = _this2.props.readonly;
503
498
  props.required = control.required || false;
504
- props.onFileChange = _bindInstanceProperty(_context22 = _this2.onFileChange).call(_context22, _assertThisInitialized(_this2), control);
499
+ props.onFileChange = _bindInstanceProperty(_context20 = _this2.onFileChange).call(_context20, _this2, control);
505
500
  props.readonly = readonly === true || _Array$isArray(readonly) && _someInstanceProperty(readonly).call(readonly, function (readonlyKey) {
506
501
  return readonlyKey === control.key;
507
502
  }) ? true : false;
508
503
  return /*#__PURE__*/React.createElement(Control, props);
509
504
  });
510
- _defineProperty(_assertThisInitialized(_this2), "toCascader", function (props, control) {
505
+ _defineProperty(_this2, "toCascader", function (props, control) {
511
506
  var container = _this2.getContainer();
512
507
  container && (props.getPopupContainer = container);
513
508
  props.options = control.options || [];
@@ -516,17 +511,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
516
511
  props.loadData = _this2.createSearchEvent(control);
517
512
  return /*#__PURE__*/React.createElement(Control, props);
518
513
  });
519
- _defineProperty(_assertThisInitialized(_this2), "toCheckbox", function (props, control) {
520
- var _context23;
514
+ _defineProperty(_this2, "toCheckbox", function (props, control) {
515
+ var _context21;
521
516
  var options = control.options || [];
522
517
  return /*#__PURE__*/React.createElement(_Checkbox.Group, {
523
518
  options: options,
524
519
  disabled: _this2.props.readonly === true,
525
- onChange: _bindInstanceProperty(_context23 = _this2.onBlur).call(_context23, _assertThisInitialized(_this2), control.key),
520
+ onChange: _bindInstanceProperty(_context21 = _this2.onBlur).call(_context21, _this2, control.key),
526
521
  value: _this2.props.value[control.key]
527
522
  });
528
523
  });
529
- _defineProperty(_assertThisInitialized(_this2), "toControl", function (props, control) {
524
+ _defineProperty(_this2, "toControl", function (props, control) {
530
525
  switch (props.type) {
531
526
  case 'readonly':
532
527
  return _this2.toReadonly(props, control);
@@ -576,36 +571,36 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
576
571
  return 'type error';
577
572
  }
578
573
  });
579
- _defineProperty(_assertThisInitialized(_this2), "toLabel", function (_ref12, type) {
580
- var title = _ref12.title,
581
- _ref12$preWrap = _ref12.preWrap,
582
- preWrap = _ref12$preWrap === void 0 ? false : _ref12$preWrap,
583
- showAdd = _ref12.showAdd,
584
- showQuery = _ref12.showQuery,
585
- key = _ref12.key,
586
- showInfo = _ref12.showInfo,
587
- showInfoTitle = _ref12.showInfoTitle,
588
- showIcon = _ref12.showIcon,
589
- iconType = _ref12.iconType;
574
+ _defineProperty(_this2, "toLabel", function (_ref10, type) {
575
+ var title = _ref10.title,
576
+ _ref10$preWrap = _ref10.preWrap,
577
+ preWrap = _ref10$preWrap === void 0 ? false : _ref10$preWrap,
578
+ showAdd = _ref10.showAdd,
579
+ showQuery = _ref10.showQuery,
580
+ key = _ref10.key,
581
+ showInfo = _ref10.showInfo,
582
+ showInfoTitle = _ref10.showInfoTitle,
583
+ showIcon = _ref10.showIcon,
584
+ iconType = _ref10.iconType;
590
585
  if (showAdd && type !== 'readonly') {
591
- var _context24;
592
- var onClick = _bindInstanceProperty(_context24 = _this2.onAdd).call(_context24, _assertThisInitialized(_this2), key, title);
586
+ var _context22;
587
+ var onClick = _bindInstanceProperty(_context22 = _this2.onAdd).call(_context22, _this2, key, title);
593
588
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
594
589
  role: "add",
595
590
  type: "plus-circle-o",
596
591
  onClick: onClick
597
592
  }));
598
593
  } else if (showQuery && type !== 'readonly') {
599
- var _context25;
600
- var _onClick = _bindInstanceProperty(_context25 = _this2.onAdd).call(_context25, _assertThisInitialized(_this2), key, title);
594
+ var _context23;
595
+ var _onClick = _bindInstanceProperty(_context23 = _this2.onAdd).call(_context23, _this2, key, title);
601
596
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
602
597
  role: "add",
603
598
  type: "search",
604
599
  onClick: _onClick
605
600
  }));
606
601
  } else if (showIcon && iconType && type !== 'readonly' && showInfoTitle) {
607
- var _context26;
608
- var _onClick2 = _bindInstanceProperty(_context26 = _this2.onAdd).call(_context26, _assertThisInitialized(_this2), key, title);
602
+ var _context24;
603
+ var _onClick2 = _bindInstanceProperty(_context24 = _this2.onAdd).call(_context24, _this2, key, title);
609
604
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Tooltip, {
610
605
  title: showInfoTitle
611
606
  }, /*#__PURE__*/React.createElement(_Icon, {
@@ -614,8 +609,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
614
609
  onClick: _onClick2
615
610
  })));
616
611
  } else if (showIcon && iconType && type !== 'readonly') {
617
- var _context27;
618
- var _onClick3 = _bindInstanceProperty(_context27 = _this2.onAdd).call(_context27, _assertThisInitialized(_this2), key, title);
612
+ var _context25;
613
+ var _onClick3 = _bindInstanceProperty(_context25 = _this2.onAdd).call(_context25, _this2, key, title);
619
614
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
620
615
  role: "add",
621
616
  type: iconType,
@@ -637,7 +632,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
637
632
  return title;
638
633
  }
639
634
  });
640
- _defineProperty(_assertThisInitialized(_this2), "toCol", function (span, control) {
635
+ _defineProperty(_this2, "toCol", function (span, control) {
641
636
  var factor = control.span || 1;
642
637
  var status = _this2.getValidState(control);
643
638
  var controlProps = _this2.getControlProps(control, status);
@@ -658,7 +653,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
658
653
  key: control.key
659
654
  }, checkable && /*#__PURE__*/React.createElement(_Checkbox, {
660
655
  className: variables('SuperForm2').checkbox,
661
- onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem, _assertThisInitialized(_this2), control),
656
+ onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem, _this2, control),
662
657
  checked: control.checked
663
658
  }), /*#__PURE__*/React.createElement(FormItem, _extends({}, itemProps, {
664
659
  className: checkable ? variables('SuperForm2').formItemWithCheckbox : '',
@@ -686,8 +681,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
686
681
  }
687
682
  });
688
683
  });
689
- _defineProperty(_assertThisInitialized(_this2), "toCols", function () {
690
- var _context28;
684
+ _defineProperty(_this2, "toCols", function () {
685
+ var _context26;
691
686
  var _this2$props5 = _this2.props,
692
687
  _this2$props5$colNum = _this2$props5.colNum,
693
688
  colNum = _this2$props5$colNum === void 0 ? defaultColNum : _this2$props5$colNum,
@@ -696,7 +691,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
696
691
  colNum = 1;
697
692
  }
698
693
  var span = 24 / colNum;
699
- return _mapInstanceProperty(_context28 = _this2.getControls()).call(_context28, function (control) {
694
+ return _mapInstanceProperty(_context26 = _this2.getControls()).call(_context26, function (control) {
700
695
  if (allFullFather) {
701
696
  control.allFullFather = allFullFather;
702
697
  }
@@ -705,7 +700,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
705
700
  });
706
701
  return _this2;
707
702
  }
708
- _createClass(SuperForm2, [{
703
+ _inherits(SuperForm2, _React$Component2);
704
+ return _createClass(SuperForm2, [{
709
705
  key: "render",
710
706
  value: function render() {
711
707
  this.initValidState();
@@ -723,7 +719,6 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
723
719
  }, this.toCols())));
724
720
  }
725
721
  }]);
726
- return SuperForm2;
727
722
  }(React.Component);
728
723
  _defineProperty(SuperForm2, "propTypes", {
729
724
  controls: PropTypes.arrayOf(PropTypes.shape(ControlType)).isRequired,