cloud-b2b 1.1.26 → 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 +104 -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 +36 -23
  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 +104 -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 +36 -37
  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
@@ -20,11 +20,8 @@ import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
20
20
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
21
21
  import _Form from "antd/es/form";
22
22
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
23
-
24
23
  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; }
25
-
26
24
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context12, _context13; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context12 = ownKeys(Object(source), !0)).call(_context12, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context13 = ownKeys(Object(source))).call(_context13, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
27
-
28
25
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
29
26
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
30
27
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
@@ -34,11 +31,8 @@ import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instanc
34
31
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
35
32
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
36
33
  import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
37
-
38
34
  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); }; }
39
-
40
35
  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; } }
41
-
42
36
  import React from 'react';
43
37
  import PropTypes from 'prop-types';
44
38
  import ReactDOM from 'react-dom';
@@ -50,26 +44,26 @@ var defaultSize = 'small';
50
44
  var defaultColNum = 4;
51
45
  var TYPE = ['text', 'search', 'select', 'number', 'date', 'readonly', 'selectSearch', 'cascader' //级联选择下拉
52
46
  ];
47
+
53
48
  /**
54
49
  * search: 搜索按钮的标题
55
50
  * more:更多按钮的标题
56
51
  * reset:重置按钮的标题
57
52
  * sort:排序按钮的标题
58
53
  */
59
-
60
54
  var ConfigType = {
61
55
  search: PropTypes.string.isRequired,
62
56
  reset: PropTypes.string,
63
57
  sort: PropTypes.string,
64
58
  more: PropTypes.string
65
59
  };
60
+
66
61
  /**
67
62
  * key: 唯一标识一个表单元素
68
63
  * title:表单元素旁边的标题
69
64
  * type:表单元素的类型
70
65
  * props:传递给表单元素的额外属性
71
66
  */
