@zgfe/business-lib 1.0.0-beta.6 → 1.0.3
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/analysisLayout/demo/index.js +4 -1
- package/es/analysisLayout/index.d.ts +1 -28
- package/es/analysisLayout/index.js +38 -48
- package/es/analysisLayout/index.less +1 -1
- package/es/assets/styles/chunks.less +143 -0
- package/es/assets/styles/inner.less +3 -0
- package/es/assets/styles/resetAntd.less +398 -0
- package/es/assets/styles/variable.less +21 -0
- package/es/assets/theme.d.ts +5 -0
- package/es/assets/theme.js +4 -0
- package/es/attrConditions/components/operateList.d.ts +8 -0
- package/es/attrConditions/components/operateList.js +83 -0
- package/es/attrConditions/components/stringList.d.ts +9 -0
- package/es/attrConditions/components/stringList.js +168 -0
- package/es/attrConditions/components/valuesList.d.ts +10 -0
- package/es/attrConditions/components/valuesList.js +188 -0
- package/es/{attributeSelector/demo/multi.d.ts → attrConditions/demo/group.d.ts} +0 -0
- package/es/attrConditions/demo/group.js +82 -0
- package/es/{globalAttributes → attrConditions}/demo/index.d.ts +0 -0
- package/es/{datePicker/demo/form.js → attrConditions/demo/index.js} +43 -23
- package/es/attrConditions/group.d.ts +5 -0
- package/es/attrConditions/group.js +183 -0
- package/es/attrConditions/index.d.ts +6 -0
- package/es/attrConditions/index.js +160 -0
- package/es/attrConditions/styles/group.less +49 -0
- package/es/attrConditions/styles/index.less +94 -0
- package/es/attrConditions/types.d.ts +63 -0
- package/es/attrConditions/types.js +19 -0
- package/es/attrConditions/utils/operates.d.ts +16 -0
- package/es/attrConditions/utils/operates.js +67 -0
- package/es/attributeSelector/demo/index.d.ts +3 -0
- package/es/attributeSelector/demo/{singleForm.js → index.js} +42 -44
- package/es/attributeSelector/index.d.ts +4 -111
- package/es/attributeSelector/index.js +88 -543
- package/es/attributeSelector/listPanel.d.ts +4 -0
- package/es/attributeSelector/listPanel.js +208 -0
- package/es/attributeSelector/option.d.ts +15 -0
- package/es/attributeSelector/option.js +53 -0
- package/es/attributeSelector/styles/index.less +100 -0
- package/es/attributeSelector/types.d.ts +79 -0
- package/es/attributeSelector/types.js +15 -0
- package/es/attributeSelector/util.d.ts +7 -0
- package/es/attributeSelector/util.js +69 -0
- package/es/chart/demo/pie.js +1 -0
- package/es/chart/index.d.ts +2 -96
- package/es/chart/index.js +28 -35
- package/es/chart/styles/index.less +50 -0
- package/es/chart/types.d.ts +46 -0
- package/es/chart/{type.js → types.js} +0 -0
- package/es/chart/util/{chartConfig.d.ts → chartOptionConfig.d.ts} +4 -35
- package/es/chart/util/{chartConfig.js → chartOptionConfig.js} +45 -111
- package/es/chart/util/formatData.d.ts +3 -7
- package/es/chart/util/formatData.js +47 -26
- package/es/chart/util/formatOption.d.ts +2 -1
- package/es/chart/util/formatOption.js +22 -9
- package/es/chart/util/mapUtil.d.ts +3 -3
- package/es/chart/util/mapUtil.js +9 -19
- package/es/commonStyle/icon.less +116 -112
- package/es/commonStyle/select.less +1 -1
- package/es/commonStyle/theme.less +520 -473
- package/es/components/iconFont.js +4 -2
- package/es/context/index.d.ts +16 -0
- package/es/context/index.js +3 -0
- package/es/datePicker/datePicker.d.ts +10 -0
- package/es/datePicker/datePicker.js +115 -0
- package/es/datePicker/demo/index.d.ts +1 -0
- package/es/datePicker/demo/index.js +9 -2
- package/es/datePicker/index.d.ts +4 -27
- package/es/datePicker/index.js +72 -148
- package/es/datePicker/styles/index.less +48 -0
- package/es/datePicker/types.d.ts +24 -0
- package/es/{eventSelector/type.js → datePicker/types.js} +0 -0
- package/es/datePicker/utils.d.ts +6 -0
- package/es/datePicker/utils.js +70 -0
- package/es/dialog/components/itemNode.d.ts +10 -0
- package/es/dialog/components/itemNode.js +109 -0
- package/es/dialog/components/list.d.ts +3 -13
- package/es/dialog/components/list.js +15 -12
- package/es/dialog/components/selectToInput.d.ts +4 -48
- package/es/dialog/components/selectToInput.js +74 -80
- package/es/dialog/components/styles/handle.less +39 -0
- package/es/dialog/components/styles/list.less +60 -0
- package/es/dialog/components/styles/tab.less +55 -0
- package/es/dialog/components/tab.d.ts +3 -7
- package/es/dialog/components/tab.js +57 -19
- package/es/dialog/data/{chart.d.ts → data.d.ts} +9 -0
- package/es/dialog/data/{chart.js → data.js} +11 -0
- package/es/dialog/demo/index.d.ts +23 -0
- package/es/dialog/demo/index.js +34 -3
- package/es/dialog/demo/index2.js +14 -2
- package/es/dialog/index.d.ts +4 -97
- package/es/dialog/index.js +54 -109
- package/es/dialog/styles/index.less +11 -0
- package/es/dialog/types.d.ts +77 -0
- package/es/{targetConditionGroup/type.js → dialog/types.js} +0 -0
- package/es/eventSelector/demo/index.js +26 -44
- package/es/eventSelector/index.d.ts +4 -30
- package/es/eventSelector/index.js +90 -416
- package/es/eventSelector/listPanel.d.ts +4 -0
- package/es/eventSelector/listPanel.js +197 -0
- package/es/eventSelector/option.d.ts +17 -0
- package/es/eventSelector/option.js +54 -0
- package/es/eventSelector/styles/index.less +77 -0
- package/es/eventSelector/types.d.ts +31 -0
- package/es/eventSelector/types.js +1 -0
- package/es/index.d.ts +14 -11
- package/es/index.js +9 -11
- package/es/{attributeSelector/data → mock}/env.d.ts +0 -0
- package/es/{attributeSelector/data → mock}/env.js +0 -0
- package/es/{attributeSelector/data → mock}/event.d.ts +0 -0
- package/es/{attributeSelector/data → mock}/event.js +0 -0
- package/es/{attributeSelector/data → mock}/user.d.ts +0 -0
- package/es/{attributeSelector/data → mock}/user.js +0 -0
- package/es/{multipleSelector → searchInput}/demo/index.d.ts +0 -0
- package/es/searchInput/demo/index.js +5 -0
- package/es/searchInput/index.d.ts +8 -0
- package/es/searchInput/index.js +31 -0
- package/es/{attributeSelector/demo/multiForm.d.ts → select/demo/group.d.ts} +0 -0
- package/es/{globalAttributes/demo/index.js → select/demo/group.js} +49 -31
- package/es/select/demo/index.js +49 -21
- package/es/{attributeSelector/demo/single.d.ts → select/demo/multiple.d.ts} +0 -0
- package/es/{multipleSelector/demo/index.js → select/demo/multiple.js} +55 -12
- package/es/select/handle.d.ts +5 -0
- package/es/select/handle.js +119 -0
- package/es/select/index.d.ts +4 -49
- package/es/select/index.js +168 -122
- package/es/select/option.d.ts +4 -0
- package/es/select/option.js +59 -0
- package/es/select/overlay.d.ts +4 -0
- package/es/select/overlay.js +154 -0
- package/es/select/styles/handle.less +111 -0
- package/es/select/styles/index.less +99 -0
- package/es/select/types.d.ts +65 -0
- package/es/select/types.js +1 -0
- package/es/table/demo/data/table.js +1 -1
- package/es/table/demo/index.d.ts +1 -1
- package/es/table/demo/index.js +9 -8
- package/es/table/demo/index3.js +9 -18
- package/es/table/index.d.ts +4 -30
- package/es/table/index.js +30 -26
- package/es/table/styles/index.less +5 -0
- package/es/table/type.d.ts +10 -0
- package/es/table/type.js +1 -0
- package/es/targetConditionGroup/components/targetDimension.d.ts +8 -0
- package/es/targetConditionGroup/components/targetDimension.js +153 -0
- package/es/targetConditionGroup/data/operates.d.ts +8 -24
- package/es/targetConditionGroup/data/operates.js +26 -69
- package/es/targetConditionGroup/demo/group.d.ts +1 -0
- package/es/targetConditionGroup/demo/group.js +108 -23
- package/es/targetConditionGroup/demo/index.js +34 -34
- package/es/targetConditionGroup/demo/styles/index.less +29 -0
- package/es/targetConditionGroup/index.d.ts +4 -57
- package/es/targetConditionGroup/index.js +177 -274
- package/es/targetConditionGroup/styles/index.less +25 -0
- package/es/targetConditionGroup/types.d.ts +32 -0
- package/es/targetConditionGroup/types.js +1 -0
- package/es/targetSelector/demo/index.d.ts +1 -0
- package/es/targetSelector/demo/index.js +29 -71
- package/es/targetSelector/editBox.d.ts +8 -0
- package/es/targetSelector/{components/BizEventNameEditBox.js → editBox.js} +49 -24
- package/es/targetSelector/index.d.ts +5 -55
- package/es/targetSelector/index.js +103 -214
- package/es/targetSelector/optionIcon.d.ts +9 -0
- package/es/targetSelector/optionIcon.js +24 -0
- package/es/targetSelector/optionMenu.d.ts +7 -0
- package/es/targetSelector/optionMenu.js +38 -0
- package/es/targetSelector/styles/index.less +88 -0
- package/es/targetSelector/types.d.ts +18 -0
- package/es/targetSelector/types.js +1 -0
- package/es/userCondition/conditionTypeList.d.ts +10 -0
- package/es/userCondition/conditionTypeList.js +43 -0
- package/es/userCondition/conditionWrap.d.ts +7 -0
- package/es/userCondition/conditionWrap.js +18 -0
- package/es/userCondition/conditions/eventCondition.d.ts +8 -0
- package/es/userCondition/conditions/eventCondition.js +104 -0
- package/es/userCondition/conditions/periodCondition.d.ts +11 -0
- package/es/userCondition/conditions/periodCondition.js +156 -0
- package/es/userCondition/conditions/propCondition.d.ts +11 -0
- package/es/userCondition/conditions/propCondition.js +147 -0
- package/es/userCondition/conditions/runTimesCondition.d.ts +9 -0
- package/es/userCondition/conditions/runTimesCondition.js +78 -0
- package/es/userCondition/conditions/styles/eventCondition.less +49 -0
- package/es/userCondition/conditions/styles/periodCondition.less +14 -0
- package/es/userCondition/conditions/styles/propCondition.less +36 -0
- package/es/userCondition/conditions/styles/runTimesCondition.less +16 -0
- package/es/{attributeSelector/demo/singleForm.d.ts → userCondition/demo/index.d.ts} +0 -0
- package/es/userCondition/demo/index.js +97 -0
- package/es/userCondition/index.d.ts +7 -0
- package/es/userCondition/index.js +146 -0
- package/es/userCondition/orConditions.d.ts +5 -0
- package/es/userCondition/orConditions.js +202 -0
- package/es/userCondition/relationLabel.d.ts +6 -0
- package/es/userCondition/relationLabel.js +12 -0
- package/es/userCondition/styles/conditionTypeList.less +31 -0
- package/es/userCondition/styles/conditionWrap.less +14 -0
- package/es/userCondition/styles/index.less +13 -0
- package/es/userCondition/styles/orConditions.less +16 -0
- package/es/userCondition/styles/relationLabel.less +18 -0
- package/es/userCondition/types.d.ts +79 -0
- package/es/userCondition/types.js +1 -0
- package/es/userCondition/util.d.ts +2 -0
- package/es/userCondition/util.js +54 -0
- package/es/{datePicker/demo/form.d.ts → userGroup/demo/group.d.ts} +0 -0
- package/es/{targetConditionGroup/demo/form.js → userGroup/demo/group.js} +68 -72
- package/es/userGroup/demo/index.d.ts +0 -1
- package/es/userGroup/demo/index.js +5 -62
- package/es/userGroup/index.d.ts +3 -77
- package/es/userGroup/index.js +60 -108
- package/es/userGroup/styles/index.less +20 -0
- package/es/userGroup/types.d.ts +15 -0
- package/es/userGroup/types.js +1 -0
- package/es/utils/ajax.js +5 -20
- package/es/utils/type.d.ts +42 -44
- package/es/utils/util.d.ts +1 -35
- package/es/utils/util.js +27 -57
- package/package.json +11 -4
- package/es/attributeSelector/demo/multi.js +0 -39
- package/es/attributeSelector/demo/multiForm.js +0 -64
- package/es/attributeSelector/demo/single.js +0 -43
- package/es/attributeSelector/group.d.ts +0 -31
- package/es/attributeSelector/group.js +0 -225
- package/es/attributeSelector/index.less +0 -172
- package/es/chart/index.less +0 -38
- package/es/chart/style/circle.svg +0 -4
- package/es/chart/type.d.ts +0 -22
- package/es/datePicker/data.d.ts +0 -9
- package/es/datePicker/data.js +0 -65
- package/es/datePicker/index.less +0 -364
- package/es/dialog/components/style/list.less +0 -59
- package/es/dialog/components/style/tab.less +0 -61
- package/es/dialog/style/index.less +0 -86
- package/es/eventSelector/demo/form.d.ts +0 -2
- package/es/eventSelector/demo/form.js +0 -89
- package/es/eventSelector/demo/nodata.d.ts +0 -2
- package/es/eventSelector/demo/nodata.js +0 -13
- package/es/eventSelector/index.less +0 -121
- package/es/eventSelector/type.d.ts +0 -41
- package/es/globalAttributes/demo/data/env.d.ts +0 -11
- package/es/globalAttributes/demo/data/env.js +0 -181
- package/es/globalAttributes/demo/data/event.d.ts +0 -237
- package/es/globalAttributes/demo/data/event.js +0 -3483
- package/es/globalAttributes/demo/data/user.d.ts +0 -22
- package/es/globalAttributes/demo/data/user.js +0 -218
- package/es/globalAttributes/index.d.ts +0 -47
- package/es/globalAttributes/index.js +0 -112
- package/es/multipleSelector/index.d.ts +0 -36
- package/es/multipleSelector/index.js +0 -131
- package/es/multipleSelector/index.less +0 -136
- package/es/table/demo/index.less +0 -8
- package/es/table/index.less +0 -139
- package/es/targetConditionGroup/components/conditionGroup.d.ts +0 -30
- package/es/targetConditionGroup/components/conditionGroup.js +0 -112
- package/es/targetConditionGroup/components/conditionItem.d.ts +0 -47
- package/es/targetConditionGroup/components/conditionItem.js +0 -232
- package/es/targetConditionGroup/components/style/group.less +0 -47
- package/es/targetConditionGroup/components/style/index.less +0 -16
- package/es/targetConditionGroup/demo/data/env.d.ts +0 -11
- package/es/targetConditionGroup/demo/data/env.js +0 -181
- package/es/targetConditionGroup/demo/data/event.d.ts +0 -237
- package/es/targetConditionGroup/demo/data/event.js +0 -3483
- package/es/targetConditionGroup/demo/data/user.d.ts +0 -22
- package/es/targetConditionGroup/demo/data/user.js +0 -218
- package/es/targetConditionGroup/demo/form.d.ts +0 -2
- package/es/targetConditionGroup/demo/item.d.ts +0 -2
- package/es/targetConditionGroup/demo/item.js +0 -5
- package/es/targetConditionGroup/group.d.ts +0 -56
- package/es/targetConditionGroup/group.js +0 -204
- package/es/targetConditionGroup/index.less +0 -76
- package/es/targetConditionGroup/type.d.ts +0 -95
- package/es/targetSelector/components/BizCascadeBox.d.ts +0 -34
- package/es/targetSelector/components/BizCascadeBox.js +0 -213
- package/es/targetSelector/components/BizEventNameEditBox.d.ts +0 -20
- package/es/targetSelector/demo/form.d.ts +0 -2
- package/es/targetSelector/demo/form.js +0 -133
- package/es/targetSelector/demo/nodata.d.ts +0 -2
- package/es/targetSelector/demo/nodata.js +0 -13
- package/es/targetSelector/index.less +0 -28
- package/es/userGroup/demo/cluster.d.ts +0 -3
- package/es/userGroup/demo/cluster.js +0 -102
- package/es/userGroup/demo/index.less +0 -3
- package/es/userGroup/index.less +0 -2
- package/es/userGroup/userCluster.d.ts +0 -63
- package/es/userGroup/userCluster.js +0 -255
|
@@ -11,57 +11,39 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
13
|
import React, { useState } from 'react';
|
|
14
|
-
import { BizEventSelector } from '@zgfe/business-lib';
|
|
15
|
-
|
|
16
|
-
value: 1,
|
|
17
|
-
label: '整体',
|
|
18
|
-
children: [{
|
|
19
|
-
value: 'xihu',
|
|
20
|
-
label: 'West Lake'
|
|
21
|
-
}, {
|
|
22
|
-
value: 'xiasha',
|
|
23
|
-
label: 'Xia Sha'
|
|
24
|
-
}]
|
|
25
|
-
}, {
|
|
26
|
-
value: 2,
|
|
27
|
-
label: '分组',
|
|
28
|
-
children: [{
|
|
29
|
-
value: 'xihu2',
|
|
30
|
-
label: 'West Lake2'
|
|
31
|
-
}, {
|
|
32
|
-
value: 'xiasha2',
|
|
33
|
-
label: 'Xia Sha2j'
|
|
34
|
-
}]
|
|
35
|
-
}];
|
|
14
|
+
import { BizEventSelector, convertAttributeData, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
|
+
import eventData from '../../mock/event';
|
|
36
16
|
|
|
37
17
|
var EventDemo = function EventDemo() {
|
|
38
|
-
var
|
|
18
|
+
var store = convertAttributeData({
|
|
19
|
+
eventList: eventData
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
var _useState = useState({
|
|
23
|
+
group: {
|
|
24
|
+
id: 4201
|
|
25
|
+
},
|
|
26
|
+
event: {
|
|
27
|
+
id: 24143017
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
39
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var _useState3 = useState(),
|
|
44
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
45
|
-
option = _useState4[0],
|
|
46
|
-
setOption = _useState4[1];
|
|
31
|
+
value = _useState2[0],
|
|
32
|
+
setValue = _useState2[1];
|
|
47
33
|
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
setOption(data);
|
|
34
|
+
var onChange = function onChange(data) {
|
|
35
|
+
setValue(data);
|
|
51
36
|
};
|
|
52
37
|
|
|
53
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
options: cascadeOptions,
|
|
57
|
-
fieldNames: {
|
|
58
|
-
label: 'label',
|
|
59
|
-
value: 'value',
|
|
60
|
-
groupLabel: 'label',
|
|
61
|
-
groupValue: 'value',
|
|
62
|
-
children: 'children'
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u4E8B\u4EF6\u662F\uFF1A", JSON.stringify(value)), /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
|
|
39
|
+
value: {
|
|
40
|
+
eventGroupList: store.eventGroupList
|
|
63
41
|
}
|
|
64
|
-
}
|
|
42
|
+
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
43
|
+
defaultValue: value,
|
|
44
|
+
alias: "\u522B\u540D",
|
|
45
|
+
onChange: onChange
|
|
46
|
+
})));
|
|
65
47
|
};
|
|
66
48
|
|
|
67
49
|
export default (function () {
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import './
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @description 默认的选中项
|
|
7
|
-
* @default -
|
|
8
|
-
*/
|
|
9
|
-
defaultValue?: string | number | Event;
|
|
10
|
-
/**
|
|
11
|
-
* @description 指定选中项
|
|
12
|
-
* @default -
|
|
13
|
-
*/
|
|
14
|
-
value?: string | number | Event;
|
|
15
|
-
/**
|
|
16
|
-
* @description 别名
|
|
17
|
-
* @default -
|
|
18
|
-
*/
|
|
19
|
-
aliasName?: string;
|
|
20
|
-
/**
|
|
21
|
-
* @description 是否展示事件概览
|
|
22
|
-
* @default true
|
|
23
|
-
*/
|
|
24
|
-
showAll?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @description 选择完成后的回调
|
|
27
|
-
* @default -
|
|
28
|
-
*/
|
|
29
|
-
onChange?: (value1: string | number | object, value2: string | number | object) => void;
|
|
30
|
-
}
|
|
31
|
-
declare const BizEventSelector: React.FC<EventBoxProps>;
|
|
2
|
+
import './styles/index.less';
|
|
3
|
+
import { EventSelectTypes } from './types';
|
|
4
|
+
export declare const classPrefix = "biz-event-select";
|
|
5
|
+
declare const BizEventSelector: React.FC<EventSelectTypes.Props>;
|
|
32
6
|
export default BizEventSelector;
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
7
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
|
-
|
|
9
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
10
|
-
|
|
11
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
|
|
13
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
-
|
|
15
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
-
|
|
17
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
18
|
-
|
|
19
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
2
|
|
|
21
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -28,432 +10,124 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
28
10
|
|
|
29
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
12
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
import IconFont from '../components/iconFont';
|
|
39
|
-
import { util } from '../utils';
|
|
40
|
-
import './index.less';
|
|
13
|
+
import { Dropdown } from 'antd';
|
|
14
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
15
|
+
import SelectHandle from '../select/handle';
|
|
16
|
+
import BizGlobalDataContext from '../context';
|
|
17
|
+
import EventListPanel from './listPanel';
|
|
18
|
+
import './styles/index.less';
|
|
19
|
+
export var classPrefix = 'biz-event-select';
|
|
41
20
|
|
|
42
21
|
var BizEventSelector = function BizEventSelector(props) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
defaultValue = props.defaultValue,
|
|
47
|
-
value = props.value,
|
|
48
|
-
_props$showAll = props.showAll,
|
|
49
|
-
showAll = _props$showAll === void 0 ? true : _props$showAll,
|
|
50
|
-
_props$fieldNames = props.fieldNames,
|
|
51
|
-
fieldNames = _props$fieldNames === void 0 ? {
|
|
52
|
-
label: 'name',
|
|
53
|
-
value: 'id',
|
|
54
|
-
groupLabel: 'name',
|
|
55
|
-
groupValue: 'id',
|
|
56
|
-
children: 'children'
|
|
57
|
-
} : _props$fieldNames,
|
|
58
|
-
_props$responseType = props.responseType,
|
|
59
|
-
responseType = _props$responseType === void 0 ? 'id' : _props$responseType,
|
|
60
|
-
_props$placeholder = props.placeholder,
|
|
61
|
-
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
|
|
62
|
-
onChange = props.onChange; // 是否显示下拉框
|
|
22
|
+
var alias = props.alias,
|
|
23
|
+
placeholder = props.placeholder,
|
|
24
|
+
showAllEvent = props.showAllEvent;
|
|
63
25
|
|
|
64
|
-
var _useState = useState(
|
|
26
|
+
var _useState = useState(),
|
|
65
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var _useState3 = useState({}),
|
|
71
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
72
|
-
group = _useState4[0],
|
|
73
|
-
setGroup = _useState4[1]; // 分组(下拉框第一列)信息, 原始信息
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var _useState5 = useState({}),
|
|
77
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
-
group2 = _useState6[0],
|
|
79
|
-
setGroup2 = _useState6[1]; // group的children数量
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var _useState7 = useState(0),
|
|
83
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
84
|
-
eventCount = _useState8[0],
|
|
85
|
-
setEventCount = _useState8[1]; // 选中值(下拉框第二列)选中信息
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var _useState9 = useState({}),
|
|
89
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
90
|
-
event = _useState10[0],
|
|
91
|
-
setEvent = _useState10[1]; // 搜索框是否是聚焦状态
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var _useState11 = useState(false),
|
|
95
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
96
|
-
focused = _useState12[0],
|
|
97
|
-
setFocused = _useState12[1]; // 第二列数据 虚拟滚动,每次滚动10条
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
var _useState13 = useState([]),
|
|
101
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
102
|
-
eventData = _useState14[0],
|
|
103
|
-
setEventData = _useState14[1]; // 搜索值
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var _useState15 = useState(''),
|
|
107
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
108
|
-
searchValue = _useState16[0],
|
|
109
|
-
setSearchValue = _useState16[1]; // 选中值
|
|
110
|
-
// const [eventValue, setEventValue] = useState<Event>()
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var pagesize = 9;
|
|
114
|
-
var cascadeRef = useRef(null);
|
|
28
|
+
currentValue = _useState2[0],
|
|
29
|
+
setCurrentValue = _useState2[1];
|
|
115
30
|
|
|
116
31
|
var _useContext = useContext(BizGlobalDataContext),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
var _useState17 = useState(options || eventMeta),
|
|
120
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
121
|
-
eventOptions = _useState18[0],
|
|
122
|
-
setEventOptions = _useState18[1];
|
|
123
|
-
|
|
124
|
-
var _useState19 = useState(true),
|
|
125
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
126
|
-
showOverview = _useState20[0],
|
|
127
|
-
setShowOverview = _useState20[1];
|
|
128
|
-
|
|
129
|
-
var _useState21 = useState(aliasName),
|
|
130
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
131
|
-
alias = _useState22[0],
|
|
132
|
-
setAlias = _useState22[1];
|
|
32
|
+
eventGroupList = _useContext.eventGroupList;
|
|
133
33
|
|
|
134
34
|
useEffect(function () {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}, [
|
|
139
|
-
|
|
35
|
+
if (!props.defaultValue) return;
|
|
36
|
+
var data = getValue(props.defaultValue);
|
|
37
|
+
setCurrentValue(data);
|
|
38
|
+
}, []);
|
|
140
39
|
useEffect(function () {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
} catch (err) {
|
|
166
|
-
_iterator2.e(err);
|
|
167
|
-
} finally {
|
|
168
|
-
_iterator2.f();
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
} catch (err) {
|
|
172
|
-
_iterator.e(err);
|
|
173
|
-
} finally {
|
|
174
|
-
_iterator.f();
|
|
175
|
-
}
|
|
40
|
+
if (!props.value) return;
|
|
41
|
+
var data = getValue(props.value);
|
|
42
|
+
setCurrentValue(data);
|
|
43
|
+
}, [props.value]);
|
|
44
|
+
|
|
45
|
+
var getValue = function getValue(param) {
|
|
46
|
+
var _param$group, _param$event;
|
|
47
|
+
|
|
48
|
+
var res = {};
|
|
49
|
+
|
|
50
|
+
if (!((_param$group = param.group) === null || _param$group === void 0 ? void 0 : _param$group.id)) {
|
|
51
|
+
res.group = {
|
|
52
|
+
id: 0,
|
|
53
|
+
name: '所有分组',
|
|
54
|
+
eventList: function () {
|
|
55
|
+
var list = [];
|
|
56
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
57
|
+
list = list.concat(group.eventList);
|
|
58
|
+
});
|
|
59
|
+
return list;
|
|
60
|
+
}()
|
|
61
|
+
};
|
|
62
|
+
}
|
|
176
63
|
|
|
177
|
-
|
|
64
|
+
if (((_param$event = param.event) === null || _param$event === void 0 ? void 0 : _param$event.id) === -100) {
|
|
65
|
+
res.event = {
|
|
66
|
+
id: -100,
|
|
67
|
+
name: '事件概览',
|
|
68
|
+
attrList: []
|
|
69
|
+
};
|
|
70
|
+
}
|
|
178
71
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
} // // 丢弃事件分组不显示
|
|
72
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
73
|
+
var _param$group2;
|
|
182
74
|
|
|
75
|
+
if (group.id === ((_param$group2 = param.group) === null || _param$group2 === void 0 ? void 0 : _param$group2.id)) res.group = group;
|
|
76
|
+
group.eventList.forEach(function (event) {
|
|
77
|
+
var _param$event2;
|
|
183
78
|
|
|
184
|
-
|
|
185
|
-
return group.groupName === '丢弃事件';
|
|
79
|
+
if (event.id === ((_param$event2 = param.event) === null || _param$event2 === void 0 ? void 0 : _param$event2.id)) res.event = event;
|
|
186
80
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}); // setGroup(firstGroup);
|
|
191
|
-
// setGroup2(firstGroup);
|
|
192
|
-
|
|
193
|
-
setGroup(result[0]);
|
|
194
|
-
setGroup2(result[0]);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
if (options && options.length > 0) {
|
|
198
|
-
initValue();
|
|
199
|
-
} // 添加点击事件监听,隐藏下拉框
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
var handleClick = function handleClick(e) {
|
|
203
|
-
if (!cascadeRef.current || !cascadeRef.current.contains(e.target)) {
|
|
204
|
-
setShowDropdown(false);
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
document.addEventListener('click', handleClick);
|
|
209
|
-
return function () {
|
|
210
|
-
document.removeEventListener('click', handleClick);
|
|
211
|
-
};
|
|
212
|
-
}, []); // 监听传入值改变
|
|
213
|
-
|
|
214
|
-
useEffect(function () {
|
|
215
|
-
var inValue = defaultValue || value;
|
|
216
|
-
if (!inValue || inValue === {}) return;
|
|
217
|
-
var id = _typeof(inValue) === 'object' ? inValue[fieldNames.value] : inValue;
|
|
218
|
-
if (event && event[fieldNames.value] === id) return;
|
|
219
|
-
var eid = id.split(',');
|
|
220
|
-
|
|
221
|
-
if (parseFloat(eid[0]) < 0) {
|
|
222
|
-
// 事件概览
|
|
223
|
-
if (eid[1] < 0) {
|
|
224
|
-
setEvent(function () {
|
|
225
|
-
var _ref;
|
|
226
|
-
|
|
227
|
-
return _ref = {}, _defineProperty(_ref, fieldNames.value, id), _defineProperty(_ref, fieldNames.label, '事件概览'), _ref;
|
|
228
|
-
});
|
|
229
|
-
setGroup(function () {
|
|
230
|
-
var _ref2;
|
|
231
|
-
|
|
232
|
-
return _ref2 = {}, _defineProperty(_ref2, fieldNames.groupLabel, '所有分组'), _defineProperty(_ref2, fieldNames.groupValue, -2), _ref2;
|
|
233
|
-
});
|
|
234
|
-
} else {
|
|
235
|
-
var _iterator3 = _createForOfIteratorHelper(eventOptions),
|
|
236
|
-
_step3;
|
|
237
|
-
|
|
238
|
-
try {
|
|
239
|
-
var _loop = function _loop() {
|
|
240
|
-
var option = _step3.value;
|
|
241
|
-
|
|
242
|
-
if (option[fieldNames.groupValue] === eid[1]) {
|
|
243
|
-
setGroup(function () {
|
|
244
|
-
var _ref3;
|
|
81
|
+
});
|
|
82
|
+
return res;
|
|
83
|
+
};
|
|
245
84
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
};
|
|
85
|
+
var getLabel = function getLabel() {
|
|
86
|
+
var label = '';
|
|
87
|
+
if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.event)) return label;
|
|
88
|
+
var name = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.event.alias) || (currentValue === null || currentValue === void 0 ? void 0 : currentValue.event.name);
|
|
251
89
|
|
|
252
|
-
|
|
253
|
-
|
|
90
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.event.id) === -100) {
|
|
91
|
+
var _currentValue$group;
|
|
254
92
|
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
} catch (err) {
|
|
258
|
-
_iterator3.e(err);
|
|
259
|
-
} finally {
|
|
260
|
-
_iterator3.f();
|
|
261
|
-
}
|
|
262
|
-
}
|
|
93
|
+
label = "".concat((currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$group = currentValue.group) === null || _currentValue$group === void 0 ? void 0 : _currentValue$group.name) || '所有分组', "/").concat(name);
|
|
263
94
|
} else {
|
|
264
|
-
|
|
265
|
-
_step4;
|
|
266
|
-
|
|
267
|
-
try {
|
|
268
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
269
|
-
var option = _step4.value;
|
|
270
|
-
var children = option[fieldNames.children] || [];
|
|
271
|
-
|
|
272
|
-
var _iterator5 = _createForOfIteratorHelper(children),
|
|
273
|
-
_step5;
|
|
274
|
-
|
|
275
|
-
try {
|
|
276
|
-
var _loop2 = function _loop2() {
|
|
277
|
-
var event = _step5.value;
|
|
278
|
-
|
|
279
|
-
if (event[fieldNames.value] == id) {
|
|
280
|
-
setEvent(function () {
|
|
281
|
-
return _objectSpread({}, event);
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
287
|
-
_loop2();
|
|
288
|
-
}
|
|
289
|
-
} catch (err) {
|
|
290
|
-
_iterator5.e(err);
|
|
291
|
-
} finally {
|
|
292
|
-
_iterator5.f();
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
} catch (err) {
|
|
296
|
-
_iterator4.e(err);
|
|
297
|
-
} finally {
|
|
298
|
-
_iterator4.f();
|
|
299
|
-
}
|
|
95
|
+
label = name;
|
|
300
96
|
}
|
|
301
|
-
}, [defaultValue, value]); // 更改group后,事件列表响应
|
|
302
|
-
|
|
303
|
-
useEffect(function () {
|
|
304
|
-
var arr = [],
|
|
305
|
-
size = 0;
|
|
306
|
-
|
|
307
|
-
if (group && group[fieldNames.children]) {
|
|
308
|
-
var _group$fieldNames$chi;
|
|
309
97
|
|
|
310
|
-
|
|
311
|
-
|
|
98
|
+
if (alias && alias !== name) {
|
|
99
|
+
label += "(".concat(alias, ")");
|
|
312
100
|
}
|
|
313
101
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
arr.unshift((_arr$unshift = {}, _defineProperty(_arr$unshift, fieldNames.value, "-2,".concat(group[fieldNames.groupValue])), _defineProperty(_arr$unshift, fieldNames.label, '事件概览'), _arr$unshift));
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
setEventData(arr);
|
|
321
|
-
setEventCount(size);
|
|
322
|
-
}, [group]);
|
|
323
|
-
useEffect(function () {
|
|
324
|
-
setShowOverview(function () {
|
|
325
|
-
return showAll;
|
|
326
|
-
});
|
|
327
|
-
}, [showAll]); // 初始化搜索框
|
|
328
|
-
|
|
329
|
-
useEffect(function () {
|
|
330
|
-
setSearchValue(function () {
|
|
331
|
-
return '';
|
|
332
|
-
});
|
|
333
|
-
}, [showDropdown]); // 搜索结果
|
|
334
|
-
|
|
335
|
-
useEffect(function () {
|
|
336
|
-
if (!showDropdown) return;
|
|
337
|
-
var arr = group2[fieldNames.children] && group2[fieldNames.children].filter(function (item) {
|
|
338
|
-
return item[fieldNames.label] && JSON.stringify(item[fieldNames.label]).toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
|
339
|
-
});
|
|
340
|
-
setGroup(function (group) {
|
|
341
|
-
group[fieldNames.children] = arr;
|
|
342
|
-
return _objectSpread({}, group);
|
|
343
|
-
});
|
|
344
|
-
}, [searchValue, group2, showDropdown]); // 加载更多
|
|
345
|
-
|
|
346
|
-
var loadMoreData = function loadMoreData() {
|
|
347
|
-
var _group$fieldNames$chi2;
|
|
102
|
+
return label;
|
|
103
|
+
};
|
|
348
104
|
|
|
349
|
-
|
|
350
|
-
|
|
105
|
+
var onChange = function onChange(value) {
|
|
106
|
+
setCurrentValue(value);
|
|
107
|
+
props.onChange && props.onChange(value);
|
|
351
108
|
};
|
|
352
109
|
|
|
353
110
|
return /*#__PURE__*/React.createElement("div", {
|
|
354
|
-
className:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
return !status;
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
364
|
-
className: "biz-input"
|
|
365
|
-
}, event[fieldNames.label] ? event[fieldNames.label] === '事件概览' ? "".concat(group[fieldNames.groupLabel], "/").concat(event[fieldNames.label]) : event[fieldNames.label] : /*#__PURE__*/React.createElement("span", {
|
|
366
|
-
className: "biz-placeholder"
|
|
367
|
-
}, placeholder), /*#__PURE__*/React.createElement("span", null, alias && alias !== '' && "(".concat(alias, ")"))), /*#__PURE__*/React.createElement(IconFont, {
|
|
368
|
-
className: "biz-select-zhankai",
|
|
369
|
-
type: 'icon-xiangxia'
|
|
370
|
-
})), options && options.length ? /*#__PURE__*/React.createElement("div", {
|
|
371
|
-
className: "biz-dropdown-cascade ".concat(showDropdown && 'biz-flex')
|
|
372
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
373
|
-
className: "biz-dropdown-menu"
|
|
374
|
-
}, eventOptions.map(function (menu, index) {
|
|
375
|
-
var _menu$fieldNames$chil;
|
|
376
|
-
|
|
377
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
378
|
-
className: "biz-dropdown-item ".concat(menu[fieldNames.groupValue] === group[fieldNames.groupValue] && 'box-hover'),
|
|
379
|
-
key: menu[fieldNames.groupValue] || 'key' + index,
|
|
380
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
381
|
-
e.stopPropagation();
|
|
382
|
-
setGroup(function () {
|
|
383
|
-
return _objectSpread({}, menu);
|
|
384
|
-
});
|
|
385
|
-
setGroup2(function () {
|
|
386
|
-
return _objectSpread({}, menu);
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
}, /*#__PURE__*/React.createElement("span", null, menu[fieldNames.groupLabel]), /*#__PURE__*/React.createElement("span", {
|
|
390
|
-
className: "biz-count"
|
|
391
|
-
}, (_menu$fieldNames$chil = menu[fieldNames.children]) === null || _menu$fieldNames$chil === void 0 ? void 0 : _menu$fieldNames$chil.length));
|
|
392
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
393
|
-
className: "biz-dropdown-content"
|
|
394
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
395
|
-
className: "biz-search-box",
|
|
396
|
-
prefix: /*#__PURE__*/React.createElement(IconFont, {
|
|
397
|
-
className: "biz-icon",
|
|
398
|
-
type: "icon-sousuo"
|
|
111
|
+
className: classPrefix
|
|
112
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
113
|
+
overlay: /*#__PURE__*/React.createElement(EventListPanel, {
|
|
114
|
+
value: currentValue,
|
|
115
|
+
onChange: onChange,
|
|
116
|
+
showOverview: showAllEvent
|
|
399
117
|
}),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
type: 'icon-qingchu'
|
|
404
|
-
})
|
|
118
|
+
trigger: ['click'],
|
|
119
|
+
overlayStyle: {
|
|
120
|
+
minWidth: 0
|
|
405
121
|
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
dataLength: eventData.length,
|
|
416
|
-
next: loadMoreData,
|
|
417
|
-
hasMore: eventData.length < eventCount,
|
|
418
|
-
loader: /*#__PURE__*/React.createElement(Skeleton, {
|
|
419
|
-
paragraph: {
|
|
420
|
-
rows: 1
|
|
421
|
-
},
|
|
422
|
-
active: true
|
|
423
|
-
}),
|
|
424
|
-
scrollableTarget: "scrollableDiv"
|
|
425
|
-
}, /*#__PURE__*/React.createElement(List, {
|
|
426
|
-
dataSource: eventData,
|
|
427
|
-
renderItem: function renderItem(item) {
|
|
428
|
-
return /*#__PURE__*/React.createElement(List.Item, {
|
|
429
|
-
key: item[fieldNames.value],
|
|
430
|
-
className: "biz-dropdown-item ".concat(item[fieldNames.value] === event[fieldNames.value] && 'box-active'),
|
|
431
|
-
onClick: function onClick(e) {
|
|
432
|
-
e.stopPropagation();
|
|
433
|
-
setEvent(function () {
|
|
434
|
-
return _objectSpread({}, item);
|
|
435
|
-
});
|
|
436
|
-
setShowDropdown(false);
|
|
437
|
-
|
|
438
|
-
if (onChange) {
|
|
439
|
-
item.groupId = group[fieldNames.groupValue];
|
|
440
|
-
|
|
441
|
-
if (responseType === 'id') {
|
|
442
|
-
onChange(item[fieldNames.value], item);
|
|
443
|
-
} else {
|
|
444
|
-
onChange(item, item[fieldNames.value]);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
449
|
-
dangerouslySetInnerHTML: {
|
|
450
|
-
__html: util.setHighLight(item[fieldNames.label], searchValue)
|
|
451
|
-
}
|
|
452
|
-
}));
|
|
453
|
-
}
|
|
454
|
-
})))), ")") : showDropdown && /*#__PURE__*/React.createElement("div", {
|
|
455
|
-
className: "biz-select-nodata"
|
|
456
|
-
}, "\u6682\u65E0\u6570\u636E"));
|
|
122
|
+
onVisibleChange: props.onVisibleChange
|
|
123
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
124
|
+
className: "".concat(classPrefix, "-handle")
|
|
125
|
+
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
126
|
+
theme: "secondary",
|
|
127
|
+
border: false,
|
|
128
|
+
label: getLabel(),
|
|
129
|
+
placeholder: placeholder
|
|
130
|
+
}))));
|
|
457
131
|
};
|
|
458
132
|
|
|
459
133
|
export default BizEventSelector;
|