cloud-b2b 1.1.27 → 1.1.28

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 (105) hide show
  1. package/es/Area/Area.js +16 -45
  2. package/es/Card/Card.js +3 -4
  3. package/es/CodeInput/CodeInput.js +30 -59
  4. package/es/Control/Control.js +47 -94
  5. package/es/Control/event.js +0 -14
  6. package/es/Enhance/Dialogs.js +0 -15
  7. package/es/Enhance/Loading.js +16 -36
  8. package/es/Enhance/index.js +0 -2
  9. package/es/Header/Header.js +3 -35
  10. package/es/Header/Vertical.js +1 -24
  11. package/es/ImageView/ImageView.js +5 -22
  12. package/es/Indent/Indent.js +3 -7
  13. package/es/InpurCascader/InputCascader.js +10 -36
  14. package/es/InputEditor/InputEditor.js +55 -55
  15. package/es/InputSearch/InputSearch.js +26 -71
  16. package/es/InputSelect/InputSelect.js +17 -48
  17. package/es/InputWriting/InputWriting.js +6 -28
  18. package/es/Layout/Layout.js +28 -59
  19. package/es/LayoutLink/LayoutLink.js +11 -20
  20. package/es/Link/Link.js +4 -27
  21. package/es/Loading/Loading.js +1 -3
  22. package/es/Loading2/Loading2.js +0 -2
  23. package/es/ModalWithDrag/ModalWithDrag.js +3 -8
  24. package/es/ModalWithDrag/drag.js +12 -29
  25. package/es/NumberInput/NumberInput.js +24 -63
  26. package/es/Search/Search.js +53 -149
  27. package/es/Sidebar/Sidebar.js +13 -34
  28. package/es/Sidebar2/Sidebar.js +3 -30
  29. package/es/SuperForm/SuperForm.js +27 -150
  30. package/es/SuperForm2/SuperForm.js +31 -165
  31. package/es/SuperIcon/SuperIcon.js +3 -6
  32. package/es/SuperPagination/SuperPagination.js +15 -32
  33. package/es/SuperTab/SuperTab.js +4 -27
  34. package/es/SuperTab2/SuperTab2.js +11 -33
  35. package/es/SuperTable/DragSortRow.js +6 -34
  36. package/es/SuperTable/FilterDropDown.js +10 -34
  37. package/es/SuperTable/SuperTable.js +91 -216
  38. package/es/SuperTable/fixed.js +1 -9
  39. package/es/SuperTable2/SuperTable2.js +95 -206
  40. package/es/SuperTable2/SuperTableCell.js +16 -55
  41. package/es/SuperTable3/FilterDropDown.js +10 -34
  42. package/es/SuperTable3/SuperTable.js +57 -175
  43. package/es/SuperTable3/fixed.js +1 -9
  44. package/es/SuperToolbar/SuperToolbar.js +21 -49
  45. package/es/SuperUpload/SuperUpload.js +73 -110
  46. package/es/Title/Title.js +12 -15
  47. package/es/Viewer/ImageViews.js +7 -60
  48. package/es/Viewer/Viewer.js +7 -34
  49. package/es/WingBlank/WingBlank.js +2 -6
  50. package/es/helper.js +7 -27
  51. package/es/history.js +3 -2
  52. package/lib/Area/Area.js +16 -64
  53. package/lib/Card/Card.js +3 -13
  54. package/lib/CodeInput/CodeInput.js +30 -77
  55. package/lib/Control/Control.js +47 -135
  56. package/lib/Control/event.js +0 -16
  57. package/lib/Enhance/Dialogs.js +0 -26
  58. package/lib/Enhance/Loading.js +16 -52
  59. package/lib/Enhance/index.js +0 -9
  60. package/lib/Header/Header.js +3 -48
  61. package/lib/Header/Vertical.js +1 -36
  62. package/lib/ImageView/ImageView.js +5 -30
  63. package/lib/Indent/Indent.js +3 -13
  64. package/lib/InpurCascader/InputCascader.js +11 -50
  65. package/lib/InputEditor/InputEditor.js +55 -64
  66. package/lib/InputSearch/InputSearch.js +26 -78
  67. package/lib/InputSelect/InputSelect.js +17 -62
  68. package/lib/InputWriting/InputWriting.js +6 -35
  69. package/lib/Layout/Layout.js +28 -76
  70. package/lib/LayoutLink/LayoutLink.js +11 -38
  71. package/lib/Link/Link.js +4 -40
  72. package/lib/Loading/Loading.js +1 -9
  73. package/lib/Loading2/Loading2.js +0 -8
  74. package/lib/ModalWithDrag/ModalWithDrag.js +3 -18
  75. package/lib/ModalWithDrag/drag.js +12 -34
  76. package/lib/NumberInput/NumberInput.js +24 -76
  77. package/lib/Search/Search.js +53 -157
  78. package/lib/Sidebar/Sidebar.js +13 -46
  79. package/lib/Sidebar2/Sidebar.js +3 -42
  80. package/lib/SuperForm/SuperForm.js +27 -149
  81. package/lib/SuperForm2/SuperForm.js +31 -160
  82. package/lib/SuperIcon/SuperIcon.js +3 -14
  83. package/lib/SuperPagination/SuperPagination.js +15 -42
  84. package/lib/SuperTab/SuperTab.js +4 -34
  85. package/lib/SuperTab2/SuperTab2.js +11 -48
  86. package/lib/SuperTable/DragSortRow.js +6 -42
  87. package/lib/SuperTable/FilterDropDown.js +10 -42
  88. package/lib/SuperTable/SuperTable.js +90 -210
  89. package/lib/SuperTable/fixed.js +1 -13
  90. package/lib/SuperTable2/SuperTable2.js +95 -222
  91. package/lib/SuperTable2/SuperTableCell.js +13 -62
  92. package/lib/SuperTable3/FilterDropDown.js +10 -42
  93. package/lib/SuperTable3/SuperTable.js +56 -169
  94. package/lib/SuperTable3/fixed.js +1 -13
  95. package/lib/SuperToolbar/SuperToolbar.js +20 -64
  96. package/lib/SuperUpload/SuperUpload.js +73 -140
  97. package/lib/Title/Title.js +12 -24
  98. package/lib/Viewer/ImageViews.js +7 -63
  99. package/lib/Viewer/Viewer.js +7 -43
  100. package/lib/WingBlank/WingBlank.js +2 -14
  101. package/lib/helper.js +6 -44
  102. package/lib/history.js +0 -5
  103. package/lib/index.js +0 -76
  104. package/lib/variables.js +0 -4
  105. package/package.json +1 -1
