@zgfe/modules-dm 1.0.42-alpha.11 → 1.0.42-alpha.8
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/components/demo.js +1 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +3 -2
- package/es/modules/{dataManage → dataCollection}/components/createVirtualDrawer.js +1 -1
- package/es/modules/{dataManage → dataCollection}/components/eventFilter/styles/index.less +1 -1
- package/es/modules/{dataManage → dataCollection}/components/eventGroupingDrawer.js +3 -3
- package/es/modules/{dataManage → dataCollection}/components/tablePlus.js +1 -1
- package/es/modules/{dataManage → dataCollection}/components/virtualTablePlus.js +3 -3
- package/es/modules/dataCollection/index.d.ts +19 -0
- package/es/modules/dataCollection/index.js +93 -0
- package/es/modules/dataCollection/styles/index.less +842 -0
- package/es/modules/dataManage/index.d.ts +16 -1
- package/es/modules/dataManage/index.js +13 -80
- package/es/modules/dataManage/styles/index.less +25 -834
- package/package.json +1 -1
- /package/es/modules/{dataManage → dataCollection}/collectionAttributeList.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/collectionAttributeList.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/collectionEventList.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/collectionEventList.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/createVirtualDrawer.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventFilter/index.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventFilter/index.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventFilter/types.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventFilter/types.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventGroupingDrawer.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventItem.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/eventItem.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/selectAttributes.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/selectAttributes.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/tablePlus.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/components/virtualTablePlus.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/types.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/types.js +0 -0
- /package/es/modules/{dataManage → dataCollection}/virtualEventList.d.ts +0 -0
- /package/es/modules/{dataManage → dataCollection}/virtualEventList.js +0 -0
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import './styles/index.less';
|
|
2
3
|
interface DataManageProps {
|
|
3
4
|
updateEventMetas: Function;
|
|
5
|
+
/**
|
|
6
|
+
* 是否展示埋点方案
|
|
7
|
+
* default: true
|
|
8
|
+
*/
|
|
9
|
+
showPlan?: boolean;
|
|
4
10
|
/**
|
|
5
11
|
* 拓展的一级菜单
|
|
6
12
|
*/
|
|
@@ -10,10 +16,19 @@ interface DataManageProps {
|
|
|
10
16
|
children: React.ReactNode;
|
|
11
17
|
[other: string]: any;
|
|
12
18
|
}[];
|
|
19
|
+
/**
|
|
20
|
+
* 拓展的二级菜单
|
|
21
|
+
*/
|
|
22
|
+
extraSubTabs?: {
|
|
23
|
+
key: string;
|
|
24
|
+
label: string;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
[other: string]: any;
|
|
27
|
+
}[];
|
|
13
28
|
/**
|
|
14
29
|
* 默认选中菜单
|
|
15
30
|
*/
|
|
16
|
-
|
|
31
|
+
activeSubTab?: number | string;
|
|
17
32
|
}
|
|
18
33
|
declare const DataManage: React.FC<DataManageProps>;
|
|
19
34
|
export default DataManage;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
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."); }
|
|
7
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); }
|
|
@@ -9,19 +5,17 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
7
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
12
|
-
import {
|
|
8
|
+
import React, { useContext, useEffect } from 'react';
|
|
9
|
+
import './styles/index.less';
|
|
13
10
|
import { DmContext, upDatedDmFun } from '../../store';
|
|
14
11
|
import { ActionType } from '../../store/action';
|
|
15
|
-
import
|
|
16
|
-
import request from '../../utils/ajax';
|
|
17
|
-
import apis from '../../constants/api';
|
|
18
|
-
import { getAppID } from '../../utils';
|
|
19
|
-
import EventList from './collectionEventList';
|
|
20
|
-
import CollectionAttributeList from './collectionAttributeList';
|
|
21
|
-
import VirtualEventList from './virtualEventList';
|
|
12
|
+
import DataCollection from '../dataCollection';
|
|
22
13
|
var DataManage = function DataManage(props) {
|
|
14
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
15
|
+
authority = _useContext.authority;
|
|
23
16
|
var classPrefix = 'data-manage';
|
|
24
|
-
var updateEventMetas = props.updateEventMetas
|
|
17
|
+
var updateEventMetas = props.updateEventMetas,
|
|
18
|
+
showPlan = props.showPlan;
|
|
25
19
|
var _upDatedDmFun = upDatedDmFun(),
|
|
26
20
|
_upDatedDmFun2 = _slicedToArray(_upDatedDmFun, 2),
|
|
27
21
|
state = _upDatedDmFun2[0],
|
|
@@ -32,49 +26,6 @@ var DataManage = function DataManage(props) {
|
|
|
32
26
|
payload: updateEventMetas
|
|
33
27
|
});
|
|
34
28
|
}, []);
|
|
35
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
36
|
-
currentApp = _useContext.currentApp,
|
|
37
|
-
authority = _useContext.authority;
|
|
38
|
-
// const [listTab, setListTab] = useState<string | number>(props.activeTab || 1);
|
|
39
|
-
// const tabsChange = (e: RadioChangeEvent) => {
|
|
40
|
-
// setListTab(e.target.value);
|
|
41
|
-
// };
|
|
42
|
-
// 判断埋点方案开关是否打开
|
|
43
|
-
var _useState = useState(0),
|
|
44
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
isOpen = _useState2[0],
|
|
46
|
-
setIsOpen = _useState2[1];
|
|
47
|
-
var queryControlSwitch = function queryControlSwitch() {
|
|
48
|
-
request(apis.queryControlSwitch, {
|
|
49
|
-
method: 'get',
|
|
50
|
-
params: {
|
|
51
|
-
appId: getAppID(currentApp)
|
|
52
|
-
}
|
|
53
|
-
}).then(function (res) {
|
|
54
|
-
if (!res) return;
|
|
55
|
-
setIsOpen(res.data.isOpen);
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
// 不在方案中的数据
|
|
59
|
-
var _useState3 = useState({}),
|
|
60
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
61
|
-
queryPlanData = _useState4[0],
|
|
62
|
-
setqueryPlanData = _useState4[1];
|
|
63
|
-
var queryPlan = function queryPlan() {
|
|
64
|
-
request(apis.queryPlan, {
|
|
65
|
-
method: 'post',
|
|
66
|
-
data: {
|
|
67
|
-
appId: getAppID(currentApp)
|
|
68
|
-
}
|
|
69
|
-
}).then(function (res) {
|
|
70
|
-
setqueryPlanData(res.data);
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
// 初始化数据
|
|
74
|
-
useEffect(function () {
|
|
75
|
-
queryControlSwitch();
|
|
76
|
-
queryPlan();
|
|
77
|
-
}, []);
|
|
78
29
|
return /*#__PURE__*/React.createElement(DmContext.Provider, {
|
|
79
30
|
value: {
|
|
80
31
|
state: state,
|
|
@@ -82,30 +33,12 @@ var DataManage = function DataManage(props) {
|
|
|
82
33
|
}
|
|
83
34
|
}, /*#__PURE__*/React.createElement("div", {
|
|
84
35
|
className: classPrefix
|
|
85
|
-
}, /*#__PURE__*/React.createElement(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
destroyInactiveTabPane: true,
|
|
89
|
-
items: [authority[100020] && {
|
|
90
|
-
key: '1',
|
|
91
|
-
label: '元事件',
|
|
92
|
-
children: /*#__PURE__*/React.createElement(EventList, {
|
|
93
|
-
isOpen: isOpen,
|
|
94
|
-
queryPlanData: queryPlanData
|
|
95
|
-
})
|
|
96
|
-
}, authority[1700559695] && {
|
|
97
|
-
key: '3',
|
|
98
|
-
label: '虚拟事件',
|
|
99
|
-
children: /*#__PURE__*/React.createElement(VirtualEventList, null)
|
|
100
|
-
}, authority[100021] && {
|
|
101
|
-
key: '2',
|
|
102
|
-
label: '用户属性管理',
|
|
103
|
-
children: /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
104
|
-
isOpen: isOpen,
|
|
105
|
-
queryPlanData: queryPlanData,
|
|
106
|
-
source: "user"
|
|
107
|
-
})
|
|
108
|
-
}].concat(_toConsumableArray(props.extraTabs || []))
|
|
36
|
+
}, /*#__PURE__*/React.createElement(DataCollection, {
|
|
37
|
+
activeTab: props.activeSubTab,
|
|
38
|
+
extraTabs: props.extraSubTabs
|
|
109
39
|
})));
|
|
110
40
|
};
|
|
41
|
+
DataManage.defaultProps = {
|
|
42
|
+
showPlan: true
|
|
43
|
+
};
|
|
111
44
|
export default DataManage;
|