cloud-b2b 1.1.62 → 1.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/es/Area/Area.js +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 +11 -14
  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/Search2/Search.js +85 -88
  19. package/es/Search2/Search.less +64 -64
  20. package/es/Search2/package.json +6 -6
  21. package/es/Sidebar/Sidebar.js +11 -14
  22. package/es/Sidebar2/Sidebar.js +13 -16
  23. package/es/SuperForm/SuperForm.js +74 -79
  24. package/es/SuperForm2/SuperForm.js +95 -101
  25. package/es/SuperPagination/SuperPagination.js +8 -11
  26. package/es/SuperTab/SuperTab.js +12 -15
  27. package/es/SuperTab2/SuperTab2.js +13 -16
  28. package/es/SuperTable/DragSortRow.js +12 -15
  29. package/es/SuperTable/FilterDropDown.js +11 -14
  30. package/es/SuperTable/SuperTable.js +68 -71
  31. package/es/SuperTable2/SuperTable2.js +85 -88
  32. package/es/SuperTable2/SuperTableCell.js +27 -30
  33. package/es/SuperTable3/FilterDropDown.js +11 -14
  34. package/es/SuperTable3/SuperTable.js +58 -61
  35. package/es/SuperToolbar/SuperToolbar.js +11 -14
  36. package/es/SuperUpload/SuperUpload.js +107 -91
  37. package/es/Viewer/ImageViews.js +16 -19
  38. package/es/Viewer/Viewer.js +11 -14
  39. package/es/helper.js +18 -17
  40. package/lib/Area/Area.js +8 -11
  41. package/lib/CodeInput/CodeInput.js +16 -19
  42. package/lib/Enhance/Dialogs.js +11 -14
  43. package/lib/Enhance/Loading.js +15 -18
  44. package/lib/Header/Header.js +17 -20
  45. package/lib/Header/Vertical.js +11 -14
  46. package/lib/ImageView/ImageView.js +10 -13
  47. package/lib/InpurCascader/InputCascader.js +11 -14
  48. package/lib/InputEditor/InputEditor.js +16 -18
  49. package/lib/InputSearch/InputSearch.js +19 -22
  50. package/lib/InputSelect/InputSelect.js +14 -17
  51. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  52. package/lib/InputWriting/InputWriting.js +12 -15
  53. package/lib/Layout/Layout.js +14 -17
  54. package/lib/LayoutLink/LayoutLink.js +1 -2
  55. package/lib/Link/Link.js +7 -10
  56. package/lib/NumberInput/NumberInput.js +13 -16
  57. package/lib/Search/Search.js +53 -57
  58. package/lib/Search2/Search.js +86 -90
  59. package/lib/Search2/Search.less +64 -64
  60. package/lib/Search2/package.json +6 -6
  61. package/lib/Sidebar/Sidebar.js +11 -14
  62. package/lib/Sidebar2/Sidebar.js +13 -16
  63. package/lib/SuperForm/SuperForm.js +75 -81
  64. package/lib/SuperForm2/SuperForm.js +96 -103
  65. package/lib/SuperPagination/SuperPagination.js +8 -11
  66. package/lib/SuperTab/SuperTab.js +12 -15
  67. package/lib/SuperTab2/SuperTab2.js +13 -16
  68. package/lib/SuperTable/DragSortRow.js +12 -15
  69. package/lib/SuperTable/FilterDropDown.js +11 -14
  70. package/lib/SuperTable/SuperTable.js +68 -71
  71. package/lib/SuperTable2/SuperTable2.js +86 -90
  72. package/lib/SuperTable2/SuperTableCell.js +27 -30
  73. package/lib/SuperTable3/FilterDropDown.js +11 -14
  74. package/lib/SuperTable3/SuperTable.js +58 -61
  75. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  76. package/lib/SuperUpload/SuperUpload.js +96 -81
  77. package/lib/Viewer/ImageViews.js +16 -19
  78. package/lib/Viewer/Viewer.js +11 -14
  79. package/lib/helper.js +18 -17
  80. 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
@@ -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 === 'customType') {
443
439
  var _this$props$items$rec = _this.props.items[record.key].__customType,
@@ -562,7 +558,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
562
558
  case 'uploadImg':
563
559
  var commonProps = _this.props.callback.buildSuperUploadProps ? _this.props.callback.buildSuperUploadProps() : {};
564
560
  var uploadProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
565
- onFileChange: _this.props.callback.onTableFileChange ? (0, _bind["default"])(_context10 = _this.props.callback.onTableFileChange).call(_context10, null, col.key, index) : undefined,
561
+ onFileChange: _this.props.callback.onTableFileChange ? (0, _bind["default"])(_context0 = _this.props.callback.onTableFileChange).call(_context0, null, col.key, index) : undefined,
566
562
  type: col.type
567
563
  }, col.props), _this.props), commonProps), {}, {
568
564
  value: _this.props.items[index][col.key]
@@ -579,7 +575,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
579
575
  }
580
576
  };
581
577
  });