@@ -12,6 +12,7 @@ import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
12
12
  import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
13
13
  import _Table from "antd/es/table";
14
14
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
15
+ import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/objectDestructuringEmpty";
15
16
  import _extends from "@babel/runtime-corejs3/helpers/extends";
16
17
  import _Switch from "antd/es/switch";
17
18
  import _Button from "antd/es/button";
@@ -25,17 +26,11 @@ import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleC
25
26
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
26
27
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
27
28
  var _excluded = ["onRowClick"];
28
-
29
29
  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; } } }; }
30
-
31
30
  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
-
33
- 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; }
34
-
31
+ 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; }
35
32
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
-
37
33
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context18, _context19; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context18 = ownKeys(Object(source), !0)).call(_context18, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context19 = ownKeys(Object(source))).call(_context19, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
38
-
39
34
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
40
35
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
41
36
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
@@ -45,11 +40,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
45
40
  import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
46
41
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
47
42
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
48
-
49
43
  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); }; }
50
-
51
44
  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; } }
52
-
53
45
  import React from 'react';
54
46
  import PropTypes from 'prop-types';
55
47
  import ReactDOM from 'react-dom';
@@ -60,12 +52,18 @@ import SuperToolbar from '../SuperToolbar';
60
52
  import variables from '../variables';
61
53
  import helper, { getObjectExclude } from '../helper';
62
54
  import DragSortRow from "../SuperTable/DragSortRow";
63
- var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select', //存储value
64
- 'selectText', //存储title
65
- 'search', 'searchText', 'selectSearch', //多选下拉搜索
66
- 'date', 'button', 'custom', 'switch', 'textArea', 'link', 'toolbar', //按钮组
67
- 'img', //图片标题组 value为{src,title}时显示图片标题 为字符串时 只显示图片
55
+ var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select',
56
+ //存储value
57
+ 'selectText',
58
+ //存储title
59
+ 'search', 'searchText', 'selectSearch',
60
+ //多选下拉搜索
61
+ 'date', 'button', 'custom', 'switch', 'textArea', 'link', 'toolbar',
62
+ //按钮组
63
+ 'img',
64
+ //图片标题组 value为{src,title}时显示图片标题 为字符串时 只显示图片
68
65
  'uploadImg'];
66
+
69
67
  /**
70
68
  * key:标识所在列,在一个表格中必须唯一
71
69
  * title:列的标题,type为checkbox时,title为空字符串时,表头才会显示为复选框
@@ -78,7 +76,6 @@ var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select', //
78
76
  * showAdd: 表头是否显示+号,默认为false,加号会触发onAdd事件
79
77
  * hide: 为true时隐藏该列
80
78
  */
