@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.
Files changed (35) hide show
  1. package/es/components/demo.js +1 -1
  2. package/es/index.d.ts +3 -2
  3. package/es/index.js +3 -2
  4. package/es/modules/{dataManage → dataCollection}/components/createVirtualDrawer.js +1 -1
  5. package/es/modules/{dataManage → dataCollection}/components/eventFilter/styles/index.less +1 -1
  6. package/es/modules/{dataManage → dataCollection}/components/eventGroupingDrawer.js +3 -3
  7. package/es/modules/{dataManage → dataCollection}/components/tablePlus.js +1 -1
  8. package/es/modules/{dataManage → dataCollection}/components/virtualTablePlus.js +3 -3
  9. package/es/modules/dataCollection/index.d.ts +19 -0
  10. package/es/modules/dataCollection/index.js +93 -0
  11. package/es/modules/dataCollection/styles/index.less +842 -0
  12. package/es/modules/dataManage/index.d.ts +16 -1
  13. package/es/modules/dataManage/index.js +13 -80
  14. package/es/modules/dataManage/styles/index.less +25 -834
  15. package/package.json +1 -1
  16. /package/es/modules/{dataManage → dataCollection}/collectionAttributeList.d.ts +0 -0
  17. /package/es/modules/{dataManage → dataCollection}/collectionAttributeList.js +0 -0
  18. /package/es/modules/{dataManage → dataCollection}/collectionEventList.d.ts +0 -0
  19. /package/es/modules/{dataManage → dataCollection}/collectionEventList.js +0 -0
  20. /package/es/modules/{dataManage → dataCollection}/components/createVirtualDrawer.d.ts +0 -0
  21. /package/es/modules/{dataManage → dataCollection}/components/eventFilter/index.d.ts +0 -0
  22. /package/es/modules/{dataManage → dataCollection}/components/eventFilter/index.js +0 -0
  23. /package/es/modules/{dataManage → dataCollection}/components/eventFilter/types.d.ts +0 -0
  24. /package/es/modules/{dataManage → dataCollection}/components/eventFilter/types.js +0 -0
  25. /package/es/modules/{dataManage → dataCollection}/components/eventGroupingDrawer.d.ts +0 -0
  26. /package/es/modules/{dataManage → dataCollection}/components/eventItem.d.ts +0 -0
  27. /package/es/modules/{dataManage → dataCollection}/components/eventItem.js +0 -0
  28. /package/es/modules/{dataManage → dataCollection}/components/selectAttributes.d.ts +0 -0
  29. /package/es/modules/{dataManage → dataCollection}/components/selectAttributes.js +0 -0
  30. /package/es/modules/{dataManage → dataCollection}/components/tablePlus.d.ts +0 -0
  31. /package/es/modules/{dataManage → dataCollection}/components/virtualTablePlus.d.ts +0 -0
  32. /package/es/modules/{dataManage → dataCollection}/types.d.ts +0 -0
  33. /package/es/modules/{dataManage → dataCollection}/types.js +0 -0
  34. /package/es/modules/{dataManage → dataCollection}/virtualEventList.d.ts +0 -0
  35. /package/es/modules/{dataManage → dataCollection}/virtualEventList.js +0 -0
@@ -24,7 +24,7 @@ var DemoWrapper2 = function DemoWrapper2(props) {
24
24
  }
25
25
  }, /*#__PURE__*/React.createElement(DemoWrapper, {
26
26
  needMeta: true,
27
- defaultApp: 461
27
+ defaultApp: 86265
28
28
  }, props.children)));
29
29
  };
30
30
  export default DemoWrapper2;
package/es/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference path="../typings.d.ts" />
2
- import DataManage from './modules/dataManage';
2
+ import DataCollection from './modules/dataCollection';
3
3
  import PlanList from './modules/dataPlan';
4
- export { PlanList, DataManage };
4
+ import DataManage from './modules/dataManage';
5
+ export { PlanList, DataCollection, DataManage };
package/es/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference path="../typings.d.ts" />
2
- import DataManage from './modules/dataManage';
2
+ import DataCollection from './modules/dataCollection';
3
3
  import PlanList from './modules/dataPlan';
4
- export { PlanList, DataManage };
4
+ import DataManage from './modules/dataManage';
5
+ export { PlanList, DataCollection, DataManage };
@@ -120,7 +120,7 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
120
120
  }
121
121
  };
122
122
  var onClose = function onClose() {
123
- if (virtualDrawerType === 'edit') {
123
+ if (virtualDrawerType === "edit") {
124
124
  if (formSubmit && getVirtualContentChange(_.cloneDeep(editVirtualEventData), _.cloneDeep(formSubmitData))) {
125
125
  Modal.confirm({
126
126
  centered: true,
@@ -66,7 +66,7 @@
66
66
  }
67
67
  .delete-box:hover {
68
68
  .shanchu {
69
- color: #fb5547;
69
+ color: #FB5547;
70
70
  }
71
71
  }
72
72
  }
@@ -328,17 +328,17 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
328
328
  }
329
329
  }
330
330
  }, "\u79FB\u52A8")), /*#__PURE__*/React.createElement("span", {
331
- className: "handle",
331
+ className: 'handle',
332
332
  onClick: function onClick() {
333
333
  return eventShowOrHidden(0, item.groupId);
334
334
  }
335
335
  }, "\u663E\u793A"), /*#__PURE__*/React.createElement("span", {
336
- className: "handle",
336
+ className: 'handle',
337
337
  onClick: function onClick() {
338
338
  return eventShowOrHidden(1, item.groupId);
339
339
  }
340
340
  }, "\u9690\u85CF")), item.groupName && /*#__PURE__*/React.createElement("span", {
341
- className: "handle-delete",
341
+ className: 'handle-delete',
342
342
  onClick: function onClick() {
343
343
  return groupDelete(item.groupId);
344
344
  }
@@ -417,7 +417,7 @@ var TablePlus = function TablePlus(props) {
417
417
  trigger: "hover",
418
418
  placement: "top"
419
419
  }, /*#__PURE__*/React.createElement("div", {
420
- className: "alias_name_text"
420
+ className: 'alias_name_text'
421
421
  }, record.alias_name)), /*#__PURE__*/React.createElement(IconFont, {
422
422
  className: "edit-alias-name",
423
423
  onClick: function onClick() {
@@ -213,7 +213,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
213
213
  trigger: "hover",
214
214
  placement: "top"
215
215
  }, /*#__PURE__*/React.createElement("div", {
216
- className: "alias_name_text"
216
+ className: 'alias_name_text'
217
217
  }, record.aliasName)));
218
218
  }
