cloud-b2b 1.1.69 → 1.1.71

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 (84) hide show
  1. package/es/Area/Area.js +8 -11
  2. package/es/CodeInput/CodeInput.js +16 -19
  3. package/es/Control/Control.js +21 -3
  4. package/es/Enhance/Dialogs.js +11 -14
  5. package/es/Enhance/Loading.js +15 -18
  6. package/es/Header/Header.js +17 -20
  7. package/es/Header/Vertical.js +11 -14
  8. package/es/ImageView/ImageView.js +10 -13
  9. package/es/InpurCascader/InputCascader.js +11 -14
  10. package/es/InputEditor/InputEditor.js +16 -18
  11. package/es/InputSearch/InputSearch.js +22 -24
  12. package/es/InputSelect/InputSelect.js +14 -17
  13. package/es/InputTreeSelect/InputTreeSelect.js +10 -13
  14. package/es/InputWriting/InputWriting.js +12 -15
  15. package/es/Layout/Layout.js +14 -17
  16. package/es/Link/Link.js +7 -10
  17. package/es/NumberInput/NumberInput.js +13 -16
  18. package/es/Search/Search.js +52 -55
  19. package/es/Search2/Search.js +83 -86
  20. package/es/Search2/Search.less +64 -64
  21. package/es/Search2/package.json +6 -6
  22. package/es/Sidebar/Sidebar.js +11 -14
  23. package/es/Sidebar2/Sidebar.js +13 -16
  24. package/es/SuperForm/SuperForm.js +74 -79
  25. package/es/SuperForm2/SuperForm.js +114 -105
  26. package/es/SuperForm2/SuperForm.less +7 -0
  27. package/es/SuperPagination/SuperPagination.js +8 -11
  28. package/es/SuperTab/SuperTab.js +12 -15
  29. package/es/SuperTab2/SuperTab2.js +13 -16
  30. package/es/SuperTable/DragSortRow.js +12 -15
  31. package/es/SuperTable/FilterDropDown.js +11 -14
  32. package/es/SuperTable/SuperTable.js +70 -73
  33. package/es/SuperTable2/SuperTable2.js +89 -92
  34. package/es/SuperTable2/SuperTableCell.js +27 -30
  35. package/es/SuperTable3/FilterDropDown.js +11 -14
  36. package/es/SuperTable3/SuperTable.js +58 -61
  37. package/es/SuperToolbar/SuperToolbar.js +11 -14
  38. package/es/SuperUpload/SuperUpload.js +74 -74
  39. package/es/Viewer/ImageViews.js +16 -19
  40. package/es/Viewer/Viewer.js +11 -14
  41. package/es/helper.js +18 -17
  42. package/lib/Area/Area.js +8 -11
  43. package/lib/CodeInput/CodeInput.js +16 -19
  44. package/lib/Control/Control.js +21 -3
  45. package/lib/Enhance/Dialogs.js +11 -14
  46. package/lib/Enhance/Loading.js +15 -18
  47. package/lib/Header/Header.js +17 -20
  48. package/lib/Header/Vertical.js +11 -14
  49. package/lib/ImageView/ImageView.js +10 -13
  50. package/lib/InpurCascader/InputCascader.js +11 -14
  51. package/lib/InputEditor/InputEditor.js +16 -18
  52. package/lib/InputSearch/InputSearch.js +22 -24
  53. package/lib/InputSelect/InputSelect.js +14 -17
  54. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  55. package/lib/InputWriting/InputWriting.js +12 -15
  56. package/lib/Layout/Layout.js +14 -17
  57. package/lib/LayoutLink/LayoutLink.js +1 -2
  58. package/lib/Link/Link.js +7 -10
  59. package/lib/NumberInput/NumberInput.js +13 -16
  60. package/lib/Search/Search.js +53 -57
  61. package/lib/Search2/Search.js +84 -88
  62. package/lib/Search2/Search.less +64 -64
  63. package/lib/Search2/package.json +6 -6
  64. package/lib/Sidebar/Sidebar.js +11 -14
  65. package/lib/Sidebar2/Sidebar.js +13 -16
  66. package/lib/SuperForm/SuperForm.js +75 -81
  67. package/lib/SuperForm2/SuperForm.js +115 -107
  68. package/lib/SuperForm2/SuperForm.less +7 -0
  69. package/lib/SuperPagination/SuperPagination.js +8 -11
  70. package/lib/SuperTab/SuperTab.js +12 -15
  71. package/lib/SuperTab2/SuperTab2.js +13 -16
  72. package/lib/SuperTable/DragSortRow.js +12 -15
  73. package/lib/SuperTable/FilterDropDown.js +11 -14
  74. package/lib/SuperTable/SuperTable.js +70 -73
  75. package/lib/SuperTable2/SuperTable2.js +90 -94
  76. package/lib/SuperTable2/SuperTableCell.js +27 -30
  77. package/lib/SuperTable3/FilterDropDown.js +11 -14
  78. package/lib/SuperTable3/SuperTable.js +58 -61
  79. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  80. package/lib/SuperUpload/SuperUpload.js +75 -76
  81. package/lib/Viewer/ImageViews.js +16 -19
  82. package/lib/Viewer/Viewer.js +11 -14
  83. package/lib/helper.js +18 -17
  84. package/package.json +1 -1