81
-
82
79
  var ColType = {
83
80
  key: PropTypes.string.isRequired,
84
81
  title: PropTypes.string.isRequired,
@@ -91,6 +88,7 @@ var ColType = {
91
88
  hide: PropTypes.bool,
92
89
  props: PropTypes.any
93
90
  };
91
+
94
92
  /**
95
93
  * onCheck:点击复选框时触发,原型func(rowIndex, keyName, checked)
96
94
  * onContentChange: 输入框内容改变时触发,原型为function(rowIndex, keyName, value)
@@ -102,7 +100,6 @@ var ColType = {
102
100
  * onToolbar:点击表格列按钮组时触发,原型为function(按钮组列的key,rowIndex,该行数据的值,按钮key);
103
101
  * onDoubleClick: 双击单元格触发(只针对于type类型为空的情况下)
104
102
  */
105
-
106
103
  var CallbackType = {
107
104
  onExitValid: PropTypes.func,
108
105
  onCheck: PropTypes.func,
@@ -121,133 +118,102 @@ var CallbackType = {
121
118
  //点击img类型标题触发事件
122
119
  onMoveRow: PropTypes.func
123
120
  };
121
+
124
122
  /**
125
123
  * base[可选]:序号的开始数字,所有回调函数中的序号值都会加上这个值,默认值为0
126
124
  * isEmphasized: [可选],是否强调,行字体加粗显示, 除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
127
125
  */
128
-
129
126
  var SuperTable2 = /*#__PURE__*/function (_React$Component) {
130
127
  _inherits(SuperTable2, _React$Component);
131
-
132
128
  var _super = _createSuper(SuperTable2);
133
-
134
129
  function SuperTable2() {
135
130
  var _context;
136
-
137
131
  var _this;
138
-
139
132
  _classCallCheck(this, SuperTable2);
140
-
141
133
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
142
134
  args[_key] = arguments[_key];
143
135
  }
144
-
145
136
  _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
146
-
147
137
  _defineProperty(_assertThisInitialized(_this), "onSwitch", function (key, rowIndex) {
148
138
  return function (value) {
149
139
  var _ref = _this.props.callback || {},
150
- onContentChange = _ref.onContentChange;
151
-
140
+ onContentChange = _ref.onContentChange;
152
141
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
153
142
  };
154
143
  });
155
-
156
144
  _defineProperty(_assertThisInitialized(_this), "onCheck", function (key, rowIndex) {
157
145
  return function (e) {
158
146
  var _ref2 = _this.props.callback || {},
159
- onCheck = _ref2.onCheck;
160
-
147
+ onCheck = _ref2.onCheck;
161
148
  onCheck && onCheck(_this.getIndex(rowIndex), key, e.target.checked);
162
149
  };
163
150
  });
164
-
165
151
  _defineProperty(_assertThisInitialized(_this), "onChange", function (key, rowIndex) {
166
152
  return function (value) {
167
153
  var _ref3 = _this.props.callback || {},
168
- onContentChange = _ref3.onContentChange;
169
-
154
+ onContentChange = _ref3.onContentChange;
170
155
  _this.closeValid();
171
-
172
156
  onContentChange && onContentChange(_this.getIndex(rowIndex), key, value);
173
157
  };
174
158
  });
175
-
176
159
  _defineProperty(_assertThisInitialized(_this), "onSearch", function (key, rowIndex, config) {
177
160
  return function (value) {
178
161
  var _ref4 = _this.props.callback || {},
179
- onSearch = _ref4.onSearch;
180
-
162
+ onSearch = _ref4.onSearch;
181
163
  onSearch && onSearch(_this.getIndex(rowIndex), key, value, config);
182
164
  };
183
165
  });
184
-
185
166
  _defineProperty(_assertThisInitialized(_this), "onAdd", function (key) {
186
167
  return function () {
187
168
  var _ref5 = _this.props.callback || {},
188
- onAdd = _ref5.onAdd;
189
-
169
+ onAdd = _ref5.onAdd;
190
170
  onAdd && onAdd(key);
191
171
  };
192
172
  });
193
-
194
173
  _defineProperty(_assertThisInitialized(_this), "onRowAdd", function (key, index) {
195
174
  return function () {
196
175
  var _ref6 = _this.props.callback || {},
197
- onLink = _ref6.onLink;
198
-
176
+ onLink = _ref6.onLink;
199
177
  onLink && onLink(key, index, _this.props.items[index]);
200
178
  };
201
179
  });
202
-
203
180
  _defineProperty(_assertThisInitialized(_this), "onBlur", function (key, rowIndex) {
204
181
  return function (value) {
205
182
  var _ref7 = _this.props.callback || {},
206
- onBlur = _ref7.onBlur;
207
-
183
+ onBlur = _ref7.onBlur;
208
184
  _this.closeValid();
209
-
210
185
  onBlur && onBlur(_this.getIndex(rowIndex), key, value);
211
186
  };
212
187
  });
213
-
214
188
  _defineProperty(_assertThisInitialized(_this), "onDoubleClick", function (key, value) {
215
189
  return function () {
216
190
  var _ref8 = _this.props.callback || {},
217
- onDoubleClick = _ref8.onDoubleClick;
218
-
191
+ onDoubleClick = _ref8.onDoubleClick;
219
192
  onDoubleClick && onDoubleClick(key, value);
220
193
  };
221
194
  });
222
-
223
195
  _defineProperty(_assertThisInitialized(_this), "onImgTileClick", function (col, value, rowIndex) {
224
196
  return function () {
225
197
  var _ref9 = _this.props.callback || {},
226
- onImgTileClick = _ref9.onImgTileClick;
227
-
198
+ onImgTileClick = _ref9.onImgTileClick;
228
199
  onImgTileClick && onImgTileClick(col, value, rowIndex);
229
200
  };
230
201
  });
231
-
232
202
  _defineProperty(_assertThisInitialized(_this), "onMoveRow", function (dragIndex, targetIndex) {
233
203
  var _ref10 = _this.props.callback || {},
234
- onMoveRow = _ref10.onMoveRow;
235
-
204
+ onMoveRow = _ref10.onMoveRow;
236
205
  onMoveRow && onMoveRow(dragIndex, targetIndex);
237
206
  });
238
-
239
207
  _defineProperty(_assertThisInitialized(_this), "closeValid", function () {
240
208
  var _this$props = _this.props,
241
- valid = _this$props.valid,
242
- _this$props$callback = _this$props.callback,
243
- callback = _this$props$callback === void 0 ? {} : _this$props$callback;
209
+ valid = _this$props.valid,
210
+ _this$props$callback = _this$props.callback,
211
+ callback = _this$props$callback === void 0 ? {} : _this$props$callback;
244
212
  valid && callback.onExitValid();
245
213
  });
246
-
247
214
  _defineProperty(_assertThisInitialized(_this), "getOptions", function (key, colOptions, index) {
248
215
  var options = _this.props.items[index].options;
249
216
  var options2 = _this.props.options;
250
-
251
217
  if (options && _Array$isArray(options[key])) {
252
218
  return options[key];
253
219
  } else if (options2 && _Array$isArray(options2[key])) {
@@ -256,7 +222,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
256
222
  return colOptions;
257
223
  }
258
224
  });
259
-
260
225
  _defineProperty(_assertThisInitialized(_this), "validField", function (required, value) {
261
226
  if (!_this.props.valid || _this.error || !required || value) {
262
227
  return false;
@@ -267,25 +232,22 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
267
232
  return true;
268
233
  }
269
234
  });
270
-
271
235
  _defineProperty(_assertThisInitialized(_this), "renderEditableCell", function (config, value, index) {
272
236
  var key = config.key,
273
- type = config.type,
274
- options = config.options,
275
- props = config.props,
276
- required = config.required,
277
- width = config.width,
278
- showRowAdd = config.showRowAdd;
279
-
237
+ type = config.type,
238
+ options = config.options,
239
+ props = config.props,
240
+ required = config.required,
241
+ width = config.width,
242
+ showRowAdd = config.showRowAdd;
280
243
  var _this$props$items$ind = _this.props.items[index],
281
- readonly = _this$props$items$ind.readonly,
282
- _this$props$items$ind2 = _this$props$items$ind.isReadonly,
283
- isReadonly = _this$props$items$ind2 === void 0 ? [] : _this$props$items$ind2,
284
- _this$props$items$ind3 = _this$props$items$ind.isRequired,
285
- isRequired = _this$props$items$ind3 === void 0 ? [] : _this$props$items$ind3,
286
- _this$props$items$ind4 = _this$props$items$ind._extraProps,
287
- _extraProps = _this$props$items$ind4 === void 0 ? {} : _this$props$items$ind4;
288
-
244
+ readonly = _this$props$items$ind.readonly,
245
+ _this$props$items$ind2 = _this$props$items$ind.isReadonly,
246
+ isReadonly = _this$props$items$ind2 === void 0 ? [] : _this$props$items$ind2,
247
+ _this$props$items$ind3 = _this$props$items$ind.isRequired,
248
+ isRequired = _this$props$items$ind3 === void 0 ? [] : _this$props$items$ind3,
249
+ _this$props$items$ind4 = _this$props$items$ind._extraProps,
250
+ _extraProps = _this$props$items$ind4 === void 0 ? {} : _this$props$items$ind4;
289
251
  var cellProps = {
290
252
  value: value,
291
253
  width: width,
@@ -297,7 +259,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
297
259
  onSearch: _this.onSearch(key, index, config),
298
260
  onBlur: _this.onBlur(key, index)
299
261
  };
300
-
301
262
  if (showRowAdd && _Array$isArray(isRequired) && _includesInstanceProperty(isRequired).call(isRequired, key)) {
302
263
  cellProps.error = _this.validField(true, value);
303
264
  cellProps.props = _objectSpread(_objectSpread({}, cellProps.props), _extraProps);
@@ -323,7 +284,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
323
284
  onClick: _this.onRowAdd(key, index)
324
285
  })));
325
286
  }
326
-
327
287
  if (_Array$isArray(isRequired) && _includesInstanceProperty(isRequired).call(isRequired, key)) {
328
288
  cellProps.error = _this.validField(true, value);
329
289
  cellProps.props = _objectSpread(_objectSpread({}, cellProps.props), _extraProps);
@@ -340,7 +300,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
340
300
  }
341
301
  }, /*#__PURE__*/React.createElement(SuperTableCell, cellProps)));