582
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getCheckedStatus", function (key) {
578
+ (0, _defineProperty2["default"])(_this, "getCheckedStatus", function (key) {
583
579
  var has = false,
584
580
  not = false;
585
581
  var items = _this.props.items;
@@ -600,7 +596,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
600
596
  indeterminate: has && not
601
597
  };
602
598
  });
603
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toAdd", function (key, showAdd) {
599
+ (0, _defineProperty2["default"])(_this, "toAdd", function (key, showAdd) {
604
600
  if (showAdd) {
605
601
  var onClick = _this.onAdd(key);
606
602
  return /*#__PURE__*/_react["default"].createElement(_icon["default"], {
@@ -612,12 +608,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
612
608
  return null;
613
609
  }
614
610
  });
615
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnTitle", function (_ref16) {
616
- var required = _ref16.required,
617
- title = _ref16.title,
618
- type = _ref16.type,
619
- key = _ref16.key,
620
- showAdd = _ref16.showAdd;
611
+ (0, _defineProperty2["default"])(_this, "getColumnTitle", function (_ref14) {
612
+ var required = _ref14.required,
613
+ title = _ref14.title,
614
+ type = _ref14.type,
615
+ key = _ref14.key,
616
+ showAdd = _ref14.showAdd;
621
617
  if (type === 'checkbox') {
622
618
  var status = _this.getCheckedStatus(key);
623
619
  return /*#__PURE__*/_react["default"].createElement(_checkbox["default"], (0, _extends2["default"])({
@@ -630,31 +626,31 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
630
626
  }, title, _this.toAdd(key, showAdd));
631
627
  }
632
628
  });
633
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnClassName", function (_ref17) {
634
- var type = _ref17.type,
635
- align = _ref17.align;
629
+ (0, _defineProperty2["default"])(_this, "getColumnClassName", function (_ref15) {
630
+ var type = _ref15.type,
631
+ align = _ref15.align;
636
632
  if (type === 'index' || type === 'checkbox') {
637
633
  return 'ant-table-selection-column';
638
634
  } else {
639
635
  return align ? (0, _variables["default"])('SuperTable2')[align] : '';
640
636
  }
641
637
  });
642
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "canReadonly", function (type) {
643
- var _context11;
644
- return !(0, _includes["default"])(_context11 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context11, type);
638
+ (0, _defineProperty2["default"])(_this, "canReadonly", function (type) {
639
+ var _context1;
640
+ return !(0, _includes["default"])(_context1 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context1, type);
645
641
  });
646
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumns", function (cols) {
647
- var _context12;
642
+ (0, _defineProperty2["default"])(_this, "getColumns", function (cols) {
643
+ var _context10;
648
644
  var readonly = _this.props.readonly;
649
- return (0, _map["default"])(_context12 = (0, _filter["default"])(cols).call(cols, function (col) {
645
+ return (0, _map["default"])(_context10 = (0, _filter["default"])(cols).call(cols, function (col) {
650
646
  return !col.hide;
651
- })).call(_context12, function (_ref18, index) {
652
- var _context13;
653
- var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref18), _ref18));
647
+ })).call(_context10, function (_ref16, index) {
648
+ var _context11;
649
+ var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref16), _ref16));
654
650
  col.className = _this.getColumnClassName(col);
655
651
  col.title = _this.getColumnTitle(col);
656
652
  col.dataIndex = col.key;
657
- col.width = col.width ? col.width : (0, _includes["default"])(_context13 = ['index', 'checked']).call(_context13, col.key) ? 70 : col.type === 'img' ? 200 : 120;
653
+ col.width = col.width ? col.width : (0, _includes["default"])(_context11 = ['index', 'checked']).call(_context11, col.key) ? 70 : col.type === 'img' ? 200 : 120;
658
654
  // const {props = {}} =
659
655
  // const {edit = false} = props
660
656
  // if (!(readonly || col.type === 'readonly') || !this.canReadonly(col.type)) {
@@ -680,7 +676,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
680
676
  return col;
681
677
  });
682
678
  });
683
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getText", function (value, options) {
679
+ (0, _defineProperty2["default"])(_this, "getText", function (value, options) {
684
680
  if ((0, _isArray["default"])(value)) {
685
681
  return (0, _map["default"])(value).call(value, function (v) {
686
682
  return (0, _Control.getTitle)(v, options);
@@ -689,14 +685,14 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
689
685
  return (0, _Control.getTitle)(value, options);
690
686
  }
691
687
  });
692
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getDataSource", function (items, cols) {
688
+ (0, _defineProperty2["default"])(_this, "getDataSource", function (items, cols) {
693
689
  return (0, _map["default"])(items).call(items, function (item, index) {
694
- return (0, _reduce["default"])(cols).call(cols, function (result, _ref19) {
695
- var _context14, _context15;
696
- var key = _ref19.key,
697
- type = _ref19.type,
698
- options = _ref19.options;
699
- 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)) {
690
+ return (0, _reduce["default"])(cols).call(cols, function (result, _ref17) {
691
+ var _context12, _context13;
692
+ var key = _ref17.key,
693
+ type = _ref17.type,
694
+ options = _ref17.options;
695
+ 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)) {
700
696
  result[key] = item[key];
701
697
  } else {
702
698
  result[key] = _this.getText(item[key], options);
@@ -708,7 +704,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
708
704
  }));
709
705
  });
710
706
  });
711
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPropsByCheckbox", function () {
707
+ (0, _defineProperty2["default"])(_this, "getPropsByCheckbox", function () {
712
708
  var _this$props2 = _this.props,
713
709
  items = _this$props2.items,
714
710
  _this$props2$isEmphas = _this$props2.isEmphasized,
@@ -723,13 +719,13 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
723
719
  rowClassName: rowClassName
724
720
  };
725
721
  });