@@ -39,10 +39,9 @@ var _icon = _interopRequireDefault(require("antd/lib/icon"));
39
39
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
40
40
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
41
41
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
42
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
43
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
44
42
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
45
43
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
44
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
46
45
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
47
46
  var _react = _interopRequireDefault(require("react"));
48
47
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -54,9 +53,9 @@ var _DragSortRow = _interopRequireDefault(require("./DragSortRow"));
54
53
  var _variables = _interopRequireDefault(require("../variables"));
55
54
  var _excluded = ["onRowClick"];
56
55
  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; }
57
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context10, _context11; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty2(_context10 = ownKeys(Object(t), !0)).call(_context10, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty2(_context11 = ownKeys(Object(t))).call(_context11, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
58
- 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); }; }
59
- 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; } }
56
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty2(_context0 = ownKeys(Object(t), !0)).call(_context0, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty2(_context1 = ownKeys(Object(t))).call(_context1, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
57
+ 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)); }
58
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
60
59
  /**
61
60
  * sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
62
61
  * filter: [可选],是否支持过滤,默认为false
@@ -117,8 +116,6 @@ var CallbackType = {
117
116
  * searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
118
117
  */
119
118
  var SuperTable = /*#__PURE__*/function (_React$Component) {
120
- (0, _inherits2["default"])(SuperTable, _React$Component);
121
- var _super = _createSuper(SuperTable);
122
119
  function SuperTable() {
123
120
  var _context;
124
121
  var _this;
@@ -126,18 +123,18 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
126
123
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
127
124
  args[_key] = arguments[_key];
128
125
  }
129
- _this = _super.call.apply(_super, (0, _concat["default"])(_context = [this]).call(_context, args));
130
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
126
+ _this = _callSuper(this, SuperTable, (0, _concat["default"])(_context = []).call(_context, args));
127
+ (0, _defineProperty2["default"])(_this, "state", {
131
128
  filterVisibleKey: ''
132
129
  });
133
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onTableChange", function (pagination, filters, sorter) {
130
+ (0, _defineProperty2["default"])(_this, "onTableChange", function (pagination, filters, sorter) {
134
131
  var _ref = _this.props.callback || {},
135
132
  onTableChange = _ref.onTableChange;
136
133
  var _this$props$filterInf = _this.props.filterInfo,
137
134
  filterInfo = _this$props$filterInf === void 0 ? null : _this$props$filterInf;
138
135
  onTableChange && onTableChange(sorter, filterInfo);
139
136
  });
140
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function () {
137
+ (0, _defineProperty2["default"])(_this, "onChange", function () {
141
138
  var selectedKeyArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
142
139
  var _ref2 = _this.props.callback || {},
143
140
  onCheck = _ref2.onCheck;
@@ -184,22 +181,22 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
184
181
  }
185
182
  }
186
183
  });
187
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onCheckChange", function (selectedKeys) {
184
+ (0, _defineProperty2["default"])(_this, "onCheckChange", function (selectedKeys) {
188
185
  var _ref3 = _this.props.callback || {},
189
186
  onCheck = _ref3.onCheck;
190
187
  onCheck && onCheck(selectedKeys);
191
188
  });
192
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRadioChange", function (selectedKeys) {
189
+ (0, _defineProperty2["default"])(_this, "onRadioChange", function (selectedKeys) {
193
190
  var _ref4 = _this.props.callback || {},
194
191
  onRadio = _ref4.onRadio;
195
192
  onRadio && onRadio(selectedKeys);
196
193
  });
