cloud-b2b 1.1.57 → 1.1.58

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 (74) 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/Sidebar/Sidebar.js +14 -11
  19. package/es/Sidebar2/Sidebar.js +16 -13
  20. package/es/SuperForm/SuperForm.js +79 -74
  21. package/es/SuperForm2/SuperForm.js +100 -95
  22. package/es/SuperPagination/SuperPagination.js +11 -8
  23. package/es/SuperTab/SuperTab.js +15 -12
  24. package/es/SuperTab2/SuperTab2.js +16 -13
  25. package/es/SuperTable/DragSortRow.js +15 -12
  26. package/es/SuperTable/FilterDropDown.js +14 -11
  27. package/es/SuperTable/SuperTable.js +71 -68
  28. package/es/SuperTable2/SuperTable2.js +89 -86
  29. package/es/SuperTable2/SuperTableCell.js +35 -25
  30. package/es/SuperTable3/FilterDropDown.js +14 -11
  31. package/es/SuperTable3/SuperTable.js +61 -58
  32. package/es/SuperToolbar/SuperToolbar.js +14 -11
  33. package/es/SuperUpload/SuperUpload.js +74 -74
  34. package/es/Viewer/ImageViews.js +19 -16
  35. package/es/Viewer/Viewer.js +14 -11
  36. package/es/helper.js +17 -18
  37. package/lib/Area/Area.js +11 -8
  38. package/lib/CodeInput/CodeInput.js +19 -16
  39. package/lib/Enhance/Dialogs.js +14 -11
  40. package/lib/Enhance/Loading.js +18 -15
  41. package/lib/Header/Header.js +20 -17
  42. package/lib/Header/Vertical.js +14 -11
  43. package/lib/ImageView/ImageView.js +13 -10
  44. package/lib/InpurCascader/InputCascader.js +14 -11
  45. package/lib/InputEditor/InputEditor.js +18 -16
  46. package/lib/InputSearch/InputSearch.js +22 -19
  47. package/lib/InputSelect/InputSelect.js +17 -14
  48. package/lib/InputTreeSelect/InputTreeSelect.js +13 -10
  49. package/lib/InputWriting/InputWriting.js +15 -12
  50. package/lib/Layout/Layout.js +17 -14
  51. package/lib/LayoutLink/LayoutLink.js +2 -1
  52. package/lib/Link/Link.js +10 -7
  53. package/lib/NumberInput/NumberInput.js +16 -13
  54. package/lib/Search/Search.js +57 -53
  55. package/lib/Sidebar/Sidebar.js +14 -11
  56. package/lib/Sidebar2/Sidebar.js +16 -13
  57. package/lib/SuperForm/SuperForm.js +81 -75
  58. package/lib/SuperForm2/SuperForm.js +102 -96
  59. package/lib/SuperPagination/SuperPagination.js +11 -8
  60. package/lib/SuperTab/SuperTab.js +15 -12
  61. package/lib/SuperTab2/SuperTab2.js +16 -13
  62. package/lib/SuperTable/DragSortRow.js +15 -12
  63. package/lib/SuperTable/FilterDropDown.js +14 -11
  64. package/lib/SuperTable/SuperTable.js +71 -68
  65. package/lib/SuperTable2/SuperTable2.js +91 -87
  66. package/lib/SuperTable2/SuperTableCell.js +35 -25
  67. package/lib/SuperTable3/FilterDropDown.js +14 -11
  68. package/lib/SuperTable3/SuperTable.js +61 -58
  69. package/lib/SuperToolbar/SuperToolbar.js +14 -11
  70. package/lib/SuperUpload/SuperUpload.js +76 -75
  71. package/lib/Viewer/ImageViews.js +19 -16
  72. package/lib/Viewer/Viewer.js +14 -11
  73. package/lib/helper.js +17 -18
  74. package/package.json +1 -1
@@ -40,9 +40,10 @@ var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
40
40
  var _icon = _interopRequireDefault(require("antd/lib/icon"));
