cloud-b2b 1.1.80 → 1.1.82

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 (82) hide show
  1. package/es/Area/Area.js +16 -11
  2. package/es/CodeInput/CodeInput.js +19 -16
  3. package/es/Control/Control.js +4 -1
  4. package/es/Enhance/Dialogs.js +14 -11
  5. package/es/Enhance/Loading.js +18 -15
  6. package/es/Header/Header.js +20 -17
  7. package/es/Header/Vertical.js +14 -11
  8. package/es/ImageView/ImageView.js +13 -10
  9. package/es/InpurCascader/InputCascader.js +14 -11
  10. package/es/InputEditor/InputEditor.js +18 -16
  11. package/es/InputSearch/InputSearch.js +23 -20
  12. package/es/InputSelect/InputSelect.js +17 -14
  13. package/es/InputTreeSelect/InputTreeSelect.js +13 -10
  14. package/es/InputWriting/InputWriting.js +15 -12
  15. package/es/Layout/Layout.js +17 -14
  16. package/es/Link/Link.js +10 -7
  17. package/es/NumberInput/NumberInput.js +16 -13
  18. package/es/Search/Search.js +55 -52
  19. package/es/Search2/Search.js +86 -83
  20. package/es/Search2/Search.less +64 -64
  21. package/es/Search2/package.json +6 -6
  22. package/es/Sidebar/Sidebar.js +14 -11
  23. package/es/Sidebar2/Sidebar.js +16 -13
  24. package/es/SuperForm/SuperForm.js +79 -74
  25. package/es/SuperForm2/SuperForm.js +114 -108
  26. package/es/SuperPagination/SuperPagination.js +11 -8
  27. package/es/SuperTab/SuperTab.js +15 -12
  28. package/es/SuperTab2/SuperTab2.js +16 -13
  29. package/es/SuperTable/DragSortRow.js +15 -12
  30. package/es/SuperTable/FilterDropDown.js +14 -11
  31. package/es/SuperTable/SuperTable.js +73 -70
  32. package/es/SuperTable2/SuperTable2.js +92 -89
  33. package/es/SuperTable2/SuperTableCell.js +30 -27
  34. package/es/SuperTable3/FilterDropDown.js +14 -11
  35. package/es/SuperTable3/SuperTable.js +61 -58
  36. package/es/SuperToolbar/SuperToolbar.js +15 -12
  37. package/es/SuperUpload/SuperUpload.js +38 -38
  38. package/es/Viewer/ImageViews.js +19 -16
  39. package/es/Viewer/Viewer.js +14 -11
  40. package/es/helper.js +17 -18
  41. package/lib/Area/Area.js +16 -11
  42. package/lib/CodeInput/CodeInput.js +19 -16
  43. package/lib/Control/Control.js +4 -1
  44. package/lib/Enhance/Dialogs.js +14 -11
  45. package/lib/Enhance/Loading.js +18 -15
  46. package/lib/Header/Header.js +20 -17
  47. package/lib/Header/Vertical.js +14 -11
  48. package/lib/ImageView/ImageView.js +13 -10
  49. package/lib/InpurCascader/InputCascader.js +14 -11
  50. package/lib/InputEditor/InputEditor.js +18 -16
  51. package/lib/InputSearch/InputSearch.js +23 -20
  52. package/lib/InputSelect/InputSelect.js +17 -14
  53. package/lib/InputTreeSelect/InputTreeSelect.js +13 -10
  54. package/lib/InputWriting/InputWriting.js +15 -12
  55. package/lib/Layout/Layout.js +17 -14
  56. package/lib/LayoutLink/LayoutLink.js +2 -1
  57. package/lib/Link/Link.js +10 -7
  58. package/lib/NumberInput/NumberInput.js +16 -13
  59. package/lib/Search/Search.js +57 -53
  60. package/lib/Search2/Search.js +88 -84
  61. package/lib/Search2/Search.less +64 -64
  62. package/lib/Search2/package.json +6 -6
  63. package/lib/Sidebar/Sidebar.js +14 -11
  64. package/lib/Sidebar2/Sidebar.js +16 -13
  65. package/lib/SuperForm/SuperForm.js +81 -75
  66. package/lib/SuperForm2/SuperForm.js +116 -109
  67. package/lib/SuperPagination/SuperPagination.js +11 -8
  68. package/lib/SuperTab/SuperTab.js +15 -12
  69. package/lib/SuperTab2/SuperTab2.js +16 -13
  70. package/lib/SuperTable/DragSortRow.js +15 -12
  71. package/lib/SuperTable/FilterDropDown.js +14 -11
  72. package/lib/SuperTable/SuperTable.js +73 -70
  73. package/lib/SuperTable2/SuperTable2.js +94 -90
  74. package/lib/SuperTable2/SuperTableCell.js +30 -27
  75. package/lib/SuperTable3/FilterDropDown.js +14 -11
  76. package/lib/SuperTable3/SuperTable.js +61 -58
  77. package/lib/SuperToolbar/SuperToolbar.js +15 -12
  78. package/lib/SuperUpload/SuperUpload.js +40 -39
  79. package/lib/Viewer/ImageViews.js +19 -16
  80. package/lib/Viewer/Viewer.js +14 -11
  81. package/lib/helper.js +17 -18
  82. package/package.json +1 -1