197
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRadioRowClick", function (record) {
194
+ (0, _defineProperty2["default"])(_this, "onRadioRowClick", function (record) {
198
195
  var _ref5 = _this.props.callback || {},
199
196
  onRadio = _ref5.onRadio;
200
197
  onRadio && onRadio([record.key]);
201
198
  });
202
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRowClick", function (record) {
199
+ (0, _defineProperty2["default"])(_this, "onRowClick", function (record) {
203
200
  var _this$props2 = _this.props,
204
201
  _this$props2$isWeaken = _this$props2.isWeaken,
205
202
  isWeaken = _this$props2$isWeaken === void 0 ? false : _this$props2$isWeaken,
@@ -229,33 +226,33 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
229
226
  }
230
227
  }, 250);
231
228
  });
232
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDoubleClick", function (record) {
229
+ (0, _defineProperty2["default"])(_this, "onDoubleClick", function (record) {
233
230
  clearTimeout(_this.timer);
234
231
  var _ref7 = _this.props.callback || {},
235
232
  onDoubleClick = _ref7.onDoubleClick;
236
233
  onDoubleClick && onDoubleClick(record.key);
237
234
  });
238
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onLink", function (key, index, item, e) {
235
+ (0, _defineProperty2["default"])(_this, "onLink", function (key, index, item, e) {
239
236
  var _ref8 = _this.props.callback || {},
240
237
  onLink = _ref8.onLink;
241
238
  onLink && onLink(key, index, item);
242
239
  e.stopPropagation();
243
240
  });
244
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onLinkDouble", function (e) {
241
+ (0, _defineProperty2["default"])(_this, "onLinkDouble", function (e) {
245
242
  e.stopPropagation();
246
243
  });
247
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onMoveRow", function (dragIndex, targetIndex) {
244
+ (0, _defineProperty2["default"])(_this, "onMoveRow", function (dragIndex, targetIndex) {
248
245
  var _ref9 = _this.props.callback || {},
249
246
  onMoveRow = _ref9.onMoveRow;
250
247
  onMoveRow && onMoveRow(dragIndex, targetIndex);
251
248
  });
252
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getSelectedRowKeys", function (items) {
249
+ (0, _defineProperty2["default"])(_this, "getSelectedRowKeys", function (items) {
253
250
  return (0, _reduce["default"])(items).call(items, function (result, item, index) {
254
251
  item.checked && result.push(index);
255
252
  return result;
256
253
  }, []);
257
254
  });
258
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getIndexInfo", function () {
255
+ (0, _defineProperty2["default"])(_this, "getIndexInfo", function () {
259
256
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
260
257
  var _this$props4 = _this.props,
261
258
  _this$props4$index = _this$props4.index,
@@ -270,7 +267,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
270
267
  }
271
268
  }] : [];
272
269
  });
273
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setSortInfo", function (col, sortInfo) {
270
+ (0, _defineProperty2["default"])(_this, "setSortInfo", function (col, sortInfo) {
274
271
  if (col.sorter === 'string') {
275
272
  col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
276
273
  col.sorter = function (row1, row2) {
@@ -293,13 +290,13 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
293
290
  delete col.sorter;
294
291
  }
295
292
  });
296
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setFilterInfo", function (col, filterInfo, visibleKey) {
293
+ (0, _defineProperty2["default"])(_this, "setFilterInfo", function (col, filterInfo, visibleKey) {
297
294
  if ((0, _filter["default"])(col)) {
298
295
  var _col$isDateFilterBySt = col.isDateFilterByStartAndEnd,
299
296
  isDateFilterByStartAndEnd = _col$isDateFilterBySt === void 0 ? false : _col$isDateFilterBySt;
300
297
  var onSearch = function onSearch(value) {
301
- var _ref10 = _this.props.callback || {},
302
- onTableChange = _ref10.onTableChange;
298
+ var _ref0 = _this.props.callback || {},
299
+ onTableChange = _ref0.onTableChange;
303
300
  var _this$props$sortInfo = _this.props.sortInfo,
304
301
  sortInfo = _this$props$sortInfo === void 0 ? null : _this$props$sortInfo;
305
302
  var newFilterInfo = (0, _assign["default"])({}, filterInfo, (0, _defineProperty2["default"])({}, col.key, value));
@@ -347,7 +344,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
347
344
  }
348
345
  delete col.filter;
349
346
  });
350
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "linkList", function (key, index, item) {
347
+ (0, _defineProperty2["default"])(_this, "linkList", function (key, index, item) {
351
348
  var linkTitleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fileName';
352
349
  var list = item[key] || [];
353
350
  return /*#__PURE__*/_react["default"].createElement("div", null, (0, _map["default"])(list).call(list, function (item2, index2) {
@@ -361,7 +358,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
361
358
  }, (0, _concat["default"])(_context3 = "".concat(item2[linkTitleKey])).call(_context3, split));
362
359
  }));
363
360
  });
364
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "waring", function (key, index, item, warningKey) {
361
+ (0, _defineProperty2["default"])(_this, "waring", function (key, index, item, warningKey) {
365
362
  var text = item[key] ? item[key] : '';
366
363
  var color = item[warningKey] == 1 ? 'red' : 'rgba(0, 0, 0, 0.65)';
367
364
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", {
@@ -370,7 +367,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
370
367
  }
371
368
  }, text.title ? text.title : text));