342
302
  }
343
-
344
303
  if (showRowAdd) {
345
304
  return /*#__PURE__*/React.createElement("div", {
346
305
  style: {
@@ -362,25 +321,23 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
362
321
  onClick: _this.onRowAdd(key, index)
363
322
  })));
364
323
  }
365
-
366
324
  return /*#__PURE__*/React.createElement(SuperTableCell, cellProps);
367
325
  });
368
-
369
326
  _defineProperty(_assertThisInitialized(_this), "renderLinkCell", function (col, value, record, index) {
370
327
  if (col.link === 'list') {
371
328
  var list = value && _Array$isArray(value) ? value : [];
372
- return /*#__PURE__*/React.createElement("div", null, _mapInstanceProperty(list).call(list, function (item2, index2) {
329
+ return /*#__PURE__*/React.createElement("div", {
330
+ style: {
331
+ whiteSpace: 'pre-wrap'
332
+ }
333
+ }, _mapInstanceProperty(list).call(list, function (item2, index2) {
373
334
  var _context2;
374
-
375
335
  var split = index2 === list.length - 1 ? '' : ',';
376
-
377
336
  var onClick = function onClick() {
378
337
  var _ref11 = _this.props.callback || {},
379
- onLink = _ref11.onLink;
380
-
338
+ onLink = _ref11.onLink;
381
339
  onLink && onLink(col.key, index, item2);
382
340
  };
383
-
384
341
  return /*#__PURE__*/React.createElement("a", {
385
342
  key: index2,
386
343
  onClick: onClick
@@ -388,30 +345,26 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
388
345
  }));
389
346
  } else {
390
347
  var title = typeof col.link === 'string' ? col.link : value;
391
-
392
348
  var onClick = function onClick() {
393
349
  var _ref12 = _this.props.callback || {},
394
- onLink = _ref12.onLink;
395
-
350
+ onLink = _ref12.onLink;
396
351
  onLink && onLink(col.key, index, record);
397
352
  };
398
-
399
353
  return /*#__PURE__*/React.createElement("a", {
354
+ style: {
355
+ whiteSpace: 'normal'
356
+ },
400
357
  onClick: onClick
401
358
  }, title);
402
359
  }
403
360
  });
404
-
405
361
  _defineProperty(_assertThisInitialized(_this), "getIndex", function (index) {
406
362
  return (_this.props.base || 0) + index;
407
363
  });
408
-
409
364
  _defineProperty(_assertThisInitialized(_this), "getCellRender", function (col) {
410
365
  return function (value, record, index) {
411
366
  var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
412
-
413
367
  var realType = record._isEdit === true && _this.canReadonly(col.type) ? col.editType : col.type;
414
-
415
368
  if (!realType) {
416
369
  return /*#__PURE__*/React.createElement("div", {
417
370
  onDoubleClick: _this.onDoubleClick(col.key, record.key),
@@ -430,23 +383,18 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
430
383
  title: value
431
384
  }, value);
432
385
  }
433
-
434
386
  switch (realType) {
435
387
  case 'checkbox':
436
388
  return /*#__PURE__*/React.createElement(_Checkbox, {
437
389
  onChange: _this.onCheck(col.key, record.key),
438
390
  checked: value || false
439
391
  });
440
-
441
392
  case 'index':
442
393
  return _this.getIndex(index) + 1;
443
-
444
394
  case 'link':
445
395
  return _this.renderLinkCell(col, value, record, record.key);
446
-
447
396
  case 'button':
448
397
  var onClick = _this.props.callback.onLink ? _bindInstanceProperty(_context3 = _this.props.callback.onLink).call(_context3, null, col.key, record.key, record) : undefined;
449
-
450
398
  if (col.icon === 'add') {
451
399
  return /*#__PURE__*/React.createElement(_Button, {
452
400
  onClick: onClick,
@@ -464,7 +412,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
464
412
  type: col.bsStyle
465
413
  }, record[col.key] || col.typeRelated);
466
414
  }
467
-
468
415
  case 'switch':
469
416
  return typeof value === 'string' ? /*#__PURE__*/React.createElement("div", null, value) : /*#__PURE__*/React.createElement(_Switch, {
470
417
  checkedChildren: col.props.checkedChildren || '',
@@ -474,10 +421,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
474
421
  checked: typeof value === 'number' ? Boolean(value) : value || false,
475
422
  disabled: !(record._isEdit === true)
476
423
  });
477
-
478
424
  case 'custom':
479
425
  return _this.props.callback.onRenderCustom(record.key, col.key, value, col.props, col);
480
-
481
426
  case 'toolbar':
482
427
  //showByKey为true时,每条数据中与按钮key相同的属性值决定按钮是否显示,建议key用下划线开始命名,避免与后台数据冲突
483
428
  var props = {
@@ -489,7 +434,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
489
434
  })
490
435
  };
491
436
  return /*#__PURE__*/React.createElement(SuperToolbar, props);
492
-
493
437
  case 'img':
494
438
  return value ? typeof value === 'string' ? /*#__PURE__*/React.createElement("img", {
495
439
  src: _includesInstanceProperty(value).call(value, 'http') ? value : _concatInstanceProperty(_context7 = "".concat(window.location.origin, "/api/proxy/file-center-service/")).call(_context7, value),
@@ -529,19 +473,15 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
529
473
  color: '#333'
530
474
  }
531
475
  }, value.remark))) : /*#__PURE__*/React.createElement("div", null);
532
-
533
476
  case 'uploadImg':
534
477
  var commonProps = _this.props.callback.buildSuperUploadProps ? _this.props.callback.buildSuperUploadProps() : {};
535
-
536
478
  var uploadProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
537
479
  onFileChange: _this.props.callback.onTableFileChange ? _bindInstanceProperty(_context10 = _this.props.callback.onTableFileChange).call(_context10, null, col.key, index) : undefined,
538
480
  type: col.type
539
481
  }, col.props), _this.props), commonProps), {}, {
540
482
  value: _this.props.items[index][col.key]
541
483
  });
