cloud-b2b 1.1.50 → 1.1.51
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/package.json +44 -22
- package/src/Area/Area.js +94 -0
- package/src/Card/Card.js +16 -0
- package/src/CodeInput/CodeInput.js +76 -0
- package/src/Control/Control.js +338 -0
- package/src/Control/event.js +45 -0
- package/src/Enhance/Dialogs.js +24 -0
- package/src/Enhance/Loading.js +83 -0
- package/{es → src}/Enhance/index.js +8 -8
- package/src/Header/Header.js +149 -0
- package/src/Header/Vertical.js +74 -0
- package/src/ImageView/ImageView.js +62 -0
- package/src/Indent/Indent.js +12 -0
- package/src/InpurCascader/InputCascader.js +83 -0
- package/src/InputEditor/InputEditor.js +93 -0
- package/src/InputSearch/InputSearch.js +186 -0
- package/src/InputSelect/InputSelect.js +103 -0
- package/src/InputTreeSelect/InputTreeSelect.js +87 -0
- package/src/InputWriting/InputWriting.js +65 -0
- package/src/Layout/Layout.js +121 -0
- package/src/LayoutLink/LayoutLink.js +59 -0
- package/src/Link/Link.js +57 -0
- package/src/Loading/Loading.js +15 -0
- package/src/Loading2/Loading2.js +15 -0
- package/src/ModalWithDrag/ModalWithDrag.js +17 -0
- package/src/ModalWithDrag/drag.js +128 -0
- package/src/NumberInput/NumberInput.js +137 -0
- package/src/Search/Search.js +368 -0
- package/src/Sidebar/Sidebar.js +111 -0
- package/src/Sidebar2/Sidebar.js +143 -0
- package/src/SuperForm/SuperForm.js +516 -0
- package/src/SuperForm2/SuperForm.js +588 -0
- package/src/SuperIcon/SuperIcon.js +14 -0
- package/src/SuperPagination/SuperPagination.js +65 -0
- package/src/SuperTab/SuperTab.js +84 -0
- package/src/SuperTab2/SuperTab2.js +94 -0
- package/src/SuperTable/DragSortRow.js +62 -0
- package/src/SuperTable/FilterDropDown.js +111 -0
- package/src/SuperTable/SuperTable.js +590 -0
- package/src/SuperTable/fixed.js +34 -0
- package/src/SuperTable2/SuperTable2.js +600 -0
- package/src/SuperTable2/SuperTableCell.js +144 -0
- package/src/SuperTable3/FilterDropDown.js +111 -0
- package/src/SuperTable3/SuperTable.js +498 -0
- package/src/SuperTable3/fixed.js +34 -0
- package/src/SuperToolbar/SuperToolbar.js +128 -0
- package/src/SuperUpload/SuperUpload.js +137 -0
- package/src/Title/Title.js +18 -0
- package/src/Viewer/ImageViews.js +220 -0
- package/src/Viewer/Viewer.js +97 -0
- package/src/WingBlank/WingBlank.js +14 -0
- package/src/helper.js +185 -0
- package/src/history.js +6 -0
- package/src/index.js +38 -0
- package/src/variables.js +5 -0
- package/test/index.html +10 -0
- package/test/test.js +16 -0
- package/test/test.less +12 -0
- package/test/webpack.config.js +71 -0
- package/tools/babel.config.js +14 -0
- package/tools/build.js +70 -0
- package/tools/publish.js +9 -0
- package/tools/util.js +53 -0
- package/es/Area/Area.js +0 -170
- package/es/Card/Card.js +0 -20
- package/es/CodeInput/CodeInput.js +0 -152
- package/es/Control/Control.js +0 -496
- package/es/Control/event.js +0 -57
- package/es/Enhance/Dialogs.js +0 -67
- package/es/Enhance/Loading.js +0 -151
- package/es/Header/Header.js +0 -194
- package/es/Header/Vertical.js +0 -129
- package/es/ImageView/ImageView.js +0 -117
- package/es/Indent/Indent.js +0 -23
- package/es/InpurCascader/InputCascader.js +0 -135
- package/es/InputEditor/InputEditor.js +0 -113
- package/es/InputSearch/InputSearch.js +0 -311
- package/es/InputSelect/InputSelect.js +0 -191
- package/es/InputTreeSelect/InputTreeSelect.js +0 -147
- package/es/InputWriting/InputWriting.js +0 -107
- package/es/Layout/Layout.js +0 -232
- package/es/LayoutLink/LayoutLink.js +0 -82
- package/es/Link/Link.js +0 -108
- package/es/Loading/Loading.js +0 -15
- package/es/Loading2/Loading2.js +0 -11
- package/es/ModalWithDrag/ModalWithDrag.js +0 -34
- package/es/ModalWithDrag/drag.js +0 -133
- package/es/NumberInput/NumberInput.js +0 -240
- package/es/Search/Search.js +0 -595
- package/es/Sidebar/Sidebar.js +0 -165
- package/es/Sidebar2/Sidebar.js +0 -192
- package/es/SuperForm/SuperForm.js +0 -720
- package/es/SuperForm2/SuperForm.js +0 -828
- package/es/SuperIcon/SuperIcon.js +0 -30
- package/es/SuperPagination/SuperPagination.js +0 -126
- package/es/SuperTab/SuperTab.js +0 -130
- package/es/SuperTab2/SuperTab2.js +0 -167
- package/es/SuperTable/DragSortRow.js +0 -125
- package/es/SuperTable/FilterDropDown.js +0 -188
- package/es/SuperTable/SuperTable.js +0 -940
- package/es/SuperTable/fixed.js +0 -42
- package/es/SuperTable2/SuperTable2.js +0 -1019
- package/es/SuperTable2/SuperTableCell.js +0 -242
- package/es/SuperTable3/FilterDropDown.js +0 -188
- package/es/SuperTable3/SuperTable.js +0 -790
- package/es/SuperTable3/fixed.js +0 -42
- package/es/SuperToolbar/SuperToolbar.js +0 -223
- package/es/SuperUpload/SuperUpload.js +0 -434
- package/es/Title/Title.js +0 -36
- package/es/Viewer/ImageViews.js +0 -311
- package/es/Viewer/Viewer.js +0 -149
- package/es/WingBlank/WingBlank.js +0 -20
- package/es/helper.js +0 -169
- package/es/history.js +0 -5
- package/es/index.js +0 -37
- package/es/variables.js +0 -4
- package/lib/Area/Area.js +0 -198
- package/lib/Area/package.json +0 -6
- package/lib/Card/Card.js +0 -38
- package/lib/Card/package.json +0 -6
- package/lib/CodeInput/CodeInput.js +0 -179
- package/lib/CodeInput/package.json +0 -6
- package/lib/Control/Control.js +0 -548
- package/lib/Control/event.js +0 -68
- package/lib/Control/package.json +0 -6
- package/lib/Enhance/Dialogs.js +0 -87
- package/lib/Enhance/Loading.js +0 -175
- package/lib/Enhance/index.js +0 -35
- package/lib/Enhance/package.json +0 -6
- package/lib/Header/Header.js +0 -215
- package/lib/Header/Header.less +0 -95
- package/lib/Header/Vertical.js +0 -150
- package/lib/Header/Vertical.less +0 -60
- package/lib/Header/package.json +0 -6
- package/lib/ImageView/ImageView.js +0 -134
- package/lib/ImageView/ImageView.less +0 -14
- package/lib/ImageView/package.json +0 -6
- package/lib/Indent/Indent.js +0 -38
- package/lib/Indent/package.json +0 -6
- package/lib/InpurCascader/InputCascader.js +0 -156
- package/lib/InpurCascader/package.json +0 -6
- package/lib/InputEditor/InputEditor.js +0 -131
- package/lib/InputEditor/inputEditor.less +0 -8
- package/lib/InputEditor/package.json +0 -6
- package/lib/InputSearch/InputSearch.js +0 -327
- package/lib/InputSearch/package.json +0 -6
- package/lib/InputSelect/InputSelect.js +0 -214
- package/lib/InputSelect/package.json +0 -6
- package/lib/InputTreeSelect/InputTreeSelect.js +0 -169
- package/lib/InputTreeSelect/package.json +0 -6
- package/lib/InputWriting/InputWriting.js +0 -123
- package/lib/InputWriting/package.json +0 -6
- package/lib/Layout/Layout.js +0 -258
- package/lib/Layout/Layout.less +0 -28
- package/lib/Layout/package.json +0 -6
- package/lib/LayoutLink/LayoutLink.js +0 -114
- package/lib/LayoutLink/LayoutLink.less +0 -53
- package/lib/LayoutLink/package.json +0 -6
- package/lib/Link/Link.js +0 -130
- package/lib/Link/package.json +0 -6
- package/lib/Loading/Loading.js +0 -30
- package/lib/Loading/Loading.less +0 -13
- package/lib/Loading/package.json +0 -6
- package/lib/Loading2/Loading2.js +0 -26
- package/lib/Loading2/Loading2.less +0 -19
- package/lib/Loading2/package.json +0 -6
- package/lib/ModalWithDrag/ModalWithDrag.js +0 -53
- package/lib/ModalWithDrag/ModalWithDrag.less +0 -6
- package/lib/ModalWithDrag/drag.js +0 -147
- package/lib/ModalWithDrag/package.json +0 -6
- package/lib/NumberInput/NumberInput.js +0 -262
- package/lib/NumberInput/package.json +0 -6
- package/lib/Search/Search.js +0 -616
- package/lib/Search/Search.less +0 -63
- package/lib/Search/package.json +0 -6
- package/lib/Sidebar/Sidebar.js +0 -186
- package/lib/Sidebar/Sidebar.less +0 -78
- package/lib/Sidebar/package.json +0 -6
- package/lib/Sidebar2/Sidebar.js +0 -213
- package/lib/Sidebar2/Sidebar.less +0 -153
- package/lib/Sidebar2/package.json +0 -6
- package/lib/SuperForm/SuperForm.js +0 -731
- package/lib/SuperForm/SuperForm.less +0 -52
- package/lib/SuperForm/package.json +0 -6
- package/lib/SuperForm2/SuperForm.js +0 -834
- package/lib/SuperForm2/SuperForm.less +0 -52
- package/lib/SuperForm2/package.json +0 -6
- package/lib/SuperIcon/SuperIcon.js +0 -47
- package/lib/SuperIcon/package.json +0 -6
- package/lib/SuperPagination/SuperPagination.js +0 -145
- package/lib/SuperPagination/package.json +0 -6
- package/lib/SuperTab/SuperTab.js +0 -146
- package/lib/SuperTab/SuperTab.less +0 -43
- package/lib/SuperTab/package.json +0 -6
- package/lib/SuperTab2/SuperTab2.js +0 -191
- package/lib/SuperTab2/SuperTab2.less +0 -18
- package/lib/SuperTab2/package.json +0 -6
- package/lib/SuperTable/DragSortRow.js +0 -142
- package/lib/SuperTable/DragSortRow.less +0 -17
- package/lib/SuperTable/FilterDropDown.js +0 -205
- package/lib/SuperTable/FilterDropDown.less +0 -30
- package/lib/SuperTable/SuperTable.js +0 -945
- package/lib/SuperTable/SuperTable.less +0 -132
- package/lib/SuperTable/fixed.js +0 -55
- package/lib/SuperTable/package.json +0 -6
- package/lib/SuperTable2/SuperTable2.js +0 -1047
- package/lib/SuperTable2/SuperTable2.less +0 -118
- package/lib/SuperTable2/SuperTableCell.js +0 -258
- package/lib/SuperTable2/package.json +0 -6
- package/lib/SuperTable3/FilterDropDown.js +0 -205
- package/lib/SuperTable3/FilterDropDown.less +0 -29
- package/lib/SuperTable3/SuperTable.js +0 -795
- package/lib/SuperTable3/SuperTable.less +0 -99
- package/lib/SuperTable3/fixed.js +0 -55
- package/lib/SuperTable3/package.json +0 -6
- package/lib/SuperToolbar/SuperToolbar.js +0 -248
- package/lib/SuperToolbar/SuperToolbar.less +0 -17
- package/lib/SuperToolbar/package.json +0 -6
- package/lib/SuperUpload/SuperUpload.js +0 -481
- package/lib/SuperUpload/SuperUpload.less +0 -28
- package/lib/SuperUpload/package.json +0 -6
- package/lib/Title/Title.js +0 -54
- package/lib/Title/Title.less +0 -35
- package/lib/Title/package.json +0 -6
- package/lib/Viewer/ImageViews.js +0 -323
- package/lib/Viewer/Viewer.js +0 -167
- package/lib/Viewer/Viewer.less +0 -67
- package/lib/Viewer/imgView.less +0 -59
- package/lib/Viewer/package.json +0 -7
- package/lib/WingBlank/WingBlank.js +0 -37
- package/lib/WingBlank/WingBlank.less +0 -12
- package/lib/WingBlank/package.json +0 -6
- package/lib/adjust.less +0 -89
- package/lib/helper.js +0 -204
- package/lib/history.js +0 -18
- package/lib/index.js +0 -347
- package/lib/index.less +0 -31
- package/lib/style.less +0 -30
- package/lib/variables.js +0 -16
- package/lib/variables.less +0 -73
- /package/{es → src}/Area/package.json +0 -0
- /package/{es → src}/Card/package.json +0 -0
- /package/{es → src}/CodeInput/package.json +0 -0
- /package/{es → src}/Control/package.json +0 -0
- /package/{es → src}/Enhance/package.json +0 -0
- /package/{es → src}/Header/Header.less +0 -0
- /package/{es → src}/Header/Vertical.less +0 -0
- /package/{es → src}/Header/package.json +0 -0
- /package/{es → src}/ImageView/ImageView.less +0 -0
- /package/{es → src}/ImageView/package.json +0 -0
- /package/{es → src}/Indent/package.json +0 -0
- /package/{es → src}/InpurCascader/package.json +0 -0
- /package/{es → src}/InputEditor/inputEditor.less +0 -0
- /package/{es → src}/InputEditor/package.json +0 -0
- /package/{es → src}/InputSearch/package.json +0 -0
- /package/{es → src}/InputSelect/package.json +0 -0
- /package/{es → src}/InputTreeSelect/package.json +0 -0
- /package/{es → src}/InputWriting/package.json +0 -0
- /package/{es → src}/Layout/Layout.less +0 -0
- /package/{es → src}/Layout/package.json +0 -0
- /package/{es → src}/LayoutLink/LayoutLink.less +0 -0
- /package/{es → src}/LayoutLink/package.json +0 -0
- /package/{es → src}/Link/package.json +0 -0
- /package/{es → src}/Loading/Loading.less +0 -0
- /package/{es → src}/Loading/package.json +0 -0
- /package/{es → src}/Loading2/Loading2.less +0 -0
- /package/{es → src}/Loading2/package.json +0 -0
- /package/{es → src}/ModalWithDrag/ModalWithDrag.less +0 -0
- /package/{es → src}/ModalWithDrag/package.json +0 -0
- /package/{es → src}/NumberInput/package.json +0 -0
- /package/{es → src}/Search/Search.less +0 -0
- /package/{es → src}/Search/package.json +0 -0
- /package/{es → src}/Sidebar/Sidebar.less +0 -0
- /package/{es → src}/Sidebar/package.json +0 -0
- /package/{es → src}/Sidebar2/Sidebar.less +0 -0
- /package/{es → src}/Sidebar2/package.json +0 -0
- /package/{es → src}/SuperForm/SuperForm.less +0 -0
- /package/{es → src}/SuperForm/package.json +0 -0
- /package/{es → src}/SuperForm2/SuperForm.less +0 -0
- /package/{es → src}/SuperForm2/package.json +0 -0
- /package/{es → src}/SuperIcon/package.json +0 -0
- /package/{es → src}/SuperPagination/package.json +0 -0
- /package/{es → src}/SuperTab/SuperTab.less +0 -0
- /package/{es → src}/SuperTab/package.json +0 -0
- /package/{es → src}/SuperTab2/SuperTab2.less +0 -0
- /package/{es → src}/SuperTab2/package.json +0 -0
- /package/{es → src}/SuperTable/DragSortRow.less +0 -0
- /package/{es → src}/SuperTable/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable/SuperTable.less +0 -0
- /package/{es → src}/SuperTable/package.json +0 -0
- /package/{es → src}/SuperTable2/SuperTable2.less +0 -0
- /package/{es → src}/SuperTable2/package.json +0 -0
- /package/{es → src}/SuperTable3/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable3/SuperTable.less +0 -0
- /package/{es → src}/SuperTable3/package.json +0 -0
- /package/{es → src}/SuperToolbar/SuperToolbar.less +0 -0
- /package/{es → src}/SuperToolbar/package.json +0 -0
- /package/{es → src}/SuperUpload/SuperUpload.less +0 -0
- /package/{es → src}/SuperUpload/package.json +0 -0
- /package/{es → src}/Title/Title.less +0 -0
- /package/{es → src}/Title/package.json +0 -0
- /package/{es → src}/Viewer/Viewer.less +0 -0
- /package/{es → src}/Viewer/imgView.less +0 -0
- /package/{es → src}/Viewer/package.json +0 -0
- /package/{es → src}/WingBlank/WingBlank.less +0 -0
- /package/{es → src}/WingBlank/package.json +0 -0
- /package/{es → src}/adjust.less +0 -0
- /package/{es → src}/style.less +0 -0
- /package/{es → src}/variables.less +0 -0
package/es/Search/Search.js
DELETED
|
@@ -1,595 +0,0 @@
|
|
|
1
|
-
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
4
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
5
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
6
|
-
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
7
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
8
|
-
import _Row from "antd/es/row";
|
|
9
|
-
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
10
|
-
import _Col from "antd/es/col";
|
|
11
|
-
import _Icon from "antd/es/icon";
|
|
12
|
-
import _Button from "antd/es/button";
|
|
13
|
-
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
14
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
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
|
-
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
19
|
-
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
20
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
21
|
-
import _Form from "antd/es/form";
|
|
22
|
-
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
23
|
-
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context12, _context13; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context12 = ownKeys(Object(source), !0)).call(_context12, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context13 = ownKeys(Object(source))).call(_context13, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
-
|
|
28
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
29
|
-
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
30
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
31
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
32
|
-
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
33
|
-
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
|
|
34
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
35
|
-
import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
|
|
36
|
-
import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
|
|
37
|
-
|
|
38
|
-
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); }; }
|
|
39
|
-
|
|
40
|
-
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; } }
|
|
41
|
-
|
|
42
|
-
import React from 'react';
|
|
43
|
-
import PropTypes from 'prop-types';
|
|
44
|
-
import ReactDOM from 'react-dom';
|
|
45
|
-
import Control, { getTitle, makeString } from '../Control';
|
|
46
|
-
import { getPathValue } from "../helper";
|
|
47
|
-
import variables from '../variables';
|
|
48
|
-
var FormItem = _Form.Item;
|
|
49
|
-
var defaultSize = 'small';
|
|
50
|
-
var defaultColNum = 4;
|
|
51
|
-
var TYPE = ['text', 'search', 'select', 'number', 'date', 'readonly', 'selectSearch', 'cascader', //级联选择下拉
|
|
52
|
-
'treeSelect' //树选择
|
|
53
|
-
];
|
|
54
|
-
/**
|
|
55
|
-
* search: 搜索按钮的标题
|
|
56
|
-
* more:更多按钮的标题
|
|
57
|
-
* reset:重置按钮的标题
|
|
58
|
-
* sort:排序按钮的标题
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
var ConfigType = {
|
|
62
|
-
search: PropTypes.string.isRequired,
|
|
63
|
-
reset: PropTypes.string,
|
|
64
|
-
sort: PropTypes.string,
|
|
65
|
-
more: PropTypes.string
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* key: 唯一标识一个表单元素
|
|
69
|
-
* title:表单元素旁边的标题
|
|
70
|
-
* type:表单元素的类型
|
|
71
|
-
* props:传递给表单元素的额外属性
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
var FilterType = {
|
|
75
|
-
key: PropTypes.string.isRequired,
|
|
76
|
-
title: PropTypes.string.isRequired,
|
|
77
|
-
type: PropTypes.oneOf(TYPE).isRequired,
|
|
78
|
-
options: PropTypes.array,
|
|
79
|
-
props: PropTypes.object
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* data:传递给filters的默认值,为key:value的形式,此处的key为FilterType中的key
|
|
83
|
-
* isSort:是否需要排序按钮,默认false,当设置为true时,onClick函数需要实现key为sort的响应函数
|
|
84
|
-
* options: 作用同FilterType.options类似,但优先级高于它
|
|
85
|
-
* onClick:按钮点击事件,原型为func(key)
|
|
86
|
-
* onChange:表单控件内容改变时触发,原型为func(key, value)
|
|
87
|
-
* onSearch:search控件发出的事件,原型为func(key, value)
|
|
88
|
-
* displayRow:折叠时需要展示的行数,整数,默认为1
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
var Search = /*#__PURE__*/function (_React$Component) {
|
|
92
|
-
_inherits(Search, _React$Component);
|
|
93
|
-
|
|
94
|
-
var _super = _createSuper(Search);
|
|
95
|
-
|
|
96
|
-
function Search() {
|
|
97
|
-
var _context;
|
|
98
|
-
|
|
99
|
-
var _this;
|
|
100
|
-
|
|
101
|
-
_classCallCheck(this, Search);
|
|
102
|
-
|
|
103
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
104
|
-
args[_key] = arguments[_key];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
108
|
-
|
|
109
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
110
|
-
more: false
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
_defineProperty(_assertThisInitialized(_this), "onClick", function (key) {
|
|
114
|
-
var onClick = _this.props.onClick;
|
|
115
|
-
onClick && onClick(key);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
_defineProperty(_assertThisInitialized(_this), "onMore", function () {
|
|
119
|
-
var onHeightChange = _this.props.onHeightChange;
|
|
120
|
-
|
|
121
|
-
_this.setState({
|
|
122
|
-
more: !_this.state.more
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
onHeightChange && onHeightChange(_this.calHeight(!_this.state.more));
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
_defineProperty(_assertThisInitialized(_this), "onChange", function (dictionary, key, value) {
|
|
129
|
-
var _context2, _context3;
|
|
130
|
-
|
|
131
|
-
var onChange = _this.props.onChange;
|
|
132
|
-
|
|
133
|
-
if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !_includesInstanceProperty(_context2 = _mapInstanceProperty(_context3 = global.dictionary[dictionary]).call(_context3, function (item) {
|
|
134
|
-
return item.value;
|
|
135
|
-
})).call(_context2, value)) {
|
|
136
|
-
var _context4;
|
|
137
|
-
|
|
138
|
-
var realValue = JSON.parse(value);
|
|
139
|
-
|
|
140
|
-
_this.onClick('reset');
|
|
141
|
-
|
|
142
|
-
_mapInstanceProperty(_context4 = _Object$keys(realValue)).call(_context4, function (objectKey) {
|
|
143
|
-
onChange && objectKey !== 'queryId' && onChange(objectKey, realValue[objectKey]);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
onChange && onChange(key, value);
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
_defineProperty(_assertThisInitialized(_this), "onPressEnter", function () {
|
|
151
|
-
ReactDOM.findDOMNode(_this.refs.search).click();
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
_defineProperty(_assertThisInitialized(_this), "toButton", function (key) {
|
|
155
|
-
var _context5;
|
|
156
|
-
|
|
157
|
-
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
158
|
-
var config = _this.props.config;
|
|
159
|
-
|
|
160
|
-
var onClick = _bindInstanceProperty(_context5 = _this.onClick).call(_context5, _assertThisInitialized(_this), key);
|
|
161
|
-
|
|
162
|
-
return /*#__PURE__*/React.createElement(_Button, _extends({
|
|
163
|
-
size: defaultSize,
|
|
164
|
-
onClick: onClick
|
|
165
|
-
}, props), config[key]);
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
_defineProperty(_assertThisInitialized(_this), "toMore", function () {
|
|
169
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
170
|
-
role: "more",
|
|
171
|
-
onClick: _this.onMore
|
|
172
|
-
}, _this.props.config.more, /*#__PURE__*/React.createElement(_Icon, {
|
|
173
|
-
type: "down",
|
|
174
|
-
"data-status": !_this.state.more ? 'down' : 'up'
|
|
175
|
-
}));
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
_defineProperty(_assertThisInitialized(_this), "toButtons", function () {
|
|
179
|
-
var config = _this.props.config;
|
|
180
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
181
|
-
role: "buttons"
|
|
182
|
-
}, _this.toButton('search', {
|
|
183
|
-
ref: 'search',
|
|
184
|
-
type: 'primary'
|
|
185
|
-
}), config.reset ? _this.toButton('reset') : null, _this.isSort() ? _this.toButton('sort') : null, _this.isMore() ? _this.toMore() : null);
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
_defineProperty(_assertThisInitialized(_this), "isSort", function () {
|
|
189
|
-
var _this$props = _this.props,
|
|
190
|
-
config = _this$props.config,
|
|
191
|
-
_this$props$colNum = _this$props.colNum,
|
|
192
|
-
colNum = _this$props$colNum === void 0 ? defaultColNum : _this$props$colNum,
|
|
193
|
-
filters = _this$props.filters,
|
|
194
|
-
_this$props$isSort = _this$props.isSort,
|
|
195
|
-
isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
|
|
196
|
-
return isSort && _sortInstanceProperty(config) && filters.length > colNum;
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
_defineProperty(_assertThisInitialized(_this), "isMore", function () {
|
|
200
|
-
var _this$props2 = _this.props,
|
|
201
|
-
config = _this$props2.config,
|
|
202
|
-
_this$props2$colNum = _this$props2.colNum,
|
|
203
|
-
colNum = _this$props2$colNum === void 0 ? defaultColNum : _this$props2$colNum,
|
|
204
|
-
filters = _this$props2.filters,
|
|
205
|
-
_this$props2$displayR = _this$props2.displayRow,
|
|
206
|
-
displayRow = _this$props2$displayR === void 0 ? 1 : _this$props2$displayR;
|
|
207
|
-
return config.more && _filterInstanceProperty(filters).call(filters, function (item) {
|
|
208
|
-
return !item.hide;
|
|
209
|
-
}).length > colNum * displayRow;
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
_defineProperty(_assertThisInitialized(_this), "getOptions", function (filter) {
|
|
213
|
-
var options = _this.props.options;
|
|
214
|
-
|
|
215
|
-
if (options && _Array$isArray(options[filter.key])) {
|
|
216
|
-
return options[filter.key];
|
|
217
|
-
} else {
|
|
218
|
-
return filter.options || filter.typeRelated || [];
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
_defineProperty(_assertThisInitialized(_this), "getContainer", function () {
|
|
223
|
-
return _this.props.getContainer;
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
_defineProperty(_assertThisInitialized(_this), "getControlProps", function (control) {
|
|
227
|
-
var _context6;
|
|
228
|
-
|
|
229
|
-
var _this$props$data = _this.props.data,
|
|
230
|
-
data = _this$props$data === void 0 ? {} : _this$props$data;
|
|
231
|
-
return _objectSpread(_objectSpread({}, control.props || {}), {}, {
|
|
232
|
-
size: defaultSize,
|
|
233
|
-
type: control.type,
|
|
234
|
-
value: makeString(data[control.key]),
|
|
235
|
-
onChange: _bindInstanceProperty(_context6 = _this.onChange).call(_context6, _assertThisInitialized(_this), control.dictionary, control.key)
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
_defineProperty(_assertThisInitialized(_this), "validDate", function (_ref) {
|
|
240
|
-
var key = _ref.key,
|
|
241
|
-
type = _ref.type;
|
|
242
|
-
return function (date) {
|
|
243
|
-
var _this$props$data2 = _this.props.data,
|
|
244
|
-
data = _this$props$data2 === void 0 ? {} : _this$props$data2;
|
|
245
|
-
|
|
246
|
-
if (!date || !data[key]) {
|
|
247
|
-
return false;
|
|
248
|
-
} else {
|
|
249
|
-
if (type === '>') {
|
|
250
|
-
return date.format('YYYY-MM-DD HH:mm:ss') <= data[key].valueOf();
|
|
251
|
-
} else if (type === '<') {
|
|
252
|
-
return date.format('YYYY-MM-DD HH:mm:ss') >= data[key].valueOf();
|
|
253
|
-
} else {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
_defineProperty(_assertThisInitialized(_this), "toText", function (props) {
|
|
261
|
-
props.onPressEnter = _this.onPressEnter;
|
|
262
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
_defineProperty(_assertThisInitialized(_this), "toNumber", function (props) {
|
|
266
|
-
props.defaultValue = props.value;
|
|
267
|
-
delete props.value;
|
|
268
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
_defineProperty(_assertThisInitialized(_this), "getQueryGroupOptions", function (_ref2) {
|
|
272
|
-
var dictionary = _ref2.dictionary,
|
|
273
|
-
_ref2$configCode = _ref2.configCode,
|
|
274
|
-
configCode = _ref2$configCode === void 0 ? 'unknown' : _ref2$configCode;
|
|
275
|
-
var realOptions = [];
|
|
276
|
-
|
|
277
|
-
if (dictionary && global.dictionary) {
|
|
278
|
-
var dicOptions = global.dictionary[dictionary] || [];
|
|
279
|
-
realOptions = _concatInstanceProperty(realOptions).call(realOptions, dicOptions);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
var state = global.store.getState();
|
|
283
|
-
var path = ['layout', 'tableColsSetting', configCode];
|
|
284
|
-
|
|
285
|
-
var _ref3 = getPathValue(state, path) || {},
|
|
286
|
-
_ref3$queryList = _ref3.queryList,
|
|
287
|
-
queryList = _ref3$queryList === void 0 ? [] : _ref3$queryList;
|
|
288
|
-
|
|
289
|
-
return _concatInstanceProperty(realOptions).call(realOptions, _mapInstanceProperty(queryList).call(queryList, function (item) {
|
|
290
|
-
return {
|
|
291
|
-
title: item.name,
|
|
292
|
-
value: _JSON$stringify(item.query)
|
|
293
|
-
};
|
|
294
|
-
}));
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
_defineProperty(_assertThisInitialized(_this), "toSelect", function (props, filter) {
|
|
298
|
-
var container = _this.getContainer();
|
|
299
|
-
|
|
300
|
-
container && (props.getPopupContainer = container);
|
|
301
|
-
props.options = filter.key === 'queryGroup' ? _this.getQueryGroupOptions(filter) : _this.getOptions(filter);
|
|
302
|
-
props.dropdownMatchSelectWidth = false;
|
|
303
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
_defineProperty(_assertThisInitialized(_this), "createSearchEvent", function (filter) {
|
|
307
|
-
if (_this.props.onSearch) {
|
|
308
|
-
return function (value) {
|
|
309
|
-
return _this.props.onSearch(filter.key, value, filter);
|
|
310
|
-
};
|
|
311
|
-
} else {
|
|
312
|
-
return null;
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
_defineProperty(_assertThisInitialized(_this), "toSearch", function (props, filter) {
|
|
317
|
-
var container = _this.getContainer();
|
|
318
|
-
|
|
319
|
-
container && (props.getPopupContainer = container);
|
|
320
|
-
props.options = _this.getOptions(filter);
|
|
321
|
-
props.onSearch = _this.createSearchEvent(filter);
|
|
322
|
-
props.dropdownMatchSelectWidth = false;
|
|
323
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
_defineProperty(_assertThisInitialized(_this), "selectSearch", function (props, filter) {
|
|
327
|
-
var container = _this.getContainer();
|
|
328
|
-
|
|
329
|
-
container && (props.getPopupContainer = container);
|
|
330
|
-
props.options = _this.getOptions(filter);
|
|
331
|
-
props.onSearch = _this.createSearchEvent(filter);
|
|
332
|
-
props.dropdownMatchSelectWidth = false;
|
|
333
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
_defineProperty(_assertThisInitialized(_this), "toDate", function (props, _ref4) {
|
|
337
|
-
var rule = _ref4.rule;
|
|
338
|
-
|
|
339
|
-
var container = _this.getContainer();
|
|
340
|
-
|
|
341
|
-
container && (props.getCalendarContainer = container);
|
|
342
|
-
rule && (props.disabledDate = _this.validDate(rule));
|
|
343
|
-
props.style = {
|
|
344
|
-
width: '100%'
|
|
345
|
-
};
|
|
346
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
347
|
-
});
|
|
348
|
-
|
|
349
|
-
_defineProperty(_assertThisInitialized(_this), "toReadonly", function (props, filter) {
|
|
350
|
-
props.value = getTitle(props.value, _this.getOptions(filter));
|
|
351
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
_defineProperty(_assertThisInitialized(_this), "toCascader", function (props, filter) {
|
|
355
|
-
var container = _this.getContainer();
|
|
356
|
-
|
|
357
|
-
container && (props.getPopupContainer = container);
|
|
358
|
-
props.options = _this.getOptions(filter);
|
|
359
|
-
props.onSearch = _this.createSearchEvent(filter);
|
|
360
|
-
props.placeholder = filter.placeholder || '';
|
|
361
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
362
|
-
});
|
|
363
|
-
|
|
364
|
-
_defineProperty(_assertThisInitialized(_this), "toTreeSelect", function (props, filter) {
|
|
365
|
-
var container = _this.getContainer();
|
|
366
|
-
|
|
367
|
-
container && (props.getPopupContainer = container);
|
|
368
|
-
props.options = _this.getOptions(filter);
|
|
369
|
-
props.onSearch = _this.createSearchEvent(filter);
|
|
370
|
-
props.placeholder = filter.placeholder || '';
|
|
371
|
-
return /*#__PURE__*/React.createElement(Control, props);
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
_defineProperty(_assertThisInitialized(_this), "toControl", function (control) {
|
|
375
|
-
var props = _this.getControlProps(control);
|
|
376
|
-
|
|
377
|
-
switch (control.type) {
|
|
378
|
-
case 'text':
|
|
379
|
-
return _this.toText(props, control);
|
|
380
|
-
|
|
381
|
-
case 'number':
|
|
382
|
-
return _this.toNumber(props, control);
|
|
383
|
-
|
|
384
|
-
case 'select':
|
|
385
|
-
return _this.toSelect(props, control);
|
|
386
|
-
|
|
387
|
-
case 'selectSearch':
|
|
388
|
-
return _this.selectSearch(props, control);
|
|
389
|
-
|
|
390
|
-
case 'search':
|
|
391
|
-
return _this.toSearch(props, control);
|
|
392
|
-
|
|
393
|
-
case 'date':
|
|
394
|
-
return _this.toDate(props, control);
|
|
395
|
-
|
|
396
|
-
case 'readonly':
|
|
397
|
-
return _this.toReadonly(props, control);
|
|
398
|
-
|
|
399
|
-
case 'cascader':
|
|
400
|
-
return _this.toCascader(props, control);
|
|
401
|
-
|
|
402
|
-
case 'treeSelect':
|
|
403
|
-
return _this.toTreeSelect(props, control);
|
|
404
|
-
|
|
405
|
-
default:
|
|
406
|
-
return 'type error';
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
_defineProperty(_assertThisInitialized(_this), "toLabel", function (_ref5) {
|
|
411
|
-
var title = _ref5.title,
|
|
412
|
-
key = _ref5.key,
|
|
413
|
-
dictionary = _ref5.dictionary,
|
|
414
|
-
_ref5$configCode = _ref5.configCode,
|
|
415
|
-
configCode = _ref5$configCode === void 0 ? 'unknown' : _ref5$configCode;
|
|
416
|
-
|
|
417
|
-
if (key === 'queryGroup') {
|
|
418
|
-
var _context7, _context8;
|
|
419
|
-
|
|
420
|
-
//查询组合
|
|
421
|
-
return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
|
|
422
|
-
role: "icon",
|
|
423
|
-
type: "plus-circle-o",
|
|
424
|
-
onClick: _bindInstanceProperty(_context7 = _this.onAddQueryGroup).call(_context7, _assertThisInitialized(_this), configCode, _this.props.data, dictionary)
|
|
425
|
-
}), /*#__PURE__*/React.createElement(_Icon, {
|
|
426
|
-
role: "icon",
|
|
427
|
-
type: "minus-circle-o",
|
|
428
|
-
onClick: _bindInstanceProperty(_context8 = _this.onDelQueryGroup).call(_context8, _assertThisInitialized(_this), configCode, _this.props.data, dictionary)
|
|
429
|
-
}));
|
|
430
|
-
} else {
|
|
431
|
-
return title;
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
|
|
435
|
-
_defineProperty(_assertThisInitialized(_this), "toCol", function (span, control, more) {
|
|
436
|
-
var factor = control.span || 1;
|
|
437
|
-
return /*#__PURE__*/React.createElement(_Col, {
|
|
438
|
-
span: span * factor,
|
|
439
|
-
key: control.key,
|
|
440
|
-
onFocus: more ? function () {
|
|
441
|
-
_this.setState({
|
|
442
|
-
more: true
|
|
443
|
-
});
|
|
444
|
-
} : undefined
|
|
445
|
-
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
446
|
-
label: _this.toLabel(control),
|
|
447
|
-
required: control.required
|
|
448
|
-
}, _this.toControl(control)));
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
_defineProperty(_assertThisInitialized(_this), "toCols", function () {
|
|
452
|
-
var _context9;
|
|
453
|
-
|
|
454
|
-
var _this$props3 = _this.props,
|
|
455
|
-
_this$props3$colNum = _this$props3.colNum,
|
|
456
|
-
colNum = _this$props3$colNum === void 0 ? defaultColNum : _this$props3$colNum,
|
|
457
|
-
filters = _this$props3.filters,
|
|
458
|
-
_this$props3$displayR = _this$props3.displayRow,
|
|
459
|
-
displayRow = _this$props3$displayR === void 0 ? 1 : _this$props3$displayR;
|
|
460
|
-
var span = 24 / Math.min(colNum, _filterInstanceProperty(filters).call(filters, function (item) {
|
|
461
|
-
return !item.hide;
|
|
462
|
-
}).length);
|
|
463
|
-
return _mapInstanceProperty(_context9 = _filterInstanceProperty(filters).call(filters, function (item) {
|
|
464
|
-
return !item.hide;
|
|
465
|
-
})).call(_context9, function (control, index) {
|
|
466
|
-
return _this.toCol(span, control, index >= colNum * displayRow);
|
|
467
|
-
});
|
|
468
|
-
});
|
|
469
|
-
|
|
470
|
-
_defineProperty(_assertThisInitialized(_this), "calWidth", function () {
|
|
471
|
-
var _this$props4 = _this.props,
|
|
472
|
-
_this$props4$colNum = _this$props4.colNum,
|
|
473
|
-
colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
|
|
474
|
-
filters = _this$props4.filters;
|
|
475
|
-
|
|
476
|
-
var length = _filterInstanceProperty(filters).call(filters, function (item) {
|
|
477
|
-
return !item.hide;
|
|
478
|
-
}).length;
|
|
479
|
-
|
|
480
|
-
if (length < colNum) {
|
|
481
|
-
return "".concat(length * 18, "%");
|
|
482
|
-
} else {
|
|
483
|
-
return "".concat(defaultColNum * 18, "%");
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
|
|
487
|
-
_defineProperty(_assertThisInitialized(_this), "calHeight", function (more) {
|
|
488
|
-
var _this$props5 = _this.props,
|
|
489
|
-
_this$props5$colNum = _this$props5.colNum,
|
|
490
|
-
colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
|
|
491
|
-
filters = _this$props5.filters,
|
|
492
|
-
_this$props5$displayR = _this$props5.displayRow,
|
|
493
|
-
displayRow = _this$props5$displayR === void 0 ? 1 : _this$props5$displayR;
|
|
494
|
-
|
|
495
|
-
if (more) {
|
|
496
|
-
var row = Math.ceil(_filterInstanceProperty(filters).call(filters, function (item) {
|
|
497
|
-
return !item.hide;
|
|
498
|
-
}).length / colNum);
|
|
499
|
-
return row * 36 + (row - 1) * 10;
|
|
500
|
-
} else {
|
|
501
|
-
return displayRow * 36 + (displayRow - 1) * 10;
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
|
|
505
|
-
return _this;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
_createClass(Search, [{
|
|
509
|
-
key: "onAddQueryGroup",
|
|
510
|
-
value: function () {
|
|
511
|
-
var _onAddQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(configCode, searchData, dictionary) {
|
|
512
|
-
var onAddQueryGroup;
|
|
513
|
-
return _regeneratorRuntime.wrap(function _callee$(_context10) {
|
|
514
|
-
while (1) {
|
|
515
|
-
switch (_context10.prev = _context10.next) {
|
|
516
|
-
case 0:
|
|
517
|
-
onAddQueryGroup = this.props.onAddQueryGroup;
|
|
518
|
-
onAddQueryGroup && onAddQueryGroup(configCode, searchData, dictionary);
|
|
519
|
-
|
|
520
|
-
case 2:
|
|
521
|
-
case "end":
|
|
522
|
-
return _context10.stop();
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}, _callee, this);
|
|
526
|
-
}));
|
|
527
|
-
|
|
528
|
-
function onAddQueryGroup(_x, _x2, _x3) {
|
|
529
|
-
return _onAddQueryGroup.apply(this, arguments);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
return onAddQueryGroup;
|
|
533
|
-
}()
|
|
534
|
-
}, {
|
|
535
|
-
key: "onDelQueryGroup",
|
|
536
|
-
value: function () {
|
|
537
|
-
var _onDelQueryGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(configCode, searchData, dictionary) {
|
|
538
|
-
var onDelQueryGroup;
|
|
539
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context11) {
|
|
540
|
-
while (1) {
|
|
541
|
-
switch (_context11.prev = _context11.next) {
|
|
542
|
-
case 0:
|
|
543
|
-
onDelQueryGroup = this.props.onDelQueryGroup;
|
|
544
|
-
onDelQueryGroup && onDelQueryGroup(configCode, searchData, dictionary);
|
|
545
|
-
|
|
546
|
-
case 2:
|
|
547
|
-
case "end":
|
|
548
|
-
return _context11.stop();
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
}, _callee2, this);
|
|
552
|
-
}));
|
|
553
|
-
|
|
554
|
-
function onDelQueryGroup(_x4, _x5, _x6) {
|
|
555
|
-
return _onDelQueryGroup.apply(this, arguments);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
return onDelQueryGroup;
|
|
559
|
-
}()
|
|
560
|
-
}, {
|
|
561
|
-
key: "render",
|
|
562
|
-
value: function render() {
|
|
563
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
564
|
-
className: variables('Search'),
|
|
565
|
-
style: {
|
|
566
|
-
height: this.calHeight(this.state.more)
|
|
567
|
-
}
|
|
568
|
-
}, /*#__PURE__*/React.createElement(_Form, {
|
|
569
|
-
layout: "vertical",
|
|
570
|
-
style: {
|
|
571
|
-
width: this.calWidth()
|
|
572
|
-
}
|
|
573
|
-
}, /*#__PURE__*/React.createElement(_Row, {
|
|
574
|
-
gutter: 20
|
|
575
|
-
}, this.toCols())), this.toButtons());
|
|
576
|
-
}
|
|
577
|
-
}]);
|
|
578
|
-
|
|
579
|
-
return Search;
|
|
580
|
-
}(React.Component);
|
|
581
|
-
|
|
582
|
-
_defineProperty(Search, "propTypes", {
|
|
583
|
-
config: PropTypes.shape(ConfigType).isRequired,
|
|
584
|
-
filters: PropTypes.arrayOf(PropTypes.shape(FilterType)).isRequired,
|
|
585
|
-
data: PropTypes.object,
|
|
586
|
-
options: PropTypes.object,
|
|
587
|
-
getContainer: PropTypes.func,
|
|
588
|
-
onClick: PropTypes.func,
|
|
589
|
-
onChange: PropTypes.func,
|
|
590
|
-
onSearch: PropTypes.func,
|
|
591
|
-
onHeightChange: PropTypes.func,
|
|
592
|
-
displayRow: PropTypes.number
|
|
593
|
-
});
|
|
594
|
-
|
|
595
|
-
export default Search;
|