cloud-b2b 1.1.70 → 1.1.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/es/Area/Area.js +8 -11
  2. package/es/CodeInput/CodeInput.js +16 -19
  3. package/es/Enhance/Dialogs.js +11 -14
  4. package/es/Enhance/Loading.js +15 -18
  5. package/es/Header/Header.js +17 -20
  6. package/es/Header/Vertical.js +11 -14
  7. package/es/ImageView/ImageView.js +10 -13
  8. package/es/InpurCascader/InputCascader.js +11 -14
  9. package/es/InputEditor/InputEditor.js +16 -18
  10. package/es/InputSearch/InputSearch.js +20 -23
  11. package/es/InputSelect/InputSelect.js +14 -17
  12. package/es/InputTreeSelect/InputTreeSelect.js +10 -13
  13. package/es/InputWriting/InputWriting.js +12 -15
  14. package/es/Layout/Layout.js +14 -17
  15. package/es/Link/Link.js +7 -10
  16. package/es/NumberInput/NumberInput.js +13 -16
  17. package/es/Search/Search.js +52 -55
  18. package/es/Search2/Search.js +83 -86
  19. package/es/Search2/Search.less +64 -64
  20. package/es/Search2/package.json +6 -6
  21. package/es/Sidebar/Sidebar.js +11 -14
  22. package/es/Sidebar2/Sidebar.js +13 -16
  23. package/es/SuperForm/SuperForm.js +74 -79
  24. package/es/SuperForm2/SuperForm.js +101 -103
  25. package/es/SuperPagination/SuperPagination.js +8 -11
  26. package/es/SuperTab/SuperTab.js +12 -15
  27. package/es/SuperTab2/SuperTab2.js +13 -16
  28. package/es/SuperTable/DragSortRow.js +12 -15
  29. package/es/SuperTable/FilterDropDown.js +11 -14
  30. package/es/SuperTable/SuperTable.js +70 -73
  31. package/es/SuperTable2/SuperTable2.js +89 -92
  32. package/es/SuperTable2/SuperTableCell.js +27 -30
  33. package/es/SuperTable3/FilterDropDown.js +11 -14
  34. package/es/SuperTable3/SuperTable.js +58 -61
  35. package/es/SuperToolbar/SuperToolbar.js +11 -14
  36. package/es/SuperUpload/SuperUpload.js +74 -74
  37. package/es/Viewer/ImageViews.js +16 -19
  38. package/es/Viewer/Viewer.js +11 -14
  39. package/es/helper.js +18 -17
  40. package/lib/Area/Area.js +8 -11
  41. package/lib/CodeInput/CodeInput.js +16 -19
  42. package/lib/Enhance/Dialogs.js +11 -14
  43. package/lib/Enhance/Loading.js +15 -18
  44. package/lib/Header/Header.js +17 -20
  45. package/lib/Header/Vertical.js +11 -14
  46. package/lib/ImageView/ImageView.js +10 -13
  47. package/lib/InpurCascader/InputCascader.js +11 -14
  48. package/lib/InputEditor/InputEditor.js +16 -18
  49. package/lib/InputSearch/InputSearch.js +20 -23
  50. package/lib/InputSelect/InputSelect.js +14 -17
  51. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  52. package/lib/InputWriting/InputWriting.js +12 -15
  53. package/lib/Layout/Layout.js +14 -17
  54. package/lib/LayoutLink/LayoutLink.js +1 -2
  55. package/lib/Link/Link.js +7 -10
  56. package/lib/NumberInput/NumberInput.js +13 -16
  57. package/lib/Search/Search.js +53 -57
  58. package/lib/Search2/Search.js +84 -88
  59. package/lib/Search2/Search.less +64 -64
  60. package/lib/Search2/package.json +6 -6
  61. package/lib/Sidebar/Sidebar.js +11 -14
  62. package/lib/Sidebar2/Sidebar.js +13 -16
  63. package/lib/SuperForm/SuperForm.js +75 -81
  64. package/lib/SuperForm2/SuperForm.js +102 -105
  65. package/lib/SuperPagination/SuperPagination.js +8 -11
  66. package/lib/SuperTab/SuperTab.js +12 -15
  67. package/lib/SuperTab2/SuperTab2.js +13 -16
  68. package/lib/SuperTable/DragSortRow.js +12 -15
  69. package/lib/SuperTable/FilterDropDown.js +11 -14
  70. package/lib/SuperTable/SuperTable.js +70 -73
  71. package/lib/SuperTable2/SuperTable2.js +90 -94
  72. package/lib/SuperTable2/SuperTableCell.js +27 -30
  73. package/lib/SuperTable3/FilterDropDown.js +11 -14
  74. package/lib/SuperTable3/SuperTable.js +58 -61
  75. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  76. package/lib/SuperUpload/SuperUpload.js +75 -76
  77. package/lib/Viewer/ImageViews.js +16 -19
  78. package/lib/Viewer/Viewer.js +11 -14
  79. package/lib/helper.js +18 -17
  80. package/package.json +1 -1