542
-
543
484
  return /*#__PURE__*/React.createElement(Control, uploadProps);
544
-
545
485
  default:
546
486
  return _this.renderEditableCell(_objectSpread(_objectSpread({}, col), {}, {
547
487
  type: realType
@@ -549,15 +489,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
549
489
  }
550
490
  };
551
491
  });
552
-
553
492
  _defineProperty(_assertThisInitialized(_this), "getCheckedStatus", function (key) {
554
493
  var has = false,
555
- not = false;
494
+ not = false;
556
495
  var items = _this.props.items;
557
-
558
496
  var _iterator = _createForOfIteratorHelper(items),
559
- _step;
560
-
497
+ _step;
561
498
  try {
562
499
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
563
500
  var item = _step.value;
@@ -568,17 +505,14 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
568
505
  } finally {
569
506
  _iterator.f();
570
507
  }
571
-
572
508
  return {
573
509
  checked: has && !not,
574
510
  indeterminate: has && not
575
511
  };
576
512
  });
577
-
578
513
  _defineProperty(_assertThisInitialized(_this), "toAdd", function (key, showAdd) {
579
514
  if (showAdd) {
580
515
  var onClick = _this.onAdd(key);
581
-
582
516
  return /*#__PURE__*/React.createElement(_Icon, {
583
517
  type: "plus-circle-o",
584
518
  role: "add",
@@ -588,17 +522,14 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
588
522
  return null;
589
523
  }
590
524
  });
591
-
592
525
  _defineProperty(_assertThisInitialized(_this), "getColumnTitle", function (_ref13) {
593
526
  var required = _ref13.required,
594
- title = _ref13.title,
595
- type = _ref13.type,
596
- key = _ref13.key,
597
- showAdd = _ref13.showAdd;
598
-
527
+ title = _ref13.title,
528
+ type = _ref13.type,
529
+ key = _ref13.key,
530
+ showAdd = _ref13.showAdd;
599
531
  if (type === 'checkbox') {
600
532
  var status = _this.getCheckedStatus(key);
601
-
602
533
  return /*#__PURE__*/React.createElement(_Checkbox, _extends({
603
534
  onChange: _this.onCheck(key, -1)
604
535
  }, status));
@@ -609,49 +540,40 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
609
540
  }, title, _this.toAdd(key, showAdd));
610
541
  }
611
542
  });
