@zgfe/modules-dm 1.0.41 → 1.0.42-alpha.10

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 (36) hide show
  1. package/es/components/demo.js +1 -1
  2. package/es/index.d.ts +2 -3
  3. package/es/index.js +2 -3
  4. package/es/modules/{dataCollection → dataManage}/components/createVirtualDrawer.js +1 -1
  5. package/es/modules/{dataCollection → dataManage}/components/eventFilter/styles/index.less +1 -1
  6. package/es/modules/{dataCollection → dataManage}/components/eventGroupingDrawer.js +3 -3
  7. package/es/modules/{dataCollection → dataManage}/components/tablePlus.js +1 -1
  8. package/es/modules/{dataCollection → dataManage}/components/virtualTablePlus.js +3 -3
  9. package/es/modules/dataManage/index.d.ts +1 -16
  10. package/es/modules/dataManage/index.js +70 -22
  11. package/es/modules/dataManage/styles/index.less +833 -25
  12. package/package.json +2 -2
  13. package/README.md +0 -37
  14. package/es/modules/dataCollection/index.d.ts +0 -19
  15. package/es/modules/dataCollection/index.js +0 -99
  16. package/es/modules/dataCollection/styles/index.less +0 -832
  17. /package/es/modules/{dataCollection → dataManage}/collectionAttributeList.d.ts +0 -0
  18. /package/es/modules/{dataCollection → dataManage}/collectionAttributeList.js +0 -0
  19. /package/es/modules/{dataCollection → dataManage}/collectionEventList.d.ts +0 -0
  20. /package/es/modules/{dataCollection → dataManage}/collectionEventList.js +0 -0
  21. /package/es/modules/{dataCollection → dataManage}/components/createVirtualDrawer.d.ts +0 -0
  22. /package/es/modules/{dataCollection → dataManage}/components/eventFilter/index.d.ts +0 -0
  23. /package/es/modules/{dataCollection → dataManage}/components/eventFilter/index.js +0 -0
  24. /package/es/modules/{dataCollection → dataManage}/components/eventFilter/types.d.ts +0 -0
  25. /package/es/modules/{dataCollection → dataManage}/components/eventFilter/types.js +0 -0
  26. /package/es/modules/{dataCollection → dataManage}/components/eventGroupingDrawer.d.ts +0 -0
  27. /package/es/modules/{dataCollection → dataManage}/components/eventItem.d.ts +0 -0
  28. /package/es/modules/{dataCollection → dataManage}/components/eventItem.js +0 -0
  29. /package/es/modules/{dataCollection → dataManage}/components/selectAttributes.d.ts +0 -0
  30. /package/es/modules/{dataCollection → dataManage}/components/selectAttributes.js +0 -0
  31. /package/es/modules/{dataCollection → dataManage}/components/tablePlus.d.ts +0 -0
  32. /package/es/modules/{dataCollection → dataManage}/components/virtualTablePlus.d.ts +0 -0
  33. /package/es/modules/{dataCollection → dataManage}/types.d.ts +0 -0
  34. /package/es/modules/{dataCollection → dataManage}/types.js +0 -0
  35. /package/es/modules/{dataCollection → dataManage}/virtualEventList.d.ts +0 -0
  36. /package/es/modules/{dataCollection → dataManage}/virtualEventList.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.41",
3
+ "version": "1.0.42-alpha.10",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "umi-request": "^1.4.0",
52
52
  "yorkie": "^2.0.0"
53
53
  },
54
- "gitHead": "ee301ccae532f40ea489db03cfadf1f14d6aef8e",
54
+ "gitHead": "951170e644a46fd388269e91dea5d98e9f52bb2b",
55
55
  "gitHooks": {
56
56
  "pre-commit": "lint-staged"
57
57
  }
