cloud-b2b 1.1.61 → 1.1.63

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 -100
  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 +90 -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 -102
  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 +91 -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
@@ -20,18 +20,17 @@ import _Checkbox from "antd/es/checkbox";
20
20
  import _Icon from "antd/es/icon";
21
21
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
22
22
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
23
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
24
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
25
23
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
26
24
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
25
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
27
26
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
28
27
  import _Radio from "antd/es/radio";
29
28
  var _excluded = ["onRowClick"];
30
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(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; } } }; }
31
- 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); }
32
- 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; }
29
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (_Array$isArray(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; } } }; }
30
+ 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; } }
31
+ 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; }
33
32
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34
- 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) { _defineProperty(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; }
33
+ 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) { _defineProperty(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; }
35
34
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
36
35
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
37
36
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
@@ -41,8 +40,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
41
40
  import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
42
41
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
43
42
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
44
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
45
- 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; } }
43
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
44
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
46
45
  import React from 'react';
47
46
  import PropTypes from 'prop-types';
48
47
  import ReactDOM from 'react-dom';
@@ -126,8 +125,6 @@ var CallbackType = {
126
125
  * isEmphasized: [可选],是否强调,行字体加粗显示, 除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
127
126
  */
128
127
  var SuperTable2 = /*#__PURE__*/function (_React$Component) {
129
- _inherits(SuperTable2, _React$Component);
130
- var _super = _createSuper(SuperTable2);
131
128
  function SuperTable2() {
132
129
  var _context;
133
130
  var _this;
@@ -135,22 +132,22 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
135
132
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
136
133
  args[_key] = arguments[_key];
137
134
  }
138
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
139
- _defineProperty(_assertThisInitialized(_this), "onSwitch", function (key, rowIndex) {
135
+ _this = _callSuper(this, SuperTable2, _concatInstanceProperty(_context = []).call(_context, args));
136
+ _defineProperty(_this, "onSwitch", function (key, rowIndex) {
140
137
  return function (value) {
141
138
  var _ref = _this.props.callback || {},
142
139
  onContentChange = _ref.onContentChange;
143
140
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
144
141
  };
145
142
  });
146
- _defineProperty(_assertThisInitialized(_this), "onCheck", function (key, rowIndex) {
143
+ _defineProperty(_this, "onCheck", function (key, rowIndex) {
147
144
  return function (e) {
148
145
  var _ref2 = _this.props.callback || {},
149
146
  onCheck = _ref2.onCheck;
150
147
  onCheck && onCheck(_this.getIndex(rowIndex), key, e.target.checked);
151
148
  };
152
149
  });
153
- _defineProperty(_assertThisInitialized(_this), "onChange", function (key, rowIndex) {
150
+ _defineProperty(_this, "onChange", function (key, rowIndex) {
154
151
  return function (value) {
155
152
  var _ref3 = _this.props.callback || {},
156
153
  onContentChange = _ref3.onContentChange;
@@ -158,7 +155,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
158
155
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
159
156
  };
160
157
  });
161
- _defineProperty(_assertThisInitialized(_this), "onDoubleChange1", function (key, rowIndex) {
158
+ _defineProperty(_this, "onDoubleChange1", function (key, rowIndex) {
162
159
  return function (doublekey, value) {
163
160
  var _ref4 = _this.props.callback || {},
164
161
  onContentChange = _ref4.onContentChange;
@@ -166,28 +163,28 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
166
163
  onContentChange && onContentChange(_this.getIndex(rowIndex), doublekey, value);
167
164
  };
168
165
  });
169
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (key, rowIndex, config) {
166
+ _defineProperty(_this, "onSearch", function (key, rowIndex, config) {
170
167
  return function (value) {
171
168
  var _ref5 = _this.props.callback || {},
172
169
  onSearch = _ref5.onSearch;
173
170
  onSearch && onSearch(_this.getIndex(rowIndex), key, value, config);
174
171
  };
175
172
  });
176
- _defineProperty(_assertThisInitialized(_this), "onAdd", function (key) {
173
+ _defineProperty(_this, "onAdd", function (key) {
177
174
  return function () {
178
175
  var _ref6 = _this.props.callback || {},
179
176
  onAdd = _ref6.onAdd;
180
177
  onAdd && onAdd(key);
181
178
  };
182
179
  });
183
- _defineProperty(_assertThisInitialized(_this), "onRowAdd", function (key, index) {
180
+ _defineProperty(_this, "onRowAdd", function (key, index) {
184
181
  return function () {
185
182
  var _ref7 = _this.props.callback || {},
186
183
  onLink = _ref7.onLink;
187
184
  onLink && onLink(key, index, _this.props.items[index]);
188
185
  };
189
186
  });
190
- _defineProperty(_assertThisInitialized(_this), "onBlur", function (key, rowIndex) {
187
+ _defineProperty(_this, "onBlur", function (key, rowIndex) {
191
188
  return function (value) {
192
189
  var _ref8 = _this.props.callback || {},
193
190
  onBlur = _ref8.onBlur;
@@ -195,33 +192,33 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
195
192
  onBlur && onBlur(_this.getIndex(rowIndex), key, value);
196
193
  };
197
194
  });
198
- _defineProperty(_assertThisInitialized(_this), "onDoubleClick", function (key, value) {
195
+ _defineProperty(_this, "onDoubleClick", function (key, value) {
199
196
  return function () {
200
197
  var _ref9 = _this.props.callback || {},
201
198
  onDoubleClick = _ref9.onDoubleClick;
202
199
  onDoubleClick && onDoubleClick(key, value);
203
200
  };
204
201
  });
205
- _defineProperty(_assertThisInitialized(_this), "onImgTileClick", function (col, value, rowIndex) {
202
+ _defineProperty(_this, "onImgTileClick", function (col, value, rowIndex) {
206
203
  return function () {
207
- var _ref10 = _this.props.callback || {},
208
- onImgTileClick = _ref10.onImgTileClick;
204
+ var _ref0 = _this.props.callback || {},
205
+ onImgTileClick = _ref0.onImgTileClick;
209
206
  onImgTileClick && onImgTileClick(col, value, rowIndex);
210
207
  };
211
208
  });
212
- _defineProperty(_assertThisInitialized(_this), "onMoveRow", function (dragIndex, targetIndex) {
213
- var _ref11 = _this.props.callback || {},
214
- onMoveRow = _ref11.onMoveRow;
209
+ _defineProperty(_this, "onMoveRow", function (dragIndex, targetIndex) {
210
+ var _ref1 = _this.props.callback || {},
211
+ onMoveRow = _ref1.onMoveRow;
215
212
  onMoveRow && onMoveRow(dragIndex, targetIndex);
216
213
  });
217
- _defineProperty(_assertThisInitialized(_this), "closeValid", function () {
214
+ _defineProperty(_this, "closeValid", function () {
218
215
  var _this$props = _this.props,
219
216
  valid = _this$props.valid,
220
217
  _this$props$callback = _this$props.callback,
221
218
  callback = _this$props$callback === void 0 ? {} : _this$props$callback;
222
219
  valid && callback.onExitValid();
223
220
  });
224
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (key, colOptions, index) {
221
+ _defineProperty(_this, "getOptions", function (key, colOptions, index) {
225
222
  var options = _this.props.items[index].options;
226
223
  var options2 = _this.props.options;
227
224
  if (options && _Array$isArray(options[key])) {
@@ -232,7 +229,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
232
229
  return colOptions;
233
230
  }
234
231
  });
235
- _defineProperty(_assertThisInitialized(_this), "validField", function (required, value) {
232
+ _defineProperty(_this, "validField", function (required, value) {
236
233
  if (!_this.props.valid || _this.error || !required || value) {
237
234
  return false;
238
235
  } else if (typeof value === 'number') {
@@ -242,15 +239,15 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
242
239
  return true;
243
240
  }
244
241
  });
245
- _defineProperty(_assertThisInitialized(_this), "toRadio", function (_ref12, index) {
246
- var value = _ref12.value,
247
- title = _ref12.title;
242
+ _defineProperty(_this, "toRadio", function (_ref10, index) {
243
+ var value = _ref10.value,
244
+ title = _ref10.title;
248
245
  return /*#__PURE__*/React.createElement(_Radio, {
249
246
  key: index,
250
247
  value: String(value)
251
248
  }, title);
252
249
  });
253
- _defineProperty(_assertThisInitialized(_this), "renderRadioGroup", function (config, value, index) {
250
+ _defineProperty(_this, "renderRadioGroup", function (config, value, index) {
254
251
  var key = config.key,
255
252
  options = config.options;
256
253
  var radioGroupProps = {
@@ -261,7 +258,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
261
258
  };
262
259
  return /*#__PURE__*/React.createElement(RadioGroup, radioGroupProps, _mapInstanceProperty(options).call(options, _this.toRadio));
263
260
  });
264
- _defineProperty(_assertThisInitialized(_this), "renderEditableCell", function (config, value, index) {
261
+ _defineProperty(_this, "renderEditableCell", function (config, value, index) {
265
262
  var key = config.key,
266
263
  type = config.type,
267
264
  options = config.options,
@@ -353,7 +350,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
353
350
  }
354
351
  return /*#__PURE__*/React.createElement(SuperTableCell, cellProps);
355
352
  });
356
- _defineProperty(_assertThisInitialized(_this), "renderDoubleEditableCell", function (config, value, index) {
353
+ _defineProperty(_this, "renderDoubleEditableCell", function (config, value, index) {
357
354
  var key = config.key,
358
355
  type = config.type,
359
356
  options = config.options,
@@ -383,7 +380,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
383
380
  };
384
381
  return /*#__PURE__*/React.createElement(SuperTableCell, cellProps);
385
382
  });
386
- _defineProperty(_assertThisInitialized(_this), "renderLinkCell", function (col, value, record, index) {
383
+ _defineProperty(_this, "renderLinkCell", function (col, value, record, index) {
387
384
  if (col.link === 'list') {
388
385
  var list = value && _Array$isArray(value) ? value : [];
389
386
  return /*#__PURE__*/React.createElement("div", {
@@ -394,8 +391,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
394
391
  var _context2;
395
392
  var split = index2 === list.length - 1 ? '' : ',';
396
393
  var onClick = function onClick() {
397
- var _ref13 = _this.props.callback || {},
398
- onLink = _ref13.onLink;
394
+ var _ref11 = _this.props.callback || {},
395
+ onLink = _ref11.onLink;
399
396
  onLink && onLink(col.key, index, item2);
400
397
  };
401
398
  return /*#__PURE__*/React.createElement("a", {
@@ -406,8 +403,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
406
403
  } else {
407
404
  var title = typeof col.link === 'string' ? col.link : value;
408
405
  var onClick = function onClick() {
409
- var _ref14 = _this.props.callback || {},
410
- onLink = _ref14.onLink;
406
+ var _ref12 = _this.props.callback || {},
407
+ onLink = _ref12.onLink;
411
408
  onLink && onLink(col.key, index, record);
412
409
  };
413
410
  return /*#__PURE__*/React.createElement("a", {
@@ -419,13 +416,18 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
419
416
  }, title);
420
417
  }
421
418
  });
422
- _defineProperty(_assertThisInitialized(_this), "getIndex", function (index) {
419
+ _defineProperty(_this, "getIndex", function (index) {
423
420
  return (_this.props.base || 0) + index;
424
421
  });
425
- _defineProperty(_assertThisInitialized(_this), "getCellRender", function (col) {
422
+ _defineProperty(_this, "getCellRender", function (col) {
426
423
  return function (value, record, index) {
427
- var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
424
+ var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0;
428
425
  var realType = record._isEdit === true && _this.canReadonly(col.type) ? col.editType : col.type;
426
+ if (realType === 'customType') {
427
+ var _this$props$items$rec = _this.props.items[record.key].__customType,
428
+ __customType = _this$props$items$rec === void 0 ? _defineProperty({}, col.key, 'text') : _this$props$items$rec;
429
+ realType = __customType[col.key];
430
+ }
429
431
  if (!realType) {
430
432
  return /*#__PURE__*/React.createElement("div", {
431
433
  onDoubleClick: _this.onDoubleClick(col.key, record.key),
@@ -544,7 +546,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
544
546
  case 'uploadImg':
545
547
  var commonProps = _this.props.callback.buildSuperUploadProps ? _this.props.callback.buildSuperUploadProps() : {};
546
548
  var uploadProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
547
- onFileChange: _this.props.callback.onTableFileChange ? _bindInstanceProperty(_context10 = _this.props.callback.onTableFileChange).call(_context10, null, col.key, index) : undefined,
549
+ onFileChange: _this.props.callback.onTableFileChange ? _bindInstanceProperty(_context0 = _this.props.callback.onTableFileChange).call(_context0, null, col.key, index) : undefined,
548
550
  type: col.type
549
551
  }, col.props), _this.props), commonProps), {}, {
550
552
  value: _this.props.items[index][col.key]
@@ -561,7 +563,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
561
563
  }
562
564
  };
563
565
  });
564
- _defineProperty(_assertThisInitialized(_this), "getCheckedStatus", function (key) {
566
+ _defineProperty(_this, "getCheckedStatus", function (key) {
565
567
  var has = false,
566
568
  not = false;
567
569
  var items = _this.props.items;
@@ -582,7 +584,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
582
584
  indeterminate: has && not
583
585
  };
584
586
  });
585
- _defineProperty(_assertThisInitialized(_this), "toAdd", function (key, showAdd) {
587
+ _defineProperty(_this, "toAdd", function (key, showAdd) {
586
588
  if (showAdd) {
587
589
  var onClick = _this.onAdd(key);
588
590
  return /*#__PURE__*/React.createElement(_Icon, {
@@ -594,12 +596,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
594
596
  return null;
595
597
  }
596
598
  });
597
- _defineProperty(_assertThisInitialized(_this), "getColumnTitle", function (_ref15) {
598
- var required = _ref15.required,
599
- title = _ref15.title,
600
- type = _ref15.type,
601
- key = _ref15.key,
602
- showAdd = _ref15.showAdd;
599
+ _defineProperty(_this, "getColumnTitle", function (_ref14) {
600
+ var required = _ref14.required,
601
+ title = _ref14.title,
602
+ type = _ref14.type,
603
+ key = _ref14.key,
604
+ showAdd = _ref14.showAdd;
603
605
  if (type === 'checkbox') {
604
606
  var status = _this.getCheckedStatus(key);
605
607
  return /*#__PURE__*/React.createElement(_Checkbox, _extends({
@@ -612,31 +614,31 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
612
614
  }, title, _this.toAdd(key, showAdd));
613
615
  }
614
616
  });
615
- _defineProperty(_assertThisInitialized(_this), "getColumnClassName", function (_ref16) {
616
- var type = _ref16.type,
617
- align = _ref16.align;
617
+ _defineProperty(_this, "getColumnClassName", function (_ref15) {
618
+ var type = _ref15.type,
619
+ align = _ref15.align;
618
620
  if (type === 'index' || type === 'checkbox') {
619
621
  return 'ant-table-selection-column';
620
622
  } else {
621
623
  return align ? variables('SuperTable2')[align] : '';
622
624
  }
623
625
  });
624
- _defineProperty(_assertThisInitialized(_this), "canReadonly", function (type) {
625
- var _context11;
626
- return !_includesInstanceProperty(_context11 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context11, type);
626
+ _defineProperty(_this, "canReadonly", function (type) {
627
+ var _context1;
628
+ return !_includesInstanceProperty(_context1 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context1, type);
627
629
  });
628
- _defineProperty(_assertThisInitialized(_this), "getColumns", function (cols) {
629
- var _context12;
630
+ _defineProperty(_this, "getColumns", function (cols) {
631
+ var _context10;
630
632
  var readonly = _this.props.readonly;
631
- return _mapInstanceProperty(_context12 = _filterInstanceProperty(cols).call(cols, function (col) {
633
+ return _mapInstanceProperty(_context10 = _filterInstanceProperty(cols).call(cols, function (col) {
632
634
  return !col.hide;
633
- })).call(_context12, function (_ref17, index) {
634
- var _context13;
635
- var col = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
635
+ })).call(_context10, function (_ref16, index) {
636
+ var _context11;
637
+ var col = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
636
638
  col.className = _this.getColumnClassName(col);
637
639
  col.title = _this.getColumnTitle(col);
638
640
  col.dataIndex = col.key;
639
- col.width = col.width ? col.width : _includesInstanceProperty(_context13 = ['index', 'checked']).call(_context13, col.key) ? 70 : col.type === 'img' ? 200 : 120;
641
+ col.width = col.width ? col.width : _includesInstanceProperty(_context11 = ['index', 'checked']).call(_context11, col.key) ? 70 : col.type === 'img' ? 200 : 120;
640
642
  // const {props = {}} =
641
643
  // const {edit = false} = props
642
644
  // if (!(readonly || col.type === 'readonly') || !this.canReadonly(col.type)) {
@@ -662,7 +664,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
662
664
  return col;
663
665
  });
664
666
  });
665
- _defineProperty(_assertThisInitialized(_this), "getText", function (value, options) {
667
+ _defineProperty(_this, "getText", function (value, options) {
666
668
  if (_Array$isArray(value)) {
667
669
  return _mapInstanceProperty(value).call(value, function (v) {
668
670
  return getTitle(v, options);
@@ -671,14 +673,14 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
671
673
  return getTitle(value, options);
672
674
  }
673
675
  });
674
- _defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
676
+ _defineProperty(_this, "getDataSource", function (items, cols) {
675
677
  return _mapInstanceProperty(items).call(items, function (item, index) {
676
- return _reduceInstanceProperty(cols).call(cols, function (result, _ref18) {
677
- var _context14, _context15;
678
- var key = _ref18.key,
679
- type = _ref18.type,
680
- options = _ref18.options;
681
- if (!_this.props.readonly && type && type !== 'readonly' && (!item.isReadonly || _Array$isArray(item.isReadonly) && !_includesInstanceProperty(_context14 = item.isReadonly).call(_context14, key)) || _includesInstanceProperty(_context15 = ['img', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context15, type)) {
678
+ return _reduceInstanceProperty(cols).call(cols, function (result, _ref17) {
679
+ var _context12, _context13;
680
+ var key = _ref17.key,
681
+ type = _ref17.type,
682
+ options = _ref17.options;
683
+ if (!_this.props.readonly && type && type !== 'readonly' && (!item.isReadonly || _Array$isArray(item.isReadonly) && !_includesInstanceProperty(_context12 = item.isReadonly).call(_context12, key)) || _includesInstanceProperty(_context13 = ['img', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context13, type)) {
682
684
  result[key] = item[key];
683
685
  } else {
684
686
  result[key] = _this.getText(item[key], options);
@@ -690,7 +692,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
690
692
  }));
691
693
  });
692
694
  });
693
- _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox", function () {
695
+ _defineProperty(_this, "getPropsByCheckbox", function () {
694
696
  var _this$props2 = _this.props,
695
697
  items = _this$props2.items,
696
698
  _this$props2$isEmphas = _this$props2.isEmphasized,
@@ -705,13 +707,13 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
705
707
  rowClassName: rowClassName
706
708
  };
707
709
  });
708
- _defineProperty(_assertThisInitialized(_this), "getSelectedRowKeys", function (items) {
710
+ _defineProperty(_this, "getSelectedRowKeys", function (items) {
709
711
  return _reduceInstanceProperty(items).call(items, function (result, item, index) {
710
712
  item.checked && result.push(index);
711
713
  return result;
712
714
  }, []);
713
715
  });
714
- _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox2", function (items) {
716
+ _defineProperty(_this, "getPropsByCheckbox2", function (items) {
715
717
  var _this$props3 = _this.props,
716
718
  _this$props3$checkbox = _this$props3.checkbox,
717
719
  checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
@@ -796,7 +798,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
796
798
  };
797
799
  }
798
800
  });
799
- _defineProperty(_assertThisInitialized(_this), "getRowPropsForDrag", function () {
801
+ _defineProperty(_this, "getRowPropsForDrag", function () {
800
802
  return function (record, index) {
801
803
  return {
802
804
  index: index,
@@ -804,7 +806,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
804
806
  };
805
807
  };
806
808
  });
807
- _defineProperty(_assertThisInitialized(_this), "getRowProps", function (onRowClick) {
809
+ _defineProperty(_this, "getRowProps", function (onRowClick) {
808
810
  return function (record) {
809
811
  return {
810
812
  onClick: function onClick() {
@@ -816,8 +818,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
816
818
  };
817
819
  };
818
820
  });
819
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
820
- var _context16;
821
+ _defineProperty(_this, "getProps", function () {
822
+ var _context14;
821
823
  var _this$props4 = _this.props,
822
824
  cols = _this$props4.cols,
823
825
  items = _this$props4.items,
@@ -835,11 +837,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
835
837
  expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
836
838
  _this$props4$onExpand = _this$props4.onExpand,
837
839
  onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand;
838
- var widthX = _reduceInstanceProperty(_context16 = _filterInstanceProperty(cols).call(cols, function (col) {
840
+ var widthX = _reduceInstanceProperty(_context14 = _filterInstanceProperty(cols).call(cols, function (col) {
839
841
  return !col.hide;
840
- })).call(_context16, function (width, item) {
841
- var _context17;
842
- return width += item.width ? item.width : _includesInstanceProperty(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
842
+ })).call(_context14, function (width, item) {
843
+ var _context15;
844
+ return width += item.width ? item.width : _includesInstanceProperty(_context15 = ['index', 'checked']).call(_context15, item.key) ? 70 : item.type === 'img' ? 200 : 120;
843
845
  }, 0);
844
846
  var scrollProps = !helper.isEmpty2(expandedRowRender) ? {
845
847
  expandedRowRender: expandedRowRender
@@ -877,9 +879,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
877
879
  onExpand: onExpand
878
880
  }, scrollProps);
879
881
  });
880
- _defineProperty(_assertThisInitialized(_this), "setScroll", function () {
882
+ _defineProperty(_this, "setScroll", function () {
881
883
  if (_this.props.maxHeight && _this.props.items.length) {
882
- var root = ReactDOM.findDOMNode(_assertThisInitialized(_this));
884
+ var root = ReactDOM.findDOMNode(_this);
883
885
  var container = root.getElementsByClassName('ant-table-body')[0];
884
886
  var header = root.getElementsByClassName('ant-table-thead')[0];
885
887
  fixed(container, header, _this.props.maxHeight);
@@ -887,7 +889,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
887
889
  });
888
890
  return _this;
889
891
  }
890
- _createClass(SuperTable2, [{
892
+ _inherits(SuperTable2, _React$Component);
893
+ return _createClass(SuperTable2, [{
891
894
  key: "componentDidMount",
892
895
  value: function componentDidMount() {
893
896
  this.setScroll();
@@ -906,7 +909,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
906
909
  }));
907
910
  }
908
911
  }]);
909
- return SuperTable2;
910
912
  }(React.Component);
911
913
  _defineProperty(SuperTable2, "propTypes", {
912
914
  cols: PropTypes.arrayOf(PropTypes.shape(ColType)).isRequired,