72
-
73
67
  var FilterType = {
74
68
  key: PropTypes.string.isRequired,
75
69
  title: PropTypes.string.isRequired,
@@ -77,6 +71,7 @@ var FilterType = {
77
71
  options: PropTypes.array,
78
72
  props: PropTypes.object
79
73
  };
74
+
80
75
  /**
81
76
  * data:传递给filters的默认值,为key:value的形式,此处的key为FilterType中的key
82
77
  * isSort:是否需要排序按钮,默认false,当设置为true时,onClick函数需要实现key为sort的响应函数
@@ -86,84 +81,59 @@ var FilterType = {
86
81
  * onSearch:search控件发出的事件,原型为func(key, value)
87
82
  * displayRow:折叠时需要展示的行数,整数,默认为1
88
83
  */
89
-
90
84
  var Search = /*#__PURE__*/function (_React$Component) {
91
85
  _inherits(Search, _React$Component);
92
-
93
86
  var _super = _createSuper(Search);
94
-
95
87
  function Search() {
96
88
  var _context;
97
-
98
89
  var _this;
99
-
100
90
  _classCallCheck(this, Search);
101
-
102
91
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
103
92
  args[_key] = arguments[_key];
104
93
  }
105
-
106
94
  _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
107
-
108
95
  _defineProperty(_assertThisInitialized(_this), "state", {
109
96
  more: false
110
97
  });
111
-
112
98
  _defineProperty(_assertThisInitialized(_this), "onClick", function (key) {
113
99
  var onClick = _this.props.onClick;
114
100
  onClick && onClick(key);
115
101
  });
116
-
117
102
  _defineProperty(_assertThisInitialized(_this), "onMore", function () {
118
103
  var onHeightChange = _this.props.onHeightChange;
119
-
120
104
  _this.setState({
121
105
  more: !_this.state.more
122
106
  });
123
-
124
107
  onHeightChange && onHeightChange(_this.calHeight(!_this.state.more));
125
108
  });
126
-
127
109
  _defineProperty(_assertThisInitialized(_this), "onChange", function (dictionary, key, value) {
128
110
  var _context2, _context3;
129
-
130
111
  var onChange = _this.props.onChange;
131
-
132
112
  if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !_includesInstanceProperty(_context2 = _mapInstanceProperty(_context3 = global.dictionary[dictionary]).call(_context3, function (item) {
133
113
  return item.value;
134
114
  })).call(_context2, value)) {
135
115
  var _context4;
136
-
137
116
  var realValue = JSON.parse(value);
138
-
139
117
  _this.onClick('reset');
140
-
141
118
  _mapInstanceProperty(_context4 = _Object$keys(realValue)).call(_context4, function (objectKey) {
142
119
  onChange && objectKey !== 'queryId' && onChange(objectKey, realValue[objectKey]);
143
120
  });
144
121
  }
145
-
146
122
  onChange && onChange(key, value);
147
123
  });
148
-
149
124
  _defineProperty(_assertThisInitialized(_this), "onPressEnter", function () {
150
125
  ReactDOM.findDOMNode(_this.refs.search).click();
151
126
  });
152
-
153
127
  _defineProperty(_assertThisInitialized(_this), "toButton", function (key) {
154
128
  var _context5;
155
-
156
129
  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
157
130
  var config = _this.props.config;
158
-
159
131
  var onClick = _bindInstanceProperty(_context5 = _this.onClick).call(_context5, _assertThisInitialized(_this), key);
160
-
161
132
  return /*#__PURE__*/React.createElement(_Button, _extends({
162
133
  size: defaultSize,
163
134
  onClick: onClick
164
135
  }, props), config[key]);
165
136
  });
166
-
167
137
  _defineProperty(_assertThisInitialized(_this), "toMore", function () {
168
138
  return /*#__PURE__*/React.createElement("a", {
169
139
  role: "more",
@@ -173,7 +143,6 @@ var Search = /*#__PURE__*/function (_React$Component) {
173
143
  "data-status": !_this.state.more ? 'down' : 'up'
174
144
  }));
175
145
  });
176
-
177
146
  _defineProperty(_assertThisInitialized(_this), "toButtons", function () {
178
147
  var config = _this.props.config;
179
148
  return /*#__PURE__*/React.createElement("div", {
@@ -183,50 +152,43 @@ var Search = /*#__PURE__*/function (_React$Component) {
183
152
  type: 'primary'
184
153
  }), config.reset ? _this.toButton('reset') : null, _this.isSort() ? _this.toButton('sort') : null, _this.isMore() ? _this.toMore() : null);
185
154
  });
186
-
187
155
  _defineProperty(_assertThisInitialized(_this), "isSort", function () {
188
156
  var _this$props = _this.props,
189
- config = _this$props.config,
190
- _this$props$colNum = _this$props.colNum,
191
- colNum = _this$props$colNum === void 0 ? defaultColNum : _this$props$colNum,
192
- filters = _this$props.filters,
193
- _this$props$isSort = _this$props.isSort,
194
- isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
157
+ config = _this$props.config,
158
+ _this$props$colNum = _this$props.colNum,
159
+ colNum = _this$props$colNum === void 0 ? defaultColNum : _this$props$colNum,
160
+ filters = _this$props.filters,
161
+ _this$props$isSort = _this$props.isSort,
162
+ isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
195
163
  return isSort && _sortInstanceProperty(config) && filters.length > colNum;
196
164
  });
197
-
198
165
  _defineProperty(_assertThisInitialized(_this), "isMore", function () {
199
166
  var _this$props2 = _this.props,
200
- config = _this$props2.config,
201
- _this$props2$colNum = _this$props2.colNum,
202
- colNum = _this$props2$colNum === void 0 ? defaultColNum : _this$props2$colNum,
203
- filters = _this$props2.filters,
204
- _this$props2$displayR = _this$props2.displayRow,
205
- displayRow = _this$props2$displayR === void 0 ? 1 : _this$props2$displayR;
167
+ config = _this$props2.config,
168
+ _this$props2$colNum = _this$props2.colNum,
169
+ colNum = _this$props2$colNum === void 0 ? defaultColNum : _this$props2$colNum,
170
+ filters = _this$props2.filters,
171
+ _this$props2$displayR = _this$props2.displayRow,
172
+ displayRow = _this$props2$displayR === void 0 ? 1 : _this$props2$displayR;
206
173
  return config.more && _filterInstanceProperty(filters).call(filters, function (item) {
207
174
  return !item.hide;
208
175
  }).length > colNum * displayRow;
209
176
  });
210
-
211
177
  _defineProperty(_assertThisInitialized(_this), "getOptions", function (filter) {
212
178
  var options = _this.props.options;
213
-
214
179
  if (options && _Array$isArray(options[filter.key])) {
215
180
  return options[filter.key];
216
181
  } else {
217
182
  return filter.options || filter.typeRelated || [];
218
183
  }
219
184
  });
220
-
221
185
  _defineProperty(_assertThisInitialized(_this), "getContainer", function () {
222
186
  return _this.props.getContainer;
223
187
  });
224
-
225
188
  _defineProperty(_assertThisInitialized(_this), "getControlProps", function (control) {
226
189
  var _context6;
227
-
228
190
  var _this$props$data = _this.props.data,
229
- data = _this$props$data === void 0 ? {} : _this$props$data;
191
+ data = _this$props$data === void 0 ? {} : _this$props$data;
230
192
  return _objectSpread(_objectSpread({}, control.props || {}), {}, {
231
193
  size: defaultSize,
232
194
  type: control.type,
@@ -234,14 +196,12 @@ var Search = /*#__PURE__*/function (_React$Component) {
234
196
  onChange: _bindInstanceProperty(_context6 = _this.onChange).call(_context6, _assertThisInitialized(_this), control.dictionary, control.key)
235
197
  });
236
198
  });
237
-
238
199
  _defineProperty(_assertThisInitialized(_this), "validDate", function (_ref) {
239
200
  var key = _ref.key,
240
- type = _ref.type;
201
+ type = _ref.type;
241
202
  return function (date) {
242
203
  var _this$props$data2 = _this.props.data,
243
- data = _this$props$data2 === void 0 ? {} : _this$props$data2;
244
-
204
+ data = _this$props$data2 === void 0 ? {} : _this$props$data2;
245
205
  if (!date || !data[key]) {
246
206
  return false;
247
207
  } else {
@@ -255,36 +215,29 @@ var Search = /*#__PURE__*/function (_React$Component) {
255
215
  }
256
216
  };
257
217
  });
258
-
259
218
  _defineProperty(_assertThisInitialized(_this), "toText", function (props) {
260
219
  props.onPressEnter = _this.onPressEnter;
261
220
  return /*#__PURE__*/React.createElement(Control, props);
262
221
  });
263
-
264
222
  _defineProperty(_assertThisInitialized(_this), "toNumber", function (props) {
265
223
  props.defaultValue = props.value;
266
224
  delete props.value;
267
225
  return /*#__PURE__*/React.createElement(Control, props);
268
226
  });
269
-
270
227
  _defineProperty(_assertThisInitialized(_this), "getQueryGroupOptions", function (_ref2) {
271
228
  var dictionary = _ref2.dictionary,
272
- _ref2$configCode = _ref2.configCode,
273
- configCode = _ref2$configCode === void 0 ? 'unknown' : _ref2$configCode;
229
+ _ref2$configCode = _ref2.configCode,
230
+ configCode = _ref2$configCode === void 0 ? 'unknown' : _ref2$configCode;
274
231
  var realOptions = [];
275
-
276
232
  if (dictionary && global.dictionary) {
277
233
  var dicOptions = global.dictionary[dictionary] || [];
278
234
  realOptions = _concatInstanceProperty(realOptions).call(realOptions, dicOptions);
279
235
  }
280
-
281
236
  var state = global.store.getState();
282
237
  var path = ['layout', 'tableColsSetting', configCode];
283
-
284
238
  var _ref3 = getPathValue(state, path) || {},
285
- _ref3$queryList = _ref3.queryList,
286
- queryList = _ref3$queryList === void 0 ? [] : _ref3$queryList;
287
-
239
+ _ref3$queryList = _ref3.queryList,
240
+ queryList = _ref3$queryList === void 0 ? [] : _ref3$queryList;
288
241
  return _concatInstanceProperty(realOptions).call(realOptions, _mapInstanceProperty(queryList).call(queryList, function (item) {
289
242
  return {
290
243
  title: item.name,
@@ -292,16 +245,13 @@ var Search = /*#__PURE__*/function (_React$Component) {
292
245
  };
293
246
  }));
294
247
  });
295
-
296
248
  _defineProperty(_assertThisInitialized(_this), "toSelect", function (props, filter) {
297
249
  var container = _this.getContainer();
298
-
299
250
  container && (props.getPopupContainer = container);
300
251
  props.options = filter.key === 'queryGroup' ? _this.getQueryGroupOptions(filter) : _this.getOptions(filter);
301
252
  props.dropdownMatchSelectWidth = false;
302
253
  return /*#__PURE__*/React.createElement(Control, props);
303
254
  });
304
-
305
255
  _defineProperty(_assertThisInitialized(_this), "createSearchEvent", function (filter) {
306
256
  if (_this.props.onSearch) {
307
257
  return function (value) {
@@ -311,32 +261,25 @@ var Search = /*#__PURE__*/function (_React$Component) {
311
261
  return null;
312
262
  }
313
263
  });
314
-
315
264
  _defineProperty(_assertThisInitialized(_this), "toSearch", function (props, filter) {
316
265
  var container = _this.getContainer();
317
-
318
266
  container && (props.getPopupContainer = container);
319
267
  props.options = _this.getOptions(filter);
320
268
  props.onSearch = _this.createSearchEvent(filter);
321
269
  props.dropdownMatchSelectWidth = false;
322
270
  return /*#__PURE__*/React.createElement(Control, props);
323
271
  });
324
-
325
272
  _defineProperty(_assertThisInitialized(_this), "selectSearch", function (props, filter) {
326
273
  var container = _this.getContainer();
327
-
328
274
  container && (props.getPopupContainer = container);
329
275
  props.options = _this.getOptions(filter);
330
276
  props.onSearch = _this.createSearchEvent(filter);
331
277
  props.dropdownMatchSelectWidth = false;
332
278
  return /*#__PURE__*/React.createElement(Control, props);
333
279
  });
334
-
335
280
  _defineProperty(_assertThisInitialized(_this), "toDate", function (props, _ref4) {
336
281
  var rule = _ref4.rule;
337
-
338
282
  var container = _this.getContainer();
339
-
340
283
  container && (props.getCalendarContainer = container);
341
284
  rule && (props.disabledDate = _this.validDate(rule));
342
285
  props.style = {
@@ -344,65 +287,49 @@ var Search = /*#__PURE__*/function (_React$Component) {
344
287
  };
345
288
  return /*#__PURE__*/React.createElement(Control, props);
346
289
  });
347
-
348
290
  _defineProperty(_assertThisInitialized(_this), "toReadonly", function (props, filter) {
349
291
  props.value = getTitle(props.value, _this.getOptions(filter));
350
292
  return /*#__PURE__*/React.createElement(Control, props);
351
293
  });
352
-
353
294
  _defineProperty(_assertThisInitialized(_this), "toCascader", function (props, filter) {
354
295
  var container = _this.getContainer();
355
-
356
296
  container && (props.getPopupContainer = container);
357
297
  props.options = _this.getOptions(filter);
358
298
  props.onSearch = _this.createSearchEvent(filter);
359
299
  props.placeholder = filter.placeholder || '';
360
300
  return /*#__PURE__*/React.createElement(Control, props);
361
301
  });
362
-
363
302
  _defineProperty(_assertThisInitialized(_this), "toControl", function (control) {
364
303
  var props = _this.getControlProps(control);
365
-
366
304
  switch (control.type) {
367
305
  case 'text':
368
306
  return _this.toText(props, control);
369
-
370
307
  case 'number':
371
308
  return _this.toNumber(props, control);
372
-
373
309
  case 'select':
374
310
  return _this.toSelect(props, control);
375
-
376
311
  case 'selectSearch':
377
312
  return _this.selectSearch(props, control);
378
-
379
313
  case 'search':
380
314
  return _this.toSearch(props, control);
381
-
382
315
  case 'date':
383
316
  return _this.toDate(props, control);
384
-
385
317
  case 'readonly':
386
318
  return _this.toReadonly(props, control);
387
-
388
319
  case 'cascader':
389
320
  return _this.toCascader(props, control);
390
-
391
321
  default:
392
322
  return 'type error';
393
323
  }
394
324
  });
395
-
396
325
  _defineProperty(_assertThisInitialized(_this), "toLabel", function (_ref5) {
397
326
  var title = _ref5.title,
398
- key = _ref5.key,
399
- dictionary = _ref5.dictionary,
400
- _ref5$configCode = _ref5.configCode,
401
- configCode = _ref5$configCode === void 0 ? 'unknown' : _ref5$configCode;
402
-
327
+ key = _ref5.key,
328
+ dictionary = _ref5.dictionary,
329
+ _ref5$configCode = _ref5.configCode,
330
+ configCode = _ref5$configCode === void 0 ? 'unknown' : _ref5$configCode;
403
331
  if (key === 'queryGroup') {
404
332
  var _context7, _context8;
405
-
406
333
  //查询组合
407
334
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
408
335
  role: "icon",
@@ -417,7 +344,6 @@ var Search = /*#__PURE__*/function (_React$Component) {
417
344
  return title;
418
345
  }
419
346
  });
420
-
421
347
  _defineProperty(_assertThisInitialized(_this), "toCol", function (span, control, more) {
422
348
  var factor = control.span || 1;
423
349
  return /*#__PURE__*/React.createElement(_Col, {
@@ -433,16 +359,14 @@ var Search = /*#__PURE__*/function (_React$Component) {
433
359
  required: control.required
434
360
  }, _this.toControl(control)));
435
361
  });
436
-
437
362
  _defineProperty(_assertThisInitialized(_this), "toCols", function () {
438
363
  var _context9;
439
-
440
364
  var _this$props3 = _this.props,
441
- _this$props3$colNum = _this$props3.colNum,
442
- colNum = _this$props3$colNum === void 0 ? defaultColNum : _this$props3$colNum,
443
- filters = _this$props3.filters,
444
- _this$props3$displayR = _this$props3.displayRow,
445
- displayRow = _this$props3$displayR === void 0 ? 1 : _this$props3$displayR;
365
+ _this$props3$colNum = _this$props3.colNum,
366
+ colNum = _this$props3$colNum === void 0 ? defaultColNum : _this$props3$colNum,
367
+ filters = _this$props3.filters,
368
+ _this$props3$displayR = _this$props3.displayRow,
369
+ displayRow = _this$props3$displayR === void 0 ? 1 : _this$props3$displayR;
446
370
  var span = 24 / Math.min(colNum, _filterInstanceProperty(filters).call(filters, function (item) {
447
371
  return !item.hide;
448
372
  }).length);
@@ -452,32 +376,27 @@ var Search = /*#__PURE__*/function (_React$Component) {
452
376
  return _this.toCol(span, control, index >= colNum * displayRow);
453
377
  });
454
378
  });
455
-
456
379
  _defineProperty(_assertThisInitialized(_this), "calWidth", function () {
457
380
  var _this$props4 = _this.props,
458
- _this$props4$colNum = _this$props4.colNum,
459
- colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
460
- filters = _this$props4.filters;
461
-
381
+ _this$props4$colNum = _this$props4.colNum,
382
+ colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
383
+ filters = _this$props4.filters;
462
384
  var length = _filterInstanceProperty(filters).call(filters, function (item) {
463
385
  return !item.hide;
464
386
  }).length;
465
-
466
387
  if (length < colNum) {
467
388
  return "".concat(length * 18, "%");
468
389
  } else {
469
390
  return "".concat(defaultColNum * 18, "%");
470
391
  }
471
392
  });
472
-
473
393
  _defineProperty(_assertThisInitialized(_this), "calHeight", function (more) {
474
394
  var _this$props5 = _this.props,
475
- _this$props5$colNum = _this$props5.colNum,
476
- colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
477
- filters = _this$props5.filters,
478
- _this$props5$displayR = _this$props5.displayRow,
479
- displayRow = _this$props5$displayR === void 0 ? 1 : _this$props5$displayR;
480
-
395
+ _this$props5$colNum = _this$props5.colNum,
396
+ colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
397
+ filters = _this$props5.filters,
398
+ _this$props5$displayR = _this$props5.displayRow,
399
+ displayRow = _this$props5$displayR === void 0 ? 1 : _this$props5$displayR;
481
400
  if (more) {
482
401
  var row = Math.ceil(_filterInstanceProperty(filters).call(filters, function (item) {
483
402
  return !item.hide;
@@ -487,34 +406,27 @@ var Search = /*#__PURE__*/function (_React$Component) {
487
406
  return displayRow * 36 + (displayRow - 1) * 10;
488
407
  }
489
408
  });
490
-
491
409
  return _this;
492
410
  }
493
-
494
411
  _createClass(Search, [{
495
412
  key: "onAddQueryGroup",
496
413
  value: function () {
497
414
  var _onAddQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(configCode, searchData, dictionary) {
498
415
  var onAddQueryGroup;
499
416
  return _regeneratorRuntime.wrap(function _callee$(_context10) {
500
- while (1) {
501
- switch (_context10.prev = _context10.next) {
502
- case 0:
503
- onAddQueryGroup = this.props.onAddQueryGroup;
504
- onAddQueryGroup && onAddQueryGroup(configCode, searchData, dictionary);
505
-
506
- case 2:
507
- case "end":
508
- return _context10.stop();
509
- }
417
+ while (1) switch (_context10.prev = _context10.next) {
418
+ case 0:
419
+ onAddQueryGroup = this.props.onAddQueryGroup;
420
+ onAddQueryGroup && onAddQueryGroup(configCode, searchData, dictionary);
421
+ case 2:
422
+ case "end":
423
+ return _context10.stop();
510
424
  }
511
425
  }, _callee, this);
512
426
  }));
513
-
514
427
  function onAddQueryGroup(_x, _x2, _x3) {
515
428
  return _onAddQueryGroup.apply(this, arguments);
516
429
  }
517
-
518
430
  return onAddQueryGroup;
519
431
  }()
520
432
  }, {
@@ -523,24 +435,19 @@ var Search = /*#__PURE__*/function (_React$Component) {
523
435
  var _onDelQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
524
436
  var onDelQueryGroup;
525
437
  return _regeneratorRuntime.wrap(function _callee2$(_context11) {
526
- while (1) {
527
- switch (_context11.prev = _context11.next) {
528
- case 0:
529
- onDelQueryGroup = this.props.onDelQueryGroup;
530
- onDelQueryGroup && onDelQueryGroup(configCode, searchData, dictionary);
531
-
532
- case 2:
533
- case "end":
534
- return _context11.stop();
535
- }
438
+ while (1) switch (_context11.prev = _context11.next) {
439
+ case 0:
440
+ onDelQueryGroup = this.props.onDelQueryGroup;
441
+ onDelQueryGroup && onDelQueryGroup(configCode, searchData, dictionary);
442
+ case 2:
443
+ case "end":
444
+ return _context11.stop();
536
445
  }
537
446
  }, _callee2, this);
538
447
  }));
539
-
540
448
  function onDelQueryGroup(_x4, _x5, _x6) {
541
449
  return _onDelQueryGroup.apply(this, arguments);
542
450
  }
543
-
544
451
  return onDelQueryGroup;
545
452
  }()
546
453
  }, {
@@ -561,10 +468,8 @@ var Search = /*#__PURE__*/function (_React$Component) {
561
468
  }, this.toCols())), this.toButtons());
562
469
  }
563
470
  }]);
564
-
565
471
  return Search;
566
472
  }(React.Component);
567
-
568
473
  _defineProperty(Search, "propTypes", {
569
474
  config: PropTypes.shape(ConfigType).isRequired,
570
475
  filters: PropTypes.arrayOf(PropTypes.shape(FilterType)).isRequired,
@@ -577,5 +482,4 @@ _defineProperty(Search, "propTypes", {
577
482
  onHeightChange: PropTypes.func,
578
483
  displayRow: PropTypes.number
579
484
  });
580
-
581
485
  export default Search;