219
219
  }, {
@@ -256,7 +256,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
256
256
  trigger: "hover",
257
257
  placement: "top"
258
258
  }, /*#__PURE__*/React.createElement("div", {
259
- className: "description"
259
+ className: 'description'
260
260
  }, text)));
261
261
  }
262
262
  }, {
@@ -275,7 +275,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
275
275
  trigger: "hover",
276
276
  placement: "top"
277
277
  }, /*#__PURE__*/React.createElement("div", {
278
- className: "bind-event"
278
+ className: 'bind-event'
279
279
  }, text)));
280
280
  }
281
281
  }, {
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ interface DataCollectionProps {
3
+ /**
4
+ * 默认选中菜单
5
+ */
6
+ activeTab?: number | string;
7
+ /**
8
+ * 拓展的一级菜单
9
+ */
10
+ extraTabs?: {
11
+ key: string;
12
+ label: string;
13
+ hidden?: boolean;
14
+ children: React.ReactNode;
15
+ [other: string]: any;
16
+ }[];
17
+ }
18
+ declare const DataCollection: React.FC<DataCollectionProps>;
19
+ export default DataCollection;
@@ -0,0 +1,93 @@
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ 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
+ 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); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ 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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import { BizGlobalDataContext } from '@zgfe/business-lib';
12
+ import { Tabs } from 'antd';
13
+ import React, { useState, useContext, useEffect } from 'react';
14
+ import request from '../../utils/ajax';
15
+ import apis from '../../constants/api';
16
+ import { getAppID } from '../../utils';
17
+ import EventList from './collectionEventList';
18
+ import CollectionAttributeList from './collectionAttributeList';
19
+ import VirtualEventList from './virtualEventList';
20
+ var DataCollection = function DataCollection(props) {
21
+ var classPrefix = 'data-collection';
22
+ var _useContext = useContext(BizGlobalDataContext),
23
+ currentApp = _useContext.currentApp,
24
+ authority = _useContext.authority;
25
+ // const [listTab, setListTab] = useState<string | number>(props.activeTab || 1);
26
+ // const tabsChange = (e: RadioChangeEvent) => {
27
+ // setListTab(e.target.value);
28
+ // };
29
+ // 判断埋点方案开关是否打开
30
+ var _useState = useState(0),
31
+ _useState2 = _slicedToArray(_useState, 2),
32
+ isOpen = _useState2[0],
33
+ setIsOpen = _useState2[1];
34
+ var queryControlSwitch = function queryControlSwitch() {
35
+ request(apis.queryControlSwitch, {
36
+ method: 'get',
37
+ params: {
38
+ appId: getAppID(currentApp)
39
+ }
40
+ }).then(function (res) {
41
+ if (!res) return;
42
+ setIsOpen(res.data.isOpen);
43
+ });
44
+ };
45
+ // 不在方案中的数据
46
+ var _useState3 = useState({}),
47
+ _useState4 = _slicedToArray(_useState3, 2),
48
+ queryPlanData = _useState4[0],
49
+ setqueryPlanData = _useState4[1];
50
+ var queryPlan = function queryPlan() {
51
+ request(apis.queryPlan, {
52
+ method: 'post',
53
+ data: {
54
+ appId: getAppID(currentApp)
55
+ }
56
+ }).then(function (res) {
57
+ setqueryPlanData(res.data);
58
+ });
59
+ };
60
+ // 初始化数据
61
+ useEffect(function () {
62
+ queryControlSwitch();
63
+ queryPlan();
64
+ }, []);
65
+ return /*#__PURE__*/React.createElement("div", {
66
+ className: classPrefix
67
+ }, /*#__PURE__*/React.createElement(Tabs, {
68
+ className: "tabs",
69
+ defaultActiveKey: "0",
70
+ destroyInactiveTabPane: true,
71
+ items: [authority[100020] && {
72
+ key: '1',
73
+ label: '元事件',
74
+ children: /*#__PURE__*/React.createElement(EventList, {
75
+ isOpen: isOpen,
76
+ queryPlanData: queryPlanData
77
+ })
78
+ }, authority[1700559695] && {
79
+ key: '3',
80
+ label: '虚拟事件',
81
+ children: /*#__PURE__*/React.createElement(VirtualEventList, null)
82
+ }, authority[100021] && {
83
+ key: '2',
84
+ label: '用户属性管理',
85
+ children: /*#__PURE__*/React.createElement(CollectionAttributeList, {
86
+ isOpen: isOpen,
87
+ queryPlanData: queryPlanData,
88
+ source: "user"
89
+ })
90
+ }].concat(_toConsumableArray(props.extraTabs || []))
91
+ }));
92
+ };
93
+ export default DataCollection;