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
@@ -2,13 +2,12 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
2
2
  import _Button from "antd/es/button";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
9
8
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
- 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); }; }
11
- 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; } }
9
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
11
  import _Object$keys2 from "@babel/runtime-corejs3/core-js-stable/object/keys";
13
12
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
14
13
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
@@ -42,19 +41,17 @@ var getCurrentSideKey = function getCurrentSideKey() {
42
41
  }
43
42
  };
44
43
  var Layout = /*#__PURE__*/function (_React$Component) {
45
- _inherits(Layout, _React$Component);
46
- var _super = _createSuper(Layout);
47
44
  function Layout(props) {
48
45
  var _this;
49
46
  _classCallCheck(this, Layout);
50
- _this = _super.call(this, props);
51
- _defineProperty(_assertThisInitialized(_this), "onOpenChange", function (sideKey, openKeys) {
47
+ _this = _callSuper(this, Layout, [props]);
48
+ _defineProperty(_this, "onOpenChange", function (sideKey, openKeys) {
52
49
  var onOpenChange = _this.props.onOpenChange;
53
50
  if (onOpenChange) {
54
51
  onOpenChange(sideKey, openKeys);
55
52
  }
56
53
  });
57
- _defineProperty(_assertThisInitialized(_this), "getSidebarProps", function (sideKey) {
54
+ _defineProperty(_this, "getSidebarProps", function (sideKey) {
58
55
  var _context3;
59
56
  var _this$props = _this.props,
60
57
  sidebars = _this$props.sidebars,
@@ -71,7 +68,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
71
68
  activeKey: nav2,
72
69
  items: sides,
73
70
  openKeys: openKeys[sideKey] || [],
74
- onOpenChange: _bindInstanceProperty(_context3 = _this.onOpenChange).call(_context3, _assertThisInitialized(_this), sideKey),
71
+ onOpenChange: _bindInstanceProperty(_context3 = _this.onOpenChange).call(_context3, _this, sideKey),
75
72
  onModeChange: function onModeChange(mode) {
76
73
  return _this.setState({
77
74
  mode: mode
@@ -79,7 +76,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
79
76
  }
80
77
  };
81
78
  });
82
- _defineProperty(_assertThisInitialized(_this), "toSidebar", function (sideKey) {
79
+ _defineProperty(_this, "toSidebar", function (sideKey) {
83
80
  var hasHeaderV = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
84
81
  if (!sideKey) {
85
82
  return null;
@@ -91,7 +88,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
91
88
  }, /*#__PURE__*/React.createElement(Sidebar, _this.getSidebarProps(sideKey)));
92
89
  }
93
90
  });
94
- _defineProperty(_assertThisInitialized(_this), "toHeader", function () {
91
+ _defineProperty(_this, "toHeader", function () {
95
92
  var _context4, _context5;
96
93
  var _this$props2 = _this.props,
97
94
  loading = _this$props2.loading,
@@ -123,7 +120,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
123
120
  onLogout: onLogout
124
121
  });
125
122
  });
126
- _defineProperty(_assertThisInitialized(_this), "headerVProps", function (selectKey) {
123
+ _defineProperty(_this, "headerVProps", function (selectKey) {
127
124
  var _context6;
128
125
  var keys = ['setting', 'message'];
129
126
  return {
@@ -140,7 +137,8 @@ var Layout = /*#__PURE__*/function (_React$Component) {
140
137
  };
141
138
  return _this;
142
139
  }
143
- _createClass(Layout, [{
140
+ _inherits(Layout, _React$Component);
141
+ return _createClass(Layout, [{
144
142
  key: "componentWillReceiveProps",
145
143
  value: function componentWillReceiveProps(props) {
146
144
  if (!props.loading) {
@@ -153,7 +151,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
153
151
  }, {
154
152
  key: "render",
155
153
  value: function render() {
156
- var _context10;
154
+ var _context0;
157
155
  var _this$props3 = this.props,
158
156
  loading = _this$props3.loading,
159
157
  sidebars = _this$props3.sidebars,
@@ -169,7 +167,7 @@ var Layout = /*#__PURE__*/function (_React$Component) {
169
167
  var _context9;
170
168
  return !_includesInstanceProperty(_context9 = ['setting', 'message']).call(_context9, item.key);
171
169
  }).length > 1;
172
- var sideKey = loading || !nav2 ? '' : getCurrentSideKey(sidebars, _concatInstanceProperty(_context10 = "/".concat(nav1, "/")).call(_context10, nav2));
170
+ var sideKey = loading || !nav2 ? '' : getCurrentSideKey(sidebars, _concatInstanceProperty(_context0 = "/".concat(nav1, "/")).call(_context0, nav2));
173
171
  return noPrivilege ? /*#__PURE__*/React.createElement("div", {
174
172
  style: {
175
173
  textAlign: 'center'
@@ -188,7 +186,6 @@ var Layout = /*#__PURE__*/function (_React$Component) {
188
186
  }, this.toHeader(sideKey), loading ? /*#__PURE__*/React.createElement(Loading, null) : /*#__PURE__*/React.createElement("div", null, hasV ? /*#__PURE__*/React.createElement(HeaderV, this.headerVProps(sideKey)) : null, this.toSidebar(sideKey, hasV), /*#__PURE__*/React.createElement("section", null, children)));
189
187
  }
190
188
  }]);
191
- return Layout;
192
189
  }(React.Component);
193
190
  _defineProperty(Layout, "propTypes", {
194
191
  children: PropTypes.node.isRequired,
package/es/Link/Link.js CHANGED
@@ -3,15 +3,14 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
4
4
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
5
5
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
6
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
6
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
9
7
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
8
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
10
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
11
10
  var _excluded = ["to", "children", "disabled"];
12
11
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
13
- 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); }; }
14
- 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; } }
12
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
15
14
  import React from 'react';
16
15
  import PropTypes from 'prop-types';
17
16
  import history from '../history';
@@ -29,8 +28,6 @@ function jump(url) {
29
28
  }
30
29
  }
31
30
  var Link = /*#__PURE__*/function (_React$Component) {
32
- _inherits(Link, _React$Component);
33
- var _super = _createSuper(Link);
34
31
  function Link() {
35
32
  var _context;
36
33
  var _this;
@@ -38,8 +35,8 @@ var Link = /*#__PURE__*/function (_React$Component) {
38
35
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
36
  args[_key] = arguments[_key];
40
37
  }
41
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
42
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
38
+ _this = _callSuper(this, Link, _concatInstanceProperty(_context = []).call(_context, args));
39
+ _defineProperty(_this, "handleClick", function (event) {
43
40
  if (_this.props.onClick) {
44
41
  _this.props.onClick(event);
45
42
  }
@@ -54,7 +51,8 @@ var Link = /*#__PURE__*/function (_React$Component) {
54
51
  });
55
52
  return _this;
56
53
  }
57
- _createClass(Link, [{
54
+ _inherits(Link, _React$Component);
55
+ return _createClass(Link, [{
58
56
  key: "render",
59
57
  value: function render() {
60
58
  var _this$props = this.props,
@@ -73,7 +71,6 @@ var Link = /*#__PURE__*/function (_React$Component) {
73
71
  }
74
72
  }
75
73
  }]);
76
- return Link;
77
74
  }(React.Component);
78
75
  _defineProperty(Link, "propTypes", {
79
76
  to: PropTypes.string,
@@ -9,15 +9,14 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
9
9
  import _Input from "antd/es/input";
10
10
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
11
11
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
12
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
13
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
12
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
13
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
15
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
16
  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; }
18
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- 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); }; }
20
- 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; } }
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
20
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
22
21
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
23
22
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
@@ -100,8 +99,6 @@ var PROPS = {
100
99
  };
101
100
  var PROPS_KEYS = _Object$keys(PROPS);
102
101
  var NumberInput = /*#__PURE__*/function (_React$Component) {
103
- _inherits(NumberInput, _React$Component);
104
- var _super = _createSuper(NumberInput);
105
102
  function NumberInput() {
106
103
  var _context2;
107
104
  var _this;
@@ -109,12 +106,12 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
109
106
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
110
107
  args[_key] = arguments[_key];
111
108
  }
112
- _this = _super.call.apply(_super, _concatInstanceProperty(_context2 = [this]).call(_context2, args));
113
- _defineProperty(_assertThisInitialized(_this), "state", {
109
+ _this = _callSuper(this, NumberInput, _concatInstanceProperty(_context2 = []).call(_context2, args));
110
+ _defineProperty(_this, "state", {
114
111
  typo: false,
115
112
  value: ''
116
113
  });
117
- _defineProperty(_assertThisInitialized(_this), "onChange", function (event) {
114
+ _defineProperty(_this, "onChange", function (event) {
118
115
  var value = event.target.value;
119
116
  if (!_this.hasSpecialChar(value)) {
120
117
  _this.setState({
@@ -123,7 +120,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
123
120
  });
124
121
  }
125
122
  });
126
- _defineProperty(_assertThisInitialized(_this), "onBlur", function (event) {
123
+ _defineProperty(_this, "onBlur", function (event) {
127
124
  var _this$props = _this.props,
128
125
  onBlur = _this$props.onBlur,
129
126
  onChange = _this$props.onChange,
@@ -142,7 +139,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
142
139
  onBlur && onBlur(event); //有输入才触发外部失去焦点事件,避免非必要请求
143
140
  }
144
141
  });
145
- _defineProperty(_assertThisInitialized(_this), "hasSpecialChar", function (value) {
142
+ _defineProperty(_this, "hasSpecialChar", function (value) {
146
143
  if (_includesInstanceProperty(value).call(value, '+')) {
147
144
  return true;
148
145
  } else if (!_this.props.sign && _includesInstanceProperty(value).call(value, '-')) {
@@ -151,7 +148,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
151
148
  return !_this.props.real && _includesInstanceProperty(value).call(value, '.');
152
149
  }
153
150
  });
154
- _defineProperty(_assertThisInitialized(_this), "format", function (value, fixed) {
151
+ _defineProperty(_this, "format", function (value, fixed) {
155
152
  var _this$props2 = _this.props,
156
153
  real = _this$props2.real,
157
154
  sign = _this$props2.sign,
@@ -167,7 +164,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
167
164
  big: big
168
165
  });
169
166
  });
170
- _defineProperty(_assertThisInitialized(_this), "getShowValue", function () {
167
+ _defineProperty(_this, "getShowValue", function () {
171
168
  if (_this.state.typo) {
172
169
  // 处于输入状态从state中取值
173
170
  return _this.state.value;
@@ -176,7 +173,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
176
173
  return _this.format(_this.props.defaultValue, _this.props.fixed).value;
177
174
  }
178
175
  });
179
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
176
+ _defineProperty(_this, "getProps", function () {
180
177
  var props = getObjectExclude(_this.props, PROPS_KEYS);
181
178
  return _objectSpread(_objectSpread({}, props), {}, {
182
179
  type: 'text',
@@ -188,13 +185,13 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
188
185
  });
189
186
  return _this;
190
187
  }
191
- _createClass(NumberInput, [{
188
+ _inherits(NumberInput, _React$Component);
189
+ return _createClass(NumberInput, [{
192
190
  key: "render",
193
191
  value: function render() {
194
192
  return /*#__PURE__*/React.createElement(_Input, this.getProps());
195
193
  }
196
194
  }]);
197
- return NumberInput;
198
195
  }(React.Component);
199
196
  _defineProperty(NumberInput, "propTypes", PROPS);
200
197
  export default NumberInput;
@@ -13,15 +13,14 @@ import _Button from "antd/es/button";
13
13
  import _extends from "@babel/runtime-corejs3/helpers/extends";
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
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
23
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; }
24
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context12, _context13; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context12 = ownKeys(Object(t), !0)).call(_context12, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context13 = ownKeys(Object(t))).call(_context13, 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 _context10, _context11; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context10 = ownKeys(Object(t), !0)).call(_context10, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context11 = ownKeys(Object(t))).call(_context11, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
25
24
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
26
25
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
27
26
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
@@ -31,8 +30,8 @@ import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instanc
31
30
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
32
31
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
33
32
  import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
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); }; }
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; } }
33
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
34
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
36
35
  import React from 'react';
37
36
  import PropTypes from 'prop-types';
38
37
  import ReactDOM from 'react-dom';
@@ -84,8 +83,6 @@ var FilterType = {
84
83
  * displayRow:折叠时需要展示的行数,整数,默认为1
85
84
  */
86
85
  var Search = /*#__PURE__*/function (_React$Component) {
87
- _inherits(Search, _React$Component);
88
- var _super = _createSuper(Search);
89
86
  function Search() {
90
87
  var _context;
91
88
  var _this;
@@ -93,22 +90,22 @@ var Search = /*#__PURE__*/function (_React$Component) {
93
90
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
94
91
  args[_key] = arguments[_key];
95
92
  }
96
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
97
- _defineProperty(_assertThisInitialized(_this), "state", {
93
+ _this = _callSuper(this, Search, _concatInstanceProperty(_context = []).call(_context, args));
94
+ _defineProperty(_this, "state", {
98
95
  more: false
99
96
  });
100
- _defineProperty(_assertThisInitialized(_this), "onClick", function (key) {
97
+ _defineProperty(_this, "onClick", function (key) {
101
98
  var onClick = _this.props.onClick;
102
99
  onClick && onClick(key);
103
100
  });
104
- _defineProperty(_assertThisInitialized(_this), "onMore", function () {
101
+ _defineProperty(_this, "onMore", function () {
105
102
  var onHeightChange = _this.props.onHeightChange;
106
103
  _this.setState({
107
104
  more: !_this.state.more
108
105
  });
109
106
  onHeightChange && onHeightChange(_this.calHeight(!_this.state.more));
110
107
  });
111
- _defineProperty(_assertThisInitialized(_this), "onChange", function (dictionary, key, value) {
108
+ _defineProperty(_this, "onChange", function (dictionary, key, value) {
112
109
  var _context2, _context3;
113
110
  var onChange = _this.props.onChange;
114
111
  if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !_includesInstanceProperty(_context2 = _mapInstanceProperty(_context3 = global.dictionary[dictionary]).call(_context3, function (item) {
@@ -123,20 +120,20 @@ var Search = /*#__PURE__*/function (_React$Component) {
123
120
  }
124
121
  onChange && onChange(key, value);
125
122
  });
126
- _defineProperty(_assertThisInitialized(_this), "onPressEnter", function () {
123
+ _defineProperty(_this, "onPressEnter", function () {
127
124
  ReactDOM.findDOMNode(_this.refs.search).click();
128
125
  });
129
- _defineProperty(_assertThisInitialized(_this), "toButton", function (key) {
126
+ _defineProperty(_this, "toButton", function (key) {
130
127
  var _context5;
131
128
  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
132
129
  var config = _this.props.config;
133
- var onClick = _bindInstanceProperty(_context5 = _this.onClick).call(_context5, _assertThisInitialized(_this), key);
130
+ var onClick = _bindInstanceProperty(_context5 = _this.onClick).call(_context5, _this, key);
134
131
  return /*#__PURE__*/React.createElement(_Button, _extends({
135
132
  size: defaultSize,
136
133
  onClick: onClick
137
134
  }, props), config[key]);
138
135
  });
139
- _defineProperty(_assertThisInitialized(_this), "toMore", function () {
136
+ _defineProperty(_this, "toMore", function () {
140
137
  return /*#__PURE__*/React.createElement("a", {
141
138
  role: "more",
142
139
  onClick: _this.onMore
@@ -145,7 +142,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
145
142
  "data-status": !_this.state.more ? 'down' : 'up'
146
143
  }));
147
144
  });
148
- _defineProperty(_assertThisInitialized(_this), "toButtons", function () {
145
+ _defineProperty(_this, "toButtons", function () {
149
146
  var config = _this.props.config;
150
147
  return /*#__PURE__*/React.createElement("div", {
151
148
  role: "buttons"
@@ -154,7 +151,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
154
151
  type: 'primary'
155
152
  }), config.reset ? _this.toButton('reset') : null, _this.isSort() ? _this.toButton('sort') : null, _this.isMore() ? _this.toMore() : null);
156
153
  });
157
- _defineProperty(_assertThisInitialized(_this), "isSort", function () {
154
+ _defineProperty(_this, "isSort", function () {
158
155
  var _this$props = _this.props,
159
156
  config = _this$props.config,
160
157
  _this$props$colNum = _this$props.colNum,
@@ -164,7 +161,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
164
161
  isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
165
162
  return isSort && _sortInstanceProperty(config) && filters.length > colNum;
166
163
  });
167
- _defineProperty(_assertThisInitialized(_this), "isMore", function () {
164
+ _defineProperty(_this, "isMore", function () {
168
165
  var _this$props2 = _this.props,
169
166
  config = _this$props2.config,
170
167
  _this$props2$colNum = _this$props2.colNum,
@@ -176,7 +173,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
176
173
  return !item.hide;
177
174
  }).length > colNum * displayRow;
178
175
  });
179
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (filter) {
176
+ _defineProperty(_this, "getOptions", function (filter) {
180
177
  var options = _this.props.options;
181
178
  if (options && _Array$isArray(options[filter.key])) {
182
179
  return options[filter.key];
@@ -184,10 +181,10 @@ var Search = /*#__PURE__*/function (_React$Component) {
184
181
  return filter.options || filter.typeRelated || [];
185
182
  }
186
183
  });
187
- _defineProperty(_assertThisInitialized(_this), "getContainer", function () {
184
+ _defineProperty(_this, "getContainer", function () {
188
185
  return _this.props.getContainer;
189
186
  });
190
- _defineProperty(_assertThisInitialized(_this), "getControlProps", function (control) {
187
+ _defineProperty(_this, "getControlProps", function (control) {
191
188
  var _context6;
192
189
  var _this$props$data = _this.props.data,
193
190
  data = _this$props$data === void 0 ? {} : _this$props$data;
@@ -195,10 +192,10 @@ var Search = /*#__PURE__*/function (_React$Component) {
195
192
  size: defaultSize,
196
193
  type: control.type,
197
194
  value: makeString(data[control.key]),
198
- onChange: _bindInstanceProperty(_context6 = _this.onChange).call(_context6, _assertThisInitialized(_this), control.dictionary, control.key)
195
+ onChange: _bindInstanceProperty(_context6 = _this.onChange).call(_context6, _this, control.dictionary, control.key)
199
196
  });
200
197
  });
201
- _defineProperty(_assertThisInitialized(_this), "validDate", function (_ref) {
198
+ _defineProperty(_this, "validDate", function (_ref) {
202
199
  var key = _ref.key,
203
200
  type = _ref.type;
204
201
  return function (date) {
@@ -217,16 +214,16 @@ var Search = /*#__PURE__*/function (_React$Component) {
217
214
  }
218
215
  };
219
216
  });
220
- _defineProperty(_assertThisInitialized(_this), "toText", function (props) {
217
+ _defineProperty(_this, "toText", function (props) {
221
218
  props.onPressEnter = _this.onPressEnter;
222
219
  return /*#__PURE__*/React.createElement(Control, props);
223
220
  });
224
- _defineProperty(_assertThisInitialized(_this), "toNumber", function (props) {
221
+ _defineProperty(_this, "toNumber", function (props) {
225
222
  props.defaultValue = props.value;
226
223
  delete props.value;
227
224
  return /*#__PURE__*/React.createElement(Control, props);
228
225
  });
229
- _defineProperty(_assertThisInitialized(_this), "getQueryGroupOptions", function (_ref2) {
226
+ _defineProperty(_this, "getQueryGroupOptions", function (_ref2) {
230
227
  var dictionary = _ref2.dictionary,
231
228
  _ref2$configCode = _ref2.configCode,
232
229
  configCode = _ref2$configCode === void 0 ? 'unknown' : _ref2$configCode;
@@ -247,14 +244,14 @@ var Search = /*#__PURE__*/function (_React$Component) {
247
244
  };
248
245
  }));
249
246
  });
250
- _defineProperty(_assertThisInitialized(_this), "toSelect", function (props, filter) {
247
+ _defineProperty(_this, "toSelect", function (props, filter) {
251
248
  var container = _this.getContainer();
252
249
  container && (props.getPopupContainer = container);
253
250
  props.options = filter.key === 'queryGroup' ? _this.getQueryGroupOptions(filter) : _this.getOptions(filter);
254
251
  props.dropdownMatchSelectWidth = false;
255
252
  return /*#__PURE__*/React.createElement(Control, props);
256
253
  });
257
- _defineProperty(_assertThisInitialized(_this), "createSearchEvent", function (filter) {
254
+ _defineProperty(_this, "createSearchEvent", function (filter) {
258
255
  if (_this.props.onSearch) {
259
256
  return function (value) {
260
257
  return _this.props.onSearch(filter.key, value, filter);
@@ -263,7 +260,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
263
260
  return null;
264
261
  }
265
262
  });
266
- _defineProperty(_assertThisInitialized(_this), "toSearch", function (props, filter) {
263
+ _defineProperty(_this, "toSearch", function (props, filter) {
267
264
  var container = _this.getContainer();
268
265
  container && (props.getPopupContainer = container);
269
266
  props.options = _this.getOptions(filter);
@@ -271,7 +268,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
271
268
  props.dropdownMatchSelectWidth = false;
272
269
  return /*#__PURE__*/React.createElement(Control, props);
273
270
  });
274
- _defineProperty(_assertThisInitialized(_this), "selectSearch", function (props, filter) {
271
+ _defineProperty(_this, "selectSearch", function (props, filter) {
275
272
  var container = _this.getContainer();
276
273
  container && (props.getPopupContainer = container);
277
274
  props.options = _this.getOptions(filter);
@@ -279,7 +276,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
279
276
  props.dropdownMatchSelectWidth = false;
280
277
  return /*#__PURE__*/React.createElement(Control, props);
281
278
  });
282
- _defineProperty(_assertThisInitialized(_this), "toDate", function (props, _ref4) {
279
+ _defineProperty(_this, "toDate", function (props, _ref4) {
283
280
  var rule = _ref4.rule;
284
281
  var container = _this.getContainer();
285
282
  container && (props.getCalendarContainer = container);
@@ -289,11 +286,11 @@ var Search = /*#__PURE__*/function (_React$Component) {
289
286
  };
290
287
  return /*#__PURE__*/React.createElement(Control, props);
291
288
  });
292
- _defineProperty(_assertThisInitialized(_this), "toReadonly", function (props, filter) {
289
+ _defineProperty(_this, "toReadonly", function (props, filter) {
293
290
  props.value = getTitle(props.value, _this.getOptions(filter));
294
291
  return /*#__PURE__*/React.createElement(Control, props);
295
292
  });
296
- _defineProperty(_assertThisInitialized(_this), "toCascader", function (props, filter) {
293
+ _defineProperty(_this, "toCascader", function (props, filter) {
297
294
  var container = _this.getContainer();
298
295
  container && (props.getPopupContainer = container);
299
296
  props.options = _this.getOptions(filter);
@@ -301,7 +298,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
301
298
  props.placeholder = filter.placeholder || '';
302
299
  return /*#__PURE__*/React.createElement(Control, props);
303
300
  });
304
- _defineProperty(_assertThisInitialized(_this), "toTreeSelect", function (props, filter) {
301
+ _defineProperty(_this, "toTreeSelect", function (props, filter) {
305
302
  var container = _this.getContainer();
306
303
  container && (props.getPopupContainer = container);
307
304
  props.options = _this.getOptions(filter);
@@ -309,7 +306,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
309
306
  props.placeholder = filter.placeholder || '';
310
307
  return /*#__PURE__*/React.createElement(Control, props);
311
308
  });
312
- _defineProperty(_assertThisInitialized(_this), "toControl", function (control) {
309
+ _defineProperty(_this, "toControl", function (control) {
313
310
  var props = _this.getControlProps(control);
314
311
  switch (control.type) {
315
312
  case 'text':
@@ -334,7 +331,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
334
331
  return 'type error';
335
332
  }
336
333
  });
337
- _defineProperty(_assertThisInitialized(_this), "toLabel", function (_ref5) {
334
+ _defineProperty(_this, "toLabel", function (_ref5) {
338
335
  var title = _ref5.title,
339
336
  key = _ref5.key,
340
337
  dictionary = _ref5.dictionary,
@@ -346,17 +343,17 @@ var Search = /*#__PURE__*/function (_React$Component) {
346
343
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
347
344
  role: "icon",
348
345
  type: "plus-circle-o",
349
- onClick: _bindInstanceProperty(_context7 = _this.onAddQueryGroup).call(_context7, _assertThisInitialized(_this), configCode, _this.props.data, dictionary)
346
+ onClick: _bindInstanceProperty(_context7 = _this.onAddQueryGroup).call(_context7, _this, configCode, _this.props.data, dictionary)
350
347
  }), /*#__PURE__*/React.createElement(_Icon, {
351
348
  role: "icon",
352
349
  type: "minus-circle-o",
353
- onClick: _bindInstanceProperty(_context8 = _this.onDelQueryGroup).call(_context8, _assertThisInitialized(_this), configCode, _this.props.data, dictionary)
350
+ onClick: _bindInstanceProperty(_context8 = _this.onDelQueryGroup).call(_context8, _this, configCode, _this.props.data, dictionary)
354
351
  }));
355
352
  } else {
356
353
  return title;
357
354
  }
358
355
  });
359
- _defineProperty(_assertThisInitialized(_this), "toCol", function (span, control, more) {
356
+ _defineProperty(_this, "toCol", function (span, control, more) {
360
357
  var factor = control.span || 1;
361
358
  return /*#__PURE__*/React.createElement(_Col, {
362
359
  span: span * factor,
@@ -371,7 +368,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
371
368
  required: control.required
372
369
  }, _this.toControl(control)));
373
370
  });
374
- _defineProperty(_assertThisInitialized(_this), "toCols", function () {
371
+ _defineProperty(_this, "toCols", function () {
375
372
  var _context9;
376
373
  var _this$props3 = _this.props,
377
374
  _this$props3$colNum = _this$props3.colNum,
@@ -388,7 +385,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
388
385
  return _this.toCol(span, control, index >= colNum * displayRow);
389
386
  });
390
387
  });
391
- _defineProperty(_assertThisInitialized(_this), "calWidth", function () {
388
+ _defineProperty(_this, "calWidth", function () {
392
389
  var _this$props4 = _this.props,
393
390
  _this$props4$colNum = _this$props4.colNum,
394
391
  colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
@@ -402,7 +399,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
402
399
  return "".concat(defaultColNum * 18, "%");
403
400
  }
404
401
  });
405
- _defineProperty(_assertThisInitialized(_this), "calHeight", function (more) {
402
+ _defineProperty(_this, "calHeight", function (more) {
406
403
  var _this$props5 = _this.props,
407
404
  _this$props5$colNum = _this$props5.colNum,
408
405
  colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
@@ -420,19 +417,20 @@ var Search = /*#__PURE__*/function (_React$Component) {
420
417
  });
421
418
  return _this;
422
419
  }
423
- _createClass(Search, [{
420
+ _inherits(Search, _React$Component);
421
+ return _createClass(Search, [{
424
422
  key: "onAddQueryGroup",
425
423
  value: function () {
426
- var _onAddQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(configCode, searchData, dictionary) {
424
+ var _onAddQueryGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(configCode, searchData, dictionary) {
427
425
  var onAddQueryGroup;
428
- return _regeneratorRuntime.wrap(function _callee$(_context10) {
429
- while (1) switch (_context10.prev = _context10.next) {
426
+ return _regeneratorRuntime.wrap(function (_context0) {
427
+ while (1) switch (_context0.prev = _context0.next) {
430
428
  case 0:
431
429
  onAddQueryGroup = this.props.onAddQueryGroup;
432
430
  onAddQueryGroup && onAddQueryGroup(configCode, searchData, dictionary);
433
- case 2:
431
+ case 1:
434
432
  case "end":
435
- return _context10.stop();
433
+ return _context0.stop();
436
434
  }
437
435
  }, _callee, this);
438
436
  }));
@@ -444,16 +442,16 @@ var Search = /*#__PURE__*/function (_React$Component) {
444
442
  }, {
445
443
  key: "onDelQueryGroup",
446
444
  value: function () {
447
- var _onDelQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
445
+ var _onDelQueryGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
448
446
  var onDelQueryGroup;
449
- return _regeneratorRuntime.wrap(function _callee2$(_context11) {
450
- while (1) switch (_context11.prev = _context11.next) {
447
+ return _regeneratorRuntime.wrap(function (_context1) {
448
+ while (1) switch (_context1.prev = _context1.next) {
451
449
  case 0:
452
450
  onDelQueryGroup = this.props.onDelQueryGroup;
453
451
  onDelQueryGroup && onDelQueryGroup(configCode, searchData, dictionary);
454
- case 2:
452
+ case 1:
455
453
  case "end":
456
- return _context11.stop();
454
+ return _context1.stop();
457
455
  }
458
456
  }, _callee2, this);
459
457
  }));
@@ -480,7 +478,6 @@ var Search = /*#__PURE__*/function (_React$Component) {
480
478
  }, this.toCols())), this.toButtons());
481
479
  }
482
480
  }]);
483
- return Search;
484
481
  }(React.Component);
485
482
  _defineProperty(Search, "propTypes", {
486
483
  config: PropTypes.shape(ConfigType).isRequired,