@alicloud/console-components-search 0.2.39-beta.1 → 0.2.39
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/CHANGELOG.md +1 -1
- package/demos/demo1.demo.tsx +2 -4
- package/dist/index.js +9502 -12991
- package/es/ComplexSearch/InputPrefix.js +2 -5
- package/es/ComplexSearch/index.js +3 -6
- package/lib/ComplexSearch/InputPrefix.js +2 -5
- package/lib/ComplexSearch/index.js +3 -6
- package/lib/types/IRcSearchProps.type.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["defaultValue", "dataSource", "label", "type", "popupClassName"
|
|
3
|
+
var _excluded = ["defaultValue", "dataSource", "label", "type", "popupClassName"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { Icon, Select, CascaderSelect } from '@alicloud/console-components';
|
|
@@ -12,7 +12,6 @@ var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
|
12
12
|
label = props.label,
|
|
13
13
|
type = props.type,
|
|
14
14
|
popupClassName = props.popupClassName,
|
|
15
|
-
popupProps = props.popupProps,
|
|
16
15
|
reset = _objectWithoutProperties(props, _excluded);
|
|
17
16
|
var noSelect = dataSource.length < 2 && ((_dataSource$ = dataSource[0]) === null || _dataSource$ === void 0 ? void 0 : (_dataSource$$children = _dataSource$.children) === null || _dataSource$$children === void 0 ? void 0 : _dataSource$$children.length) < 2;
|
|
18
17
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -40,8 +39,7 @@ var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
|
40
39
|
}
|
|
41
40
|
}, reset, {
|
|
42
41
|
autoWidth: false,
|
|
43
|
-
popupClassName: classNames('rc-search-prefix', popupClassName)
|
|
44
|
-
popupProps: popupProps
|
|
42
|
+
popupClassName: classNames('rc-search-prefix', popupClassName)
|
|
45
43
|
})) : /*#__PURE__*/React.createElement(CascaderSelect, _extends({
|
|
46
44
|
className: classNames('condition-select', {
|
|
47
45
|
'rc-search-prefix-no-select': noSelect
|
|
@@ -55,7 +53,6 @@ var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
|
55
53
|
}, reset, {
|
|
56
54
|
autoWidth: false,
|
|
57
55
|
popupClassName: classNames('rc-search-prefix', popupClassName),
|
|
58
|
-
popupProps: popupProps,
|
|
59
56
|
canOnlyCheckLeaf: true
|
|
60
57
|
})));
|
|
61
58
|
};
|
|
@@ -153,8 +153,7 @@ var ComplexSearch = function ComplexSearch(props) {
|
|
|
153
153
|
_props$prefixSelectMo = props.prefixSelectMode,
|
|
154
154
|
prefixSelectMode = _props$prefixSelectMo === void 0 ? 'select' : _props$prefixSelectMo,
|
|
155
155
|
prefixSelectItemRender = props.prefixSelectItemRender,
|
|
156
|
-
prefixPopupClassName = props.prefixPopupClassName
|
|
157
|
-
prefixPopupProps = props.prefixPopupProps;
|
|
156
|
+
prefixPopupClassName = props.prefixPopupClassName;
|
|
158
157
|
var _useState = useState(options.find(function (o) {
|
|
159
158
|
return getDataIndex(o) === defaultSelectedDataIndex;
|
|
160
159
|
})),
|
|
@@ -378,8 +377,7 @@ var ComplexSearch = function ComplexSearch(props) {
|
|
|
378
377
|
handlerFilterTypeChange(value);
|
|
379
378
|
},
|
|
380
379
|
itemRender: prefixSelectItemRender,
|
|
381
|
-
popupClassName: prefixPopupClassName
|
|
382
|
-
popupProps: prefixPopupProps
|
|
380
|
+
popupClassName: prefixPopupClassName
|
|
383
381
|
}) : null), /*#__PURE__*/React.createElement("div", {
|
|
384
382
|
className: classNames('forms')
|
|
385
383
|
}, !selectedFilterType && prefixSelectMode === 'cascader' ? /*#__PURE__*/React.createElement(CascaderSelect, {
|
|
@@ -393,8 +391,7 @@ var ComplexSearch = function ComplexSearch(props) {
|
|
|
393
391
|
handlerFilterTypeChange(value);
|
|
394
392
|
},
|
|
395
393
|
itemRender: prefixSelectItemRender,
|
|
396
|
-
popupClassName: prefixPopupClassName
|
|
397
|
-
popupProps: prefixPopupProps
|
|
394
|
+
popupClassName: prefixPopupClassName
|
|
398
395
|
}) : null, !selectedFilterType && prefixSelectMode === 'select' ? /*#__PURE__*/React.createElement(AutoComplete, _extends({}, init(SEARCH_FILTER_FIELD, {
|
|
399
396
|
props: {
|
|
400
397
|
// @ts-ignore
|
|
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
var _consoleComponents = require("@alicloud/console-components");
|
|
13
|
-
var _excluded = ["defaultValue", "dataSource", "label", "type", "popupClassName"
|
|
13
|
+
var _excluded = ["defaultValue", "dataSource", "label", "type", "popupClassName"];
|
|
14
14
|
var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
15
15
|
var _dataSource$, _dataSource$$children;
|
|
16
16
|
var defaultValue = props.defaultValue,
|
|
@@ -19,7 +19,6 @@ var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
|
19
19
|
label = props.label,
|
|
20
20
|
type = props.type,
|
|
21
21
|
popupClassName = props.popupClassName,
|
|
22
|
-
popupProps = props.popupProps,
|
|
23
22
|
reset = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
24
23
|
var noSelect = dataSource.length < 2 && ((_dataSource$ = dataSource[0]) === null || _dataSource$ === void 0 ? void 0 : (_dataSource$$children = _dataSource$.children) === null || _dataSource$$children === void 0 ? void 0 : _dataSource$$children.length) < 2;
|
|
25
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -47,8 +46,7 @@ var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
|
47
46
|
}
|
|
48
47
|
}, reset, {
|
|
49
48
|
autoWidth: false,
|
|
50
|
-
popupClassName: (0, _classnames.default)('rc-search-prefix', popupClassName)
|
|
51
|
-
popupProps: popupProps
|
|
49
|
+
popupClassName: (0, _classnames.default)('rc-search-prefix', popupClassName)
|
|
52
50
|
})) : /*#__PURE__*/_react.default.createElement(_consoleComponents.CascaderSelect, (0, _extends2.default)({
|
|
53
51
|
className: (0, _classnames.default)('condition-select', {
|
|
54
52
|
'rc-search-prefix-no-select': noSelect
|
|
@@ -62,7 +60,6 @@ var SearchConditionSelectPrefix = function SearchConditionSelectPrefix(props) {
|
|
|
62
60
|
}, reset, {
|
|
63
61
|
autoWidth: false,
|
|
64
62
|
popupClassName: (0, _classnames.default)('rc-search-prefix', popupClassName),
|
|
65
|
-
popupProps: popupProps,
|
|
66
63
|
canOnlyCheckLeaf: true
|
|
67
64
|
})));
|
|
68
65
|
};
|
|
@@ -162,8 +162,7 @@ var ComplexSearch = function ComplexSearch(props) {
|
|
|
162
162
|
_props$prefixSelectMo = props.prefixSelectMode,
|
|
163
163
|
prefixSelectMode = _props$prefixSelectMo === void 0 ? 'select' : _props$prefixSelectMo,
|
|
164
164
|
prefixSelectItemRender = props.prefixSelectItemRender,
|
|
165
|
-
prefixPopupClassName = props.prefixPopupClassName
|
|
166
|
-
prefixPopupProps = props.prefixPopupProps;
|
|
165
|
+
prefixPopupClassName = props.prefixPopupClassName;
|
|
167
166
|
var _useState = (0, _react.useState)(options.find(function (o) {
|
|
168
167
|
return getDataIndex(o) === defaultSelectedDataIndex;
|
|
169
168
|
})),
|
|
@@ -387,8 +386,7 @@ var ComplexSearch = function ComplexSearch(props) {
|
|
|
387
386
|
handlerFilterTypeChange(value);
|
|
388
387
|
},
|
|
389
388
|
itemRender: prefixSelectItemRender,
|
|
390
|
-
popupClassName: prefixPopupClassName
|
|
391
|
-
popupProps: prefixPopupProps
|
|
389
|
+
popupClassName: prefixPopupClassName
|
|
392
390
|
}) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
393
391
|
className: (0, _classnames.default)('forms')
|
|
394
392
|
}, !selectedFilterType && prefixSelectMode === 'cascader' ? /*#__PURE__*/_react.default.createElement(_consoleComponents.CascaderSelect, {
|
|
@@ -402,8 +400,7 @@ var ComplexSearch = function ComplexSearch(props) {
|
|
|
402
400
|
handlerFilterTypeChange(value);
|
|
403
401
|
},
|
|
404
402
|
itemRender: prefixSelectItemRender,
|
|
405
|
-
popupClassName: prefixPopupClassName
|
|
406
|
-
popupProps: prefixPopupProps
|
|
403
|
+
popupClassName: prefixPopupClassName
|
|
407
404
|
}) : null, !selectedFilterType && prefixSelectMode === 'select' ? /*#__PURE__*/_react.default.createElement(AutoComplete, (0, _extends2.default)({}, init(_constants.SEARCH_FILTER_FIELD, {
|
|
408
405
|
props: {
|
|
409
406
|
// @ts-ignore
|