41
41
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
42
42
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
43
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
44
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
43
45
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
44
46
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
45
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
46
47
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
47
48
  var _radio = _interopRequireDefault(require("antd/lib/radio"));
48
49
  var _react = _interopRequireDefault(require("react"));
@@ -56,14 +57,15 @@ var _variables = _interopRequireDefault(require("../variables"));
56
57
  var _helper = _interopRequireWildcard(require("../helper"));
57
58
  var _DragSortRow = _interopRequireDefault(require("../SuperTable/DragSortRow"));
58
59
  var _excluded = ["onRowClick"];
59
- 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" != _typeof(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); }
60
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (_Array$isArray2(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
61
- function _unsupportedIterableToArray(r, a) { if (r) { var _context18; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context18 = {}.toString.call(r)).call(_context18, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
62
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
60
+ 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); }
61
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(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; }
62
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
63
+ function _unsupportedIterableToArray(o, minLen) { var _context20; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context20 = Object.prototype.toString.call(o)).call(_context20, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
64
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
63
65
  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; }
64
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context16, _context17; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context16 = ownKeys(Object(t), !0)).call(_context16, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context17 = ownKeys(Object(t))).call(_context17, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
65
- 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)); }
66
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
66
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context18, _context19; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context18 = ownKeys(Object(t), !0)).call(_context18, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context19 = ownKeys(Object(t))).call(_context19, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
67
+ 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); }; }
68
+ 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; } }
67
69
  var RadioGroup = _radio["default"].Group;
68
70
  var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select',
69
71
  //存储value
@@ -75,7 +77,7 @@ var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select',
75
77
  //按钮组
76
78
  'img',
77
79
  //图片标题组 value为{src,title}时显示图片标题 为字符串时 只显示图片
78
- 'uploadImg', 'double', 'radioGroup'];
80
+ 'uploadImg', 'double', 'radioGroup', 'selectWriting'];
79
81
 
80
82
  /**
81
83
  * key:标识所在列,在一个表格中必须唯一
@@ -137,6 +139,8 @@ var CallbackType = {
137
139
  * isEmphasized: [可选],是否强调,行字体加粗显示, 除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
138
140
  */
