@zgfe/business-lib 1.0.24-alpha.1 → 1.0.24-alpha.4

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.
@@ -1 +1 @@
1
- export var chartColors = ['#165DFF', '#CDDBFD', '#80E1D9', '#CDF3F0', '#65789B', '#CED4DE', '#F8BC3B', '#FCE7B9', '#6F66ED', '#D1CEFD', '#66AFED', '#D3E7F9', '#9661BC', '#DFCFEA', '#FF7557', '#FFD1C7', '#4DB273', '#BBDEC8', '#F08BB4', '#FFE0ED'];
1
+ export var chartColors = ['#165DFF', '#80E1D9', '#65789B', '#F8BC3B', '#6F66ED', '#66AFED', '#9661BC', '#FF7557', '#4DB273', '#F08BB4', '#CDDBFD', '#CDF3F0', '#CED4DE', '#FCE7B9', '#D1CEFD', '#D3E7F9', '#DFCFEA', '#FFD1C7', '#BBDEC8', '#FFE0ED'];
@@ -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;
@@ -68,8 +68,9 @@ export default (function () {
68
68
  key: data.id
69
69
  }, data.label);
70
70
  },
71
- onChange: function onChange(list) {
72
- console.log('排序后数据', list);
71
+ onChange: function onChange(array) {
72
+ console.log('排序后数据', array);
73
+ setList(array);
73
74
  }
74
75
  }));
75
76
  });
@@ -6,7 +6,7 @@
6
6
  }
7
7
  .item {
8
8
  display: inline-block;
9
- width: 300px;
9
+ width: 10%;
10
10
  height: 150px;
11
11
  margin: @margin-md;
12
12
  line-height: 150px;
package/es/dnd/index.js CHANGED
@@ -91,7 +91,9 @@ var BizDnd = function BizDnd(props) {
91
91
  res.push(item);
92
92
  }
93
93
 
94
- if (props.onChange) props.onChange(res);
94
+ setTimeout(function () {
95
+ if (props.onChange) props.onChange(res);
96
+ });
95
97
  return res;
96
98
  });
97
99
  return target;
package/es/dnd/item.js CHANGED
@@ -47,10 +47,12 @@ var BizDndItem = function BizDndItem(props) {
47
47
  if (ref.current) {
48
48
  var computedStyle = window.getComputedStyle(ref.current);
49
49
  style = {
50
- position: 'fixed',
50
+ position: '',
51
51
  pointerEvents: 'inherit',
52
52
  top: top - Number(computedStyle.marginTop.replace('px', '')),
53
- left: left - Number(computedStyle.marginLeft.replace('px', ''))
53
+ left: left - Number(computedStyle.marginLeft.replace('px', '')),
54
+ width: computedStyle.width,
55
+ height: computedStyle.height
54
56
  };
55
57
  setStyle();
56
58
  preMouse = {
@@ -62,10 +64,13 @@ var BizDndItem = function BizDndItem(props) {
62
64
  }
63
65
 
64
66
  function onMouseMove(e) {
67
+ var computedStyle = window.getComputedStyle(ref.current);
65
68
  style.position = 'fixed';
66
69
  style.top += e.clientY - (preMouse.y || 0);
67
70
  style.left += e.clientX - (preMouse.x || 0);
68
71
  style.pointerEvents = 'none';
72
+ style.width = computedStyle.width;
73
+ style.height = computedStyle.height;
69
74
  setStyle();
70
75
  preMouse = {
71
76
  x: e.clientX,
@@ -82,7 +87,9 @@ var BizDndItem = function BizDndItem(props) {
82
87
  position: 'inherit',
83
88
  pointerEvents: 'inherit',
84
89
  top: 0,
85
- left: 0
90
+ left: 0,
91
+ width: '',
92
+ height: ''
86
93
  };
87
94
  setStyle();
88
95
  if (props.onDropEnd) props.onDropEnd(data);
@@ -94,6 +101,7 @@ var BizDndItem = function BizDndItem(props) {
94
101
  ref.current.style.top = "".concat(style.top, "px");
95
102
  ref.current.style.left = "".concat(style.left, "px");
96
103
  ref.current.style.pointerEvents = style.pointerEvents;
104
+ ref.current.style.width = style.width;
97
105
  }
98
106
  }
99
107
 
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),
@@ -18,8 +18,8 @@ import userData from '../../mock/user';
18
18
  var defaultValue = {
19
19
  type: 'event',
20
20
  alias: 'alias',
21
- eventId: 24143017,
22
- eventGroupId: 4201,
21
+ eventId: 7086289,
22
+ eventGroupId: 4160,
23
23
  analysisIndex: 'times',
24
24
  filters: {
25
25
  relation: 'or',
@@ -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');
@@ -10,7 +10,6 @@
10
10
  .biz-user-condition-item-delete {
11
11
  display: flex;
12
12
  align-items: center;
13
- height: 40px;
14
13
  margin-left: @margin-lg;
15
14
  cursor: pointer;
16
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.0.24-alpha.1",
3
+ "version": "1.0.24-alpha.4",
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": "d11c81c871b7a2bb1bec63974a638665c506f4ce"
61
+ "gitHead": "2bbf073e332b60e06d87c7c947579d7ccc6d8fdd"
62
62
  }