372
369
  });
373
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "defaultList", function (key, index, item, text, link) {
370
+ (0, _defineProperty2["default"])(_this, "defaultList", function (key, index, item, text, link) {
374
371
  var _context4;
375
372
  var onClick = (0, _bind["default"])(_context4 = _this.onLink).call(_context4, null, key, index, item);
376
373
  if (link && typeof link === 'string') {
@@ -381,8 +378,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
381
378
  }
382
379
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, text));
383
380
  });
384
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "tags", function (key, index, item, _ref11) {
385
- var tags = _ref11.tags;
381
+ (0, _defineProperty2["default"])(_this, "tags", function (key, index, item, _ref1) {
382
+ var tags = _ref1.tags;
386
383
  var list = item[key] || [];
387
384
  return /*#__PURE__*/_react["default"].createElement("div", null, (0, _map["default"])(list).call(list, function (item2, index2) {
388
385
  var _context5;
@@ -417,7 +414,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
417
414
  }, /*#__PURE__*/_react["default"].createElement(_tag["default"], tagProps, item2[tags])) : /*#__PURE__*/_react["default"].createElement(_tag["default"], tagProps, item2[tags]);
418
415
  }));
419
416
  });
420
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumns", function (cols, items) {
417
+ (0, _defineProperty2["default"])(_this, "getColumns", function (cols, items) {
421
418
  var _context6, _context7;
422
419
  var _this$props5 = _this.props,
423
420
  sortInfo = _this$props5.sortInfo,
@@ -425,8 +422,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
425
422
  var filterVisibleKey = _this.state.filterVisibleKey;
426
423
  return (0, _map["default"])(_context6 = (0, _concat["default"])(_context7 = _this.getIndexInfo(items)).call(_context7, (0, _filter["default"])(cols).call(cols, function (col) {
427
424
  return !col.hide;
428
- }))).call(_context6, function (_ref12) {
429
- var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref12), _ref12));
425
+ }))).call(_context6, function (_ref10) {
426
+ var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref10), _ref10));
430
427
  col.dataIndex = col.key;
431
428
  col.className = col.key === 'index' ? 'ant-table-selection-column' : col.align ? (0, _variables["default"])('SuperTable')[col.align] : '';
432
429
  col.noWrap && (col.className = (0, _variables["default"])('SuperTable').noWrap);
@@ -460,7 +457,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
460
457
  return col;
461
458
  });
462
459
  });
463
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getText", function (value, options) {
460
+ (0, _defineProperty2["default"])(_this, "getText", function (value, options) {
464
461
  if ((0, _isArray["default"])(value)) {
465
462
  return (0, _map["default"])(value).call(value, function (v) {
466
463
  return (0, _Control.getTitle)(v, options);
@@ -469,7 +466,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
469
466
  return (0, _Control.getTitle)(value, options);
470
467
  }
471
468
  });
472
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "link", function (key, index, item, text) {
469
+ (0, _defineProperty2["default"])(_this, "link", function (key, index, item, text) {
473
470
  var _context8;
474
471
  var onClick = (0, _bind["default"])(_context8 = _this.onLink).call(_context8, null, key, index, item);
475
472
  return /*#__PURE__*/_react["default"].createElement("a", {
@@ -477,16 +474,16 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
477
474
  onDoubleClick: _this.onLinkDouble
478
475
  }, text);
479
476
  });
480
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "tooltip", function (key, index, item, _ref13) {
481
- var tipLen = _ref13.tooltip,
482
- options = _ref13.options;
477
+ (0, _defineProperty2["default"])(_this, "tooltip", function (key, index, item, _ref11) {
478
+ var tipLen = _ref11.tooltip,
479
+ options = _ref11.options;
483
480
  var text = _this.getText(item[key], options);
484
481
  var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
485
482
  return needTip ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
486
483
  title: text
487
484
  }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _slice["default"])(text).call(text, 0, tipLen) + '...')) : /*#__PURE__*/_react["default"].createElement("span", null, (0, _isArray["default"])(text) ? text.join(',') : text);
488
485
  });