package/README.md DELETED
@@ -1,37 +0,0 @@
1
- # modules-cdp
2
-
3
- ## Getting Started
4
-
5
- Install dependencies,
6
-
7
- ```bash
8
- $ npm i
9
- ```
10
-
11
- Start the dev server,
12
-
13
- ```bash
14
- $ npm start
15
- ```
16
-
17
- Build documentation,
18
-
19
- ```bash
20
- $ npm run docs:build
21
- ```
22
-
23
- Run test,
24
-
25
- ```bash
26
- $ npm test
27
- ```
28
-
29
- Build library via `father-build`,
30
-
31
- ```bash
32
- $ npm run build
33
- ```
34
-
35
- =====
36
-
37
- =====
@@ -1,19 +0,0 @@
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;
@@ -1,99 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
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); }
4
- 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; }
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; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { BizGlobalDataContext } from '@zgfe/business-lib';
8
- import { Radio } from 'antd';
9
- import React, { useState, useContext, useEffect } from 'react';
10
- import request from '../../utils/ajax';
11
- import apis from '../../constants/api';
12
- import { getAppID } from '../../utils';
13
- import EventList from './collectionEventList';
14
- import CollectionAttributeList from './collectionAttributeList';
15
- import VirtualEventList from './virtualEventList';
16
- var DataCollection = function DataCollection(props) {
17
- var _props$extraTabs, _props$extraTabs2;
18
- var classPrefix = 'data-collection';
19
- var _useContext = useContext(BizGlobalDataContext),
20
- currentApp = _useContext.currentApp,
21
- authority = _useContext.authority;
22
- var _useState = useState(props.activeTab || 1),
23
- _useState2 = _slicedToArray(_useState, 2),
24
- listTab = _useState2[0],
25
- setListTab = _useState2[1];
26
- var tabsChange = function tabsChange(e) {
27
- setListTab(e.target.value);
28
- };
29
- // 判断埋点方案开关是否打开
30
- var _useState3 = useState(0),
31
- _useState4 = _slicedToArray(_useState3, 2),
32
- isOpen = _useState4[0],
33
- setIsOpen = _useState4[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 _useState5 = useState({}),
47
- _useState6 = _slicedToArray(_useState5, 2),
48
- queryPlanData = _useState6[0],
49
- setqueryPlanData = _useState6[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(Radio.Group, {
68
- onChange: tabsChange,
69
- value: listTab,
70
- style: {
71
- marginBottom: 16
72
- }
73
- }, authority[100020] && /*#__PURE__*/React.createElement(Radio.Button, {
74
- value: 1
75
- }, "\u5143\u4E8B\u4EF6"), authority[1700559695] && /*#__PURE__*/React.createElement(Radio.Button, {
76
- value: 3
77
- }, "\u865A\u62DF\u4E8B\u4EF6"), authority[100021] && /*#__PURE__*/React.createElement(Radio.Button, {
78
- value: 2
79
- }, "\u7528\u6237\u5C5E\u6027\u7BA1\u7406"), (_props$extraTabs = props.extraTabs) === null || _props$extraTabs === void 0 ? void 0 : _props$extraTabs.map(function (item) {
80
- if (item.hidden) return null;
81
- return /*#__PURE__*/React.createElement(Radio.Button, {
82
- key: item.key,
83
- value: item.key,
84
- disabled: item.disabled
85
- }, item.label);
86
- })), listTab == 1 && authority[100020] && /*#__PURE__*/React.createElement(EventList, {
87
- isOpen: isOpen,
88
- queryPlanData: queryPlanData
89
- }), listTab == 3 && authority[1700559695] && /*#__PURE__*/React.createElement(VirtualEventList, null), listTab == 2 && authority[100021] && /*#__PURE__*/React.createElement(CollectionAttributeList, {
90
- isOpen: isOpen,
91
- queryPlanData: queryPlanData,
92
- source: "user"
93
- }), (_props$extraTabs2 = props.extraTabs) === null || _props$extraTabs2 === void 0 ? void 0 : _props$extraTabs2.map(function (item) {
94
- return listTab === item.key && !item.hidden ? /*#__PURE__*/React.createElement("div", {
95
- key: item.key
96
- }, item.children) : null;
97
- }));
98
- };
99
- export default DataCollection;