cloud-b2b 1.1.80 → 1.1.82

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