612
-
613
543
  _defineProperty(_assertThisInitialized(_this), "getColumnClassName", function (_ref14) {
614
544
  var type = _ref14.type,
615
- align = _ref14.align;
616
-
545
+ align = _ref14.align;
617
546
  if (type === 'index' || type === 'checkbox') {
618
547
  return 'ant-table-selection-column';
619
548
  } else {
620
549
  return align ? variables('SuperTable2')[align] : '';
621
550
  }
622
551
  });
623
-
624
552
  _defineProperty(_assertThisInitialized(_this), "canReadonly", function (type) {
625
553
  var _context11;
626
-
627
554
  return !_includesInstanceProperty(_context11 = ['index', 'checkbox', 'link', 'button', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context11, type);
628
555
  });
629
-
630
556
  _defineProperty(_assertThisInitialized(_this), "getColumns", function (cols) {
631
557
  var _context12;
632
-
633
558
  var readonly = _this.props.readonly;
634
559
  return _mapInstanceProperty(_context12 = _filterInstanceProperty(cols).call(cols, function (col) {
635
560
  return !col.hide;
636
561
  })).call(_context12, function (_ref15, index) {
637
562
  var _context13;
638
-
639
- var col = _extends({}, _ref15);
640
-
563
+ var col = _extends({}, (_objectDestructuringEmpty(_ref15), _ref15));
641
564
  col.className = _this.getColumnClassName(col);
642
565
  col.title = _this.getColumnTitle(col);
643
566
  col.dataIndex = col.key;
644
- col.width = col.width ? col.width : _includesInstanceProperty(_context13 = ['index', 'checked']).call(_context13, col.key) ? 70 : col.type === 'img' ? 200 : 120; // const {props = {}} = col;
567
+ col.width = col.width ? col.width : _includesInstanceProperty(_context13 = ['index', 'checked']).call(_context13, col.key) ? 70 : col.type === 'img' ? 200 : 120;
568
+ // const {props = {}} = col;
645
569
  // const {edit = false} = props
646
570
  // if (!(readonly || col.type === 'readonly') || !this.canReadonly(col.type)) {
647
571
  // if ( !edit && ['text', 'number', 'select', 'date', 'search', 'readonly', 'textArea', 'selectSearch'].includes(col.type)){
648
572
  // return col
649
573
  // }
650
574
  // }
651
-
652
575
  col.readonly = readonly;
653
576
  col.render = _this.getCellRender(col);
654
-
655
577
  if (col.link) {
656
578
  col.type = 'link';
657
579
  col.render = _this.getCellRender(col);
@@ -665,26 +587,21 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
665
587
  }
666
588
  };
667
589
  }
668
-
669
590
  return col;
670
591
  });
671
592
  });
672
-
673
593
  _defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
674
594
  return _mapInstanceProperty(items).call(items, function (item, index) {
675
595
  return _reduceInstanceProperty(cols).call(cols, function (result, _ref16) {
676
596
  var _context14, _context15;
677
-
678
597
  var key = _ref16.key,
679
- type = _ref16.type,
680
- options = _ref16.options;
681
-
598
+ type = _ref16.type,
599
+ options = _ref16.options;
682
600
  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)) {
683
601
  result[key] = item[key];
684
602
  } else {
685
603
  result[key] = getTitle(item[key], options);
686
604
  }
687
-
688
605
  return result;
689
606
  }, _objectSpread(_objectSpread({}, item), {}, {
690
607
  key: index,
@@ -692,68 +609,56 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
692
609
  }));
