cloud-b2b 1.1.77 → 1.1.79
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 +13 -10
- 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 +23 -20
- 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 +86 -83
- 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 +114 -108
- 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 +73 -70
- package/es/SuperTable2/SuperTable2.js +92 -89
- 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 +68 -26
- package/es/SuperUpload/SuperUpload.js +63 -53
- 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 +13 -10
- 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 +23 -20
- 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 +88 -84
- 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 +116 -109
- 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 +73 -70
- package/lib/SuperTable2/SuperTable2.js +94 -90
- 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 +67 -26
- package/lib/SuperUpload/SuperUpload.js +65 -54
- 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/lib/Search/Search.js
CHANGED
|
@@ -34,9 +34,10 @@ var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
|
34
34
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
35
35
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
36
36
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
37
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
38
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
37
39
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
38
40
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
39
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
40
41
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
41
42
|
var _form = _interopRequireDefault(require("antd/lib/form"));
|
|
42
43
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -45,11 +46,12 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
45
46
|
var _Control = _interopRequireWildcard(require("../Control"));
|
|
46
47
|
var _helper = require("../helper");
|
|
47
48
|
var _variables = _interopRequireDefault(require("../variables"));
|
|
48
|
-
function
|
|
49
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
50
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
49
51
|
function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
50
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
51
|
-
function
|
|
52
|
-
function _isNativeReflectConstruct() {
|
|
52
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
53
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
54
|
+
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; } }
|
|
53
55
|
var FormItem = _form["default"].Item;
|
|
54
56
|
var defaultSize = 'small';
|
|
55
57
|
var defaultColNum = 4;
|
|
@@ -95,6 +97,8 @@ var FilterType = {
|
|
|
95
97
|
* displayRow:折叠时需要展示的行数,整数,默认为1
|
|
96
98
|
*/
|
|
97
99
|
var Search = /*#__PURE__*/function (_React$Component) {
|
|
100
|
+
(0, _inherits2["default"])(Search, _React$Component);
|
|
101
|
+
var _super = _createSuper(Search);
|
|
98
102
|
function Search() {
|
|
99
103
|
var _context;
|
|
100
104
|
var _this;
|
|
@@ -102,22 +106,22 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
102
106
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
103
107
|
args[_key] = arguments[_key];
|
|
104
108
|
}
|
|
105
|
-
_this =
|
|
106
|
-
(0, _defineProperty2["default"])(_this, "state", {
|
|
109
|
+
_this = _super.call.apply(_super, (0, _concat["default"])(_context = [this]).call(_context, args));
|
|
110
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
107
111
|
more: false
|
|
108
112
|
});
|
|
109
|
-
(0, _defineProperty2["default"])(_this, "onClick", function (key) {
|
|
113
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onClick", function (key) {
|
|
110
114
|
var onClick = _this.props.onClick;
|
|
111
115
|
onClick && onClick(key);
|
|
112
116
|
});
|
|
113
|
-
(0, _defineProperty2["default"])(_this, "onMore", function () {
|
|
117
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onMore", function () {
|
|
114
118
|
var onHeightChange = _this.props.onHeightChange;
|
|
115
119
|
_this.setState({
|
|
116
120
|
more: !_this.state.more
|
|
117
121
|
});
|
|
118
122
|
onHeightChange && onHeightChange(_this.calHeight(!_this.state.more));
|
|
119
123
|
});
|
|
120
|
-
(0, _defineProperty2["default"])(_this, "onChange", function (dictionary, key, value) {
|
|
124
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (dictionary, key, value) {
|
|
121
125
|
var _context2, _context3;
|
|
122
126
|
var onChange = _this.props.onChange;
|
|
123
127
|
if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !(0, _includes["default"])(_context2 = (0, _map["default"])(_context3 = global.dictionary[dictionary]).call(_context3, function (item) {
|
|
@@ -132,20 +136,20 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
132
136
|
}
|
|
133
137
|
onChange && onChange(key, value);
|
|
134
138
|
});
|
|
135
|
-
(0, _defineProperty2["default"])(_this, "onPressEnter", function () {
|
|
139
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onPressEnter", function () {
|
|
136
140
|
_reactDom["default"].findDOMNode(_this.refs.search).click();
|
|
137
141
|
});
|
|
138
|
-
(0, _defineProperty2["default"])(_this, "toButton", function (key) {
|
|
142
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toButton", function (key) {
|
|
139
143
|
var _context5;
|
|
140
144
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
141
145
|
var config = _this.props.config;
|
|
142
|
-
var onClick = (0, _bind["default"])(_context5 = _this.onClick).call(_context5, _this, key);
|
|
146
|
+
var onClick = (0, _bind["default"])(_context5 = _this.onClick).call(_context5, (0, _assertThisInitialized2["default"])(_this), key);
|
|
143
147
|
return /*#__PURE__*/_react["default"].createElement(_button["default"], (0, _extends2["default"])({
|
|
144
148
|
size: defaultSize,
|
|
145
149
|
onClick: onClick
|
|
146
150
|
}, props), config[key]);
|
|
147
151
|
});
|
|
148
|
-
(0, _defineProperty2["default"])(_this, "toMore", function () {
|
|
152
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toMore", function () {
|
|
149
153
|
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
150
154
|
role: "more",
|
|
151
155
|
onClick: _this.onMore
|
|
@@ -154,7 +158,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
154
158
|
"data-status": !_this.state.more ? 'down' : 'up'
|
|
155
159
|
}));
|
|
156
160
|
});
|
|
157
|
-
(0, _defineProperty2["default"])(_this, "toButtons", function () {
|
|
161
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toButtons", function () {
|
|
158
162
|
var config = _this.props.config;
|
|
159
163
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
160
164
|
role: "buttons"
|
|
@@ -163,7 +167,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
163
167
|
type: 'primary'
|
|
164
168
|
}), config.reset ? _this.toButton('reset') : null, _this.isSort() ? _this.toButton('sort') : null, _this.isMore() ? _this.toMore() : null);
|
|
165
169
|
});
|
|
166
|
-
(0, _defineProperty2["default"])(_this, "isSort", function () {
|
|
170
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isSort", function () {
|
|
167
171
|
var _this$props = _this.props,
|
|
168
172
|
config = _this$props.config,
|
|
169
173
|
_this$props$colNum = _this$props.colNum,
|
|
@@ -173,7 +177,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
173
177
|
isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
|
|
174
178
|
return isSort && (0, _sort["default"])(config) && filters.length > colNum;
|
|
175
179
|
});
|
|
176
|
-
(0, _defineProperty2["default"])(_this, "isMore", function () {
|
|
180
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isMore", function () {
|
|
177
181
|
var _this$props2 = _this.props,
|
|
178
182
|
config = _this$props2.config,
|
|
179
183
|
_this$props2$colNum = _this$props2.colNum,
|
|
@@ -185,7 +189,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
185
189
|
return !item.hide;
|
|
186
190
|
}).length > colNum * displayRow;
|
|
187
191
|
});
|
|
188
|
-
(0, _defineProperty2["default"])(_this, "getOptions", function (filter) {
|
|
192
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getOptions", function (filter) {
|
|
189
193
|
var options = _this.props.options;
|
|
190
194
|
if (options && (0, _isArray["default"])(options[filter.key])) {
|
|
191
195
|
return options[filter.key];
|
|
@@ -193,10 +197,10 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
193
197
|
return filter.options || filter.typeRelated || [];
|
|
194
198
|
}
|
|
195
199
|
});
|
|
196
|
-
(0, _defineProperty2["default"])(_this, "getContainer", function () {
|
|
200
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getContainer", function () {
|
|
197
201
|
return _this.props.getContainer;
|
|
198
202
|
});
|
|
199
|
-
(0, _defineProperty2["default"])(_this, "getControlProps", function (control) {
|
|
203
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getControlProps", function (control) {
|
|
200
204
|
var _context6;
|
|
201
205
|
var _this$props$data = _this.props.data,
|
|
202
206
|
data = _this$props$data === void 0 ? {} : _this$props$data;
|
|
@@ -204,10 +208,10 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
204
208
|
size: defaultSize,
|
|
205
209
|
type: control.type,
|
|
206
210
|
value: (0, _Control.makeString)(data[control.key]),
|
|
207
|
-
onChange: (0, _bind["default"])(_context6 = _this.onChange).call(_context6, _this, control.dictionary, control.key)
|
|
211
|
+
onChange: (0, _bind["default"])(_context6 = _this.onChange).call(_context6, (0, _assertThisInitialized2["default"])(_this), control.dictionary, control.key)
|
|
208
212
|
});
|
|
209
213
|
});
|
|
210
|
-
(0, _defineProperty2["default"])(_this, "validDate", function (_ref) {
|
|
214
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "validDate", function (_ref) {
|
|
211
215
|
var key = _ref.key,
|
|
212
216
|
type = _ref.type;
|
|
213
217
|
return function (date) {
|
|
@@ -226,16 +230,16 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
226
230
|
}
|
|
227
231
|
};
|
|
228
232
|
});
|
|
229
|
-
(0, _defineProperty2["default"])(_this, "toText", function (props) {
|
|
233
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toText", function (props) {
|
|
230
234
|
props.onPressEnter = _this.onPressEnter;
|
|
231
235
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
232
236
|
});
|
|
233
|
-
(0, _defineProperty2["default"])(_this, "toNumber", function (props) {
|
|
237
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toNumber", function (props) {
|
|
234
238
|
props.defaultValue = props.value;
|
|
235
239
|
delete props.value;
|
|
236
240
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
237
241
|
});
|
|
238
|
-
(0, _defineProperty2["default"])(_this, "getQueryGroupOptions", function (_ref2) {
|
|
242
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getQueryGroupOptions", function (_ref2) {
|
|
239
243
|
var dictionary = _ref2.dictionary,
|
|
240
244
|
_ref2$configCode = _ref2.configCode,
|
|
241
245
|
configCode = _ref2$configCode === void 0 ? 'unknown' : _ref2$configCode;
|
|
@@ -256,14 +260,14 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
256
260
|
};
|
|
257
261
|
}));
|
|
258
262
|
});
|
|
259
|
-
(0, _defineProperty2["default"])(_this, "toSelect", function (props, filter) {
|
|
263
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toSelect", function (props, filter) {
|
|
260
264
|
var container = _this.getContainer();
|
|
261
265
|
container && (props.getPopupContainer = container);
|
|
262
266
|
props.options = filter.key === 'queryGroup' ? _this.getQueryGroupOptions(filter) : _this.getOptions(filter);
|
|
263
267
|
props.dropdownMatchSelectWidth = false;
|
|
264
268
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
265
269
|
});
|
|
266
|
-
(0, _defineProperty2["default"])(_this, "createSearchEvent", function (filter) {
|
|
270
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "createSearchEvent", function (filter) {
|
|
267
271
|
if (_this.props.onSearch) {
|
|
268
272
|
return function (value) {
|
|
269
273
|
return _this.props.onSearch(filter.key, value, filter);
|
|
@@ -272,7 +276,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
272
276
|
return null;
|
|
273
277
|
}
|
|
274
278
|
});
|
|
275
|
-
(0, _defineProperty2["default"])(_this, "toSearch", function (props, filter) {
|
|
279
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toSearch", function (props, filter) {
|
|
276
280
|
var container = _this.getContainer();
|
|
277
281
|
container && (props.getPopupContainer = container);
|
|
278
282
|
props.options = _this.getOptions(filter);
|
|
@@ -280,7 +284,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
280
284
|
props.dropdownMatchSelectWidth = false;
|
|
281
285
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
282
286
|
});
|
|
283
|
-
(0, _defineProperty2["default"])(_this, "selectSearch", function (props, filter) {
|
|
287
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "selectSearch", function (props, filter) {
|
|
284
288
|
var container = _this.getContainer();
|
|
285
289
|
container && (props.getPopupContainer = container);
|
|
286
290
|
props.options = _this.getOptions(filter);
|
|
@@ -288,7 +292,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
288
292
|
props.dropdownMatchSelectWidth = false;
|
|
289
293
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
290
294
|
});
|
|
291
|
-
(0, _defineProperty2["default"])(_this, "toDate", function (props, _ref4) {
|
|
295
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toDate", function (props, _ref4) {
|
|
292
296
|
var rule = _ref4.rule;
|
|
293
297
|
var container = _this.getContainer();
|
|
294
298
|
container && (props.getCalendarContainer = container);
|
|
@@ -298,11 +302,11 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
298
302
|
};
|
|
299
303
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
300
304
|
});
|
|
301
|
-
(0, _defineProperty2["default"])(_this, "toReadonly", function (props, filter) {
|
|
305
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toReadonly", function (props, filter) {
|
|
302
306
|
props.value = (0, _Control.getTitle)(props.value, _this.getOptions(filter));
|
|
303
307
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
304
308
|
});
|
|
305
|
-
(0, _defineProperty2["default"])(_this, "toCascader", function (props, filter) {
|
|
309
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toCascader", function (props, filter) {
|
|
306
310
|
var container = _this.getContainer();
|
|
307
311
|
container && (props.getPopupContainer = container);
|
|
308
312
|
props.options = _this.getOptions(filter);
|
|
@@ -310,7 +314,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
310
314
|
props.placeholder = filter.placeholder || '';
|
|
311
315
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
312
316
|
});
|
|
313
|
-
(0, _defineProperty2["default"])(_this, "toTreeSelect", function (props, filter) {
|
|
317
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toTreeSelect", function (props, filter) {
|
|
314
318
|
var container = _this.getContainer();
|
|
315
319
|
container && (props.getPopupContainer = container);
|
|
316
320
|
props.options = _this.getOptions(filter);
|
|
@@ -318,7 +322,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
318
322
|
props.placeholder = filter.placeholder || '';
|
|
319
323
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
320
324
|
});
|
|
321
|
-
(0, _defineProperty2["default"])(_this, "toControl", function (control) {
|
|
325
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toControl", function (control) {
|
|
322
326
|
var props = _this.getControlProps(control);
|
|
323
327
|
switch (control.type) {
|
|
324
328
|
case 'text':
|
|
@@ -343,7 +347,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
343
347
|
return 'type error';
|
|
344
348
|
}
|
|
345
349
|
});
|
|
346
|
-
(0, _defineProperty2["default"])(_this, "toLabel", function (_ref5) {
|
|
350
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toLabel", function (_ref5) {
|
|
347
351
|
var title = _ref5.title,
|
|
348
352
|
key = _ref5.key,
|
|
349
353
|
dictionary = _ref5.dictionary,
|
|
@@ -355,17 +359,17 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
355
359
|
return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
356
360
|
role: "icon",
|
|
357
361
|
type: "plus-circle-o",
|
|
358
|
-
onClick: (0, _bind["default"])(_context7 = _this.onAddQueryGroup).call(_context7, _this, configCode, _this.props.data, dictionary)
|
|
362
|
+
onClick: (0, _bind["default"])(_context7 = _this.onAddQueryGroup).call(_context7, (0, _assertThisInitialized2["default"])(_this), configCode, _this.props.data, dictionary)
|
|
359
363
|
}), /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
360
364
|
role: "icon",
|
|
361
365
|
type: "minus-circle-o",
|
|
362
|
-
onClick: (0, _bind["default"])(_context8 = _this.onDelQueryGroup).call(_context8, _this, configCode, _this.props.data, dictionary)
|
|
366
|
+
onClick: (0, _bind["default"])(_context8 = _this.onDelQueryGroup).call(_context8, (0, _assertThisInitialized2["default"])(_this), configCode, _this.props.data, dictionary)
|
|
363
367
|
}));
|
|
364
368
|
} else {
|
|
365
369
|
return title;
|
|
366
370
|
}
|
|
367
371
|
});
|
|
368
|
-
(0, _defineProperty2["default"])(_this, "toCol", function (span, control, more) {
|
|
372
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toCol", function (span, control, more) {
|
|
369
373
|
var factor = control.span || 1;
|
|
370
374
|
return /*#__PURE__*/_react["default"].createElement(_col["default"], {
|
|
371
375
|
span: span * factor,
|
|
@@ -380,7 +384,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
380
384
|
required: control.required
|
|
381
385
|
}, _this.toControl(control)));
|
|
382
386
|
});
|
|
383
|
-
(0, _defineProperty2["default"])(_this, "toCols", function () {
|
|
387
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toCols", function () {
|
|
384
388
|
var _context9;
|
|
385
389
|
var _this$props3 = _this.props,
|
|
386
390
|
_this$props3$colNum = _this$props3.colNum,
|
|
@@ -397,7 +401,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
397
401
|
return _this.toCol(span, control, index >= colNum * displayRow);
|
|
398
402
|
});
|
|
399
403
|
});
|
|
400
|
-
(0, _defineProperty2["default"])(_this, "calWidth", function () {
|
|
404
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "calWidth", function () {
|
|
401
405
|
var _this$props4 = _this.props,
|
|
402
406
|
_this$props4$colNum = _this$props4.colNum,
|
|
403
407
|
colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
|
|
@@ -411,7 +415,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
411
415
|
return "".concat(defaultColNum * 18, "%");
|
|
412
416
|
}
|
|
413
417
|
});
|
|
414
|
-
(0, _defineProperty2["default"])(_this, "calHeight", function (more) {
|
|
418
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "calHeight", function (more) {
|
|
415
419
|
var _this$props5 = _this.props,
|
|
416
420
|
_this$props5$colNum = _this$props5.colNum,
|
|
417
421
|
colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
|
|
@@ -429,20 +433,19 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
429
433
|
});
|
|
430
434
|
return _this;
|
|
431
435
|
}
|
|
432
|
-
(0,
|
|
433
|
-
return (0, _createClass2["default"])(Search, [{
|
|
436
|
+
(0, _createClass2["default"])(Search, [{
|
|
434
437
|
key: "onAddQueryGroup",
|
|
435
438
|
value: function () {
|
|
436
|
-
var _onAddQueryGroup = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(configCode, searchData, dictionary) {
|
|
439
|
+
var _onAddQueryGroup = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(configCode, searchData, dictionary) {
|
|
437
440
|
var onAddQueryGroup;
|
|
438
|
-
return _regenerator["default"].wrap(function (
|
|
439
|
-
while (1) switch (
|
|
441
|
+
return _regenerator["default"].wrap(function _callee$(_context10) {
|
|
442
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
440
443
|
case 0:
|
|
441
444
|
onAddQueryGroup = this.props.onAddQueryGroup;
|
|
442
445
|
onAddQueryGroup && onAddQueryGroup(configCode, searchData, dictionary);
|
|
443
|
-
case
|
|
446
|
+
case 2:
|
|
444
447
|
case "end":
|
|
445
|
-
return
|
|
448
|
+
return _context10.stop();
|
|
446
449
|
}
|
|
447
450
|
}, _callee, this);
|
|
448
451
|
}));
|
|
@@ -454,16 +457,16 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
454
457
|
}, {
|
|
455
458
|
key: "onDelQueryGroup",
|
|
456
459
|
value: function () {
|
|
457
|
-
var _onDelQueryGroup = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(configCode, searchData, dictionary) {
|
|
460
|
+
var _onDelQueryGroup = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(configCode, searchData, dictionary) {
|
|
458
461
|
var onDelQueryGroup;
|
|
459
|
-
return _regenerator["default"].wrap(function (
|
|
460
|
-
while (1) switch (
|
|
462
|
+
return _regenerator["default"].wrap(function _callee2$(_context11) {
|
|
463
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
461
464
|
case 0:
|
|
462
465
|
onDelQueryGroup = this.props.onDelQueryGroup;
|
|
463
466
|
onDelQueryGroup && onDelQueryGroup(configCode, searchData, dictionary);
|
|
464
|
-
case
|
|
467
|
+
case 2:
|
|
465
468
|
case "end":
|
|
466
|
-
return
|
|
469
|
+
return _context11.stop();
|
|
467
470
|
}
|
|
468
471
|
}, _callee2, this);
|
|
469
472
|
}));
|
|
@@ -490,6 +493,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
490
493
|
}, this.toCols())), this.toButtons());
|
|
491
494
|
}
|
|
492
495
|
}]);
|
|
496
|
+
return Search;
|
|
493
497
|
}(_react["default"].Component);
|
|
494
498
|
(0, _defineProperty2["default"])(Search, "propTypes", {
|
|
495
499
|
config: _propTypes["default"].shape(ConfigType).isRequired,
|