@zgfe/business-lib 1.0.24-alpha.2 → 1.0.24-alpha.5
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/chart/util/color.js +1 -1
- package/es/context/index.d.ts +12 -0
- package/es/dnd/demo/data.js +3 -2
- package/es/dnd/index.js +3 -1
- package/es/mock/event.js +37 -0
- package/es/targetConditionGroup/components/targetDimension.js +3 -1
- package/es/targetConditionGroup/demo/index.js +2 -2
- package/es/userCondition/conditionTypeList.js +5 -1
- package/es/userCondition/styles/conditionWrap.less +0 -1
- package/package.json +2 -2
package/es/chart/util/color.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var chartColors = ['#165DFF', '#
|
|
1
|
+
export var chartColors = ['#165DFF', '#80E1D9', '#65789B', '#F8BC3B', '#6F66ED', '#66AFED', '#9661BC', '#FF7557', '#4DB273', '#F08BB4', '#CDDBFD', '#CDF3F0', '#CED4DE', '#FCE7B9', '#D1CEFD', '#D3E7F9', '#DFCFEA', '#FFD1C7', '#BBDEC8', '#FFE0ED'];
|
package/es/context/index.d.ts
CHANGED
|
@@ -12,11 +12,23 @@ export interface UserInfo {
|
|
|
12
12
|
companyId: number;
|
|
13
13
|
companyName: string;
|
|
14
14
|
}
|
|
15
|
+
export interface Menu {
|
|
16
|
+
helpUrl: string;
|
|
17
|
+
href: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
name: string;
|
|
20
|
+
nametext: string;
|
|
21
|
+
supportVirtualApp: boolean;
|
|
22
|
+
childrens?: Menu[];
|
|
23
|
+
}
|
|
15
24
|
export interface GlobalContextProps {
|
|
16
25
|
userGroupList?: Array<any>;
|
|
17
26
|
eventGroupList?: EventGroup[];
|
|
18
27
|
userPropList?: UserProp[];
|
|
19
28
|
eventEnvList?: EnvProp[];
|
|
29
|
+
menuNameMap?: {
|
|
30
|
+
[name: string]: Menu;
|
|
31
|
+
};
|
|
20
32
|
currentApp?: AppInfoProps;
|
|
21
33
|
currentUser?: UserInfo;
|
|
22
34
|
isDemo?: boolean;
|
package/es/dnd/demo/data.js
CHANGED
package/es/dnd/index.js
CHANGED
package/es/mock/event.js
CHANGED
|
@@ -695,6 +695,43 @@ export default [{
|
|
|
695
695
|
groupId: 4160,
|
|
696
696
|
groupName: '小程序转化',
|
|
697
697
|
eventList: [{
|
|
698
|
+
plats: [1, 2, 3],
|
|
699
|
+
click_analysis: false,
|
|
700
|
+
mark_type: null,
|
|
701
|
+
event_id: 7086289,
|
|
702
|
+
event_name: '付款成功',
|
|
703
|
+
event_hidden: 0,
|
|
704
|
+
event_type: 0,
|
|
705
|
+
is_stop: 0,
|
|
706
|
+
is_delete: 0,
|
|
707
|
+
alias_name: '',
|
|
708
|
+
event_attrs: [{
|
|
709
|
+
hidden: 0,
|
|
710
|
+
dimension_sub: 'event_attr',
|
|
711
|
+
encryption_type: 0,
|
|
712
|
+
alias_name: '',
|
|
713
|
+
value_dict: false,
|
|
714
|
+
attr_id: 5461056,
|
|
715
|
+
attr_name: '支付方式',
|
|
716
|
+
event_id: 7086289,
|
|
717
|
+
prop_type: 1,
|
|
718
|
+
is_stop: 0
|
|
719
|
+
}, {
|
|
720
|
+
hidden: 0,
|
|
721
|
+
dimension_sub: 'event_attr',
|
|
722
|
+
encryption_type: 0,
|
|
723
|
+
alias_name: '',
|
|
724
|
+
value_dict: false,
|
|
725
|
+
attr_id: 5461057,
|
|
726
|
+
attr_name: '金额',
|
|
727
|
+
event_id: 7086289,
|
|
728
|
+
prop_type: 2,
|
|
729
|
+
is_stop: 0
|
|
730
|
+
}],
|
|
731
|
+
stop_date_time: null,
|
|
732
|
+
insert_time: '2016-01-01 00:00:00',
|
|
733
|
+
owner: 'zg'
|
|
734
|
+
}, {
|
|
698
735
|
plats: [3],
|
|
699
736
|
click_analysis: false,
|
|
700
737
|
mark_type: 1,
|
|
@@ -76,11 +76,13 @@ var BizTargetDimension = function BizTargetDimension(props) {
|
|
|
76
76
|
|
|
77
77
|
var getAttrOption = function getAttrOption(eventId) {
|
|
78
78
|
var attrData = [];
|
|
79
|
+
var attrMap = {};
|
|
79
80
|
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
80
81
|
group.eventList.forEach(function (event) {
|
|
81
82
|
if (event.id === eventId) {
|
|
82
83
|
event.attrList.forEach(function (attr) {
|
|
83
|
-
if (attr.type === 2 && !attr.isHidden && attr.label) {
|
|
84
|
+
if (attr.type === 2 && !attr.isHidden && attr.label && !attrMap[String(attr.id)]) {
|
|
85
|
+
attrMap[String(attr.id)] = true;
|
|
84
86
|
attrData.push({
|
|
85
87
|
label: attr.label,
|
|
86
88
|
value: String(attr.id),
|
|
@@ -3,6 +3,7 @@ import { Space } from 'antd';
|
|
|
3
3
|
import { PlusOutlined } from '@ant-design/icons';
|
|
4
4
|
import './styles/conditionTypeList.less';
|
|
5
5
|
import { BizUserConditionContext } from '.';
|
|
6
|
+
import BizGlobalDataContext from '../context';
|
|
6
7
|
|
|
7
8
|
var ConditionTypeList = function ConditionTypeList(props) {
|
|
8
9
|
var onAdd = props.onAdd,
|
|
@@ -13,6 +14,9 @@ var ConditionTypeList = function ConditionTypeList(props) {
|
|
|
13
14
|
textMode = _useContext.textMode,
|
|
14
15
|
openTagCondition = _useContext.openTagCondition;
|
|
15
16
|
|
|
17
|
+
var _useContext2 = useContext(BizGlobalDataContext),
|
|
18
|
+
menuNameMap = _useContext2.menuNameMap;
|
|
19
|
+
|
|
16
20
|
if (!show || textMode) return null;
|
|
17
21
|
return /*#__PURE__*/React.createElement("div", {
|
|
18
22
|
className: "biz-user-condition-type-list"
|
|
@@ -52,7 +56,7 @@ var ConditionTypeList = function ConditionTypeList(props) {
|
|
|
52
56
|
}
|
|
53
57
|
}, /*#__PURE__*/React.createElement(Space, {
|
|
54
58
|
key: "prop"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u5C5E\u6027\u6EE1\u8DB3"))), openTagCondition ? /*#__PURE__*/React.createElement("li", {
|
|
59
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u5C5E\u6027\u6EE1\u8DB3"))), openTagCondition && (!menuNameMap || menuNameMap['userTags']) ? /*#__PURE__*/React.createElement("li", {
|
|
56
60
|
className: "condition-type",
|
|
57
61
|
onClick: function onClick() {
|
|
58
62
|
return onAdd('tag');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.24-alpha.
|
|
3
|
+
"version": "1.0.24-alpha.5",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react": "^16.12.0 || ^17.0.0",
|
|
59
59
|
"yorkie": "^2.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "2607dfafb514f4b3e8a6d038538dbdd561b402f1"
|
|
62
62
|
}
|