@@ -20,17 +20,18 @@ 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";
23
25
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
24
26
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
25
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
26
27
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
27
28
  import _Radio from "antd/es/radio";
28
29
  var _excluded = ["onRowClick"];
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; }
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; }
32
33
  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; }
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; }
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; }
34
35
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
35
36
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
36
37
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
@@ -41,8 +42,8 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
41
42
  import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
42
43
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
43
44
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
44
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
45
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
45
+ 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); }; }
46
+ 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; } }
46
47
  import React from 'react';
47
48
  import PropTypes from 'prop-types';
48
49
  import ReactDOM from 'react-dom';
@@ -126,6 +127,8 @@ var CallbackType = {
126
127
  * isEmphasized: [可选],是否强调,行字体加粗显示, 除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
127
128
  */
128
129
  var SuperTable2 = /*#__PURE__*/function (_React$Component) {
130
+ _inherits(SuperTable2, _React$Component);
131
+ var _super = _createSuper(SuperTable2);
129
132
  function SuperTable2() {
130
133
  var _context;
131
134
  var _this;
@@ -133,22 +136,22 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
133
136
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
134
137
  args[_key] = arguments[_key];
135
138
  }
136
- _this = _callSuper(this, SuperTable2, _concatInstanceProperty(_context = []).call(_context, args));
137
- _defineProperty(_this, "onSwitch", function (key, rowIndex) {
139
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
140
+ _defineProperty(_assertThisInitialized(_this), "onSwitch", function (key, rowIndex) {
138
141
  return function (value) {
139
142
  var _ref = _this.props.callback || {},
140
143
  onContentChange = _ref.onContentChange;
141
144
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
142
145
  };
143
146
  });
144
- _defineProperty(_this, "onCheck", function (key, rowIndex) {
147
+ _defineProperty(_assertThisInitialized(_this), "onCheck", function (key, rowIndex) {
145
148
  return function (e) {
146
149
  var _ref2 = _this.props.callback || {},
147
150
  onCheck = _ref2.onCheck;
148
151
  onCheck && onCheck(_this.getIndex(rowIndex), key, e.target.checked);
149
152
  };
150
153
  });
151
- _defineProperty(_this, "onChange", function (key, rowIndex) {
154
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (key, rowIndex) {
152
155
  return function (value) {
153
156
  var _ref3 = _this.props.callback || {},
154
157
  onContentChange = _ref3.onContentChange;
@@ -156,7 +159,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
156
159
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
157
160
  };
158
161
  });
159
- _defineProperty(_this, "onDoubleChange1", function (key, rowIndex) {
162
+ _defineProperty(_assertThisInitialized(_this), "onDoubleChange1", function (key, rowIndex) {
160
163
  return function (doublekey, value) {
161
164
  var _ref4 = _this.props.callback || {},
162
165
  onContentChange = _ref4.onContentChange;
@@ -164,28 +167,28 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
164
167
  onContentChange && onContentChange(_this.getIndex(rowIndex), doublekey, value);
165
168
  };
166
169
  });
167
- _defineProperty(_this, "onSearch", function (key, rowIndex, config) {
170
+ _defineProperty(_assertThisInitialized(_this), "onSearch", function (key, rowIndex, config) {
168
171
  return function (value) {
169
172
  var _ref5 = _this.props.callback || {},
170
173
  onSearch = _ref5.onSearch;
171
174
  onSearch && onSearch(_this.getIndex(rowIndex), key, value, config);
172
175
  };
173
176
  });
174
- _defineProperty(_this, "onAdd", function (key) {
177
+ _defineProperty(_assertThisInitialized(_this), "onAdd", function (key) {
175
178
  return function () {
176
179
  var _ref6 = _this.props.callback || {},
177
180
  onAdd = _ref6.onAdd;
178
181
  onAdd && onAdd(key);
179
182
  };
180
183
  });
181
- _defineProperty(_this, "onRowAdd", function (key, index) {
184
+ _defineProperty(_assertThisInitialized(_this), "onRowAdd", function (key, index) {
182
185
  return function () {
183
186
  var _ref7 = _this.props.callback || {},
184
187
  onLink = _ref7.onLink;
185
188
  onLink && onLink(key, index, _this.props.items[index]);
186
189
  };
187
190
  });
188
- _defineProperty(_this, "onBlur", function (key, rowIndex) {
191
+ _defineProperty(_assertThisInitialized(_this), "onBlur", function (key, rowIndex) {
189
192
  return function (value) {
190
193
  var _ref8 = _this.props.callback || {},
191
194
  onBlur = _ref8.onBlur;
@@ -193,33 +196,33 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
193
196
  onBlur && onBlur(_this.getIndex(rowIndex), key, value);
194
197
  };
195
198
  });
196
- _defineProperty(_this, "onDoubleClick", function (key, value) {
199
+ _defineProperty(_assertThisInitialized(_this), "onDoubleClick", function (key, value) {
197
200
  return function () {
198
201
  var _ref9 = _this.props.callback || {},
199
202
  onDoubleClick = _ref9.onDoubleClick;
200
203
  onDoubleClick && onDoubleClick(key, value);
201
204
  };
202
205
  });
203
- _defineProperty(_this, "onImgTileClick", function (col, value, rowIndex) {
206
+ _defineProperty(_assertThisInitialized(_this), "onImgTileClick", function (col, value, rowIndex) {
204
207
  return function () {
205
- var _ref0 = _this.props.callback || {},
206
- onImgTileClick = _ref0.onImgTileClick;
208
+ var _ref10 = _this.props.callback || {},
209
+ onImgTileClick = _ref10.onImgTileClick;
207
210
  onImgTileClick && onImgTileClick(col, value, rowIndex);
208
211
  };
209
212
  });
210
- _defineProperty(_this, "onMoveRow", function (dragIndex, targetIndex) {
211
- var _ref1 = _this.props.callback || {},
212
- onMoveRow = _ref1.onMoveRow;
213
+ _defineProperty(_assertThisInitialized(_this), "onMoveRow", function (dragIndex, targetIndex) {
214
+ var _ref11 = _this.props.callback || {},
215
+ onMoveRow = _ref11.onMoveRow;
213
216
  onMoveRow && onMoveRow(dragIndex, targetIndex);
214
217
  });
215
- _defineProperty(_this, "closeValid", function () {
218
+ _defineProperty(_assertThisInitialized(_this), "closeValid", function () {
216
219
  var _this$props = _this.props,
217
220
  valid = _this$props.valid,
218
221
  _this$props$callback = _this$props.callback,
219
222
  callback = _this$props$callback === void 0 ? {} : _this$props$callback;
220
223
  valid && callback.onExitValid();
221
224
  });
222
- _defineProperty(_this, "getOptions", function (key, colOptions, index) {
225
+ _defineProperty(_assertThisInitialized(_this), "getOptions", function (key, colOptions, index) {
223
226
  var options = _this.props.items[index].options;
224
227
  var options2 = _this.props.options;
225
228
  if (options && _Array$isArray(options[key])) {
@@ -230,7 +233,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
230
233
  return colOptions;
231
234
  }
232
235
  });
233
- _defineProperty(_this, "validField", function (required, value) {
236
+ _defineProperty(_assertThisInitialized(_this), "validField", function (required, value) {
234
237
  if (!_this.props.valid || _this.error || !required || value) {
235
238
  return false;
236
239
  } else if (typeof value === 'number') {
@@ -240,15 +243,15 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
240
243
  return true;
241
244
  }
242
245
  });
243
- _defineProperty(_this, "toRadio", function (_ref10, index) {
244
- var value = _ref10.value,
245
- title = _ref10.title;
246
+ _defineProperty(_assertThisInitialized(_this), "toRadio", function (_ref12, index) {
247
+ var value = _ref12.value,
248
+ title = _ref12.title;
246
249
  return /*#__PURE__*/React.createElement(_Radio, {
247
250
  key: index,
248
251
  value: String(value)
249
252
  }, title);
250
253
  });
251
- _defineProperty(_this, "renderRadioGroup", function (config, value, index) {
254
+ _defineProperty(_assertThisInitialized(_this), "renderRadioGroup", function (config, value, index) {
252
255
  var key = config.key,
253
256
  options = config.options;
254
257
  var radioGroupProps = {
@@ -259,7 +262,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
259
262
  };
260
263
  return /*#__PURE__*/React.createElement(RadioGroup, radioGroupProps, _mapInstanceProperty(options).call(options, _this.toRadio));
261
264
  });
262
- _defineProperty(_this, "renderEditableCell", function (config, value, index) {
265
+ _defineProperty(_assertThisInitialized(_this), "renderEditableCell", function (config, value, index) {
263
266
  var key = config.key,
264
267
  type = config.type,
265
268
  options = config.options,
@@ -351,7 +354,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
351
354
  }
352
355
  return /*#__PURE__*/React.createElement(SuperTableCell, cellProps);
353
356
  });
354
- _defineProperty(_this, "renderDoubleEditableCell", function (config, value, index) {
357
+ _defineProperty(_assertThisInitialized(_this), "renderDoubleEditableCell", function (config, value, index) {
355
358
  var key = config.key,
356
359
  type = config.type,
357
360
  options = config.options,
@@ -381,7 +384,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
381
384
  };
382
385
  return /*#__PURE__*/React.createElement(SuperTableCell, cellProps);
383
386
  });
384
- _defineProperty(_this, "renderLinkCell", function (col, value, record, index) {
387
+ _defineProperty(_assertThisInitialized(_this), "renderLinkCell", function (col, value, record, index) {
385
388
  if (col.link === 'list') {
386
389
  var list = value && _Array$isArray(value) ? value : [];
387
390
  return /*#__PURE__*/React.createElement("div", {
@@ -392,8 +395,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
392
395
  var _context2;
393
396
  var split = index2 === list.length - 1 ? '' : ',';
394
397
  var onClick = function onClick() {
395
- var _ref11 = _this.props.callback || {},
396
- onLink = _ref11.onLink;
398
+ var _ref13 = _this.props.callback || {},
399
+ onLink = _ref13.onLink;
397
400
  onLink && onLink(col.key, index, item2);
398
401
  };
399
402
  return /*#__PURE__*/React.createElement("a", {
@@ -404,8 +407,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
404
407
  } else {
405
408
  var title = typeof col.link === 'string' ? col.link : value;
406
409
  var onClick = function onClick() {
407
- var _ref12 = _this.props.callback || {},
408
- onLink = _ref12.onLink;
410
+ var _ref14 = _this.props.callback || {},
411
+ onLink = _ref14.onLink;
409
412
  onLink && onLink(col.key, index, record);
410
413
  };
411
414
  return /*#__PURE__*/React.createElement("a", {
@@ -417,12 +420,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
417
420
  }, title);
418
421
  }
419
422
  });
420
- _defineProperty(_this, "getIndex", function (index) {
423
+ _defineProperty(_assertThisInitialized(_this), "getIndex", function (index) {
421
424
  return (_this.props.base || 0) + index;
422
425
  });
423
- _defineProperty(_this, "getCellRender", function (col) {
426
+ _defineProperty(_assertThisInitialized(_this), "getCellRender", function (col) {
424
427
  return function (value, record, index) {
425
- var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0;
428
+ var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
426
429
  var realType = record._isEdit === true && _this.canReadonly(col.type) ? col.editType : col.type;
427
430
  if (realType === 'customType') {
428
431
  var _this$props$items$rec = _this.props.items[record.key].__customType,
@@ -547,7 +550,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
547
550
  case 'uploadImg':
548
551
  var commonProps = _this.props.callback.buildSuperUploadProps ? _this.props.callback.buildSuperUploadProps() : {};
549
552
  var uploadProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
550
- onFileChange: _this.props.callback.onTableFileChange ? _bindInstanceProperty(_context0 = _this.props.callback.onTableFileChange).call(_context0, null, col.key, index) : undefined,
553
+ onFileChange: _this.props.callback.onTableFileChange ? _bindInstanceProperty(_context10 = _this.props.callback.onTableFileChange).call(_context10, null, col.key, index) : undefined,
551
554
  type: col.type
552
555
  }, col.props), _this.props), commonProps), {}, {
553
556
  value: _this.props.items[index][col.key]
@@ -564,7 +567,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
564
567
  }
565
568
  };
566
569
  });
567
- _defineProperty(_this, "getCheckedStatus", function (key) {
570
+ _defineProperty(_assertThisInitialized(_this), "getCheckedStatus", function (key) {
568
571
  var has = false,
569
572
  not = false;
570
573
  var items = _this.props.items;
@@ -585,7 +588,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
585
588
  indeterminate: has && not
586
589
  };
587
590
  });
588
- _defineProperty(_this, "toAdd", function (key, showAdd) {
591
+ _defineProperty(_assertThisInitialized(_this), "toAdd", function (key, showAdd) {
589
592
  if (showAdd) {
590
593
  var onClick = _this.onAdd(key);
591
594
  return /*#__PURE__*/React.createElement(_Icon, {
@@ -597,12 +600,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
597
600
  return null;
598
601
  }
599
602
  });
600
- _defineProperty(_this, "getColumnTitle", function (_ref14) {
601
- var required = _ref14.required,
602
- title = _ref14.title,
603
- type = _ref14.type,
604
- key = _ref14.key,
605
- showAdd = _ref14.showAdd;
603
+ _defineProperty(_assertThisInitialized(_this), "getColumnTitle", function (_ref16) {
604
+ var required = _ref16.required,
605
+ title = _ref16.title,
606
+ type = _ref16.type,
607
+ key = _ref16.key,
608
+ showAdd = _ref16.showAdd;
606
609
  if (type === 'checkbox') {
607
610
  var status = _this.getCheckedStatus(key);
608
611
  return /*#__PURE__*/React.createElement(_Checkbox, _extends({
@@ -615,23 +618,23 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
615
618
  }, title, _this.toAdd(key, showAdd));
616
619
  }
617
620
  });
618
- _defineProperty(_this, "getColumnClassName", function (_ref15) {
619
- var type = _ref15.type,
620
- align = _ref15.align;
621
+ _defineProperty(_assertThisInitialized(_this), "getColumnClassName", function (_ref17) {
622
+ var type = _ref17.type,
623
+ align = _ref17.align;
621
624
  if (type === 'index' || type === 'checkbox') {
622
625
  return 'ant-table-selection-column';
623
626
  } else {
624
627
  return align ? variables('SuperTable2')[align] : '';
625
628
  }
626
629
  });
627
- _defineProperty(_this, "canReadonly", function (type) {
628
- var _context1;
629
- return !_includesInstanceProperty(_context1 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context1, type);
630
+ _defineProperty(_assertThisInitialized(_this), "canReadonly", function (type) {
631
+ var _context11;
632
+ return !_includesInstanceProperty(_context11 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg', 'double']).call(_context11, type);
630
633
  });
631
- _defineProperty(_this, "tooltip", function (key, index, item, _ref16) {
632
- var tipLen = _ref16.tooltip,
633
- options = _ref16.options,
634
- width = _ref16.width;
634
+ _defineProperty(_assertThisInitialized(_this), "tooltip", function (key, index, item, _ref18) {
635
+ var tipLen = _ref18.tooltip,
636
+ options = _ref18.options,
637
+ width = _ref18.width;
635
638
  var text = _this.getText(item[key], options);
636
639
  var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
637
640
  return needTip ? /*#__PURE__*/React.createElement(_Tooltip, {
@@ -664,18 +667,18 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
664
667
  title: true
665
668
  }, _Array$isArray(text) ? text.join(',') : text, " ");
666
669
  });
667
- _defineProperty(_this, "getColumns", function (cols, items) {
668
- var _context10;
670
+ _defineProperty(_assertThisInitialized(_this), "getColumns", function (cols, items) {
671
+ var _context12;
669
672
  var readonly = _this.props.readonly;
670
- return _mapInstanceProperty(_context10 = _filterInstanceProperty(cols).call(cols, function (col) {
673
+ return _mapInstanceProperty(_context12 = _filterInstanceProperty(cols).call(cols, function (col) {
671
674
  return !col.hide;
672
- })).call(_context10, function (_ref17, index) {
673
- var _context11;
674
- var col = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
675
+ })).call(_context12, function (_ref19, index) {
676
+ var _context13;
677
+ var col = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
675
678
  col.className = _this.getColumnClassName(col);
676
679
  col.title = _this.getColumnTitle(col);
677
680
  col.dataIndex = col.key;
678
- !_this.props.autoAdjustingWidth && (col.width = col.width ? col.width : _includesInstanceProperty(_context11 = ['index', 'checked']).call(_context11, col.key) ? 70 : col.type === 'img' ? 200 : 120);
681
+ !_this.props.autoAdjustingWidth && (col.width = col.width ? col.width : _includesInstanceProperty(_context13 = ['index', 'checked']).call(_context13, col.key) ? 70 : col.type === 'img' ? 200 : 120);
679
682
  // col.width = col.width ? col.width : (['index','checked'].includes(col.key) ? 70 : (col.type === 'img' ? 200 : 120));
680
683
 
681
684
  // const {props = {}} =
@@ -707,7 +710,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
707
710
  return col;
708
711
  });
709
712
  });
710
- _defineProperty(_this, "getText", function (value, options) {
713
+ _defineProperty(_assertThisInitialized(_this), "getText", function (value, options) {
711
714
  if (_Array$isArray(value)) {
712
715
  return _mapInstanceProperty(value).call(value, function (v) {
713
716
  return getTitle(v, options);
@@ -716,14 +719,14 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
716
719
  return getTitle(value, options);
717
720
  }
718
721
  });
719
- _defineProperty(_this, "getDataSource", function (items, cols) {
722
+ _defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
720
723
  return _mapInstanceProperty(items).call(items, function (item, index) {
721
- return _reduceInstanceProperty(cols).call(cols, function (result, _ref18) {
722
- var _context12, _context13;
723
- var key = _ref18.key,
724
- type = _ref18.type,
725
- options = _ref18.options;
726
- 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)) {
724
+ return _reduceInstanceProperty(cols).call(cols, function (result, _ref20) {
725
+ var _context14, _context15;
726
+ var key = _ref20.key,
727
+ type = _ref20.type,
728
+ options = _ref20.options;
729
+ 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)) {
727
730
  result[key] = item[key];
728
731
  } else {
729
732
  result[key] = _this.getText(item[key], options);
@@ -735,7 +738,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
735
738
  }));
736
739
  });
737
740
  });
738
- _defineProperty(_this, "getPropsByCheckbox", function () {
741
+ _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox", function () {
739
742
  var _this$props2 = _this.props,
740
743
  items = _this$props2.items,
741
744
  _this$props2$isEmphas = _this$props2.isEmphasized,
@@ -750,13 +753,13 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
750
753
  rowClassName: rowClassName
751
754
  };
752
755
  });
753
- _defineProperty(_this, "getSelectedRowKeys", function (items) {
756
+ _defineProperty(_assertThisInitialized(_this), "getSelectedRowKeys", function (items) {
754
757
  return _reduceInstanceProperty(items).call(items, function (result, item, index) {
755
758
  item.checked && result.push(index);
756
759
  return result;
757
760
  }, []);
758
761
  });
759
- _defineProperty(_this, "getPropsByCheckbox2", function (items) {
762
+ _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox2", function (items) {
760
763
  var _this$props3 = _this.props,
761
764
  _this$props3$checkbox = _this$props3.checkbox,
762
765
  checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
@@ -841,7 +844,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
841
844
  };
842
845
  }
843
846
  });
844
- _defineProperty(_this, "getRowPropsForDrag", function () {
847
+ _defineProperty(_assertThisInitialized(_this), "getRowPropsForDrag", function () {
845
848
  return function (record, index) {
846
849
  return {
847
850
  index: index,
@@ -849,7 +852,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
849
852
  };
850
853
  };
851
854
  });
852
- _defineProperty(_this, "getRowProps", function (onRowClick) {
855
+ _defineProperty(_assertThisInitialized(_this), "getRowProps", function (onRowClick) {
853
856
  return function (record) {
854
857
  return {
855
858
  onClick: function onClick() {
@@ -861,8 +864,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
861
864
  };
862
865
  };
863
866
  });
864
- _defineProperty(_this, "getProps", function () {
865
- var _context14;
867
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
868
+ var _context16;
866
869
  var _this$props4 = _this.props,
867
870
  cols = _this$props4.cols,
868
871
  items = _this$props4.items,
@@ -884,11 +887,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
884
887
  expandedRowRenderKeepScroll = _this$props4$expanded2 === void 0 ? false : _this$props4$expanded2,
885
888
  _this$props4$autoAdju = _this$props4.autoAdjustingWidth,
886
889
  autoAdjustingWidth = _this$props4$autoAdju === void 0 ? false : _this$props4$autoAdju;
887
- var widthX = _reduceInstanceProperty(_context14 = _filterInstanceProperty(cols).call(cols, function (col) {
890
+ var widthX = _reduceInstanceProperty(_context16 = _filterInstanceProperty(cols).call(cols, function (col) {
888
891
  return !col.hide;
889
- })).call(_context14, function (width, item) {
890
- var _context15;
891
- return width += item.width ? item.width : _includesInstanceProperty(_context15 = ['index', 'checked']).call(_context15, item.key) ? 70 : item.type === 'img' ? 200 : 120;
892
+ })).call(_context16, function (width, item) {
893
+ var _context17;
894
+ return width += item.width ? item.width : _includesInstanceProperty(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
892
895
  }, 0);
893
896
  var scrollProps = {};
894
897
  if (expandedRowRenderKeepScroll) {
@@ -944,9 +947,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
944
947
  });
945
948
  return props;
946
949
  });
947
- _defineProperty(_this, "setScroll", function () {
950
+ _defineProperty(_assertThisInitialized(_this), "setScroll", function () {
948
951
  if (_this.props.maxHeight && _this.props.items.length) {
949
- var root = ReactDOM.findDOMNode(_this);
952
+ var root = ReactDOM.findDOMNode(_assertThisInitialized(_this));
950
953
  var container = root.getElementsByClassName('ant-table-body')[0];
951
954
  var header = root.getElementsByClassName('ant-table-thead')[0];
952
955
  fixed(container, header, _this.props.maxHeight);
@@ -954,8 +957,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
954
957
  });
955
958
  return _this;
956
959
  }
957
- _inherits(SuperTable2, _React$Component);
958
- return _createClass(SuperTable2, [{
960
+ _createClass(SuperTable2, [{
959
961
  key: "componentDidMount",
960
962
  value: function componentDidMount() {
961
963
  this.setScroll();
@@ -974,6 +976,7 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
974
976
  }));
975
977
  }
976
978
  }]);
979
+ return SuperTable2;
977
980
  }(React.Component);
978
981
  _defineProperty(SuperTable2, "propTypes", {
979
982
  cols: PropTypes.arrayOf(PropTypes.shape(ColType)).isRequired,