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