693
610
  });
694
611
  });
695
-
696
612
  _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox", function () {
697
613
  var _this$props2 = _this.props,
698
- items = _this$props2.items,
699
- _this$props2$isEmphas = _this$props2.isEmphasized,
700
- isEmphasized = _this$props2$isEmphas === void 0 ? false : _this$props2$isEmphas;
701
-
614
+ items = _this$props2.items,
615
+ _this$props2$isEmphas = _this$props2.isEmphasized,
616
+ isEmphasized = _this$props2$isEmphas === void 0 ? false : _this$props2$isEmphas;
702
617
  var rowClassName = function rowClassName(record) {
703
618
  if (isEmphasized && items[record.key].__isEmphasized) {
704
619
  return items[record.key].checked ? variables('SuperTable2').emphasizedSelectRow : variables('SuperTable2').emphasizedUnselectRow;
705
620
  }
706
-
707
621
  return items[record.key].checked ? variables('SuperTable2').select : '';
708
622
  };
709
-
710
623
  return {
711
624
  rowClassName: rowClassName
712
625
  };
713
626
  });
714
-
715
627
  _defineProperty(_assertThisInitialized(_this), "getSelectedRowKeys", function (items) {
716
628
  return _reduceInstanceProperty(items).call(items, function (result, item, index) {
717
629
  item.checked && result.push(index);
718
630
  return result;
719
631
  }, []);
720
632
  });
721
-
722
633
  _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox2", function (items) {
723
634
  var _this$props3 = _this.props,
724
- _this$props3$checkbox = _this$props3.checkbox,
725
- checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
726
- _this$props3$radio = _this$props3.radio,
727
- radio = _this$props3$radio === void 0 ? false : _this$props3$radio,
728
- isolation = _this$props3.isolation,
729
- _this$props3$checkedR = _this$props3.checkedRows,
730
- checkedRows = _this$props3$checkedR === void 0 ? [] : _this$props3$checkedR,
731
- _this$props3$isEmphas = _this$props3.isEmphasized,
732
- isEmphasized = _this$props3$isEmphas === void 0 ? false : _this$props3$isEmphas,
733
- _this$props3$isWeaken = _this$props3.isWeaken,
734
- isWeaken = _this$props3$isWeaken === void 0 ? true : _this$props3$isWeaken;
735
-
635
+ _this$props3$checkbox = _this$props3.checkbox,
636
+ checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
637
+ _this$props3$radio = _this$props3.radio,
638
+ radio = _this$props3$radio === void 0 ? false : _this$props3$radio,
639
+ isolation = _this$props3.isolation,
640
+ _this$props3$checkedR = _this$props3.checkedRows,
641
+ checkedRows = _this$props3$checkedR === void 0 ? [] : _this$props3$checkedR,
642
+ _this$props3$isEmphas = _this$props3.isEmphasized,
643
+ isEmphasized = _this$props3$isEmphas === void 0 ? false : _this$props3$isEmphas,
644
+ _this$props3$isWeaken = _this$props3.isWeaken,
645
+ isWeaken = _this$props3$isWeaken === void 0 ? true : _this$props3$isWeaken;
736
646
  var rowClassName1 = function rowClassName1(record) {
737
647
  if (items[record.key].__total) return variables('SuperTable').totalRow;
738
648
  if (items[record.key].__warningRow) return variables('SuperTable').warningRow;
739
649
  return _includesInstanceProperty(checkedRows).call(checkedRows, record.key) ? variables('SuperTable').select : '';
740
650
  };
741
-
742
651
  var rowClassName2 = function rowClassName2(record) {
743
652
  if (items[record.key].__total) return variables('SuperTable').totalRow;
744
653
  if (items[record.key].__warningRow) return variables('SuperTable').warningRow;
745
-
746
654
  if (isEmphasized && items[record.key].__isEmphasized) {
747
655
  return items[record.key].checked ? variables('SuperTable').emphasizedSelectRow : variables('SuperTable').emphasizedUnselectRow;
748
656
  }
749
-
750
657
  if (isWeaken && items[record.key].__isWeaken) {
751
658
  return items[record.key].checked ? variables('SuperTable').weakenedSelectRow : variables('SuperTable').weakenedUnselectRow;
752
659
  }
753
-
754
660
  return items[record.key].checked ? variables('SuperTable').select : '';
755
661
  };