@@ -13,14 +13,13 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
13
13
  import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
14
14
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
15
15
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
16
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
17
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
18
16
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
19
17
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
18
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
20
19
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
21
20
  import _Form from "antd/es/form";
22
21
  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; }
23
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context20, _context21; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context20 = ownKeys(Object(t), !0)).call(_context20, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context21 = ownKeys(Object(t))).call(_context21, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
22
+ 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; }
24
23
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
25
24
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
26
25
  import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
@@ -32,8 +31,8 @@ import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instanc
32
31
  import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
33
32
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
34
33
  import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
35
- 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); }; }
36
- 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; } }
34
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
35
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
37
36
  import React from 'react';
38
37
  import PropTypes from 'prop-types';
39
38
  import ReactDOM from 'react-dom';
@@ -55,11 +54,11 @@ var insertTimeKeyMap = {
55
54
  var TYPE = ['text', 'search', 'searchText', 'select', 'number', 'date', 'readonly', 'selectSearch', 'cascader' //级联选择下拉
56
55
  ];
57
56
 
58
- /**
59
- * search: 搜索按钮的标题
60
- * more:更多按钮的标题
61
- * reset:重置按钮的标题
62
- * sort:排序按钮的标题
57
+ /**
58
+ * search: 搜索按钮的标题
59
+ * more:更多按钮的标题
60
+ * reset:重置按钮的标题
61
+ * sort:排序按钮的标题
63
62
  */
64
63
  var ConfigType = {
65
64
  search: PropTypes.string.isRequired,
@@ -68,11 +67,11 @@ var ConfigType = {
68
67
  more: PropTypes.string
69
68
  };
70
69
 
71
- /**
72
- * key: 唯一标识一个表单元素
73
- * title:表单元素旁边的标题
74
- * type:表单元素的类型
75
- * props:传递给表单元素的额外属性
70
+ /**
71
+ * key: 唯一标识一个表单元素
72
+ * title:表单元素旁边的标题
73
+ * type:表单元素的类型
74
+ * props:传递给表单元素的额外属性
76
75
  */
77
76
  var FilterType = {
78
77
  key: PropTypes.string.isRequired,
@@ -82,18 +81,16 @@ var FilterType = {
82
81
  props: PropTypes.object
83
82
  };
84
83
 
85
- /**
86
- * data:传递给filters的默认值,为key:value的形式,此处的key为FilterType中的key
87
- * isSort:是否需要排序按钮,默认false,当设置为true时,onClick函数需要实现key为sort的响应函数
88
- * options: 作用同FilterType.options类似,但优先级高于它
89
- * onClick:按钮点击事件,原型为func(key)
90
- * onChange:表单控件内容改变时触发,原型为func(key, value)
91
- * onSearch:search控件发出的事件,原型为func(key, value)
92
- * displayRow:折叠时需要展示的行数,整数,默认为2
84
+ /**
85
+ * data:传递给filters的默认值,为key:value的形式,此处的key为FilterType中的key
86
+ * isSort:是否需要排序按钮,默认false,当设置为true时,onClick函数需要实现key为sort的响应函数
87
+ * options: 作用同FilterType.options类似,但优先级高于它
88
+ * onClick:按钮点击事件,原型为func(key)
89
+ * onChange:表单控件内容改变时触发,原型为func(key, value)
90
+ * onSearch:search控件发出的事件,原型为func(key, value)
91
+ * displayRow:折叠时需要展示的行数,整数,默认为2
93
92
  */
94
93
  var Search2 = /*#__PURE__*/function (_React$Component) {
95
- _inherits(Search2, _React$Component);
96
- var _super = _createSuper(Search2);
97
94
  function Search2() {
98
95
  var _context;
99
96
  var _this;
@@ -101,15 +98,15 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
101
98
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
102
99
  args[_key] = arguments[_key];
103
100
  }
104
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
105
- _defineProperty(_assertThisInitialized(_this), "state", {
101
+ _this = _callSuper(this, Search2, _concatInstanceProperty(_context = []).call(_context, args));
102
+ _defineProperty(_this, "state", {
106
103
  more: false
107
104
  });
108
- _defineProperty(_assertThisInitialized(_this), "getPathFun", /*#__PURE__*/function () {
109
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(key) {
105
+ _defineProperty(_this, "getPathFun", /*#__PURE__*/function () {
106
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(key) {
110
107
  var _context2, _context8;
111
108
  var pathArr, _global$store$getStat, sidebars, navigation, title, body, url;
112
- return _regeneratorRuntime.wrap(function _callee$(_context9) {
109
+ return _regeneratorRuntime.wrap(function (_context9) {
113
110
  while (1) switch (_context9.prev = _context9.next) {
114
111
  case 0:
115
112
  pathArr = global.location.pathname.split('/');
@@ -146,7 +143,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
146
143
  menuName: title
147
144
  };
148
145
  url = '/api/standard/log'; // await helper.fetchJson(url, helper.postOption(body))
149
- case 5:
146
+ case 1:
150
147
  case "end":
151
148
  return _context9.stop();
152
149
  }
@@ -156,49 +153,49 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
156
153
  return _ref.apply(this, arguments);
157
154
  };
158
155
  }());
159
- _defineProperty(_assertThisInitialized(_this), "onClick", function (key) {
156
+ _defineProperty(_this, "onClick", function (key) {
160
157
  var onClick = _this.props.onClick;
161
158
  if (key === 'search') {
162
159
  // this.getPathFun(key);
163
160
  }
164
161
  onClick && onClick(key);
165
162
  });
166
- _defineProperty(_assertThisInitialized(_this), "onMore", function () {
163
+ _defineProperty(_this, "onMore", function () {
167
164
  var onHeightChange = _this.props.onHeightChange;
168
165
  _this.setState({
169
166
  more: !_this.state.more
170
167
  });
171
168
  onHeightChange && onHeightChange(_this.calHeight(!_this.state.more));
172
169
  });
173
- _defineProperty(_assertThisInitialized(_this), "onChange", function (dictionary, key, value) {
174
- var _context10, _context11;
170
+ _defineProperty(_this, "onChange", function (dictionary, key, value) {
171
+ var _context0, _context1;
175
172
  var onChange = _this.props.onChange;
176
- if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !_includesInstanceProperty(_context10 = _mapInstanceProperty(_context11 = global.dictionary[dictionary]).call(_context11, function (item) {
173
+ if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !_includesInstanceProperty(_context0 = _mapInstanceProperty(_context1 = global.dictionary[dictionary]).call(_context1, function (item) {
177
174
  return item.value;
178
- })).call(_context10, value)) {
179
- var _context12;
175
+ })).call(_context0, value)) {
176
+ var _context10;
180
177
  var realValue = JSON.parse(value);
181
178
  _this.onClick('reset');
182
- _mapInstanceProperty(_context12 = _Object$keys(realValue)).call(_context12, function (objectKey) {
179
+ _mapInstanceProperty(_context10 = _Object$keys(realValue)).call(_context10, function (objectKey) {
183
180
  onChange && objectKey !== 'queryId' && onChange(objectKey, realValue[objectKey]);
184
181
  });
185
182
  }
186
183
  onChange && onChange(key, value);
187
184
  });
188
- _defineProperty(_assertThisInitialized(_this), "onPressEnter", function () {
185
+ _defineProperty(_this, "onPressEnter", function () {
189
186
  ReactDOM.findDOMNode(_this.refs.search).click();
190
187
  });
191
- _defineProperty(_assertThisInitialized(_this), "toButton", function (key) {
192
- var _context13;
188
+ _defineProperty(_this, "toButton", function (key) {
189
+ var _context11;
193
190
  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
194
191
  var config = _this.props.config;
195
- var onClick = _bindInstanceProperty(_context13 = _this.onClick).call(_context13, _assertThisInitialized(_this), key);
192
+ var onClick = _bindInstanceProperty(_context11 = _this.onClick).call(_context11, _this, key);
196
193
  return /*#__PURE__*/React.createElement(_Button, _extends({
197
194
  size: defaultSize,
198
195
  onClick: onClick
199
196
  }, props), config[key]);
200
197
  });
201
- _defineProperty(_assertThisInitialized(_this), "toMore", function () {
198
+ _defineProperty(_this, "toMore", function () {
202
199
  return /*#__PURE__*/React.createElement("a", {
203
200
  role: "more",
204
201
  onClick: _this.onMore
@@ -207,7 +204,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
207
204
  "data-status": !_this.state.more ? 'down' : 'up'
208
205
  }));
209
206
  });
210
- _defineProperty(_assertThisInitialized(_this), "toButtons", function () {
207
+ _defineProperty(_this, "toButtons", function () {
211
208
  var config = _this.props.config;
212
209
  return /*#__PURE__*/React.createElement("div", {
213
210
  role: "buttons"
@@ -216,7 +213,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
216
213
  type: 'primary'
217
214
  }), config.reset ? _this.toButton('reset') : null, _this.isSort() ? _this.toButton('sort') : null, _this.isMore() ? _this.toMore() : null);
218
215
  });
219
- _defineProperty(_assertThisInitialized(_this), "isSort", function () {
216
+ _defineProperty(_this, "isSort", function () {
220
217
  var _this$props = _this.props,
221
218
  config = _this$props.config,
222
219
  _this$props$colNum = _this$props.colNum,
@@ -226,7 +223,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
226
223
  isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
227
224
  return isSort && _sortInstanceProperty(config) && filters.length > colNum;
228
225
  });
229
- _defineProperty(_assertThisInitialized(_this), "isMore", function () {
226
+ _defineProperty(_this, "isMore", function () {
230
227
  var _this$props2 = _this.props,
231
228
  config = _this$props2.config,
232
229
  _this$props2$colNum = _this$props2.colNum,
@@ -238,7 +235,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
238
235
  return !item.hide;
239
236
  }).length > colNum * displayRow;
240
237
  });
241
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (filter) {
238
+ _defineProperty(_this, "getOptions", function (filter) {
242
239
  var options = _this.props.options;
243
240
  if (options && _Array$isArray(options[filter.key])) {
244
241
  return options[filter.key];
@@ -246,21 +243,21 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
246
243
  return filter.options || filter.typeRelated || [];
247
244
  }
248
245
  });
249
- _defineProperty(_assertThisInitialized(_this), "getContainer", function () {
246
+ _defineProperty(_this, "getContainer", function () {
250
247
  return _this.props.getContainer;
251
248
  });
252
- _defineProperty(_assertThisInitialized(_this), "getControlProps", function (control) {
253
- var _context14;
249
+ _defineProperty(_this, "getControlProps", function (control) {
250
+ var _context12;
254
251
  var _this$props$data = _this.props.data,
255
252
  data = _this$props$data === void 0 ? {} : _this$props$data;
256
253
  return _objectSpread(_objectSpread({}, control.props || {}), {}, {
257
254
  size: defaultSize,
258
255
  type: control.type,
259
256
  value: makeString(data[control.key]),
260
- onChange: _bindInstanceProperty(_context14 = _this.onChange).call(_context14, _assertThisInitialized(_this), control.dictionary, control.key)
257
+ onChange: _bindInstanceProperty(_context12 = _this.onChange).call(_context12, _this, control.dictionary, control.key)
261
258
  });
262
259
  });
263
- _defineProperty(_assertThisInitialized(_this), "validDate", function (_ref2) {
260
+ _defineProperty(_this, "validDate", function (_ref2) {
264
261
  var key = _ref2.key,
265
262
  type = _ref2.type;
266
263
  return function (date) {
@@ -279,16 +276,16 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
279
276
  }
280
277
  };
281
278
  });
282
- _defineProperty(_assertThisInitialized(_this), "toText", function (props) {
279
+ _defineProperty(_this, "toText", function (props) {
283
280
  props.onPressEnter = _this.onPressEnter;
284
281
  return /*#__PURE__*/React.createElement(Control, props);
285
282
  });
286
- _defineProperty(_assertThisInitialized(_this), "toNumber", function (props) {
283
+ _defineProperty(_this, "toNumber", function (props) {
287
284
  props.defaultValue = props.value;
288
285
  delete props.value;
289
286
  return /*#__PURE__*/React.createElement(Control, props);
290
287
  });
291
- _defineProperty(_assertThisInitialized(_this), "getQueryGroupOptions", function (_ref3) {
288
+ _defineProperty(_this, "getQueryGroupOptions", function (_ref3) {
292
289
  var dictionary = _ref3.dictionary,
293
290
  _ref3$configCode = _ref3.configCode,
294
291
  configCode = _ref3$configCode === void 0 ? 'unknown' : _ref3$configCode;
@@ -309,14 +306,14 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
309
306
  };
310
307
  }));
311
308
  });
312
- _defineProperty(_assertThisInitialized(_this), "toSelect", function (props, filter) {
309
+ _defineProperty(_this, "toSelect", function (props, filter) {
313
310
  var container = _this.getContainer();
314
311
  container && (props.getPopupContainer = container);
315
312
  props.options = filter.key === 'queryGroup' ? _this.getQueryGroupOptions(filter) : _this.getOptions(filter);
316
313
  props.dropdownMatchSelectWidth = false;
317
314
  return /*#__PURE__*/React.createElement(Control, props);
318
315
  });
319
- _defineProperty(_assertThisInitialized(_this), "createSearchEvent", function (filter) {
316
+ _defineProperty(_this, "createSearchEvent", function (filter) {
320
317
  if (_this.props.onSearch) {
321
318
  return function (value) {
322
319
  return _this.props.onSearch(filter.key, value, filter);
@@ -325,7 +322,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
325
322
  return null;
326
323
  }
327
324
  });
328
- _defineProperty(_assertThisInitialized(_this), "toSearch", function (props, filter) {
325
+ _defineProperty(_this, "toSearch", function (props, filter) {
329
326
  var container = _this.getContainer();
330
327
  container && (props.getPopupContainer = container);
331
328
  props.options = _this.getOptions(filter);
@@ -333,7 +330,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
333
330
  props.dropdownMatchSelectWidth = false;
334
331
  return /*#__PURE__*/React.createElement(Control, props);
335
332
  });
336
- _defineProperty(_assertThisInitialized(_this), "selectSearch", function (props, filter) {
333
+ _defineProperty(_this, "selectSearch", function (props, filter) {
337
334
  var container = _this.getContainer();
338
335
  container && (props.getPopupContainer = container);
339
336
  props.options = _this.getOptions(filter);
@@ -341,7 +338,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
341
338
  props.dropdownMatchSelectWidth = false;
342
339
  return /*#__PURE__*/React.createElement(Control, props);
343
340
  });
344
- _defineProperty(_assertThisInitialized(_this), "toDate", function (props, _ref5) {
341
+ _defineProperty(_this, "toDate", function (props, _ref5) {
345
342
  var rule = _ref5.rule;
346
343
  var container = _this.getContainer();
347
344
  container && (props.getCalendarContainer = container);
@@ -351,11 +348,11 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
351
348
  };
352
349
  return /*#__PURE__*/React.createElement(Control, props);
353
350
  });
354
- _defineProperty(_assertThisInitialized(_this), "toReadonly", function (props, filter) {
351
+ _defineProperty(_this, "toReadonly", function (props, filter) {
355
352
  props.value = getTitle(props.value, _this.getOptions(filter));
356
353
  return /*#__PURE__*/React.createElement(Control, props);
357
354
  });
358
- _defineProperty(_assertThisInitialized(_this), "toCascader", function (props, filter) {
355
+ _defineProperty(_this, "toCascader", function (props, filter) {
359
356
  var container = _this.getContainer();
360
357
  container && (props.getPopupContainer = container);
361
358
  props.options = _this.getOptions(filter);
@@ -363,7 +360,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
363
360
  props.placeholder = filter.placeholder || '';
364
361
  return /*#__PURE__*/React.createElement(Control, props);
365
362
  });
366
- _defineProperty(_assertThisInitialized(_this), "toControl", function (control) {
363
+ _defineProperty(_this, "toControl", function (control) {
367
364
  var props = _this.getControlProps(control);
368
365
  switch (control.type) {
369
366
  case 'text':
@@ -387,29 +384,29 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
387
384
  return 'type error';
388
385
  }
389
386
  });
390
- _defineProperty(_assertThisInitialized(_this), "toLabel", function (_ref6) {
387
+ _defineProperty(_this, "toLabel", function (_ref6) {
391
388
  var title = _ref6.title,
392
389
  key = _ref6.key,
393
390
  dictionary = _ref6.dictionary,
394
391
  _ref6$configCode = _ref6.configCode,
395
392
  configCode = _ref6$configCode === void 0 ? 'unknown' : _ref6$configCode;
396
393
  if (key === 'queryGroup') {
397
- var _context15, _context16;
394
+ var _context13, _context14;
398
395
  //查询组合
399
396
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
400
397
  role: "icon",
401
398
  type: "plus-circle-o",
402
- onClick: _bindInstanceProperty(_context15 = _this.onAddQueryGroup).call(_context15, _assertThisInitialized(_this), configCode, _this.props.data, dictionary)
399
+ onClick: _bindInstanceProperty(_context13 = _this.onAddQueryGroup).call(_context13, _this, configCode, _this.props.data, dictionary)
403
400
  }), /*#__PURE__*/React.createElement(_Icon, {
404
401
  role: "icon",
405
402
  type: "minus-circle-o",
406
- onClick: _bindInstanceProperty(_context16 = _this.onDelQueryGroup).call(_context16, _assertThisInitialized(_this), configCode, _this.props.data, dictionary)
403
+ onClick: _bindInstanceProperty(_context14 = _this.onDelQueryGroup).call(_context14, _this, configCode, _this.props.data, dictionary)
407
404
  }));
408
405
  } else {
409
406
  return title;
410
407
  }
411
408
  });
412
- _defineProperty(_assertThisInitialized(_this), "toCol", function (span, control, more) {
409
+ _defineProperty(_this, "toCol", function (span, control, more) {
413
410
  var factor = control.span || 1;
414
411
  return /*#__PURE__*/React.createElement(_Col, {
415
412
  span: span * factor,
@@ -445,7 +442,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
445
442
  // return newFilters.map((control, index) => this.toCol(span, control, index >= colNum * displayRow));
446
443
  // }
447
444
  // };
448
- _defineProperty(_assertThisInitialized(_this), "toCols", function () {
445
+ _defineProperty(_this, "toCols", function () {
449
446
  var _this$props3 = _this.props,
450
447
  _this$props3$colNum = _this$props3.colNum,
451
448
  colNum = _this$props3$colNum === void 0 ? defaultColNum : _this$props3$colNum,
@@ -466,7 +463,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
466
463
  });
467
464
  }
468
465
  });
469
- _defineProperty(_assertThisInitialized(_this), "calWidth", function () {
466
+ _defineProperty(_this, "calWidth", function () {
470
467
  var _this$props4 = _this.props,
471
468
  _this$props4$colNum = _this$props4.colNum,
472
469
  colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
@@ -480,7 +477,7 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
480
477
  return "".concat(defaultColNum * 13.6, "%");
481
478
  }
482
479
  });
483
- _defineProperty(_assertThisInitialized(_this), "calHeight", function (more) {
480
+ _defineProperty(_this, "calHeight", function (more) {
484
481
  var _this$props5 = _this.props,
485
482
  _this$props5$colNum = _this$props5.colNum,
486
483
  colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
@@ -498,16 +495,17 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
498
495
  });
499
496
  return _this;
500
497
  }
501
- _createClass(Search2, [{
498
+ _inherits(Search2, _React$Component);
499
+ return _createClass(Search2, [{
502
500
  key: "onAddQueryGroup",
503
501
  value: function () {
504
- var _onAddQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
505
- var _context17;
502
+ var _onAddQueryGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
503
+ var _context15;
506
504
  var filter, dicOptionNameArr, dicOptions;
507
- return _regeneratorRuntime.wrap(function _callee2$(_context18) {
508
- while (1) switch (_context18.prev = _context18.next) {
505
+ return _regeneratorRuntime.wrap(function (_context16) {
506
+ while (1) switch (_context16.prev = _context16.next) {
509
507
  case 0:
510
- filter = _reduceInstanceProperty(_context17 = _Object$keys(searchData)).call(_context17, function (state, key) {
508
+ filter = _reduceInstanceProperty(_context15 = _Object$keys(searchData)).call(_context15, function (state, key) {
511
509
  if (searchData[key] && key !== 'queryGroup') {
512
510
  state[key] = searchData[key];
513
511
  }
@@ -523,9 +521,9 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
523
521
  // if (true === await showAddDialog(configCode, filter, dicOptionNameArr)) {
524
522
  // this.onChange(undefined, 'queryGroup', '');
525
523
  // }
526
- case 3:
524
+ case 1:
527
525
  case "end":
528
- return _context18.stop();
526
+ return _context16.stop();
529
527
  }
530
528
  }, _callee2);
531
529
  }));
@@ -537,10 +535,10 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
537
535
  }, {
538
536
  key: "onDelQueryGroup",
539
537
  value: function () {
540
- var _onDelQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(configCode, searchData, dictionary) {
538
+ var _onDelQueryGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(configCode, searchData, dictionary) {
541
539
  var queryGroup, dicOptions, _JSON$parse, queryId;
542
- return _regeneratorRuntime.wrap(function _callee3$(_context19) {
543
- while (1) switch (_context19.prev = _context19.next) {
540
+ return _regeneratorRuntime.wrap(function (_context17) {
541
+ while (1) switch (_context17.prev = _context17.next) {
544
542
  case 0:
545
543
  queryGroup = searchData.queryGroup; // if (!queryGroup) return helper.showError(`请先选择要删除的查询组合`);
546
544
  if (dictionary && global.dictionary) {
@@ -549,9 +547,9 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
549
547
  _JSON$parse = JSON.parse(queryGroup), queryId = _JSON$parse.queryId; // if(true === await showDeleteDialog(configCode, queryId)) {
550
548
  // this.onClick('reset');
551
549
  // }
552
- case 3:
550
+ case 1:
553
551
  case "end":
554
- return _context19.stop();
552
+ return _context17.stop();
555
553
  }
556
554
  }, _callee3);
557
555
  }));
@@ -578,7 +576,6 @@ var Search2 = /*#__PURE__*/function (_React$Component) {
578
576
  }, this.toCols())), this.toButtons());
579
577
  }
580
578
  }]);
581
- return Search2;
582
579
  }(React.Component);
583
580
  _defineProperty(Search2, "propTypes", {
584
581
  config: PropTypes.shape(ConfigType).isRequired,
@@ -1,64 +1,64 @@
1
- @import '../variables.less';
2
-
3
- .@{cloudlink-prefix}-Search2 {
4
- transition: all 0.3s;
5
- > *:first-child {
6
- display: inline-block;
7
- vertical-align: top;
8
- margin-bottom: -10px;
9
-
10
- :global(.ant-form-item) {
11
- margin-bottom: 10px;
12
-
13
- :global(.ant-select-selection--multiple) {
14
- border-top-width: 1px;
15
- height: 22px;
16
- overflow: auto;
17
- }
18
-
19
- [role='icon'] {
20
- cursor: pointer;
21
- margin-left: 10px;
22
- color: @primary-color;
23
- }
24
- }
25
- }
26
-
27
- > *:last-child {
28
- display: inline-block;
29
- vertical-align: top;
30
- padding-left: 20px;
31
- padding-top: 14px;
32
- width: 18%;
33
- }
34
-
35
- :global(.ant-form-item-control) input,
36
- :global(.ant-calendar-picker),
37
- :global(.ant-select) {
38
- display: block;
39
- }
40
- :global(.ant-calendar-picker-small) {
41
- min-width: 100px !important;
42
- }
43
- [role='buttons'] > * {
44
- margin-right: 5px;
45
- }
46
-
47
- [role='more'] {
48
- color: rgba(0, 0, 0, 0.65);
49
- user-select: none;
50
-
51
- &:hover {
52
- color: @brand-primary;
53
- }
54
-
55
- > i {
56
- transform: scale(0.75);
57
- transition: all 0.2s;
58
-
59
- &[data-status='up'] {
60
- transform: scale(0.75) rotate(-180deg);
61
- }
62
- }
63
- }
64
- }
1
+ @import '../variables.less';
2
+
3
+ .@{cloudlink-prefix}-Search2 {
4
+ transition: all 0.3s;
5
+ > *:first-child {
6
+ display: inline-block;
7
+ vertical-align: top;
8
+ margin-bottom: -10px;
9
+
10
+ :global(.ant-form-item) {
11
+ margin-bottom: 10px;
12
+
13
+ :global(.ant-select-selection--multiple) {
14
+ border-top-width: 1px;
15
+ height: 22px;
16
+ overflow: auto;
17
+ }
18
+
19
+ [role='icon'] {
20
+ cursor: pointer;
21
+ margin-left: 10px;
22
+ color: @primary-color;
23
+ }
24
+ }
25
+ }
26
+
27
+ > *:last-child {
28
+ display: inline-block;
29
+ vertical-align: top;
30
+ padding-left: 20px;
31
+ padding-top: 14px;
32
+ width: 18%;
33
+ }
34
+
35
+ :global(.ant-form-item-control) input,
36
+ :global(.ant-calendar-picker),
37
+ :global(.ant-select) {
38
+ display: block;
39
+ }
40
+ :global(.ant-calendar-picker-small) {
41
+ min-width: 100px !important;
42
+ }
43
+ [role='buttons'] > * {
44
+ margin-right: 5px;
45
+ }
46
+
47
+ [role='more'] {
48
+ color: rgba(0, 0, 0, 0.65);
49
+ user-select: none;
50
+
51
+ &:hover {
52
+ color: @brand-primary;
53
+ }
54
+
55
+ > i {
56
+ transform: scale(0.75);
57
+ transition: all 0.2s;
58
+
59
+ &[data-status='up'] {
60
+ transform: scale(0.75) rotate(-180deg);
61
+ }
62
+ }
63
+ }
64
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "Search",
3
- "version": "0.0.0",
4
- "private": true,
5
- "main": "./Search.js"
6
- }
1
+ {
2
+ "name": "Search",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Search.js"
6
+ }