cloud-b2b 1.1.85 → 1.1.87
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 +48 -23
- package/es/CodeInput/CodeInput.js +16 -19
- package/es/Enhance/Dialogs.js +11 -14
- package/es/Enhance/Loading.js +15 -18
- package/es/Header/Header.js +17 -20
- package/es/Header/Vertical.js +11 -14
- package/es/ImageView/ImageView.js +10 -13
- package/es/InpurCascader/InputCascader.js +11 -14
- package/es/InputEditor/InputEditor.js +16 -18
- package/es/InputSearch/InputSearch.js +20 -23
- package/es/InputSelect/InputSelect.js +14 -17
- package/es/InputTreeSelect/InputTreeSelect.js +10 -13
- package/es/InputWriting/InputWriting.js +12 -15
- package/es/Layout/Layout.js +14 -17
- package/es/Link/Link.js +7 -10
- package/es/NumberInput/NumberInput.js +13 -16
- package/es/Search/Search.js +52 -55
- package/es/Search2/Search.js +83 -86
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +11 -14
- package/es/Sidebar2/Sidebar.js +13 -16
- package/es/SuperForm/SuperForm.js +74 -79
- package/es/SuperForm2/SuperForm.js +112 -114
- package/es/SuperPagination/SuperPagination.js +8 -11
- package/es/SuperTab/SuperTab.js +12 -15
- package/es/SuperTab2/SuperTab2.js +13 -16
- package/es/SuperTable/DragSortRow.js +12 -15
- package/es/SuperTable/FilterDropDown.js +11 -14
- package/es/SuperTable/SuperTable.js +139 -94
- package/es/SuperTable/SuperTable.less +11 -0
- package/es/SuperTable2/SuperTable2.js +89 -92
- package/es/SuperTable2/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +12 -15
- package/es/SuperUpload/SuperUpload.js +38 -38
- package/es/Viewer/ImageViews.js +16 -19
- package/es/Viewer/Viewer.js +11 -14
- package/es/helper.js +18 -17
- package/lib/Area/Area.js +49 -25
- package/lib/CodeInput/CodeInput.js +16 -19
- package/lib/Enhance/Dialogs.js +11 -14
- package/lib/Enhance/Loading.js +15 -18
- package/lib/Header/Header.js +17 -20
- package/lib/Header/Vertical.js +11 -14
- package/lib/ImageView/ImageView.js +10 -13
- package/lib/InpurCascader/InputCascader.js +11 -14
- package/lib/InputEditor/InputEditor.js +16 -18
- package/lib/InputSearch/InputSearch.js +20 -23
- package/lib/InputSelect/InputSelect.js +14 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
- package/lib/InputWriting/InputWriting.js +12 -15
- package/lib/Layout/Layout.js +14 -17
- package/lib/LayoutLink/LayoutLink.js +1 -2
- package/lib/Link/Link.js +7 -10
- package/lib/NumberInput/NumberInput.js +13 -16
- package/lib/Search/Search.js +53 -57
- package/lib/Search2/Search.js +84 -88
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +11 -14
- package/lib/Sidebar2/Sidebar.js +13 -16
- package/lib/SuperForm/SuperForm.js +75 -81
- package/lib/SuperForm2/SuperForm.js +113 -116
- package/lib/SuperPagination/SuperPagination.js +8 -11
- package/lib/SuperTab/SuperTab.js +12 -15
- package/lib/SuperTab2/SuperTab2.js +13 -16
- package/lib/SuperTable/DragSortRow.js +12 -15
- package/lib/SuperTable/FilterDropDown.js +11 -14
- package/lib/SuperTable/SuperTable.js +139 -94
- package/lib/SuperTable/SuperTable.less +11 -0
- package/lib/SuperTable2/SuperTable2.js +90 -94
- package/lib/SuperTable2/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +12 -15
- package/lib/SuperUpload/SuperUpload.js +39 -40
- package/lib/Viewer/ImageViews.js +16 -19
- package/lib/Viewer/Viewer.js +11 -14
- package/lib/helper.js +18 -17
- package/package.json +1 -1
package/es/Search/Search.js
CHANGED
|
@@ -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
|
|
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
|
|
35
|
-
function _isNativeReflectConstruct() {
|
|
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 =
|
|
97
|
-
_defineProperty(
|
|
93
|
+
_this = _callSuper(this, Search, _concatInstanceProperty(_context = []).call(_context, args));
|
|
94
|
+
_defineProperty(_this, "state", {
|
|
98
95
|
more: false
|
|
99
96
|
});
|
|
100
|
-
_defineProperty(
|
|
97
|
+
_defineProperty(_this, "onClick", function (key) {
|
|
101
98
|
var onClick = _this.props.onClick;
|
|
102
99
|
onClick && onClick(key);
|
|
103
100
|
});
|
|
104
|
-
_defineProperty(
|
|
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(
|
|
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(
|
|
123
|
+
_defineProperty(_this, "onPressEnter", function () {
|
|
127
124
|
ReactDOM.findDOMNode(_this.refs.search).click();
|
|
128
125
|
});
|
|
129
|
-
_defineProperty(
|
|
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,
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
184
|
+
_defineProperty(_this, "getContainer", function () {
|
|
188
185
|
return _this.props.getContainer;
|
|
189
186
|
});
|
|
190
|
-
_defineProperty(
|
|
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,
|
|
195
|
+
onChange: _bindInstanceProperty(_context6 = _this.onChange).call(_context6, _this, control.dictionary, control.key)
|
|
199
196
|
});
|
|
200
197
|
});
|
|
201
|
-
_defineProperty(
|
|
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(
|
|
217
|
+
_defineProperty(_this, "toText", function (props) {
|
|
221
218
|
props.onPressEnter = _this.onPressEnter;
|
|
222
219
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
223
220
|
});
|
|
224
|
-
_defineProperty(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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,
|
|
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,
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
420
|
+
_inherits(Search, _React$Component);
|
|
421
|
+
return _createClass(Search, [{
|
|
424
422
|
key: "onAddQueryGroup",
|
|
425
423
|
value: function () {
|
|
426
|
-
var _onAddQueryGroup = _asyncToGenerator(
|
|
424
|
+
var _onAddQueryGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(configCode, searchData, dictionary) {
|
|
427
425
|
var onAddQueryGroup;
|
|
428
|
-
return _regeneratorRuntime.wrap(function
|
|
429
|
-
while (1) switch (
|
|
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
|
|
431
|
+
case 1:
|
|
434
432
|
case "end":
|
|
435
|
-
return
|
|
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(
|
|
445
|
+
var _onDelQueryGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
|
|
448
446
|
var onDelQueryGroup;
|
|
449
|
-
return _regeneratorRuntime.wrap(function
|
|
450
|
-
while (1) switch (
|
|
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
|
|
452
|
+
case 1:
|
|
455
453
|
case "end":
|
|
456
|
-
return
|
|
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,
|