756
-
757
662
  if (checkbox) {
758
663
  if (radio) {
759
664
  return {
@@ -774,7 +679,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
774
679
  onChange: _this.onCheckChange,
775
680
  getCheckboxProps: function getCheckboxProps(record) {
776
681
  var checked = _includesInstanceProperty(checkedRows).call(checkedRows, record.key);
777
-
778
682
  return {
779
683
  checked: checked,
780
684
  disabled: items[record.key].__isWeaken,
@@ -811,7 +715,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
811
715
  };
812
716
  }
813
717
  });
814
-
815
718
  _defineProperty(_assertThisInitialized(_this), "getRowPropsForDrag", function () {
816
719
  return function (record, index) {
817
720
  return {
@@ -820,7 +723,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
820
723
  };
821
724
  };
822
725
  });
823
-
824
726
  _defineProperty(_assertThisInitialized(_this), "getRowProps", function (onRowClick) {
825
727
  return function (record) {
826
728
  return {
@@ -833,36 +735,31 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
833
735
  };
834
736
  };
835
737
  });
836
-
837
738
  _defineProperty(_assertThisInitialized(_this), "getProps", function () {
838
739
  var _context16;
839
-
840
740
  var _this$props4 = _this.props,
841
- cols = _this$props4.cols,
842
- items = _this$props4.items,
843
- _this$props4$style = _this$props4.style,
844
- style = _this$props4$style === void 0 ? {} : _this$props4$style,
845
- _this$props4$footer = _this$props4.footer,
846
- footer = _this$props4$footer === void 0 ? null : _this$props4$footer,
847
- _this$props4$paginati = _this$props4.pagination,
848
- pagination = _this$props4$paginati === void 0 ? false : _this$props4$paginati,
849
- dragSort = _this$props4.dragSort,
850
- _this$props4$isEmphas = _this$props4.isEmphasized,
851
- isEmphasized = _this$props4$isEmphas === void 0 ? false : _this$props4$isEmphas,
852
- maxHeight = _this$props4.maxHeight,
853
- _this$props4$expanded = _this$props4.expandedRowRender,
854
- expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
855
- _this$props4$onExpand = _this$props4.onExpand,
856
- onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand;
857
-
741
+ cols = _this$props4.cols,
742
+ items = _this$props4.items,
743
+ _this$props4$style = _this$props4.style,
744
+ style = _this$props4$style === void 0 ? {} : _this$props4$style,
745
+ _this$props4$footer = _this$props4.footer,
746
+ footer = _this$props4$footer === void 0 ? null : _this$props4$footer,
747
+ _this$props4$paginati = _this$props4.pagination,
748
+ pagination = _this$props4$paginati === void 0 ? false : _this$props4$paginati,
749
+ dragSort = _this$props4.dragSort,
750
+ _this$props4$isEmphas = _this$props4.isEmphasized,
751
+ isEmphasized = _this$props4$isEmphas === void 0 ? false : _this$props4$isEmphas,
752
+ maxHeight = _this$props4.maxHeight,
753
+ _this$props4$expanded = _this$props4.expandedRowRender,
754
+ expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
755
+ _this$props4$onExpand = _this$props4.onExpand,
756
+ onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand;
858
757
  var widthX = _reduceInstanceProperty(_context16 = _filterInstanceProperty(cols).call(cols, function (col) {
859
758
  return !col.hide;
860
759
  })).call(_context16, function (width, item) {
861
760
  var _context17;
862
-
863
761
  return width += item.width ? item.width : _includesInstanceProperty(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
864
762
  }, 0);
865
-
866
763
  var scrollProps = !helper.isEmpty2(expandedRowRender) ? {
867
764
  expandedRowRender: expandedRowRender
868
765
  } : {
@@ -873,11 +770,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
873
770
  y: maxHeight
874
771
  }
875
772
  };
876
-
877
773
  var _this$getPropsByCheck = _this.getPropsByCheckbox2(items),
878
- onRowClick = _this$getPropsByCheck.onRowClick,
879
- extraProps = _objectWithoutProperties(_this$getPropsByCheck, _excluded);
880
-
774
+ onRowClick = _this$getPropsByCheck.onRowClick,
775
+ extraProps = _objectWithoutProperties(_this$getPropsByCheck, _excluded);
881
776
  return _objectSpread(_objectSpread({
882
777
  className: !isEmphasized ? variables('SuperTable2') : variables('SuperTable2').noTransition,
883
778
  columns: _this.getColumns(cols),
@@ -901,7 +796,6 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
901
796
  onExpand: onExpand
902
797
  }, scrollProps);
903
798
  });
904
-
905
799
  _defineProperty(_assertThisInitialized(_this), "setScroll", function () {
906
800
  if (_this.props.maxHeight && _this.props.items.length) {
907
801
  var root = ReactDOM.findDOMNode(_assertThisInitialized(_this));
@@ -910,10 +804,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
910
804
  fixed(container, header, _this.props.maxHeight);
911
805
  }
912
806
  });
913
-
914
807
  return _this;
915
808
  }
916
-
917
809
  _createClass(SuperTable2, [{
918
810
  key: "componentDidMount",
919
811
  value: function componentDidMount() {
@@ -933,10 +825,8 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
933
825
  }));
934
826
  }
935
827
  }]);
936
-
937
828
  return SuperTable2;
938
829
  }(React.Component);
939
-
940
830
  _defineProperty(SuperTable2, "propTypes", {
941
831
  cols: PropTypes.arrayOf(PropTypes.shape(ColType)).isRequired,
942
832
  items: PropTypes.array.isRequired,
@@ -952,5 +842,4 @@ _defineProperty(SuperTable2, "propTypes", {
952
842
  isEmphasized: PropTypes.bool,
953
843
  dragSort: PropTypes.bool
954
844
  });
955
-
956
845
  export default SuperTable2;