139
141
  var SuperTable2 = /*#__PURE__*/function (_React$Component) {
142
+ (0, _inherits2["default"])(SuperTable2, _React$Component);
143
+ var _super = _createSuper(SuperTable2);
140
144
  function SuperTable2() {
141
145
  var _context;
142
146
  var _this;
@@ -144,22 +148,22 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
144
148
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
145
149
  args[_key] = arguments[_key];
146
150
  }
147
- _this = _callSuper(this, SuperTable2, (0, _concat["default"])(_context = []).call(_context, args));
148
- (0, _defineProperty2["default"])(_this, "onSwitch", function (key, rowIndex) {
151
+ _this = _super.call.apply(_super, (0, _concat["default"])(_context = [this]).call(_context, args));
152
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onSwitch", function (key, rowIndex) {
149
153
  return function (value) {
150
154
  var _ref = _this.props.callback || {},
151
155
  onContentChange = _ref.onContentChange;
152
156
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
153
157
  };
154
158
  });
155
- (0, _defineProperty2["default"])(_this, "onCheck", function (key, rowIndex) {
159
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onCheck", function (key, rowIndex) {
156
160
  return function (e) {
157
161
  var _ref2 = _this.props.callback || {},
158
162
  onCheck = _ref2.onCheck;
159
163
  onCheck && onCheck(_this.getIndex(rowIndex), key, e.target.checked);
160
164
  };
161
165
  });
162
- (0, _defineProperty2["default"])(_this, "onChange", function (key, rowIndex) {
166
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (key, rowIndex) {
163
167
  return function (value) {
164
168
  var _ref3 = _this.props.callback || {},
165
169
  onContentChange = _ref3.onContentChange;
@@ -167,7 +171,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
167
171
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
168
172
  };
169
173
  });
170
- (0, _defineProperty2["default"])(_this, "onDoubleChange1", function (key, rowIndex) {
174
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDoubleChange1", function (key, rowIndex) {
171
175
  return function (doublekey, value) {
172
176
  var _ref4 = _this.props.callback || {},
173
177
  onContentChange = _ref4.onContentChange;
@@ -175,28 +179,28 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
175
179
  onContentChange && onContentChange(_this.getIndex(rowIndex), doublekey, value);
176
180
  };
177
181
  });
178
- (0, _defineProperty2["default"])(_this, "onSearch", function (key, rowIndex, config) {
182
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onSearch", function (key, rowIndex, config) {
179
183
  return function (value) {
180
184
  var _ref5 = _this.props.callback || {},
181
185
  onSearch = _ref5.onSearch;
182
186
  onSearch && onSearch(_this.getIndex(rowIndex), key, value, config);
183
187
  };
184
188
  });
185
- (0, _defineProperty2["default"])(_this, "onAdd", function (key) {
189
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onAdd", function (key) {
186
190
  return function () {
187
191
  var _ref6 = _this.props.callback || {},
188
192
  onAdd = _ref6.onAdd;
189
193
  onAdd && onAdd(key);
190
194
  };
191
195
  });
192
- (0, _defineProperty2["default"])(_this, "onRowAdd", function (key, index) {
196
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRowAdd", function (key, index) {
193
197
  return function () {
194
198
  var _ref7 = _this.props.callback || {},
195
199
  onLink = _ref7.onLink;
196
200
  onLink && onLink(key, index, _this.props.items[index]);
197
201
  };
198
202
  });
199
- (0, _defineProperty2["default"])(_this, "onBlur", function (key, rowIndex) {
203
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onBlur", function (key, rowIndex) {
200
204
  return function (value) {
201
205
  var _ref8 = _this.props.callback || {},
202
206
  onBlur = _ref8.onBlur;
@@ -204,33 +208,33 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
204
208
  onBlur && onBlur(_this.getIndex(rowIndex), key, value);
205
209
  };
206
210
  });
207
- (0, _defineProperty2["default"])(_this, "onDoubleClick", function (key, value) {
211
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDoubleClick", function (key, value) {
208
212
  return function () {
209
213
  var _ref9 = _this.props.callback || {},
210
214
  onDoubleClick = _ref9.onDoubleClick;
211
215
  onDoubleClick && onDoubleClick(key, value);
212
216
  };
213
217
  });
214
- (0, _defineProperty2["default"])(_this, "onImgTileClick", function (col, value, rowIndex) {
218
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onImgTileClick", function (col, value, rowIndex) {
215
219
  return function () {
216
- var _ref0 = _this.props.callback || {},
217
- onImgTileClick = _ref0.onImgTileClick;
220
+ var _ref10 = _this.props.callback || {},
221
+ onImgTileClick = _ref10.onImgTileClick;
218
222
  onImgTileClick && onImgTileClick(col, value, rowIndex);
219
223
  };
220
224
  });
221
- (0, _defineProperty2["default"])(_this, "onMoveRow", function (dragIndex, targetIndex) {
222
- var _ref1 = _this.props.callback || {},
223
- onMoveRow = _ref1.onMoveRow;
225
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onMoveRow", function (dragIndex, targetIndex) {
226
+ var _ref11 = _this.props.callback || {},
227
+ onMoveRow = _ref11.onMoveRow;
224
228
  onMoveRow && onMoveRow(dragIndex, targetIndex);
225
229
  });
226
- (0, _defineProperty2["default"])(_this, "closeValid", function () {
230
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "closeValid", function () {
227
231
  var _this$props = _this.props,
228
232
  valid = _this$props.valid,
229
233
  _this$props$callback = _this$props.callback,
230
234
  callback = _this$props$callback === void 0 ? {} : _this$props$callback;
231
235
  valid && callback.onExitValid();
232
236
  });
233
- (0, _defineProperty2["default"])(_this, "getOptions", function (key, colOptions, index) {
237
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getOptions", function (key, colOptions, index) {
234
238
  var options = _this.props.items[index].options;
235
239
  var options2 = _this.props.options;
236
240
  if (options && (0, _isArray["default"])(options[key])) {
@@ -241,7 +245,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
241
245
  return colOptions;
242
246
  }
243
247
  });
244
- (0, _defineProperty2["default"])(_this, "validField", function (required, value) {
248
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "validField", function (required, value) {
245
249
  if (!_this.props.valid || _this.error || !required || value) {
246
250
  return false;
247
251
  } else if (typeof value === 'number') {
@@ -251,15 +255,15 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
251
255
  return true;
252
256
  }
253
257
  });
254
- (0, _defineProperty2["default"])(_this, "toRadio", function (_ref10, index) {
255
- var value = _ref10.value,
256
- title = _ref10.title;
258
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toRadio", function (_ref12, index) {
259
+ var value = _ref12.value,
260
+ title = _ref12.title;
257
261
  return /*#__PURE__*/_react["default"].createElement(_radio["default"], {
258
262
  key: index,
259
263
  value: String(value)
260
264
  }, title);
261
265
  });
262
- (0, _defineProperty2["default"])(_this, "renderRadioGroup", function (config, value, index) {
266
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderRadioGroup", function (config, value, index) {
263
267
  var key = config.key,
264
268
  options = config.options;
265
269
  var radioGroupProps = {
@@ -270,7 +274,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
270
274
  };
271
275
  return /*#__PURE__*/_react["default"].createElement(RadioGroup, radioGroupProps, (0, _map["default"])(options).call(options, _this.toRadio));
272
276
  });
273
- (0, _defineProperty2["default"])(_this, "renderEditableCell", function (config, value, index) {
277
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderEditableCell", function (config, value, index) {
274
278
  var key = config.key,
275
279
  type = config.type,
276
280
  options = config.options,
@@ -362,7 +366,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
362
366
  }
363
367
  return /*#__PURE__*/_react["default"].createElement(_SuperTableCell["default"], cellProps);
364
368
  });
365
- (0, _defineProperty2["default"])(_this, "renderDoubleEditableCell", function (config, value, index) {
369
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderDoubleEditableCell", function (config, value, index) {
366
370
  var key = config.key,
367
371
  type = config.type,
368
372
  options = config.options,
@@ -392,7 +396,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
392
396
  };
393
397
  return /*#__PURE__*/_react["default"].createElement(_SuperTableCell["default"], cellProps);
394
398
  });
395
- (0, _defineProperty2["default"])(_this, "renderLinkCell", function (col, value, record, index) {
399
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderLinkCell", function (col, value, record, index) {
396
400
  if (col.link === 'list') {
397
401
  var list = value && (0, _isArray["default"])(value) ? value : [];
398
402
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -403,8 +407,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
403
407
  var _context2;
404
408
  var split = index2 === list.length - 1 ? '' : ',';
405
409
  var onClick = function onClick() {
406
- var _ref11 = _this.props.callback || {},
407
- onLink = _ref11.onLink;
410
+ var _ref13 = _this.props.callback || {},
411
+ onLink = _ref13.onLink;
408
412
  onLink && onLink(col.key, index, item2);
409
413
  };
410
414
  return /*#__PURE__*/_react["default"].createElement("a", {
@@ -415,8 +419,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
415
419
  } else {
416
420
  var title = typeof col.link === 'string' ? col.link : value;
417
421
  var onClick = function onClick() {
418
- var _ref12 = _this.props.callback || {},
419
- onLink = _ref12.onLink;
422
+ var _ref14 = _this.props.callback || {},
423
+ onLink = _ref14.onLink;
420
424
  onLink && onLink(col.key, index, record);
421
425
  };
422
426
  return /*#__PURE__*/_react["default"].createElement("a", {
@@ -428,12 +432,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
428
432
  }, title);
429
433
  }
430
434
  });
431
- (0, _defineProperty2["default"])(_this, "getIndex", function (index) {
435
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getIndex", function (index) {
432
436
  return (_this.props.base || 0) + index;
433
437
  });
434
- (0, _defineProperty2["default"])(_this, "getCellRender", function (col) {
438
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getCellRender", function (col) {
435
439
  return function (value, record, index) {
436
- var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0;
440
+ var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
437
441
  var realType = record._isEdit === true && _this.canReadonly(col.type) ? col.editType : col.type;
438
442
  if (!realType) {
439
443
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -553,7 +557,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
553
557
  case 'uploadImg':
554
558
  var commonProps = _this.props.callback.buildSuperUploadProps ? _this.props.callback.buildSuperUploadProps() : {};
555
559
  var uploadProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
556
- onFileChange: _this.props.callback.onTableFileChange ? (0, _bind["default"])(_context0 = _this.props.callback.onTableFileChange).call(_context0, null, col.key, index) : undefined,
560
+ onFileChange: _this.props.callback.onTableFileChange ? (0, _bind["default"])(_context10 = _this.props.callback.onTableFileChange).call(_context10, null, col.key, index) : undefined,
557
561
  type: col.type
558
562
  }, col.props), _this.props), commonProps), {}, {
559
563
  value: _this.props.items[index][col.key]
@@ -570,7 +574,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
570
574
  }
571
575
  };
572
576
  });
573
- (0, _defineProperty2["default"])(_this, "getCheckedStatus", function (key) {
577
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getCheckedStatus", function (key) {
574
578
  var has = false,
575
579
  not = false;
576
580
  var items = _this.props.items;
@@ -591,7 +595,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
591
595
  indeterminate: has && not
592
596
  };
593
597
  });
