cloud-b2b 1.1.55 → 1.1.57

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