@zgfe/business-lib 1.0.24-alpha.2 → 1.0.24-alpha.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.
@@ -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
  });
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;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IconFontProps } from '@ant-design/icons/lib/components/IconFont';
3
+ import '../assets/iconfont/iconfont.css';
3
4
  interface Props extends IconFontProps {
4
5
  family?: string;
5
6
  size?: number;
@@ -11,6 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
11
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
12
 
13
13
  import React, { useMemo } from 'react';
14
+ import '../assets/iconfont/iconfont.css';
14
15
 
15
16
  var IconFont = function IconFont(props) {
16
17
  var className = props.className,
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.2",
3
+ "version": "1.0.24-alpha.3",
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": "262599946c1ae80f9f6836a01aa0b615efbeba23"
61
+ "gitHead": "cafe6c0c129954559c16afe53278d3ed9fb309d1"
62
62
  }