@zgfe/business-lib 1.1.34-insight.1 → 1.1.34-visual.9
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 +1 -7
- package/es/addToScene/index.js +1 -1
- package/es/assets/theme.js +2 -1
- package/es/attrConditions/components/valuesList.js +0 -1
- package/es/attrConditions/demo/group.js +3 -2
- package/es/attrConditions/index.d.ts +3 -1
- package/es/attrConditions/index.js +23 -19
- package/es/attrConditions/types.d.ts +1 -1
- package/es/attributeSelector/index.js +8 -10
- package/es/attributeSelector/types.d.ts +2 -2
- package/es/attributeSelector/util.js +5 -1
- package/es/chart/util/formatOption.js +1 -1
- package/es/context/index.d.ts +3 -1
- package/es/cycleTime/month.js +15 -17
- package/es/demoWrapper/content.js +2 -0
- package/es/eventSelector/demo/index.js +0 -1
- package/es/eventSelector/index.js +10 -15
- package/es/eventSelector/listPanel.js +3 -22
- package/es/eventSelector/types.d.ts +0 -2
- package/es/select/handle.js +2 -6
- package/es/select/index.js +11 -13
- package/es/socket/index.d.ts +3 -2
- package/es/socket/index.js +12 -4
- package/es/targetConditionGroup/components/targetDimension.js +27 -29
- package/es/targetConditionGroup/data/operates.js +3 -0
- package/es/targetConditionGroup/demo/index.js +1 -2
- package/es/targetConditionGroup/index.js +34 -65
- package/es/targetConditionGroup/types.d.ts +0 -1
- package/es/targetSelector/index.js +7 -9
- package/es/userTagsSelector/index.js +3 -5
- package/package.json +2 -2
- package/es/constants/common.d.ts +0 -11
- package/es/constants/common.js +0 -35
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
|
+
visible: true,
|
|
169
169
|
title: props.type === 'edit' ? '修改当前看板指标' : '向看板添加指标',
|
|
170
170
|
width: 503,
|
|
171
171
|
maskClosable: false,
|
|
@@ -215,12 +215,6 @@ 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
|
-
}
|
|
224
218
|
if (!value || !/\S+/.test(value)) return Promise.reject('请输入指标名称!');
|
|
225
219
|
if (!/^[\S\s]{1,20}$/.test(value)) return Promise.reject('指标名称最多为20个字符!');
|
|
226
220
|
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
|
+
visible: true,
|
|
116
116
|
maskClosable: false,
|
|
117
117
|
onOk: onSave,
|
|
118
118
|
onCancel: onCancel,
|
package/es/assets/theme.js
CHANGED
|
@@ -18,6 +18,7 @@ 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'
|
|
21
|
+
'border-color-split': '#E8EFFF',
|
|
22
|
+
'icon-color': '#5F6085'
|
|
22
23
|
};
|
|
23
24
|
});
|
|
@@ -7,11 +7,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useRef, useState } from 'react';
|
|
8
8
|
import { BizConditionGroup, DemoWrapper } from '@zgfe/business-lib';
|
|
9
9
|
import { Button } from 'antd';
|
|
10
|
+
import { OperateTypes } from '../types';
|
|
10
11
|
var conditions = [{
|
|
11
12
|
propCategory: 'userProp',
|
|
12
13
|
attrId: 0,
|
|
13
14
|
type: 2,
|
|
14
|
-
operator:
|
|
15
|
+
operator: OperateTypes.GT,
|
|
15
16
|
values: ['25200', '1'],
|
|
16
17
|
attrName: 'duration',
|
|
17
18
|
category: 'fixed',
|
|
@@ -19,7 +20,7 @@ var conditions = [{
|
|
|
19
20
|
}, {
|
|
20
21
|
propCategory: 'eventProp',
|
|
21
22
|
type: 1,
|
|
22
|
-
operator:
|
|
23
|
+
operator: OperateTypes.Equal,
|
|
23
24
|
values: ['Safari', 'Apple WebKit'],
|
|
24
25
|
attrId: 30183426
|
|
25
26
|
}];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { AttributeSelect } from '../attributeSelector/types';
|
|
2
3
|
import './styles/index.less';
|
|
3
|
-
import { AttrConditionTypes } from './types';
|
|
4
|
+
import { AttrConditionTypes, OperateTypes } from './types';
|
|
4
5
|
export declare const classPrefix = "biz-condition-item";
|
|
6
|
+
export declare function getCondition(attr: AttributeSelect.Value, operate: OperateTypes, values: string[]): AttrConditionTypes.ItemValue | undefined;
|
|
5
7
|
declare const BizConditionItem: React.FC<AttrConditionTypes.ItemProp>;
|
|
6
8
|
export default BizConditionItem;
|
|
@@ -12,6 +12,28 @@ import BizOperateList from './components/operateList';
|
|
|
12
12
|
import ValuesList from './components/valuesList';
|
|
13
13
|
import { Skeleton } from 'antd';
|
|
14
14
|
export var classPrefix = 'biz-condition-item';
|
|
15
|
+
export function getCondition(attr, operate, values) {
|
|
16
|
+
if (!attr) return;
|
|
17
|
+
var responseData = {
|
|
18
|
+
attrId: attr.id,
|
|
19
|
+
propCategory: attr.propCategory,
|
|
20
|
+
type: attr.type,
|
|
21
|
+
operator: operate,
|
|
22
|
+
values: values || [],
|
|
23
|
+
dimensionSub: attr.dimensionSub,
|
|
24
|
+
label: attr.label
|
|
25
|
+
};
|
|
26
|
+
if (attr.propCategory === PropCategory.EventProp) {
|
|
27
|
+
responseData.attrName = attr.label;
|
|
28
|
+
} else {
|
|
29
|
+
responseData.attrName = attr.name;
|
|
30
|
+
responseData.category = attr.category;
|
|
31
|
+
if (attr.propCategory === PropCategory.UserProp && attr.subtype) {
|
|
32
|
+
responseData.subtype = attr.subtype;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return responseData;
|
|
36
|
+
}
|
|
15
37
|
var BizConditionItem = function BizConditionItem(props) {
|
|
16
38
|
var _props$defaultValue, _props$value, _props$defaultValue2, _props$value2;
|
|
17
39
|
var defaultValue = props.defaultValue,
|
|
@@ -79,25 +101,7 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
79
101
|
useEffect(function () {
|
|
80
102
|
if (props.onChange) {
|
|
81
103
|
if (!attr) return;
|
|
82
|
-
|
|
83
|
-
attrId: attr.id,
|
|
84
|
-
propCategory: attr.propCategory,
|
|
85
|
-
type: attr.type,
|
|
86
|
-
operator: operate,
|
|
87
|
-
values: values || [],
|
|
88
|
-
dimensionSub: attr.dimensionSub,
|
|
89
|
-
label: attr.alias || attr.label
|
|
90
|
-
};
|
|
91
|
-
if (attr.propCategory === PropCategory.EventProp) {
|
|
92
|
-
responseData.attrName = attr.label;
|
|
93
|
-
} else {
|
|
94
|
-
responseData.attrName = attr.name;
|
|
95
|
-
responseData.category = attr.category;
|
|
96
|
-
if (attr.propCategory === PropCategory.UserProp && attr.subtype) {
|
|
97
|
-
responseData.subtype = attr.subtype;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
props.onChange(responseData);
|
|
104
|
+
props.onChange(getCondition(attr, operate, values));
|
|
101
105
|
}
|
|
102
106
|
}, [attr, operate, values]);
|
|
103
107
|
var onChangeAttr = function onChangeAttr(attrData) {
|
|
@@ -18,7 +18,7 @@ export declare namespace AttrConditionTypes {
|
|
|
18
18
|
propCategory?: 'userProp' | 'eventProp' | 'envProp';
|
|
19
19
|
category?: 'fixed' | 'custom';
|
|
20
20
|
dimensionSub?: string;
|
|
21
|
-
operator?:
|
|
21
|
+
operator?: OperateTypes;
|
|
22
22
|
values?: string[];
|
|
23
23
|
}
|
|
24
24
|
interface GroupValue {
|
|
@@ -87,21 +87,19 @@ 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
|
-
|
|
96
|
-
}));
|
|
97
|
-
},
|
|
90
|
+
overlay: /*#__PURE__*/React.createElement(AttrListPanel, _objectSpread(_objectSpread({
|
|
91
|
+
id: id
|
|
92
|
+
}, props), {}, {
|
|
93
|
+
value: currentAttr,
|
|
94
|
+
onChange: onChange
|
|
95
|
+
})),
|
|
98
96
|
trigger: ['click'],
|
|
99
97
|
overlayStyle: {
|
|
100
98
|
minWidth: 284,
|
|
101
99
|
width: width
|
|
102
100
|
},
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
visible: visible,
|
|
102
|
+
onVisibleChange: onVisibleChange,
|
|
105
103
|
destroyPopupOnHide: props.destroyPopupOnHide
|
|
106
104
|
}, /*#__PURE__*/React.createElement("div", {
|
|
107
105
|
style: {
|
|
@@ -24,8 +24,6 @@ export interface AnalysisEvent {
|
|
|
24
24
|
isOverview?: boolean;
|
|
25
25
|
eventHidden?: ShowStatus;
|
|
26
26
|
marked?: boolean;
|
|
27
|
-
isBuiltIn?: boolean;
|
|
28
|
-
type?: string;
|
|
29
27
|
}
|
|
30
28
|
export interface EventGroup {
|
|
31
29
|
id: number;
|
|
@@ -63,6 +61,8 @@ export interface PropGroups {
|
|
|
63
61
|
eventGroupList?: EventGroup[];
|
|
64
62
|
userPropList?: UserProp[];
|
|
65
63
|
envPropList?: EnvProp[];
|
|
64
|
+
eventNameMap?: Record<string, AnalysisEvent>;
|
|
65
|
+
eventIdMap?: Record<number, AnalysisEvent>;
|
|
66
66
|
}
|
|
67
67
|
export declare namespace AttributeSelect {
|
|
68
68
|
type Value = EventProp | UserProp | EnvProp | null;
|
|
@@ -3,7 +3,9 @@ export default function convertAttributeData(store) {
|
|
|
3
3
|
var res = {
|
|
4
4
|
envPropList: [],
|
|
5
5
|
eventGroupList: [],
|
|
6
|
-
userPropList: []
|
|
6
|
+
userPropList: [],
|
|
7
|
+
eventNameMap: {},
|
|
8
|
+
eventIdMap: {}
|
|
7
9
|
};
|
|
8
10
|
(_store$eventList = store.eventList) === null || _store$eventList === void 0 ? void 0 : _store$eventList.forEach(function (group_) {
|
|
9
11
|
var _res$eventGroupList;
|
|
@@ -39,6 +41,8 @@ export default function convertAttributeData(store) {
|
|
|
39
41
|
eventHidden: e.event_hidden,
|
|
40
42
|
marked: Boolean(e.mark_type)
|
|
41
43
|
};
|
|
44
|
+
res.eventNameMap[event.name] = event;
|
|
45
|
+
res.eventIdMap[event.id] = event;
|
|
42
46
|
if (event.marked) {
|
|
43
47
|
markList.push(event);
|
|
44
48
|
} else {
|
|
@@ -21,7 +21,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params) {
|
|
|
21
21
|
} else {
|
|
22
22
|
lineLabel = util.toThousands(lineLabel);
|
|
23
23
|
}
|
|
24
|
-
var name = item.seriesName.trim();
|
|
24
|
+
var name = (params.length > 1 ? item.seriesName : item.data && item.data.label ? item.data.label : item.name).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/context/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { EventGroup, UserProp, EnvProp } from '../attributeSelector/types';
|
|
2
|
+
import { EventGroup, UserProp, EnvProp, AnalysisEvent } from '../attributeSelector/types';
|
|
3
3
|
export interface AppInfoProps {
|
|
4
4
|
appId?: string | number;
|
|
5
5
|
platform?: string | number;
|
|
@@ -24,6 +24,8 @@ export interface Menu {
|
|
|
24
24
|
export interface GlobalContextProps {
|
|
25
25
|
userGroupList?: Array<any>;
|
|
26
26
|
eventGroupList?: EventGroup[];
|
|
27
|
+
eventNameMap?: Record<string, AnalysisEvent>;
|
|
28
|
+
eventIdMap?: Record<number, AnalysisEvent>;
|
|
27
29
|
userPropList?: UserProp[];
|
|
28
30
|
eventEnvList?: EnvProp[];
|
|
29
31
|
menuNameMap?: {
|
package/es/cycleTime/month.js
CHANGED
|
@@ -69,23 +69,21 @@ 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
|
-
|
|
87
|
-
open: visible,
|
|
88
|
-
onOpenChange: setVisible,
|
|
72
|
+
overlay: /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "".concat(classPrefix, "-overlay")
|
|
74
|
+
}, dayList.map(function (item) {
|
|
75
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
76
|
+
key: item.value,
|
|
77
|
+
className: "".concat(classPrefix, "-day ").concat(chosenDayList.map(function (v) {
|
|
78
|
+
return v.value;
|
|
79
|
+
}).indexOf(item.value) > -1 ? 'active' : '', " ").concat(item.value === 32 ? 'lastday' : ''),
|
|
80
|
+
onClick: function onClick() {
|
|
81
|
+
onClickMonthDay(item.value);
|
|
82
|
+
}
|
|
83
|
+
}, item.label);
|
|
84
|
+
})),
|
|
85
|
+
visible: visible,
|
|
86
|
+
onVisibleChange: setVisible,
|
|
89
87
|
trigger: ['click']
|
|
90
88
|
}, /*#__PURE__*/React.createElement("div", {
|
|
91
89
|
className: "".concat(classPrefix, "-wrapper")
|
|
@@ -175,6 +175,8 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
175
175
|
eventGroupList: store === null || store === void 0 ? void 0 : store.eventGroupList,
|
|
176
176
|
userPropList: store === null || store === void 0 ? void 0 : store.userPropList,
|
|
177
177
|
eventEnvList: store === null || store === void 0 ? void 0 : store.envPropList,
|
|
178
|
+
eventIdMap: store === null || store === void 0 ? void 0 : store.eventIdMap,
|
|
179
|
+
eventNameMap: store === null || store === void 0 ? void 0 : store.eventNameMap,
|
|
178
180
|
userGroupList: userGroups
|
|
179
181
|
}
|
|
180
182
|
}, children));
|
|
@@ -10,7 +10,6 @@ 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';
|
|
14
13
|
export var classPrefix = 'biz-event-select';
|
|
15
14
|
var BizEventSelector = function BizEventSelector(props) {
|
|
16
15
|
var alias = props.alias,
|
|
@@ -43,14 +42,13 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
43
42
|
var getValue = function getValue(param) {
|
|
44
43
|
var _param$group, _param$event;
|
|
45
44
|
var res = {};
|
|
46
|
-
var allEvents = props.showBuiltInTarget ? eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.concat(BuiltinIndicators) : eventGroupList;
|
|
47
45
|
if (!((_param$group = param.group) === null || _param$group === void 0 ? void 0 : _param$group.id)) {
|
|
48
46
|
res.group = {
|
|
49
47
|
id: 0,
|
|
50
48
|
name: '所有分组',
|
|
51
49
|
eventList: function () {
|
|
52
50
|
var list = [];
|
|
53
|
-
|
|
51
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
54
52
|
list = list.concat(group.eventList);
|
|
55
53
|
});
|
|
56
54
|
return list;
|
|
@@ -64,7 +62,7 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
64
62
|
attrList: []
|
|
65
63
|
};
|
|
66
64
|
}
|
|
67
|
-
|
|
65
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
68
66
|
var _param$group2;
|
|
69
67
|
if (group.id === ((_param$group2 = param.group) === null || _param$group2 === void 0 ? void 0 : _param$group2.id)) res.group = group;
|
|
70
68
|
group.eventList.forEach(function (event) {
|
|
@@ -102,22 +100,19 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
102
100
|
return /*#__PURE__*/React.createElement("div", {
|
|
103
101
|
className: [classPrefix, border ? 'border' : ''].join(' ')
|
|
104
102
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
defaultSelectAble: defaultSelectAble
|
|
112
|
-
});
|
|
113
|
-
},
|
|
103
|
+
overlay: /*#__PURE__*/React.createElement(EventListPanel, {
|
|
104
|
+
value: currentValue,
|
|
105
|
+
onChange: onChange,
|
|
106
|
+
showOverview: showAllEvent,
|
|
107
|
+
defaultSelectAble: defaultSelectAble
|
|
108
|
+
}),
|
|
114
109
|
trigger: ['click'],
|
|
115
110
|
overlayStyle: {
|
|
116
111
|
minWidth: 0,
|
|
117
112
|
paddingLeft: 8
|
|
118
113
|
},
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
visible: visible,
|
|
115
|
+
onVisibleChange: onVisibleChange,
|
|
121
116
|
getPopupContainer: props.popupContainer ? function () {
|
|
122
117
|
return document.getElementById(selectId);
|
|
123
118
|
} : undefined,
|
|
@@ -15,7 +15,6 @@ 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';
|
|
19
18
|
import BizSearchInput from '../searchInput';
|
|
20
19
|
import EventListOption from './option';
|
|
21
20
|
var EventListPanel = function EventListPanel(props) {
|
|
@@ -69,33 +68,15 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
});
|
|
72
|
-
list =
|
|
71
|
+
list = [].concat(markList, _toConsumableArray(list));
|
|
73
72
|
return list;
|
|
74
73
|
}(),
|
|
75
74
|
name: '所有分组'
|
|
76
75
|
};
|
|
77
76
|
setGroupList(function (list) {
|
|
78
|
-
return
|
|
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;
|
|
77
|
+
return [group].concat(_toConsumableArray(list));
|
|
98
78
|
});
|
|
79
|
+
setCurrentGroup(group);
|
|
99
80
|
}, []);
|
|
100
81
|
useEffect(function () {
|
|
101
82
|
setCurrentValue(props.value);
|
|
@@ -23,7 +23,6 @@ export declare namespace EventSelectTypes {
|
|
|
23
23
|
showAllEvent?: boolean;
|
|
24
24
|
defaultSelectAble?: boolean;
|
|
25
25
|
popupContainer?: boolean;
|
|
26
|
-
showBuiltInTarget?: boolean;
|
|
27
26
|
onVisibleChange?: (visible: boolean) => void;
|
|
28
27
|
border?: boolean;
|
|
29
28
|
theme?: string;
|
|
@@ -34,7 +33,6 @@ export declare namespace EventSelectTypes {
|
|
|
34
33
|
interface DropdownProps {
|
|
35
34
|
value?: Value;
|
|
36
35
|
showOverview?: boolean;
|
|
37
|
-
showBuiltInTarget?: boolean;
|
|
38
36
|
defaultSelectAble?: boolean;
|
|
39
37
|
onChange?: (value: Value, isOverview?: boolean) => void;
|
|
40
38
|
}
|
package/es/select/handle.js
CHANGED
|
@@ -67,11 +67,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
67
67
|
}
|
|
68
68
|
}, [focus]);
|
|
69
69
|
var searchInputWidth = useMemo(function () {
|
|
70
|
-
|
|
71
|
-
textRef.current.innerText = searchValue;
|
|
72
|
-
return textRef.current.offsetWidth;
|
|
73
|
-
}
|
|
74
|
-
return 3;
|
|
70
|
+
return textRef.current && searchValue ? textRef.current.offsetWidth : 3;
|
|
75
71
|
}, [searchValue]);
|
|
76
72
|
var onDelete = function onDelete(data) {
|
|
77
73
|
if (props.onDelete) props.onDelete(data);
|
|
@@ -126,7 +122,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
126
122
|
}), /*#__PURE__*/React.createElement("span", {
|
|
127
123
|
className: "".concat(classPrefix, "-temp"),
|
|
128
124
|
ref: textRef
|
|
129
|
-
}));
|
|
125
|
+
}, searchValue));
|
|
130
126
|
}
|
|
131
127
|
return /*#__PURE__*/React.createElement("div", {
|
|
132
128
|
ref: handleRef,
|
package/es/select/index.js
CHANGED
|
@@ -146,17 +146,15 @@ 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
|
-
|
|
158
|
-
}));
|
|
159
|
-
},
|
|
149
|
+
overlay: /*#__PURE__*/React.createElement(SelectOverlay, _objectSpread(_objectSpread({}, res), {}, {
|
|
150
|
+
value: current,
|
|
151
|
+
labelField: labelField,
|
|
152
|
+
keyField: keyField,
|
|
153
|
+
searchValue: searchValue,
|
|
154
|
+
onChange: onChange,
|
|
155
|
+
ref: overlayRef,
|
|
156
|
+
searchPlaceholder: props.searchPlaceholder
|
|
157
|
+
})),
|
|
160
158
|
disabled: props.disable,
|
|
161
159
|
destroyPopupOnHide: props.destroyPopupOnHide,
|
|
162
160
|
overlayStyle: {
|
|
@@ -167,8 +165,8 @@ var BizSelect = function BizSelect(props) {
|
|
|
167
165
|
getPopupContainer: props.popupContainer ? function () {
|
|
168
166
|
return document.getElementById(selectId);
|
|
169
167
|
} : undefined,
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
visible: visible,
|
|
169
|
+
onVisibleChange: onVisibleChange
|
|
172
170
|
}, /*#__PURE__*/React.createElement("div", {
|
|
173
171
|
className: "".concat(classPrefix, "-handle ").concat(props.className ? props.className : ''),
|
|
174
172
|
ref: selectRef,
|
package/es/socket/index.d.ts
CHANGED
|
@@ -8,11 +8,12 @@ declare class SocketClient {
|
|
|
8
8
|
private showLog;
|
|
9
9
|
private pingTimer?;
|
|
10
10
|
private appkey?;
|
|
11
|
+
private token?;
|
|
11
12
|
constructor(url: string, appkey: string, params?: Record<string, any>);
|
|
12
13
|
emit(event: string, payload?: SocketClientTypes.Message['data']['payload']): void;
|
|
13
14
|
on<T>(type: SocketClientTypes.EventType | string, handle: (data?: T) => void): void;
|
|
14
|
-
onConnected(handle: () => void): void;
|
|
15
|
-
onDisconnected(handle: () => void): void;
|
|
15
|
+
onConnected(handle: (data?: any) => void): void;
|
|
16
|
+
onDisconnected(handle: (data?: any) => void): void;
|
|
16
17
|
onError(handle: (data?: Error) => void): void;
|
|
17
18
|
private _onError;
|
|
18
19
|
private _onClose;
|
package/es/socket/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
29
29
|
this.showLog = false;
|
|
30
30
|
this.pingTimer = void 0;
|
|
31
31
|
this.appkey = void 0;
|
|
32
|
+
this.token = void 0;
|
|
32
33
|
this.appkey = appkey;
|
|
33
34
|
this.url = url;
|
|
34
35
|
this.params = params;
|
|
@@ -122,7 +123,7 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
122
123
|
_this = this;
|
|
123
124
|
this.log('info', 'socket连接成功', event);
|
|
124
125
|
(_this$listeners$conne = this.listeners['connected']) === null || _this$listeners$conne === void 0 ? void 0 : _this$listeners$conne.forEach(function (handle) {
|
|
125
|
-
handle.call(undefined);
|
|
126
|
+
handle.call(undefined, _this.token);
|
|
126
127
|
});
|
|
127
128
|
this.log('info', 'clear catch', this.catch);
|
|
128
129
|
this.catch.forEach(function (_ref) {
|
|
@@ -137,7 +138,7 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
137
138
|
}, {
|
|
138
139
|
key: "onMessage",
|
|
139
140
|
value: function onMessage(event) {
|
|
140
|
-
var _this$listeners$Socke, _this$listeners$Socke2, _this$listeners$Socke3;
|
|
141
|
+
var _this$listeners$Socke, _this$listeners$Socke2, _this$listeners$Socke3, _this$listeners$unkno;
|
|
141
142
|
var res = JSON.parse(event.data);
|
|
142
143
|
if (res.code) {
|
|
143
144
|
switch (Number(res.code)) {
|
|
@@ -158,6 +159,10 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
158
159
|
break;
|
|
159
160
|
case SocketClientTypes.ResponseCode.paramError:
|
|
160
161
|
this._onError(new Error('参数缺失或错误'));
|
|
162
|
+
default:
|
|
163
|
+
(_this$listeners$unkno = this.listeners['unknownCode']) === null || _this$listeners$unkno === void 0 ? void 0 : _this$listeners$unkno.forEach(function (handle) {
|
|
164
|
+
handle.call(undefined, res);
|
|
165
|
+
});
|
|
161
166
|
}
|
|
162
167
|
} else if (res.type === SocketClientTypes.RequestType.pong) {
|
|
163
168
|
return;
|
|
@@ -191,7 +196,8 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
191
196
|
value: function removeListener(event, handle) {
|
|
192
197
|
var _this3 = this;
|
|
193
198
|
if (handle) {
|
|
194
|
-
|
|
199
|
+
var _this$listeners$event;
|
|
200
|
+
(_this$listeners$event = this.listeners[event]) === null || _this$listeners$event === void 0 ? void 0 : _this$listeners$event.forEach(function (item, i) {
|
|
195
201
|
if (item === handle) {
|
|
196
202
|
_this3.listeners[event].splice(i, 1);
|
|
197
203
|
}
|
|
@@ -235,10 +241,12 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
235
241
|
var _this4 = this;
|
|
236
242
|
this.getToken().then(function (token) {
|
|
237
243
|
_this4.params = params || _this4.params;
|
|
244
|
+
_this4.token = token;
|
|
238
245
|
if (_this4.client) _this4.close();
|
|
239
246
|
var paramUrl = ["socketToken=".concat(token)];
|
|
240
247
|
if (_this4.params) {
|
|
241
|
-
|
|
248
|
+
var _Object$keys;
|
|
249
|
+
(_Object$keys = Object.keys(_this4.params || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.forEach(function (key) {
|
|
242
250
|
if (_.isObject(_this4.params[key]) || _.isArray(_this4.params[key])) {
|
|
243
251
|
paramUrl.push("".concat(key, "=").concat(JSON.stringify(_this4.params[key])));
|
|
244
252
|
} else {
|
|
@@ -97,35 +97,33 @@ 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
|
-
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
100
|
+
overlay: /*#__PURE__*/React.createElement(Menu, null, options.map(function (item) {
|
|
101
|
+
if (item.children) {
|
|
102
|
+
return /*#__PURE__*/React.createElement(SubMenu, {
|
|
103
|
+
popupClassName: "".concat(classPrefix, "-submenu"),
|
|
104
|
+
key: item.label,
|
|
105
|
+
title: item.label,
|
|
106
|
+
className: "".concat((dimensionParent === null || dimensionParent === void 0 ? void 0 : dimensionParent.label) === item.label ? 'active' : '')
|
|
107
|
+
}, item.children.map(function (sub) {
|
|
108
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
109
|
+
className: (dimensionParent === null || dimensionParent === void 0 ? void 0 : dimensionParent.value) === item.value && (dimension === null || dimension === void 0 ? void 0 : dimension.value) === sub.value ? 'active' : '',
|
|
110
|
+
title: sub.label,
|
|
111
|
+
key: "".concat(item.value, "-").concat(sub.value),
|
|
112
|
+
onClick: function onClick() {
|
|
113
|
+
return onChange(sub, item);
|
|
114
|
+
}
|
|
115
|
+
}, sub.label);
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
119
|
+
className: (dimension === null || dimension === void 0 ? void 0 : dimension.value) === item.value ? 'active' : '',
|
|
120
|
+
key: item.value,
|
|
121
|
+
onClick: function onClick() {
|
|
122
|
+
return onChange(item);
|
|
123
|
+
},
|
|
124
|
+
title: item.label
|
|
125
|
+
}, item.label);
|
|
126
|
+
}))
|
|
129
127
|
}, /*#__PURE__*/React.createElement("div", {
|
|
130
128
|
className: "".concat(classPrefix, "-dimension")
|
|
131
129
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
@@ -51,7 +51,6 @@ export default (function () {
|
|
|
51
51
|
max: 3
|
|
52
52
|
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
53
53
|
showAllEvent: true,
|
|
54
|
-
border: false
|
|
55
|
-
showBuiltInTarget: true
|
|
54
|
+
border: false
|
|
56
55
|
}))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C\uFF1A", JSON.stringify(target)));
|
|
57
56
|
});
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
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; }
|
|
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
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
2
|
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."); }
|
|
9
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -18,10 +12,9 @@ import BizConditionGroup from '../attrConditions/group';
|
|
|
18
12
|
import { Skeleton } from 'antd';
|
|
19
13
|
import _ from 'lodash';
|
|
20
14
|
import BizGlobalDataContext from '../context';
|
|
21
|
-
import { BuiltinIndicators } from '../constants/common';
|
|
22
15
|
export var classPrefix = 'biz-target';
|
|
23
16
|
var BizTargetCondition = function BizTargetCondition(props) {
|
|
24
|
-
var _targetData$value2, _targetData$value2$
|
|
17
|
+
var _targetData$value2, _targetData$value2$ev, _targetData$value3, _targetData$value3$ev, _targetData$value4, _targetData$value4$ev, _targetData$value5, _targetData$value5$ev;
|
|
25
18
|
var max = props.max;
|
|
26
19
|
var _useState = useState(),
|
|
27
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -76,14 +69,14 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
76
69
|
}, []);
|
|
77
70
|
useEffect(function () {
|
|
78
71
|
if (targetData === null || targetData === void 0 ? void 0 : targetData.value) {
|
|
79
|
-
var _targetData$value$eve
|
|
72
|
+
var _targetData$value$eve;
|
|
80
73
|
var canAdd = true,
|
|
81
74
|
canDelete = true;
|
|
82
|
-
if (((_targetData$value$eve = targetData.value.event) === null || _targetData$value$eve === void 0 ? void 0 : _targetData$value$eve.id) === -100
|
|
83
|
-
var _targetData$value$gro
|
|
75
|
+
if (((_targetData$value$eve = targetData.value.event) === null || _targetData$value$eve === void 0 ? void 0 : _targetData$value$eve.id) === -100) {
|
|
76
|
+
var _targetData$value$gro;
|
|
84
77
|
canAdd = false;
|
|
85
78
|
setFilters(undefined);
|
|
86
|
-
if (!((_targetData$value$gro = targetData.value.group) === null || _targetData$value$gro === void 0 ? void 0 : _targetData$value$gro.id)
|
|
79
|
+
if (!((_targetData$value$gro = targetData.value.group) === null || _targetData$value$gro === void 0 ? void 0 : _targetData$value$gro.id)) {
|
|
87
80
|
canDelete = false;
|
|
88
81
|
}
|
|
89
82
|
} else {
|
|
@@ -116,55 +109,37 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
116
109
|
eventList: []
|
|
117
110
|
};
|
|
118
111
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
eventList: []
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
BuiltinIndicators.eventList.forEach(function (item) {
|
|
129
|
-
if (item.id === data.eventId) {
|
|
130
|
-
target.value.event = _objectSpread({}, item);
|
|
131
|
-
hasEvent = true;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
112
|
+
if (data.eventId === -100) {
|
|
113
|
+
target.value.event = {
|
|
114
|
+
id: -100,
|
|
115
|
+
name: '事件概览',
|
|
116
|
+
attrList: []
|
|
117
|
+
};
|
|
134
118
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
for (var i = 0; i < eventGroupList.length; i++) {
|
|
144
|
-
var group = eventGroupList[i];
|
|
145
|
-
if (data.eventId !== -100) {
|
|
146
|
-
for (var j = 0; j < group.eventList.length; j++) {
|
|
147
|
-
var event = group.eventList[j];
|
|
148
|
-
if (event.id === data.eventId) {
|
|
149
|
-
target.value.event = event;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
119
|
+
for (var i = 0; i < eventGroupList.length; i++) {
|
|
120
|
+
var group = eventGroupList[i];
|
|
121
|
+
if (data.eventId !== -100) {
|
|
122
|
+
for (var j = 0; j < group.eventList.length; j++) {
|
|
123
|
+
var event = group.eventList[j];
|
|
124
|
+
if (event.id === data.eventId) {
|
|
125
|
+
target.value.event = event;
|
|
126
|
+
break;
|
|
152
127
|
}
|
|
153
128
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
129
|
+
}
|
|
130
|
+
if (data.eventGroupId && data.eventGroupId === group.id) {
|
|
131
|
+
target.value.group = group;
|
|
132
|
+
break;
|
|
158
133
|
}
|
|
159
134
|
}
|
|
160
135
|
}
|
|
161
136
|
return target;
|
|
162
137
|
};
|
|
163
138
|
var onChangeTarget = function onChangeTarget(target) {
|
|
164
|
-
var _target$value, _target$value$event, _targetData$value, _targetData$value$
|
|
139
|
+
var _target$value, _target$value$event, _targetData$value, _targetData$value$eve2;
|
|
165
140
|
setTargetData(target);
|
|
166
141
|
var filterData = _.cloneDeep(filters);
|
|
167
|
-
if (((_target$value = target.value) === null || _target$value === void 0 ? void 0 : (_target$value$event = _target$value.event) === null || _target$value$event === void 0 ? void 0 : _target$value$event.id) !== (targetData === null || targetData === void 0 ? void 0 : (_targetData$value = targetData.value) === null || _targetData$value === void 0 ? void 0 : (_targetData$value$
|
|
142
|
+
if (((_target$value = target.value) === null || _target$value === void 0 ? void 0 : (_target$value$event = _target$value.event) === null || _target$value$event === void 0 ? void 0 : _target$value$event.id) !== (targetData === null || targetData === void 0 ? void 0 : (_targetData$value = targetData.value) === null || _targetData$value === void 0 ? void 0 : (_targetData$value$eve2 = _targetData$value.event) === null || _targetData$value$eve2 === void 0 ? void 0 : _targetData$value$eve2.id)) {
|
|
168
143
|
filterData = undefined;
|
|
169
144
|
setFilters(undefined);
|
|
170
145
|
setIsAdd(false);
|
|
@@ -188,25 +163,19 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
188
163
|
setFilters(data);
|
|
189
164
|
onChange(dimension, targetData, data);
|
|
190
165
|
};
|
|
191
|
-
var onChange = function onChange(analysisDimension, target,
|
|
166
|
+
var onChange = function onChange(analysisDimension, target, filterDatas) {
|
|
192
167
|
if (props.onChange) {
|
|
193
|
-
var _target$value$event2, _target$value$event3, _target$value$event4, _target$value$event5, _target$value$event6, _target$value$
|
|
168
|
+
var _target$value$event2, _target$value$event3, _target$value$event4, _target$value$event5, _target$value$event6, _target$value$group;
|
|
194
169
|
if (!target || !target.value || !((_target$value$event2 = target.value.event) === null || _target$value$event2 === void 0 ? void 0 : _target$value$event2.id)) return;
|
|
195
|
-
var type = target.value.event.type;
|
|
196
|
-
if (!type) {
|
|
197
|
-
var _target$value$group;
|
|
198
|
-
type = ((_target$value$group = target.value.group) === null || _target$value$group === void 0 ? void 0 : _target$value$group.id) === -2 ? 'whole' : 'event';
|
|
199
|
-
}
|
|
200
170
|
var data = {
|
|
201
|
-
type:
|
|
171
|
+
type: 'event',
|
|
202
172
|
alias: (target === null || target === void 0 ? void 0 : target.alias) || target.value.event.alias || ((_target$value$event3 = target.value.event) === null || _target$value$event3 === void 0 ? void 0 : _target$value$event3.name) || '',
|
|
203
173
|
eventId: (_target$value$event4 = target.value.event) === null || _target$value$event4 === void 0 ? void 0 : _target$value$event4.id,
|
|
204
174
|
eventName: ((_target$value$event5 = target.value.event) === null || _target$value$event5 === void 0 ? void 0 : _target$value$event5.alias) || ((_target$value$event6 = target.value.event) === null || _target$value$event6 === void 0 ? void 0 : _target$value$event6.name),
|
|
205
|
-
eventGroupId: (_target$value$
|
|
175
|
+
eventGroupId: (_target$value$group = target.value.group) === null || _target$value$group === void 0 ? void 0 : _target$value$group.id,
|
|
206
176
|
analysisDimension: analysisDimension,
|
|
207
|
-
filters:
|
|
208
|
-
marked: target.value.event.marked
|
|
209
|
-
isBuiltIn: target.value.event.isBuiltIn
|
|
177
|
+
filters: filterDatas,
|
|
178
|
+
marked: target.value.event.marked
|
|
210
179
|
};
|
|
211
180
|
props.onChange(data);
|
|
212
181
|
}
|
|
@@ -237,8 +206,8 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
237
206
|
onAdd: onAdd,
|
|
238
207
|
onDelete: onDelete,
|
|
239
208
|
onChange: onChangeTarget
|
|
240
|
-
}, props.children),
|
|
241
|
-
eventId: (targetData === null || targetData === void 0 ? void 0 : (_targetData$
|
|
209
|
+
}, props.children), /*#__PURE__*/React.createElement(BizTargetDimension, {
|
|
210
|
+
eventId: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value2 = targetData.value) === null || _targetData$value2 === void 0 ? void 0 : (_targetData$value2$ev = _targetData$value2.event) === null || _targetData$value2$ev === void 0 ? void 0 : _targetData$value2$ev.id) ? targetData === null || targetData === void 0 ? void 0 : (_targetData$value3 = targetData.value) === null || _targetData$value3 === void 0 ? void 0 : (_targetData$value3$ev = _targetData$value3.event) === null || _targetData$value3$ev === void 0 ? void 0 : _targetData$value3$ev.id : undefined,
|
|
242
211
|
value: dimension,
|
|
243
212
|
onChange: onChangeDimension
|
|
244
213
|
})), (filters || isAdd) && /*#__PURE__*/React.createElement(BizConditionGroup, {
|
|
@@ -247,7 +216,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
247
216
|
onlyAnd: props.onlyAnd,
|
|
248
217
|
enableEventProp: true,
|
|
249
218
|
enableDelete: true,
|
|
250
|
-
eventIdList: (targetData === null || targetData === void 0 ? void 0 : (_targetData$
|
|
219
|
+
eventIdList: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value4 = targetData.value) === null || _targetData$value4 === void 0 ? void 0 : (_targetData$value4$ev = _targetData$value4.event) === null || _targetData$value4$ev === void 0 ? void 0 : _targetData$value4$ev.id) ? [targetData === null || targetData === void 0 ? void 0 : (_targetData$value5 = targetData.value) === null || _targetData$value5 === void 0 ? void 0 : (_targetData$value5$ev = _targetData$value5.event) === null || _targetData$value5$ev === void 0 ? void 0 : _targetData$value5$ev.id] : undefined,
|
|
251
220
|
onChange: onChangeFilters,
|
|
252
221
|
onConditionsCount: setCount
|
|
253
222
|
})));
|
|
@@ -103,15 +103,13 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
103
103
|
enabled: enableDelete,
|
|
104
104
|
onClick: onClickIcon
|
|
105
105
|
}), targetData && /*#__PURE__*/React.createElement(Dropdown, {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
},
|
|
106
|
+
visible: visible,
|
|
107
|
+
onVisibleChange: onVisibleChange,
|
|
108
|
+
overlay: /*#__PURE__*/React.createElement(BizTargetOptionMenu, {
|
|
109
|
+
onClick: onClickIcon,
|
|
110
|
+
enableAdd: enableAdd,
|
|
111
|
+
enableDelete: enableDelete
|
|
112
|
+
}),
|
|
115
113
|
trigger: ['click']
|
|
116
114
|
}, /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
117
115
|
name: "more",
|
|
@@ -81,15 +81,13 @@ var UserTagsSelect = function UserTagsSelect(props) {
|
|
|
81
81
|
return /*#__PURE__*/React.createElement("div", {
|
|
82
82
|
className: classPrefix
|
|
83
83
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
84
|
-
|
|
85
|
-
return renderOverlay();
|
|
86
|
-
},
|
|
84
|
+
overlay: renderOverlay(),
|
|
87
85
|
trigger: ['click'],
|
|
88
86
|
overlayStyle: {
|
|
89
87
|
minWidth: 0
|
|
90
88
|
},
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
onVisibleChange: onVisibleChange,
|
|
90
|
+
visible: visible,
|
|
93
91
|
destroyPopupOnHide: props.destroyPopupOnHide
|
|
94
92
|
}, /*#__PURE__*/React.createElement("div", {
|
|
95
93
|
className: "".concat(classPrefix, "-handle")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.34-
|
|
3
|
+
"version": "1.1.34-visual.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react": "^16.12.0 || ^17.0.0",
|
|
60
60
|
"yorkie": "^2.0.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "b8fa7a22e144c79fe39ef77900a0b870b431182e"
|
|
63
63
|
}
|
package/es/constants/common.d.ts
DELETED
package/es/constants/common.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
};
|