594
- (0, _defineProperty2["default"])(_this, "toAdd", function (key, showAdd) {
598
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toAdd", function (key, showAdd) {
595
599
  if (showAdd) {
596
600
  var onClick = _this.onAdd(key);
597
601
  return /*#__PURE__*/_react["default"].createElement(_icon["default"], {
@@ -603,12 +607,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
603
607
  return null;
604
608
  }
605
609
  });
606
- (0, _defineProperty2["default"])(_this, "getColumnTitle", function (_ref13) {
607
- var required = _ref13.required,
608
- title = _ref13.title,
609
- type = _ref13.type,
610
- key = _ref13.key,
611
- showAdd = _ref13.showAdd;
610
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnTitle", function (_ref15) {
611
+ var required = _ref15.required,
612
+ title = _ref15.title,
613
+ type = _ref15.type,
614
+ key = _ref15.key,
615
+ showAdd = _ref15.showAdd;
612
616
  if (type === 'checkbox') {
613
617
  var status = _this.getCheckedStatus(key);
614
618
  return /*#__PURE__*/_react["default"].createElement(_checkbox["default"], (0, _extends2["default"])({
@@ -621,31 +625,31 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
621
625
  }, title, _this.toAdd(key, showAdd));
622
626
  }
623
627
  });
624
- (0, _defineProperty2["default"])(_this, "getColumnClassName", function (_ref14) {
625
- var type = _ref14.type,
626
- align = _ref14.align;
628
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnClassName", function (_ref16) {
629
+ var type = _ref16.type,
630
+ align = _ref16.align;
627
631
  if (type === 'index' || type === 'checkbox') {
628
632
  return 'ant-table-selection-column';
629
633
  } else {
630
634
  return align ? (0, _variables["default"])('SuperTable2')[align] : '';
631
635
  }
632
636
  });
633
- (0, _defineProperty2["default"])(_this, "canReadonly", function (type) {
634
- var _context1;
635
- return !(0, _includes["default"])(_context1 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context1, type);
637
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "canReadonly", function (type) {
638
+ var _context11;
639
+ return !(0, _includes["default"])(_context11 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context11, type);
636
640
  });
637
- (0, _defineProperty2["default"])(_this, "getColumns", function (cols) {
638
- var _context10;
641
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumns", function (cols) {
642
+ var _context12;
639
643
  var readonly = _this.props.readonly;
640
- return (0, _map["default"])(_context10 = (0, _filter["default"])(cols).call(cols, function (col) {
644
+ return (0, _map["default"])(_context12 = (0, _filter["default"])(cols).call(cols, function (col) {
641
645
  return !col.hide;
642
- })).call(_context10, function (_ref15, index) {
643
- var _context11;
644
- var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref15), _ref15));
646
+ })).call(_context12, function (_ref17, index) {
647
+ var _context13;
648
+ var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref17), _ref17));
645
649
  col.className = _this.getColumnClassName(col);
646
650
  col.title = _this.getColumnTitle(col);
647
651
  col.dataIndex = col.key;
648
- col.width = col.width ? col.width : (0, _includes["default"])(_context11 = ['index', 'checked']).call(_context11, col.key) ? 70 : col.type === 'img' ? 200 : 120;
652
+ col.width = col.width ? col.width : (0, _includes["default"])(_context13 = ['index', 'checked']).call(_context13, col.key) ? 70 : col.type === 'img' ? 200 : 120;
649
653
  // const {props = {}} =
650
654
  // const {edit = false} = props
651
655
  // if (!(readonly || col.type === 'readonly') || !this.canReadonly(col.type)) {
@@ -671,7 +675,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
671
675
  return col;
672
676
  });
673
677
  });