726
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getSelectedRowKeys", function (items) {
722
+ (0, _defineProperty2["default"])(_this, "getSelectedRowKeys", function (items) {
727
723
  return (0, _reduce["default"])(items).call(items, function (result, item, index) {
728
724
  item.checked && result.push(index);
729
725
  return result;
730
726
  }, []);
731
727
  });
732
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPropsByCheckbox2", function (items) {
728
+ (0, _defineProperty2["default"])(_this, "getPropsByCheckbox2", function (items) {
733
729
  var _this$props3 = _this.props,
734
730
  _this$props3$checkbox = _this$props3.checkbox,
735
731
  checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
@@ -814,7 +810,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
814
810
  };
815
811
  }
816
812
  });
817
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowPropsForDrag", function () {
813
+ (0, _defineProperty2["default"])(_this, "getRowPropsForDrag", function () {
818
814
  return function (record, index) {
819
815
  return {
820
816
  index: index,
@@ -822,7 +818,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
822
818
  };
823
819
  };
824
820
  });
825
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowProps", function (onRowClick) {
821
+ (0, _defineProperty2["default"])(_this, "getRowProps", function (onRowClick) {
826
822
  return function (record) {
827
823
  return {
828
824
  onClick: function onClick() {
@@ -834,8 +830,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
834
830
  };
835
831
  };
836
832
  });
837
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getProps", function () {
838
- var _context16;
833
+ (0, _defineProperty2["default"])(_this, "getProps", function () {
834
+ var _context14;
839
835
  var _this$props4 = _this.props,
840
836
  cols = _this$props4.cols,
841
837
  items = _this$props4.items,
@@ -853,11 +849,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
853
849
  expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
854
850
  _this$props4$onExpand = _this$props4.onExpand,
855
851
  onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand;
856
- var widthX = (0, _reduce["default"])(_context16 = (0, _filter["default"])(cols).call(cols, function (col) {
852
+ var widthX = (0, _reduce["default"])(_context14 = (0, _filter["default"])(cols).call(cols, function (col) {
857
853
  return !col.hide;
858
- })).call(_context16, function (width, item) {
859
- var _context17;
860
- return width += item.width ? item.width : (0, _includes["default"])(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
854
+ })).call(_context14, function (width, item) {
855
+ var _context15;
856
+ return width += item.width ? item.width : (0, _includes["default"])(_context15 = ['index', 'checked']).call(_context15, item.key) ? 70 : item.type === 'img' ? 200 : 120;
861
857
  }, 0);
862
858
  var scrollProps = !_helper["default"].isEmpty2(expandedRowRender) ? {
863
859
  expandedRowRender: expandedRowRender
@@ -895,9 +891,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
895
891
  onExpand: onExpand
896
892
  }, scrollProps);
897
893
  });
898
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setScroll", function () {
894
+ (0, _defineProperty2["default"])(_this, "setScroll", function () {
899
895
  if (_this.props.maxHeight && _this.props.items.length) {
900
- var root = _reactDom["default"].findDOMNode((0, _assertThisInitialized2["default"])(_this));
896
+ var root = _reactDom["default"].findDOMNode(_this);
901
897
  var container = root.getElementsByClassName('ant-table-body')[0];
902
898
  var header = root.getElementsByClassName('ant-table-thead')[0];
903
899
  (0, _fixed["default"])(container, header, _this.props.maxHeight);
@@ -905,7 +901,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
905
901
  });
906
902
  return _this;
907
903
  }
908
- (0, _createClass2["default"])(SuperTable2, [{
904
+ (0, _inherits2["default"])(SuperTable2, _React$Component);
905
+ return (0, _createClass2["default"])(SuperTable2, [{
909
906
  key: "componentDidMount",
910
907
  value: function componentDidMount() {
911
908
  this.setScroll();
@@ -924,7 +921,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
924
921
  }));
925
922
  }
926
923
  }]);
927
- return SuperTable2;
928
924
  }(_react["default"].Component);
929
925
  (0, _defineProperty2["default"])(SuperTable2, "propTypes", {
930
926
  cols: _propTypes["default"].arrayOf(_propTypes["default"].shape(ColType)).isRequired,