489
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getImgSrc", function (value, options) {
486
+ (0, _defineProperty2["default"])(_this, "getImgSrc", function (value, options) {
490
487
  var index = (0, _findIndex["default"])(options).call(options, function (obj) {
491
488
  return obj.value == value;
492
489
  });
@@ -499,7 +496,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
499
496
  * @param options{array}:字段options
500
497
  * @param dataSource{string,array}:数据源,如果列数据有多层则用此决定
501
498
  */
502
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getSourceText", function (item, key, options, dataSource) {
499
+ (0, _defineProperty2["default"])(_this, "getSourceText", function (item, key, options, dataSource) {
503
500
  var value = {};
504
501
  if (typeof dataSource === 'string') {
505
502
  value = item[dataSource] || {};
@@ -519,14 +516,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
519
516
  }
520
517
  return _this.getText(value, options);
521
518
  });
522
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getDataSource", function (items, cols) {
519
+ (0, _defineProperty2["default"])(_this, "getDataSource", function (items, cols) {
523
520
  return (0, _map["default"])(items).call(items, function (item, index) {
524
- return (0, _reduce["default"])(cols).call(cols, function (result, _ref14) {
525
- var key = _ref14.key,
526
- options = _ref14.options,
527
- link = _ref14.link,
528
- icon = _ref14.icon,
529
- dataSource = _ref14.dataSource;
521
+ return (0, _reduce["default"])(cols).call(cols, function (result, _ref12) {
522
+ var key = _ref12.key,
523
+ options = _ref12.options,
524
+ link = _ref12.link,
525
+ icon = _ref12.icon,
526
+ dataSource = _ref12.dataSource;
530
527
  if (link) {
531
528
  if (typeof link === 'boolean') {
532
529
  result[key] = _this.link(key, index, item, _this.getText(item[key], options));
@@ -552,7 +549,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
552
549
  });
553
550
  });
554
551
  });
555
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPropsByCheckbox", function (items) {
552
+ (0, _defineProperty2["default"])(_this, "getPropsByCheckbox", function (items) {
556
553
  var _this$props6 = _this.props,
557
554
  _this$props6$checkbox = _this$props6.checkbox,
558
555
  checkbox = _this$props6$checkbox === void 0 ? true : _this$props6$checkbox,
@@ -637,7 +634,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
637
634
  };
638
635
  }
639
636
  });
640
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowProps", function (onRowClick, items) {
637
+ (0, _defineProperty2["default"])(_this, "getRowProps", function (onRowClick, items) {
641
638
  return function (record) {
642
639
  var item = items[record.key];
643
640
  var rowProps = {
@@ -654,7 +651,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
654
651
  return rowProps;
655
652
  };
656
653
  });
657
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowPropsForDrag", function () {
654
+ (0, _defineProperty2["default"])(_this, "getRowPropsForDrag", function () {
658
655
  return function (record, index) {
659
656
  return {
660
657
  index: index,
@@ -662,7 +659,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
662
659
  };
663
660
  };
664
661
  });
665
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getItems", function () {
662
+ (0, _defineProperty2["default"])(_this, "getItems", function () {
666
663
  var _this$props7 = _this.props,
667
664
  items = _this$props7.items,
668
665
  cols = _this$props7.cols,
@@ -674,10 +671,10 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
674
671
  var resItems = items;
675
672
  if (!dragSort && items.length > 1) {
676
673
  if (pageTotal || searchTotal) {
677
- var totalItem = (0, _reduce["default"])(cols).call(cols, function (result, _ref15) {
678
- var key = _ref15.key,
679
- _ref15$total = _ref15.total,
680
- total = _ref15$total === void 0 ? false : _ref15$total;
674
+ var totalItem = (0, _reduce["default"])(cols).call(cols, function (result, _ref13) {
675
+ var key = _ref13.key,
676
+ _ref13$total = _ref13.total,
677
+ total = _ref13$total === void 0 ? false : _ref13$total;
681
678
  if (total) {
682
679
  result[key] = (0, _parseFloat2["default"])(Number((0, _reduce["default"])(items).call(items, function (result, item) {
683
680
  return (0, _parseFloat2["default"])(String(item[key] || 0)) + result;
@@ -699,7 +696,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
699
696
  }
700
697
  return resItems;
701
698
  });
702
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toTotalFooter", function () {
699
+ (0, _defineProperty2["default"])(_this, "toTotalFooter", function () {
703
700
  var _this$props8 = _this.props,
704
701
  cols = _this$props8.cols,
705
702
  items = _this$props8.items,
@@ -715,11 +712,11 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
715
712
  return item.checked;
716
713
  });
717
714
  var countItems = checkedItems.length ? checkedItems : items;
718
- var totalItems = (0, _map["default"])(totalCols).call(totalCols, function (_ref16) {
719
- var title = _ref16.title,
720
- key = _ref16.key,
721
- _ref16$props = _ref16.props,
722
- props = _ref16$props === void 0 ? {} : _ref16$props;
715
+ var totalItems = (0, _map["default"])(totalCols).call(totalCols, function (_ref14) {
716
+ var title = _ref14.title,
717
+ key = _ref14.key,
718
+ _ref14$props = _ref14.props,
719
+ props = _ref14$props === void 0 ? {} : _ref14$props;
723
720
  var value = (0, _reduce["default"])(countItems).call(countItems, function (result, item) {
724
721
  return (0, _parseFloat2["default"])((result + Number(item[key] || 0)).toFixed(props.precision || 6));
725
722
  }, 0);
@@ -737,9 +734,9 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
737
734
  style: {
738
735
  marginRight: "15px"
739
736
  }
740
- }, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), (0, _map["default"])(totalItems).call(totalItems, function (_ref17, index) {
741
- var title = _ref17.title,
742
- value = _ref17.value;
737
+ }, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), (0, _map["default"])(totalItems).call(totalItems, function (_ref15, index) {
738
+ var title = _ref15.title,
739
+ value = _ref15.value;
743
740
  return /*#__PURE__*/_react["default"].createElement("span", {
744
741
  key: index,
745
742
  style: {
@@ -755,7 +752,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
755
752
  return null;
756
753
  }
757
754
  });
758
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getProps", function () {
755
+ (0, _defineProperty2["default"])(_this, "getProps", function () {
759
756
  var _this$props9 = _this.props,
760
757
  cols = _this$props9.cols,
761
758
  _this$props9$isPaging = _this$props9.isPaging,
@@ -791,13 +788,13 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
791
788
  }, extraProps);
792
789
  return renderProps;
793
790
  });
794
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setScroll", function () {
795
- var _this$props10 = _this.props,
796
- maxHeight = _this$props10.maxHeight,
797
- pageTotal = _this$props10.pageTotal,
798
- searchTotal = _this$props10.searchTotal;
791
+ (0, _defineProperty2["default"])(_this, "setScroll", function () {
792
+ var _this$props0 = _this.props,
793
+ maxHeight = _this$props0.maxHeight,
794
+ pageTotal = _this$props0.pageTotal,
795
+ searchTotal = _this$props0.searchTotal;
799
796
  if (maxHeight && _this.getItems().length) {
800
- var root = _reactDom["default"].findDOMNode((0, _assertThisInitialized2["default"])(_this));
797
+ var root = _reactDom["default"].findDOMNode(_this);
801
798
  var container = root.getElementsByClassName('ant-table-body')[0];
802
799
  var header = root.getElementsByClassName('ant-table-thead')[0];
803
800
  var tbody = root.getElementsByClassName('ant-table-tbody')[0];
@@ -812,7 +809,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
812
809
  });
813
810
  return _this;
814
811
  }
815
- (0, _createClass2["default"])(SuperTable, [{
812
+ (0, _inherits2["default"])(SuperTable, _React$Component);
813
+ return (0, _createClass2["default"])(SuperTable, [{
816
814
  key: "shouldComponentUpdate",
817
815
  value: function shouldComponentUpdate(props, state) {
818
816
  var _this2 = this;
@@ -839,7 +837,6 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
839
837
  }));
840
838
  }
841
839
  }]);
842
- return SuperTable;
843
840
  }(_react["default"].Component);
844
841
  (0, _defineProperty2["default"])(SuperTable, "propTypes", {
845
842
  cols: _propTypes["default"].arrayOf(_propTypes["default"].shape(ColType)).isRequired,