@zgfe/business-lib 1.1.34-alpha.16 → 1.1.34-alpha.18
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/addToPanel/index.js +7 -1
- package/es/addToScene/index.js +1 -1
- package/es/assets/theme.js +1 -2
- package/es/attrConditions/components/valuesList.js +1 -0
- package/es/attributeSelector/index.js +10 -8
- package/es/attributeSelector/types.d.ts +2 -0
- package/es/chart/util/formatOption.js +1 -1
- package/es/constants/apis.d.ts +5 -0
- package/es/constants/apis.js +6 -1
- package/es/constants/common.d.ts +11 -0
- package/es/constants/common.js +35 -0
- package/es/cycleTime/month.js +17 -15
- package/es/eventSelector/demo/index.js +1 -0
- package/es/eventSelector/index.js +15 -10
- package/es/eventSelector/listPanel.js +22 -3
- package/es/eventSelector/types.d.ts +2 -0
- package/es/select/handle.js +6 -2
- package/es/select/index.js +13 -11
- package/es/targetConditionGroup/components/targetDimension.js +29 -27
- package/es/targetConditionGroup/data/operates.js +0 -3
- package/es/targetConditionGroup/demo/index.js +2 -1
- package/es/targetConditionGroup/index.js +65 -34
- package/es/targetConditionGroup/types.d.ts +1 -0
- package/es/targetSelector/index.js +9 -7
- package/es/userCondition/conditions/business/operatorCondition.d.ts +11 -0
- package/es/userCondition/conditions/business/operatorCondition.js +180 -0
- package/es/userCondition/conditions/business/paramsCondition.d.ts +9 -0
- package/es/userCondition/conditions/business/paramsCondition.js +79 -0
- package/es/userCondition/conditions/businessCondition.d.ts +0 -2
- package/es/userCondition/conditions/businessCondition.js +13 -193
- package/es/userCondition/conditions/cdpCondition.js +1 -1
- package/es/userCondition/conditions/dataAttribute.js +44 -226
- package/es/userCondition/conditions/eventCondition.js +2 -1
- package/es/userCondition/conditions/order/runPeriodCondition.d.ts +11 -0
- package/es/userCondition/conditions/order/runPeriodCondition.js +142 -0
- package/es/userCondition/conditions/order/runTimesCondition.d.ts +11 -0
- package/es/userCondition/conditions/order/runTimesCondition.js +112 -0
- package/es/userCondition/conditions/timeDimension.d.ts +1 -0
- package/es/userCondition/conditions/timeDimension.js +26 -76
- package/es/userTagsSelector/index.js +5 -3
- package/package.json +1 -1
package/es/addToPanel/index.js
CHANGED
|
@@ -165,7 +165,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
168
|
-
|
|
168
|
+
open: true,
|
|
169
169
|
title: props.type === 'edit' ? '修改当前看板指标' : '向看板添加指标',
|
|
170
170
|
width: 503,
|
|
171
171
|
maskClosable: false,
|
|
@@ -215,6 +215,12 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
215
215
|
hidden: props.type === 'edit',
|
|
216
216
|
rules: [{
|
|
217
217
|
validator: function validator(_, value) {
|
|
218
|
+
if (props.type === 'edit') {
|
|
219
|
+
notification.error({
|
|
220
|
+
message: '指标名称不能为空'
|
|
221
|
+
});
|
|
222
|
+
return Promise.reject();
|
|
223
|
+
}
|
|
218
224
|
if (!value || !/\S+/.test(value)) return Promise.reject('请输入指标名称!');
|
|
219
225
|
if (!/^[\S\s]{1,20}$/.test(value)) return Promise.reject('指标名称最多为20个字符!');
|
|
220
226
|
return Promise.resolve();
|
package/es/addToScene/index.js
CHANGED
|
@@ -112,7 +112,7 @@ var BizAddToScene = function BizAddToScene(props) {
|
|
|
112
112
|
}, []);
|
|
113
113
|
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
114
114
|
title: "\u6DFB\u52A0\u5230\u5E38\u7528\u573A\u666F",
|
|
115
|
-
|
|
115
|
+
open: true,
|
|
116
116
|
maskClosable: false,
|
|
117
117
|
onOk: onSave,
|
|
118
118
|
onCancel: onCancel,
|
package/es/assets/theme.js
CHANGED
|
@@ -18,7 +18,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
18
18
|
'box-shadow-base': '0px 4px 10px rgba(0, 0, 0, 0.1)',
|
|
19
19
|
'btn-text-hover-bg': '#cacdd4',
|
|
20
20
|
'warning-color': '#FD9F41',
|
|
21
|
-
'border-color-split': '#E8EFFF'
|
|
22
|
-
'icon-color': '#5F6085'
|
|
21
|
+
'border-color-split': '#E8EFFF'
|
|
23
22
|
};
|
|
24
23
|
});
|
|
@@ -87,19 +87,21 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
87
87
|
}, /*#__PURE__*/React.createElement("div", {
|
|
88
88
|
className: "".concat(classPrefix, "-handle")
|
|
89
89
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
dropdownRender: function dropdownRender() {
|
|
91
|
+
return /*#__PURE__*/React.createElement(AttrListPanel, _objectSpread(_objectSpread({
|
|
92
|
+
id: id
|
|
93
|
+
}, props), {}, {
|
|
94
|
+
value: currentAttr,
|
|
95
|
+
onChange: onChange
|
|
96
|
+
}));
|
|
97
|
+
},
|
|
96
98
|
trigger: ['click'],
|
|
97
99
|
overlayStyle: {
|
|
98
100
|
minWidth: 284,
|
|
99
101
|
width: width
|
|
100
102
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
open: visible,
|
|
104
|
+
onOpenChange: onVisibleChange,
|
|
103
105
|
destroyPopupOnHide: props.destroyPopupOnHide
|
|
104
106
|
}, /*#__PURE__*/React.createElement("div", {
|
|
105
107
|
style: {
|
|
@@ -21,7 +21,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params) {
|
|
|
21
21
|
} else {
|
|
22
22
|
lineLabel = util.toThousands(lineLabel);
|
|
23
23
|
}
|
|
24
|
-
var name =
|
|
24
|
+
var name = item.seriesName.trim();
|
|
25
25
|
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(item.color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
26
26
|
});
|
|
27
27
|
return htmlArray.join('');
|
package/es/constants/apis.d.ts
CHANGED
|
@@ -8,5 +8,10 @@ declare const Apis: {
|
|
|
8
8
|
queryDatasetList: string;
|
|
9
9
|
queryDatasetDetail: string;
|
|
10
10
|
getSocketToken: string;
|
|
11
|
+
bizDataTypeList: string;
|
|
12
|
+
orderAttributeMaster: string;
|
|
13
|
+
orderAttributeSon: string;
|
|
14
|
+
bizDataAttrList: string;
|
|
15
|
+
dataAttrValue: string;
|
|
11
16
|
};
|
|
12
17
|
export default Apis;
|
package/es/constants/apis.js
CHANGED
|
@@ -7,6 +7,11 @@ var Apis = {
|
|
|
7
7
|
queryPanelGroup: '/apppanel/panels.jsp',
|
|
8
8
|
queryDatasetList: '/zg/web/cdp/inner/dataset/list',
|
|
9
9
|
queryDatasetDetail: '/zg/web/cdp/inner/dataset/detail',
|
|
10
|
-
getSocketToken: '/zg/web/v2/tracking/view/websocket/token'
|
|
10
|
+
getSocketToken: '/zg/web/v2/tracking/view/websocket/token',
|
|
11
|
+
bizDataTypeList: '/cep-console/api/v1/bizdata/type/list',
|
|
12
|
+
orderAttributeMaster: '/cep-console/api/v1/cdp/orderAttribute/master',
|
|
13
|
+
orderAttributeSon: '/cep-console/api/v1/cdp/orderAttribute/son',
|
|
14
|
+
bizDataAttrList: '/cep-console/api/v1/bizdata/attr/list',
|
|
15
|
+
dataAttrValue: '/cep-console/api/v1/es/data/attr/value'
|
|
11
16
|
};
|
|
12
17
|
export default Apis;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export var BuiltinIndicators = {
|
|
2
|
+
id: -2,
|
|
3
|
+
name: '整体',
|
|
4
|
+
eventList: [{
|
|
5
|
+
name: '新增用户',
|
|
6
|
+
id: -201,
|
|
7
|
+
type: 'add',
|
|
8
|
+
isBuiltIn: true,
|
|
9
|
+
attrList: []
|
|
10
|
+
}, {
|
|
11
|
+
name: '活跃用户',
|
|
12
|
+
id: -202,
|
|
13
|
+
type: 'active',
|
|
14
|
+
isBuiltIn: true,
|
|
15
|
+
attrList: []
|
|
16
|
+
}, {
|
|
17
|
+
name: '访问次数',
|
|
18
|
+
id: -203,
|
|
19
|
+
type: 'times',
|
|
20
|
+
isBuiltIn: true,
|
|
21
|
+
attrList: []
|
|
22
|
+
}, {
|
|
23
|
+
name: '平均使用时长',
|
|
24
|
+
id: -204,
|
|
25
|
+
type: 'duration_avg',
|
|
26
|
+
isBuiltIn: true,
|
|
27
|
+
attrList: []
|
|
28
|
+
}, {
|
|
29
|
+
name: '使用时长分布',
|
|
30
|
+
id: -205,
|
|
31
|
+
type: 'duration',
|
|
32
|
+
isBuiltIn: true,
|
|
33
|
+
attrList: []
|
|
34
|
+
}]
|
|
35
|
+
};
|
package/es/cycleTime/month.js
CHANGED
|
@@ -69,21 +69,23 @@ var MonthDay = function MonthDay(props) {
|
|
|
69
69
|
}
|
|
70
70
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
71
71
|
disabled: disable,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
dropdownRender: function dropdownRender() {
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: "".concat(classPrefix, "-overlay")
|
|
75
|
+
}, dayList.map(function (item) {
|
|
76
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
key: item.value,
|
|
78
|
+
className: "".concat(classPrefix, "-day ").concat(chosenDayList.map(function (v) {
|
|
79
|
+
return v.value;
|
|
80
|
+
}).indexOf(item.value) > -1 ? 'active' : '', " ").concat(item.value === 32 ? 'lastday' : ''),
|
|
81
|
+
onClick: function onClick() {
|
|
82
|
+
onClickMonthDay(item.value);
|
|
83
|
+
}
|
|
84
|
+
}, item.label);
|
|
85
|
+
}));
|
|
86
|
+
},
|
|
87
|
+
open: visible,
|
|
88
|
+
onOpenChange: setVisible,
|
|
87
89
|
trigger: ['click']
|
|
88
90
|
}, /*#__PURE__*/React.createElement("div", {
|
|
89
91
|
className: "".concat(classPrefix, "-wrapper")
|
|
@@ -10,6 +10,7 @@ import SelectHandle from '../select/handle';
|
|
|
10
10
|
import BizGlobalDataContext from '../context';
|
|
11
11
|
import EventListPanel from './listPanel';
|
|
12
12
|
import './styles/index.less';
|
|
13
|
+
import { BuiltinIndicators } from '../constants/common';
|
|
13
14
|
export var classPrefix = 'biz-event-select';
|
|
14
15
|
var BizEventSelector = function BizEventSelector(props) {
|
|
15
16
|
var alias = props.alias,
|
|
@@ -42,13 +43,14 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
42
43
|
var getValue = function getValue(param) {
|
|
43
44
|
var _param$group, _param$event;
|
|
44
45
|
var res = {};
|
|
46
|
+
var allEvents = props.showBuiltInTarget ? eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.concat(BuiltinIndicators) : eventGroupList;
|
|
45
47
|
if (!((_param$group = param.group) === null || _param$group === void 0 ? void 0 : _param$group.id)) {
|
|
46
48
|
res.group = {
|
|
47
49
|
id: 0,
|
|
48
50
|
name: '所有分组',
|
|
49
51
|
eventList: function () {
|
|
50
52
|
var list = [];
|
|
51
|
-
|
|
53
|
+
allEvents === null || allEvents === void 0 ? void 0 : allEvents.forEach(function (group) {
|
|
52
54
|
list = list.concat(group.eventList);
|
|
53
55
|
});
|
|
54
56
|
return list;
|
|
@@ -62,7 +64,7 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
62
64
|
attrList: []
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
|
-
|
|
67
|
+
allEvents === null || allEvents === void 0 ? void 0 : allEvents.forEach(function (group) {
|
|
66
68
|
var _param$group2;
|
|
67
69
|
if (group.id === ((_param$group2 = param.group) === null || _param$group2 === void 0 ? void 0 : _param$group2.id)) res.group = group;
|
|
68
70
|
group.eventList.forEach(function (event) {
|
|
@@ -100,19 +102,22 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
100
102
|
return /*#__PURE__*/React.createElement("div", {
|
|
101
103
|
className: [classPrefix, border ? 'border' : ''].join(' ')
|
|
102
104
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
dropdownRender: function dropdownRender() {
|
|
106
|
+
return /*#__PURE__*/React.createElement(EventListPanel, {
|
|
107
|
+
value: currentValue,
|
|
108
|
+
onChange: onChange,
|
|
109
|
+
showOverview: showAllEvent,
|
|
110
|
+
showBuiltInTarget: props.showBuiltInTarget,
|
|
111
|
+
defaultSelectAble: defaultSelectAble
|
|
112
|
+
});
|
|
113
|
+
},
|
|
109
114
|
trigger: ['click'],
|
|
110
115
|
overlayStyle: {
|
|
111
116
|
minWidth: 0,
|
|
112
117
|
paddingLeft: 8
|
|
113
118
|
},
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
open: visible,
|
|
120
|
+
onOpenChange: onVisibleChange,
|
|
116
121
|
getPopupContainer: props.popupContainer ? function () {
|
|
117
122
|
return document.getElementById(selectId);
|
|
118
123
|
} : undefined,
|
|
@@ -15,6 +15,7 @@ import InfiniteScroll from 'react-infinite-scroll-component';
|
|
|
15
15
|
import { classPrefix } from '.';
|
|
16
16
|
import { BizGlobalDataContext } from '..';
|
|
17
17
|
import { ShowStatus } from '../attributeSelector/types';
|
|
18
|
+
import { BuiltinIndicators } from '../constants/common';
|
|
18
19
|
import BizSearchInput from '../searchInput';
|
|
19
20
|
import EventListOption from './option';
|
|
20
21
|
var EventListPanel = function EventListPanel(props) {
|
|
@@ -68,15 +69,33 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
71
|
});
|
|
71
|
-
list = [].concat(markList, _toConsumableArray(list));
|
|
72
|
+
list = props.showBuiltInTarget ? [].concat(_toConsumableArray(BuiltinIndicators.eventList), markList, _toConsumableArray(list)) : [].concat(markList, _toConsumableArray(list));
|
|
72
73
|
return list;
|
|
73
74
|
}(),
|
|
74
75
|
name: '所有分组'
|
|
75
76
|
};
|
|
76
77
|
setGroupList(function (list) {
|
|
77
|
-
return [group].concat(_toConsumableArray(list));
|
|
78
|
+
return props.showBuiltInTarget ? [group, BuiltinIndicators].concat(_toConsumableArray(list)) : [group].concat(_toConsumableArray(list));
|
|
79
|
+
});
|
|
80
|
+
setCurrentGroup(function () {
|
|
81
|
+
var _props$value;
|
|
82
|
+
if (props.defaultSelectAble && ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.group)) {
|
|
83
|
+
if (props.showBuiltInTarget && props.value.group.id === -2) {
|
|
84
|
+
return BuiltinIndicators;
|
|
85
|
+
} else {
|
|
86
|
+
var _currentGroup = group;
|
|
87
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (eGroup) {
|
|
88
|
+
var _props$value2, _props$value2$group;
|
|
89
|
+
if (eGroup.id === ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : (_props$value2$group = _props$value2.group) === null || _props$value2$group === void 0 ? void 0 : _props$value2$group.id)) {
|
|
90
|
+
_currentGroup = eGroup;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return _currentGroup;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return group;
|
|
78
98
|
});
|
|
79
|
-
setCurrentGroup(group);
|
|
80
99
|
}, []);
|
|
81
100
|
useEffect(function () {
|
|
82
101
|
setCurrentValue(props.value);
|
|
@@ -23,6 +23,7 @@ export declare namespace EventSelectTypes {
|
|
|
23
23
|
showAllEvent?: boolean;
|
|
24
24
|
defaultSelectAble?: boolean;
|
|
25
25
|
popupContainer?: boolean;
|
|
26
|
+
showBuiltInTarget?: boolean;
|
|
26
27
|
onVisibleChange?: (visible: boolean) => void;
|
|
27
28
|
border?: boolean;
|
|
28
29
|
theme?: string;
|
|
@@ -33,6 +34,7 @@ export declare namespace EventSelectTypes {
|
|
|
33
34
|
interface DropdownProps {
|
|
34
35
|
value?: Value;
|
|
35
36
|
showOverview?: boolean;
|
|
37
|
+
showBuiltInTarget?: boolean;
|
|
36
38
|
defaultSelectAble?: boolean;
|
|
37
39
|
onChange?: (value: Value, isOverview?: boolean) => void;
|
|
38
40
|
}
|
package/es/select/handle.js
CHANGED
|
@@ -67,7 +67,11 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
67
67
|
}
|
|
68
68
|
}, [focus]);
|
|
69
69
|
var searchInputWidth = useMemo(function () {
|
|
70
|
-
|
|
70
|
+
if (textRef.current && searchValue) {
|
|
71
|
+
textRef.current.innerText = searchValue;
|
|
72
|
+
return textRef.current.offsetWidth;
|
|
73
|
+
}
|
|
74
|
+
return 3;
|
|
71
75
|
}, [searchValue]);
|
|
72
76
|
var onDelete = function onDelete(data) {
|
|
73
77
|
if (props.onDelete) props.onDelete(data);
|
|
@@ -122,7 +126,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
122
126
|
}), /*#__PURE__*/React.createElement("span", {
|
|
123
127
|
className: "".concat(classPrefix, "-temp"),
|
|
124
128
|
ref: textRef
|
|
125
|
-
}
|
|
129
|
+
}));
|
|
126
130
|
}
|
|
127
131
|
return /*#__PURE__*/React.createElement("div", {
|
|
128
132
|
ref: handleRef,
|
package/es/select/index.js
CHANGED
|
@@ -146,15 +146,17 @@ var BizSelect = function BizSelect(props) {
|
|
|
146
146
|
setVisible(true);
|
|
147
147
|
};
|
|
148
148
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
dropdownRender: function dropdownRender() {
|
|
150
|
+
return /*#__PURE__*/React.createElement(SelectOverlay, _objectSpread(_objectSpread({}, res), {}, {
|
|
151
|
+
value: current,
|
|
152
|
+
labelField: labelField,
|
|
153
|
+
keyField: keyField,
|
|
154
|
+
searchValue: searchValue,
|
|
155
|
+
onChange: onChange,
|
|
156
|
+
ref: overlayRef,
|
|
157
|
+
searchPlaceholder: props.searchPlaceholder
|
|
158
|
+
}));
|
|
159
|
+
},
|
|
158
160
|
disabled: props.disable,
|
|
159
161
|
destroyPopupOnHide: props.destroyPopupOnHide,
|
|
160
162
|
overlayStyle: {
|
|
@@ -165,8 +167,8 @@ var BizSelect = function BizSelect(props) {
|
|
|
165
167
|
getPopupContainer: props.popupContainer ? function () {
|
|
166
168
|
return document.getElementById(selectId);
|
|
167
169
|
} : undefined,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
open: visible,
|
|
171
|
+
onOpenChange: onVisibleChange
|
|
170
172
|
}, /*#__PURE__*/React.createElement("div", {
|
|
171
173
|
className: "".concat(classPrefix, "-handle ").concat(props.className ? props.className : ''),
|
|
172
174
|
ref: selectRef,
|
|
@@ -97,33 +97,35 @@ var BizTargetDimension = function BizTargetDimension(props) {
|
|
|
97
97
|
overlayClassName: "".concat(classPrefix, "-dropmenu"),
|
|
98
98
|
placement: "bottom",
|
|
99
99
|
trigger: ['click'],
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
100
|
+
dropdownRender: function dropdownRender() {
|
|
101
|
+
return /*#__PURE__*/React.createElement(Menu, null, options.map(function (item) {
|
|
102
|
+
if (item.children) {
|
|
103
|
+
return /*#__PURE__*/React.createElement(SubMenu, {
|
|
104
|
+
popupClassName: "".concat(classPrefix, "-submenu"),
|
|
105
|
+
key: item.label,
|
|
106
|
+
title: item.label,
|
|
107
|
+
className: "".concat((dimensionParent === null || dimensionParent === void 0 ? void 0 : dimensionParent.label) === item.label ? 'active' : '')
|
|
108
|
+
}, item.children.map(function (sub) {
|
|
109
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
110
|
+
className: (dimensionParent === null || dimensionParent === void 0 ? void 0 : dimensionParent.value) === item.value && (dimension === null || dimension === void 0 ? void 0 : dimension.value) === sub.value ? 'active' : '',
|
|
111
|
+
title: sub.label,
|
|
112
|
+
key: "".concat(item.value, "-").concat(sub.value),
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
return onChange(sub, item);
|
|
115
|
+
}
|
|
116
|
+
}, sub.label);
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
120
|
+
className: (dimension === null || dimension === void 0 ? void 0 : dimension.value) === item.value ? 'active' : '',
|
|
121
|
+
key: item.value,
|
|
122
|
+
onClick: function onClick() {
|
|
123
|
+
return onChange(item);
|
|
124
|
+
},
|
|
125
|
+
title: item.label
|
|
126
|
+
}, item.label);
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
127
129
|
}, /*#__PURE__*/React.createElement("div", {
|
|
128
130
|
className: "".concat(classPrefix, "-dimension")
|
|
129
131
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
@@ -51,6 +51,7 @@ export default (function () {
|
|
|
51
51
|
max: 3
|
|
52
52
|
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
53
53
|
showAllEvent: true,
|
|
54
|
-
border: false
|
|
54
|
+
border: false,
|
|
55
|
+
showBuiltInTarget: true
|
|
55
56
|
}))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C\uFF1A", JSON.stringify(target)));
|
|
56
57
|
});
|