674
- (0, _defineProperty2["default"])(_this, "getText", function (value, options) {
678
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getText", function (value, options) {
675
679
  if ((0, _isArray["default"])(value)) {
676
680
  return (0, _map["default"])(value).call(value, function (v) {
677
681
  return (0, _Control.getTitle)(v, options);
@@ -680,14 +684,14 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
680
684
  return (0, _Control.getTitle)(value, options);
681
685
  }
682
686
  });
683
- (0, _defineProperty2["default"])(_this, "getDataSource", function (items, cols) {
687
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getDataSource", function (items, cols) {
684
688
  return (0, _map["default"])(items).call(items, function (item, index) {
685
- return (0, _reduce["default"])(cols).call(cols, function (result, _ref16) {
686
- var _context12, _context13;
687
- var key = _ref16.key,
688
- type = _ref16.type,
689
- options = _ref16.options;
690
- if (!_this.props.readonly && type && type !== 'readonly' && (!item.isReadonly || (0, _isArray["default"])(item.isReadonly) && !(0, _includes["default"])(_context12 = item.isReadonly).call(_context12, key)) || (0, _includes["default"])(_context13 = ['img', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context13, type)) {
689
+ return (0, _reduce["default"])(cols).call(cols, function (result, _ref18) {
690
+ var _context14, _context15;
691
+ var key = _ref18.key,
692
+ type = _ref18.type,
693
+ options = _ref18.options;
694
+ if (!_this.props.readonly && type && type !== 'readonly' && (!item.isReadonly || (0, _isArray["default"])(item.isReadonly) && !(0, _includes["default"])(_context14 = item.isReadonly).call(_context14, key)) || (0, _includes["default"])(_context15 = ['img', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context15, type)) {
691
695
  result[key] = item[key];
692
696
  } else {
693
697
  result[key] = _this.getText(item[key], options);
@@ -699,7 +703,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
699
703
  }));
700
704
  });
701
705
  });
702
- (0, _defineProperty2["default"])(_this, "getPropsByCheckbox", function () {
706
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPropsByCheckbox", function () {
703
707
  var _this$props2 = _this.props,
704
708
  items = _this$props2.items,
705
709
  _this$props2$isEmphas = _this$props2.isEmphasized,
@@ -714,13 +718,13 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
714
718
  rowClassName: rowClassName
715
719
  };
716
720
  });
717
- (0, _defineProperty2["default"])(_this, "getSelectedRowKeys", function (items) {
721
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getSelectedRowKeys", function (items) {
718
722
  return (0, _reduce["default"])(items).call(items, function (result, item, index) {
719
723
  item.checked && result.push(index);
720
724
  return result;
721
725
  }, []);
722
726
  });
723
- (0, _defineProperty2["default"])(_this, "getPropsByCheckbox2", function (items) {
727
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPropsByCheckbox2", function (items) {
724
728
  var _this$props3 = _this.props,
725
729
  _this$props3$checkbox = _this$props3.checkbox,
726
730
  checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
@@ -805,7 +809,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
805
809
  };
806
810
  }
807
811
  });
808
- (0, _defineProperty2["default"])(_this, "getRowPropsForDrag", function () {
812
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowPropsForDrag", function () {
809
813
  return function (record, index) {
810
814
  return {
811
815
  index: index,
@@ -813,7 +817,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
813
817
  };
814
818
  };
815
819
  });
816
- (0, _defineProperty2["default"])(_this, "getRowProps", function (onRowClick) {
820
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowProps", function (onRowClick) {
817
821
  return function (record) {
818
822
  return {
819
823
  onClick: function onClick() {
@@ -825,8 +829,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
825
829
  };
826
830
  };
827
831
  });
828
- (0, _defineProperty2["default"])(_this, "getProps", function () {
829
- var _context14;
832
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getProps", function () {
833
+ var _context16;
830
834
  var _this$props4 = _this.props,
831
835
  cols = _this$props4.cols,
832
836
  items = _this$props4.items,
@@ -844,11 +848,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
844
848
  expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
845
849
  _this$props4$onExpand = _this$props4.onExpand,
846
850
  onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand;
847
- var widthX = (0, _reduce["default"])(_context14 = (0, _filter["default"])(cols).call(cols, function (col) {
851
+ var widthX = (0, _reduce["default"])(_context16 = (0, _filter["default"])(cols).call(cols, function (col) {
848
852
  return !col.hide;
849
- })).call(_context14, function (width, item) {
850
- var _context15;
851
- return width += item.width ? item.width : (0, _includes["default"])(_context15 = ['index', 'checked']).call(_context15, item.key) ? 70 : item.type === 'img' ? 200 : 120;
853
+ })).call(_context16, function (width, item) {
854
+ var _context17;
855
+ return width += item.width ? item.width : (0, _includes["default"])(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
852
856
  }, 0);
853
857
  var scrollProps = !_helper["default"].isEmpty2(expandedRowRender) ? {
854
858
  expandedRowRender: expandedRowRender
@@ -886,9 +890,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
886
890
  onExpand: onExpand
887
891
  }, scrollProps);
888
892
  });
889
- (0, _defineProperty2["default"])(_this, "setScroll", function () {
893
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setScroll", function () {
890
894
  if (_this.props.maxHeight && _this.props.items.length) {
891
- var root = _reactDom["default"].findDOMNode(_this);
895
+ var root = _reactDom["default"].findDOMNode((0, _assertThisInitialized2["default"])(_this));
892
896
  var container = root.getElementsByClassName('ant-table-body')[0];
893
897
  var header = root.getElementsByClassName('ant-table-thead')[0];
894
898
  (0, _fixed["default"])(container, header, _this.props.maxHeight);
@@ -896,8 +900,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
896
900
  });
897
901
  return _this;
898
902
  }
899
- (0, _inherits2["default"])(SuperTable2, _React$Component);
900
- return (0, _createClass2["default"])(SuperTable2, [{
903
+ (0, _createClass2["default"])(SuperTable2, [{
901
904
  key: "componentDidMount",
902
905
  value: function componentDidMount() {
903
906
  this.setScroll();
@@ -916,6 +919,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
916
919
  }));
917
920
  }
918
921
  }]);
922
+ return SuperTable2;
919
923
  }(_react["default"].Component);
920
924
  (0, _defineProperty2["default"])(SuperTable2, "propTypes", {
921
925
  cols: _propTypes["default"].arrayOf(_propTypes["default"].shape(ColType)).isRequired,