@zgfe/modules-dm 1.0.2-dm.2 → 1.0.2-dm.20
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/modules/dataCollection/collectionAttributeList.d.ts +1 -0
- package/es/modules/dataCollection/collectionAttributeList.js +89 -52
- package/es/modules/dataCollection/collectionEventList.js +12 -4
- package/es/modules/dataCollection/index.d.ts +3 -1
- package/es/modules/dataCollection/index.js +2 -1
- package/es/modules/dataCollection/styles/index.less +28 -10
- package/es/modules/dataCollection/tablePlus.js +87 -34
- package/es/modules/dataManage/index.d.ts +4 -1
- package/es/modules/dataManage/index.js +28 -4
- package/es/modules/dataPlan/addEventOrUser.js +13 -11
- package/es/modules/dataPlan/addPlan.d.ts +1 -0
- package/es/modules/dataPlan/addPlan.js +231 -106
- package/es/modules/dataPlan/index.js +12 -1
- package/es/modules/dataPlan/search.d.ts +1 -0
- package/es/modules/dataPlan/search.js +1 -0
- package/es/modules/dataPlan/styles/index.less +5 -0
- package/es/modules/dataPlan/userAttributeList.js +3 -23
- package/es/store/action.d.ts +7 -0
- package/es/store/action.js +5 -0
- package/es/store/index.d.ts +8 -0
- package/es/store/index.js +41 -0
- package/es/store/state.d.ts +4 -0
- package/es/store/state.js +4 -0
- package/package.json +3 -3
|
@@ -35,6 +35,11 @@ var PlanList = function PlanList(props) {
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var tableDel = function tableDel(data) {
|
|
38
|
+
if (isDemo) {
|
|
39
|
+
message.error('demo环境,无法删除');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
Modal.confirm({
|
|
39
44
|
centered: true,
|
|
40
45
|
title: '是否确认删除方案?',
|
|
@@ -52,7 +57,7 @@ var PlanList = function PlanList(props) {
|
|
|
52
57
|
message.success('删除成功');
|
|
53
58
|
queryList();
|
|
54
59
|
}).catch(function (err) {
|
|
55
|
-
message.
|
|
60
|
+
message.error('删除失败');
|
|
56
61
|
}).finally(function () {});
|
|
57
62
|
}
|
|
58
63
|
});
|
|
@@ -204,7 +209,12 @@ var PlanList = function PlanList(props) {
|
|
|
204
209
|
unCheckedChildren: "\u5173",
|
|
205
210
|
checked: isOpen
|
|
206
211
|
})), /*#__PURE__*/React.createElement(Button, {
|
|
212
|
+
disabled: isDemo,
|
|
207
213
|
onClick: function onClick() {
|
|
214
|
+
if (listData.length >= 10) {
|
|
215
|
+
return message.error('最多创建10个埋点方案');
|
|
216
|
+
}
|
|
217
|
+
|
|
208
218
|
setDrawerShow(true);
|
|
209
219
|
},
|
|
210
220
|
type: "primary",
|
|
@@ -223,6 +233,7 @@ var PlanList = function PlanList(props) {
|
|
|
223
233
|
// onChange={onChange}
|
|
224
234
|
pagination: false
|
|
225
235
|
})), /*#__PURE__*/React.createElement(AddPlan, {
|
|
236
|
+
listData: listData,
|
|
226
237
|
detailName: detailName,
|
|
227
238
|
drawerShow: drawerShow,
|
|
228
239
|
drawerClose: drawerClose,
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
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."); }
|
|
4
|
-
|
|
5
|
-
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); }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
1
|
import { Select, Table, Checkbox } from 'antd';
|
|
14
2
|
var Option = Select.Option;
|
|
15
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
16
4
|
import './styles/index.less';
|
|
17
5
|
|
|
18
6
|
var UserAttributeList = function UserAttributeList(props) {
|
|
19
7
|
var classPrefix = 'user-list'; // console.log('userAttrData', props.userAttrData);
|
|
20
|
-
|
|
21
|
-
var _useState = useState([]),
|
|
22
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
renderData = _useState2[0],
|
|
24
|
-
setRenderData = _useState2[1];
|
|
25
|
-
|
|
26
|
-
useEffect(function () {
|
|
27
|
-
setRenderData(props.userAttrData);
|
|
28
|
-
}, [props.userAttrData]); // 表格列
|
|
8
|
+
// 表格列
|
|
29
9
|
|
|
30
10
|
var columns = [{
|
|
31
11
|
title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Checkbox, {
|
|
@@ -68,7 +48,7 @@ var UserAttributeList = function UserAttributeList(props) {
|
|
|
68
48
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
69
49
|
className: "".concat(classPrefix, "-table"),
|
|
70
50
|
columns: columns,
|
|
71
|
-
dataSource:
|
|
51
|
+
dataSource: props.userAttrData,
|
|
72
52
|
bordered: true,
|
|
73
53
|
pagination: false
|
|
74
54
|
}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { State } from './state';
|
|
3
|
+
import { Action } from './action';
|
|
4
|
+
export declare const DmContext: import("react").Context<{
|
|
5
|
+
state: State;
|
|
6
|
+
dispatch: Dispatch<Action>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const upDatedDmFun: () => [state: State, dispatch: Dispatch<Action>];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
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."); }
|
|
4
|
+
|
|
5
|
+
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); }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import { useReducer, createContext } from 'react';
|
|
14
|
+
import { initState } from './state';
|
|
15
|
+
import { ActionType } from './action';
|
|
16
|
+
|
|
17
|
+
var DmReducer = function DmReducer(prevState, action) {
|
|
18
|
+
// console.log('DmReducer', prevState, action);
|
|
19
|
+
switch (action.type) {
|
|
20
|
+
case ActionType.SET_GLOBAL:
|
|
21
|
+
return {
|
|
22
|
+
updateEventMetas: action.payload
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
default:
|
|
26
|
+
return initState;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export var DmContext = /*#__PURE__*/createContext({
|
|
31
|
+
state: initState,
|
|
32
|
+
dispatch: function dispatch() {}
|
|
33
|
+
});
|
|
34
|
+
export var upDatedDmFun = function upDatedDmFun() {
|
|
35
|
+
var _useReducer = useReducer(DmReducer, initState),
|
|
36
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
37
|
+
state = _useReducer2[0],
|
|
38
|
+
dispatch = _useReducer2[1];
|
|
39
|
+
|
|
40
|
+
return [state, dispatch];
|
|
41
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.2-dm.
|
|
3
|
+
"version": "1.0.2-dm.20",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"license": "ISC",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/lodash": "^4.14.182",
|
|
42
42
|
"@umijs/fabric": "^2.8.1",
|
|
43
43
|
"@umijs/test": "^3.0.5",
|
|
44
|
-
"@zgfe/business-lib": "1.1.7-
|
|
44
|
+
"@zgfe/business-lib": "1.1.7-dmd2.7",
|
|
45
45
|
"antd": "4.22.6",
|
|
46
46
|
"dumi": "^1.1.0",
|
|
47
47
|
"father-build": "^1.17.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"umi-request": "^1.4.0",
|
|
54
54
|
"yorkie": "^2.0.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d0bf84e8a1b86247fd042fcca3c497f0e065e0a9",
|
|
57
57
|
"gitHooks": {
|
|
58
58
|
"pre-commit": "lint-staged"
|
|
59
59
|
}
|