@zgfe/business-lib 1.2.34-lijingyu1538.9 → 1.2.34-tags.2
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/AUMFormulaTarget/components/formula/util.d.ts +1 -2
- package/es/AUMFormulaTarget/components/formula/util.js +2 -2
- package/es/AUMFormulaTarget/components/formulaItem/index.js +2 -3
- package/es/AUMFormulaTarget/components/panel/cdpCshCondition.js +11 -12
- package/es/AUMFormulaTarget/components/panel/types.d.ts +0 -1
- package/es/attrCondition/useAttrCondition.d.ts +1 -0
- package/es/attrCondition/useAttrCondition.js +6 -2
- package/es/attrConditions/components/operateList.js +2 -12
- package/es/attrConditions/index.js +2 -0
- package/es/attrConditions/types.d.ts +1 -0
- package/es/attrConditions/utils/operates.js +6 -0
- package/es/attributeSelector/listPanel.js +3 -4
- package/es/constants/apis.d.ts +0 -3
- package/es/constants/apis.js +1 -4
- package/es/constants/common.d.ts +1 -1
- package/es/constants/common.js +34 -36
- package/es/context/index.d.ts +5 -16
- package/es/dataSetGroup/index.js +16 -8
- package/es/dataSetGroup/overlay.js +5 -8
- package/es/dataSetGroup/types.d.ts +0 -1
- package/es/demoWrapper/content.d.ts +0 -2
- package/es/demoWrapper/content.js +9 -27
- package/es/demoWrapper/demo/index.js +2 -15
- package/es/demoWrapper/head.d.ts +9 -0
- package/es/demoWrapper/head.js +67 -0
- package/es/demoWrapper/index.js +14 -78
- package/es/eventSelector/index.js +2 -3
- package/es/eventSelector/listPanel.js +4 -5
- package/es/formulaTarget/components/formula/util.d.ts +1 -2
- package/es/formulaTarget/components/formula/util.js +2 -2
- package/es/formulaTarget/components/formulaItem/index.js +2 -3
- package/es/productCondition/conditions/cdpCshCondition.js +5 -7
- package/es/productCondition/conditions/textDesc.js +3 -0
- package/es/productCondition/index.js +4 -2
- package/es/productCondition/orConditions.js +1 -0
- package/es/productCondition/types.d.ts +0 -3
- package/es/targetConditionGroup/components/targetDimension.js +5 -7
- package/es/targetConditionGroup/data/operates.d.ts +13 -1
- package/es/targetConditionGroup/data/operates.js +37 -10
- package/es/targetConditionGroup/index.js +2 -3
- package/es/userCondition/conditionTypeList.js +4 -4
- package/es/userCondition/conditions/cdpCondition.js +20 -18
- package/es/userCondition/conditions/cdpCshCondition.js +21 -20
- package/es/userCondition/conditions/propCondition.js +12 -1
- package/es/userCondition/conditions/tagsCondition.js +1 -4
- package/es/userCondition/demo/index.js +1 -1
- package/es/userCondition/index.js +54 -43
- package/es/userCondition/types.d.ts +7 -5
- package/es/userCondition/types.js +3 -0
- package/es/userCondition/util.d.ts +1 -1
- package/es/userCondition/util.js +3 -2
- package/es/userGroup/overlay.js +3 -1
- package/es/userGroup/styles/index.less +1 -0
- package/package.json +2 -2
|
@@ -2,7 +2,6 @@ import { AttrConditionTypes, TargetConditionTypes } from '../../..';
|
|
|
2
2
|
import { EventGroup } from '../../../attributeSelector/types';
|
|
3
3
|
import { FormulaContainerTypes } from './types';
|
|
4
4
|
import { BizFormulaTargetTypes } from '../../types';
|
|
5
|
-
import { AppInfoProps } from '../../../context/index';
|
|
6
5
|
export declare const newItem: FormulaContainerTypes.FormulaItemValue;
|
|
7
6
|
export declare const newSymbol: FormulaContainerTypes.FormulaItemValue;
|
|
8
7
|
export declare const targetsFormat: (targetFormula?: string, targets?: TargetConditionTypes.Value[], initNum?: number) => FormulaContainerTypes.FormulaItemValue[];
|
|
@@ -17,7 +16,7 @@ export declare const validator: (type: string, condition?: TargetConditionTypes.
|
|
|
17
16
|
isOk: boolean;
|
|
18
17
|
msg: string;
|
|
19
18
|
};
|
|
20
|
-
export declare const getDimension: (
|
|
19
|
+
export declare const getDimension: (data: TargetConditionTypes.DimensionValue, eId?: number, eventGroupList?: EventGroup[]) => string;
|
|
21
20
|
export declare const judgeHaveFilter: (filter?: AttrConditionTypes.GroupValue) => boolean;
|
|
22
21
|
export declare const getFilters: (filters?: AttrConditionTypes.GroupValue) => {
|
|
23
22
|
conditions: AttrConditionTypes.ItemValue[];
|
|
@@ -170,9 +170,9 @@ export var validator = function validator(type, condition) {
|
|
|
170
170
|
msg: msg
|
|
171
171
|
};
|
|
172
172
|
};
|
|
173
|
-
export var getDimension = function getDimension(
|
|
173
|
+
export var getDimension = function getDimension(data, eId, eventGroupList) {
|
|
174
174
|
var name = '';
|
|
175
|
-
normalOptions
|
|
175
|
+
normalOptions.concat(attrOptions).forEach(function (item) {
|
|
176
176
|
if (item.value === data.analysisIndex) {
|
|
177
177
|
name = item.label;
|
|
178
178
|
}
|
|
@@ -40,8 +40,7 @@ var FormulaItem = function FormulaItem(props) {
|
|
|
40
40
|
isValidate = _useState10[0],
|
|
41
41
|
setIsValidate = _useState10[1];
|
|
42
42
|
var _useContext = useContext(BizGlobalDataContext),
|
|
43
|
-
eventGroupList = _useContext.eventGroupList
|
|
44
|
-
currentApp = _useContext.currentApp;
|
|
43
|
+
eventGroupList = _useContext.eventGroupList;
|
|
45
44
|
var _useState11 = useState(false),
|
|
46
45
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
47
46
|
open = _useState12[0],
|
|
@@ -59,7 +58,7 @@ var FormulaItem = function FormulaItem(props) {
|
|
|
59
58
|
setLabel((condition === null || condition === void 0 ? void 0 : condition.eventName) || (condition === null || condition === void 0 ? void 0 : condition.datasetName) || '');
|
|
60
59
|
if (condition) {
|
|
61
60
|
if ((condition === null || condition === void 0 ? void 0 : condition.type) === FormulaTypes.EVENT) {
|
|
62
|
-
setDimension(getDimension(
|
|
61
|
+
setDimension(getDimension(condition.analysisDimension, condition.eventId, eventGroupList));
|
|
63
62
|
setHaveFilter(judgeHaveFilter(condition.filters));
|
|
64
63
|
} else {
|
|
65
64
|
setHaveFilter(!!(condition.filters || []).length);
|
|
@@ -32,8 +32,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
32
32
|
var _useState = useState(function () {
|
|
33
33
|
if (props.value) {
|
|
34
34
|
return {
|
|
35
|
-
|
|
36
|
-
datasetId: props.value.datasetId,
|
|
35
|
+
id: props.value.datasetId,
|
|
37
36
|
tableName: props.value.datasetTable
|
|
38
37
|
};
|
|
39
38
|
}
|
|
@@ -90,11 +89,9 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
90
89
|
datasetName = _props$value.datasetName,
|
|
91
90
|
datasetTable = _props$value.datasetTable,
|
|
92
91
|
fieldName = _props$value.fieldName,
|
|
93
|
-
filters = _props$value.filters
|
|
94
|
-
metaDatasetId = _props$value.metaDatasetId;
|
|
92
|
+
filters = _props$value.filters;
|
|
95
93
|
setDataset({
|
|
96
|
-
|
|
97
|
-
datasetId: datasetId,
|
|
94
|
+
id: datasetId,
|
|
98
95
|
tableName: datasetTable,
|
|
99
96
|
datasetName: datasetName
|
|
100
97
|
});
|
|
@@ -115,8 +112,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
115
112
|
if (isFirst) return;
|
|
116
113
|
if (!dataset) return;
|
|
117
114
|
var data = {
|
|
118
|
-
|
|
119
|
-
datasetId: dataset.datasetId,
|
|
115
|
+
datasetId: dataset.id,
|
|
120
116
|
datasetTable: dataset.tableName,
|
|
121
117
|
datasetName: dataset.datasetName,
|
|
122
118
|
fieldName: field === null || field === void 0 ? void 0 : field.name,
|
|
@@ -150,12 +146,12 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
150
146
|
});
|
|
151
147
|
};
|
|
152
148
|
var onTableChange = function onTableChange(data) {
|
|
153
|
-
if (data && data.
|
|
149
|
+
if (data && data.id !== (dataset === null || dataset === void 0 ? void 0 : dataset.id)) {
|
|
154
150
|
setDataset(data);
|
|
155
151
|
setField({
|
|
156
152
|
name: undefined
|
|
157
153
|
});
|
|
158
|
-
onDatasetChange(data.
|
|
154
|
+
onDatasetChange(data.id);
|
|
159
155
|
setFilters([]);
|
|
160
156
|
}
|
|
161
157
|
};
|
|
@@ -170,12 +166,12 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
170
166
|
}, /*#__PURE__*/React.createElement("div", {
|
|
171
167
|
className: "".concat(isDatasetError ? 'error' : '')
|
|
172
168
|
}, /*#__PURE__*/React.createElement(DataSetGroup, {
|
|
173
|
-
value: dataset === null || dataset === void 0 ? void 0 : dataset.
|
|
169
|
+
value: dataset === null || dataset === void 0 ? void 0 : dataset.id,
|
|
174
170
|
placeholder: "\u8BF7\u9009\u62E9\u660E\u7EC6\u8868",
|
|
175
171
|
onChange: onTableChange
|
|
176
172
|
}), isDatasetError ? /*#__PURE__*/React.createElement("div", {
|
|
177
173
|
className: "".concat(classPrefix, "-error")
|
|
178
|
-
}, "AUM\u6307\u6807\u4E0D\u53EF\u4E3A\u7A7A") : null), (dataset === null || dataset === void 0 ? void 0 : dataset.
|
|
174
|
+
}, "AUM\u6307\u6807\u4E0D\u53EF\u4E3A\u7A7A") : null), (dataset === null || dataset === void 0 ? void 0 : dataset.id) ? /*#__PURE__*/React.createElement("div", {
|
|
179
175
|
className: "".concat(classPrefix, "-item"),
|
|
180
176
|
style: {
|
|
181
177
|
flexDirection: 'column'
|
|
@@ -346,6 +342,9 @@ var RenderByType = function RenderByType(props) {
|
|
|
346
342
|
var CdpCondition = function CdpCondition(props) {
|
|
347
343
|
var value = props.value,
|
|
348
344
|
onChange = props.onChange;
|
|
345
|
+
useEffect(function () {
|
|
346
|
+
console.log(value);
|
|
347
|
+
}, []);
|
|
349
348
|
var onChangeCondition = function onChangeCondition(condition) {
|
|
350
349
|
console.log('onChangeCondition', condition);
|
|
351
350
|
onChange && onChange(condition);
|
|
@@ -11,5 +11,6 @@ declare const useAttrCondition: (props: AttrConditionTypes.ItemProp) => {
|
|
|
11
11
|
onChangeAttr: (attrData: AttributeSelect.Value) => void;
|
|
12
12
|
onChangeOperate: (data: any) => void;
|
|
13
13
|
onChangeValues: (data: any) => void;
|
|
14
|
+
placeholder: string | undefined;
|
|
14
15
|
};
|
|
15
16
|
export default useAttrCondition;
|
|
@@ -8,7 +8,7 @@ import { useEffect, useState } from 'react';
|
|
|
8
8
|
import { PropCategory } from '../attributeSelector/types';
|
|
9
9
|
import { getCondition } from '../attrConditions';
|
|
10
10
|
var useAttrCondition = function useAttrCondition(props) {
|
|
11
|
-
var _props$defaultValue, _props$value, _props$defaultValue2, _props$value2;
|
|
11
|
+
var _props$defaultValue, _props$value, _props$defaultValue2, _props$value2, _props$defaultValue3, _props$value3;
|
|
12
12
|
var _useState = useState(),
|
|
13
13
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14
14
|
attr = _useState2[0],
|
|
@@ -25,6 +25,9 @@ var useAttrCondition = function useAttrCondition(props) {
|
|
|
25
25
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
26
26
|
loading = _useState8[0],
|
|
27
27
|
setLoading = _useState8[1];
|
|
28
|
+
var _useState9 = useState(((_props$defaultValue3 = props.defaultValue) === null || _props$defaultValue3 === void 0 ? void 0 : _props$defaultValue3.placeholder) || ((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.placeholder)),
|
|
29
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
30
|
+
placeholder = _useState10[0];
|
|
28
31
|
useEffect(function () {
|
|
29
32
|
var data = props.defaultValue || props.value;
|
|
30
33
|
if (data) {
|
|
@@ -100,7 +103,8 @@ var useAttrCondition = function useAttrCondition(props) {
|
|
|
100
103
|
onDelete: onDelete,
|
|
101
104
|
onChangeAttr: onChangeAttr,
|
|
102
105
|
onChangeOperate: onChangeOperate,
|
|
103
|
-
onChangeValues: onChangeValues
|
|
106
|
+
onChangeValues: onChangeValues,
|
|
107
|
+
placeholder: placeholder
|
|
104
108
|
};
|
|
105
109
|
};
|
|
106
110
|
export default useAttrCondition;
|
|
@@ -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); }
|
|
@@ -65,14 +61,8 @@ var BizOperateList = function BizOperateList(props) {
|
|
|
65
61
|
optionData = specialOperate;
|
|
66
62
|
} else {
|
|
67
63
|
optionData = stringOperate;
|
|
68
|
-
if (props
|
|
69
|
-
optionData =
|
|
70
|
-
name: '第N位是',
|
|
71
|
-
value: '{n}th place is'
|
|
72
|
-
}, {
|
|
73
|
-
name: '第N位不是',
|
|
74
|
-
value: '{n}th place not is'
|
|
75
|
-
}]);
|
|
64
|
+
if (!props.supportNPlace) {
|
|
65
|
+
optionData = optionData.slice(0, -2);
|
|
76
66
|
}
|
|
77
67
|
}
|
|
78
68
|
}
|
|
@@ -54,6 +54,7 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
54
54
|
attr = _useAttrCondition.attr,
|
|
55
55
|
operate = _useAttrCondition.operate,
|
|
56
56
|
values = _useAttrCondition.values,
|
|
57
|
+
placeholder = _useAttrCondition.placeholder,
|
|
57
58
|
onChangeAttr = _useAttrCondition.onChangeAttr,
|
|
58
59
|
onChangeOperate = _useAttrCondition.onChangeOperate,
|
|
59
60
|
onChangeValues = _useAttrCondition.onChangeValues,
|
|
@@ -73,6 +74,7 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
73
74
|
enableEventProp: enableEventProp,
|
|
74
75
|
enableUserProp: enableUserProp,
|
|
75
76
|
enableEnvProp: enableEnvProp,
|
|
77
|
+
placeholder: placeholder,
|
|
76
78
|
disableItemList: disableItemList,
|
|
77
79
|
onChange: onChangeAttr,
|
|
78
80
|
onDelete: function onDelete(_data, e) {
|
|
@@ -33,8 +33,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
33
33
|
var _useContext = useContext(BizGlobalDataContext),
|
|
34
34
|
eventGroupList = _useContext.eventGroupList,
|
|
35
35
|
userPropList = _useContext.userPropList,
|
|
36
|
-
eventEnvList = _useContext.eventEnvList
|
|
37
|
-
currentApp = _useContext.currentApp;
|
|
36
|
+
eventEnvList = _useContext.eventEnvList;
|
|
38
37
|
var _useState3 = useState([]),
|
|
39
38
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
40
39
|
optionList = _useState4[0],
|
|
@@ -101,7 +100,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
101
100
|
if (enableUserProp) {
|
|
102
101
|
list.push({
|
|
103
102
|
id: data.user,
|
|
104
|
-
name:
|
|
103
|
+
name: '用户属性'
|
|
105
104
|
});
|
|
106
105
|
}
|
|
107
106
|
if (enableEnvProp) {
|
|
@@ -188,7 +187,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
188
187
|
if (enableUserProp) {
|
|
189
188
|
list.push({
|
|
190
189
|
isEvent: false,
|
|
191
|
-
groupName:
|
|
190
|
+
groupName: '用户属性',
|
|
192
191
|
key: 'userProps',
|
|
193
192
|
anchor: anchor.user,
|
|
194
193
|
children: userPropList
|
package/es/constants/apis.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ declare const Apis: {
|
|
|
10
10
|
queryDatasetList: string;
|
|
11
11
|
queryProduct: string;
|
|
12
12
|
queryDatasetDetail: string;
|
|
13
|
-
queryTableInfo: string;
|
|
14
13
|
getSocketToken: string;
|
|
15
14
|
bizDataTypeList: string;
|
|
16
15
|
orderAttributeMaster: string;
|
|
@@ -24,7 +23,5 @@ declare const Apis: {
|
|
|
24
23
|
queryAllTags: string;
|
|
25
24
|
querySubjectList: string;
|
|
26
25
|
queryPanels: string;
|
|
27
|
-
queryMetaDatasetList: string;
|
|
28
|
-
queryDatasetTableNames: string;
|
|
29
26
|
};
|
|
30
27
|
export default Apis;
|
package/es/constants/apis.js
CHANGED
|
@@ -10,7 +10,6 @@ var Apis = {
|
|
|
10
10
|
queryDatasetList: '/zg/web/cdp/inner/dataset/list',
|
|
11
11
|
queryProduct: '/zg/web/v2/productTag/queryProduct/',
|
|
12
12
|
queryDatasetDetail: '/zg/web/cdp/inner/dataset/detail',
|
|
13
|
-
queryTableInfo: '/zg/web/cdp/visual/flow/node/tableInfo',
|
|
14
13
|
getSocketToken: '/zg/web/v2/tracking/view/websocket/token',
|
|
15
14
|
bizDataTypeList: '/cep-console/api/v1/bizdata/type/list',
|
|
16
15
|
orderAttributeMaster: '/cep-console/api/v1/cdp/orderAttribute/master',
|
|
@@ -23,8 +22,6 @@ var Apis = {
|
|
|
23
22
|
queryUserGroup: '/zg/web/v2/userGroup/getAll',
|
|
24
23
|
queryAllTags: '/zg/web/v2/v4/userGroup/label/list',
|
|
25
24
|
querySubjectList: '/zg/web/v2/analysisSubject/queryAllSubject',
|
|
26
|
-
queryPanels: '/zg/web/v2/apppanel/panels'
|
|
27
|
-
queryMetaDatasetList: '/zg/web/v2/meta/dataset/list',
|
|
28
|
-
queryDatasetTableNames: '/zg/web/cdp/dataset/manager/datasetList'
|
|
25
|
+
queryPanels: '/zg/web/v2/apppanel/panels'
|
|
29
26
|
};
|
|
30
27
|
export default Apis;
|
package/es/constants/common.d.ts
CHANGED
package/es/constants/common.js
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
export var BuiltinIndicators =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}]
|
|
36
|
-
};
|
|
1
|
+
export var BuiltinIndicators = {
|
|
2
|
+
id: -2,
|
|
3
|
+
name: '整体',
|
|
4
|
+
eventList: [{
|
|
5
|
+
name: '新增用户',
|
|
6
|
+
id: -201,
|
|
7
|
+
type: 'add',
|
|
8
|
+
isBuiltIn: true,
|
|
9
|
+
attrList: []
|
|
10
|
+
}, {
|
|
11
|
+
name: '活跃用户',
|
|
12
|
+
id: -202,
|
|
13
|
+
type: 'active',
|
|
14
|
+
isBuiltIn: true,
|
|
15
|
+
attrList: []
|
|
16
|
+
}, {
|
|
17
|
+
name: '访问次数',
|
|
18
|
+
id: -203,
|
|
19
|
+
type: 'times',
|
|
20
|
+
isBuiltIn: true,
|
|
21
|
+
attrList: []
|
|
22
|
+
}, {
|
|
23
|
+
name: '平均使用时长',
|
|
24
|
+
id: -204,
|
|
25
|
+
type: 'duration_avg',
|
|
26
|
+
isBuiltIn: true,
|
|
27
|
+
attrList: []
|
|
28
|
+
}, {
|
|
29
|
+
name: '使用时长分布',
|
|
30
|
+
id: -205,
|
|
31
|
+
type: 'duration',
|
|
32
|
+
isBuiltIn: true,
|
|
33
|
+
attrList: []
|
|
34
|
+
}]
|
|
37
35
|
};
|
|
38
36
|
export var indicatorList = [{
|
|
39
37
|
name: '新增用户',
|
package/es/context/index.d.ts
CHANGED
|
@@ -21,30 +21,21 @@ export interface AppInfoProps {
|
|
|
21
21
|
appId?: string | number;
|
|
22
22
|
platform?: string | number;
|
|
23
23
|
appVersion?: appVersionType;
|
|
24
|
-
type?: 'user' | 'custom' | 'product';
|
|
25
|
-
unit?: string;
|
|
26
24
|
[prop: string]: any;
|
|
27
25
|
}
|
|
28
|
-
export interface AuthConfig {
|
|
29
|
-
dataAuth?: Array<any>;
|
|
30
|
-
groupIds?: number[];
|
|
31
|
-
defaultAuth: any;
|
|
32
|
-
}
|
|
33
26
|
export interface UserInfo {
|
|
34
27
|
id: number;
|
|
35
|
-
userId: number;
|
|
36
28
|
companyBuyVersion: number;
|
|
37
29
|
username: string;
|
|
38
30
|
email: string;
|
|
39
31
|
emailNote: string;
|
|
40
|
-
telphone
|
|
41
|
-
secret
|
|
32
|
+
telphone?: string;
|
|
33
|
+
secret?: string;
|
|
42
34
|
companyId: number;
|
|
43
35
|
serviceType: serviceTypeType;
|
|
44
36
|
companyName: string;
|
|
45
|
-
isAdmin
|
|
46
|
-
cdpVersion
|
|
47
|
-
authConfig: AuthConfig;
|
|
37
|
+
isAdmin?: boolean;
|
|
38
|
+
cdpVersion?: cdpVersionType;
|
|
48
39
|
}
|
|
49
40
|
export interface Menu {
|
|
50
41
|
helpUrl: string;
|
|
@@ -71,10 +62,8 @@ export interface GlobalContextProps {
|
|
|
71
62
|
eventIdMap?: Record<number, AnalysisEvent>;
|
|
72
63
|
userPropList?: UserProp[];
|
|
73
64
|
eventEnvList?: EnvProp[];
|
|
74
|
-
currentUser?: UserInfo;
|
|
75
65
|
currentApp?: AppInfoProps;
|
|
76
|
-
|
|
77
|
-
currentProject?: any;
|
|
66
|
+
currentUser?: UserInfo;
|
|
78
67
|
isDemo?: boolean;
|
|
79
68
|
route?: any;
|
|
80
69
|
router?: any;
|
package/es/dataSetGroup/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
8
|
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
9
|
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); }
|
|
@@ -40,17 +46,22 @@ var DataSetGroup = function DataSetGroup(_ref) {
|
|
|
40
46
|
getDatasetList();
|
|
41
47
|
}, []);
|
|
42
48
|
function getDatasetList() {
|
|
43
|
-
request(Apis.
|
|
49
|
+
request(Apis.queryDatasetList, {
|
|
44
50
|
method: 'post',
|
|
45
51
|
data: {
|
|
46
|
-
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
52
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
53
|
+
platform: currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform
|
|
47
54
|
}
|
|
48
55
|
}).then(function (result) {
|
|
49
|
-
var dealData = result.data
|
|
56
|
+
var dealData = result.data.map(function (item) {
|
|
57
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
58
|
+
name: item.datasetName
|
|
59
|
+
});
|
|
60
|
+
}) || [];
|
|
50
61
|
setDataset(dealData);
|
|
51
62
|
if (value) {
|
|
52
63
|
var userGroup = dealData === null || dealData === void 0 ? void 0 : dealData.find(function (item) {
|
|
53
|
-
return item.
|
|
64
|
+
return item.id === value;
|
|
54
65
|
});
|
|
55
66
|
if (userGroup) {
|
|
56
67
|
setChosen(userGroup);
|
|
@@ -79,10 +90,7 @@ var DataSetGroup = function DataSetGroup(_ref) {
|
|
|
79
90
|
dataset: dataset,
|
|
80
91
|
onClickCreate: function onClickCreate() {
|
|
81
92
|
router && router.push({
|
|
82
|
-
name: routes.
|
|
83
|
-
query: {
|
|
84
|
-
tab: 4
|
|
85
|
-
}
|
|
93
|
+
name: routes.cdp.dataset
|
|
86
94
|
});
|
|
87
95
|
setOpen(false);
|
|
88
96
|
}
|
|
@@ -11,15 +11,14 @@ import List from 'rc-virtual-list';
|
|
|
11
11
|
import _ from 'lodash';
|
|
12
12
|
import IconFont from '../icon/iconFont';
|
|
13
13
|
import UserGroupContext from './context';
|
|
14
|
-
import BizGlobalDataContext from '../context';
|
|
15
14
|
var GroupItem = function GroupItem(_ref) {
|
|
16
15
|
var item = _ref.item,
|
|
17
16
|
currentGroup = _ref.currentGroup,
|
|
18
17
|
onClose = _ref.onClose,
|
|
19
18
|
setCurrentGroup = _ref.setCurrentGroup;
|
|
20
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: "".concat(classPrefix, "-item ").concat((currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.
|
|
22
|
-
key: item.
|
|
20
|
+
className: "".concat(classPrefix, "-item ").concat((currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id) === item.id ? 'active' : ''),
|
|
21
|
+
key: item.id,
|
|
23
22
|
onClick: function onClick() {
|
|
24
23
|
setCurrentGroup(item);
|
|
25
24
|
if (onClose) onClose();
|
|
@@ -45,8 +44,6 @@ var Overlay = function Overlay(_ref2) {
|
|
|
45
44
|
var _useContext = useContext(UserGroupContext),
|
|
46
45
|
value = _useContext.value,
|
|
47
46
|
setValue = _useContext.setValue;
|
|
48
|
-
var _useContext2 = useContext(BizGlobalDataContext),
|
|
49
|
-
currentApp = _useContext2.currentApp;
|
|
50
47
|
useEffect(function () {
|
|
51
48
|
onSearch('');
|
|
52
49
|
setType('userGroup');
|
|
@@ -87,7 +84,7 @@ var Overlay = function Overlay(_ref2) {
|
|
|
87
84
|
type: "zengjia"
|
|
88
85
|
}), "\u5FEB\u901F\u521B\u5EFA\u660E\u7EC6\u8868")), /*#__PURE__*/React.createElement("div", {
|
|
89
86
|
className: "".concat(classPrefix, "-divider")
|
|
90
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u6240\u6709"
|
|
87
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u6240\u6709\u7528\u6237")), showList.length > 10 ? /*#__PURE__*/React.createElement(List, {
|
|
91
88
|
data: showList || [],
|
|
92
89
|
itemHeight: 32,
|
|
93
90
|
itemKey: "id",
|
|
@@ -95,7 +92,7 @@ var Overlay = function Overlay(_ref2) {
|
|
|
95
92
|
className: "".concat(classPrefix, "-list")
|
|
96
93
|
}, function (item) {
|
|
97
94
|
return /*#__PURE__*/React.createElement(GroupItem, {
|
|
98
|
-
key: item.
|
|
95
|
+
key: item.id,
|
|
99
96
|
item: item,
|
|
100
97
|
currentGroup: currentGroup,
|
|
101
98
|
setCurrentGroup: setCurrentGroup,
|
|
@@ -105,7 +102,7 @@ var Overlay = function Overlay(_ref2) {
|
|
|
105
102
|
className: "".concat(classPrefix, "-list")
|
|
106
103
|
}, showList === null || showList === void 0 ? void 0 : showList.map(function (item) {
|
|
107
104
|
return /*#__PURE__*/React.createElement(GroupItem, {
|
|
108
|
-
key: item.
|
|
105
|
+
key: item.id,
|
|
109
106
|
item: item,
|
|
110
107
|
currentGroup: currentGroup,
|
|
111
108
|
setCurrentGroup: setCurrentGroup,
|
|
@@ -50,8 +50,6 @@ function ajax(url, options) {
|
|
|
50
50
|
var DemoContent = function DemoContent(_ref3) {
|
|
51
51
|
var children = _ref3.children,
|
|
52
52
|
currentApp = _ref3.currentApp,
|
|
53
|
-
currentProject = _ref3.currentProject,
|
|
54
|
-
projectList = _ref3.projectList,
|
|
55
53
|
needMeta = _ref3.needMeta,
|
|
56
54
|
contextProps = _ref3.contextProps;
|
|
57
55
|
var _useState = useState([]),
|
|
@@ -90,18 +88,14 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
90
88
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
91
89
|
loadUsers = _useState18[0],
|
|
92
90
|
setLoadUsers = _useState18[1];
|
|
93
|
-
var _useState19 = useState(
|
|
91
|
+
var _useState19 = useState(),
|
|
94
92
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var _useState21 = useState(),
|
|
93
|
+
store = _useState20[0],
|
|
94
|
+
setStore = _useState20[1];
|
|
95
|
+
var _useState21 = useState(false),
|
|
98
96
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
var _useState23 = useState(false),
|
|
102
|
-
_useState24 = _slicedToArray(_useState23, 2),
|
|
103
|
-
storeReady = _useState24[0],
|
|
104
|
-
setStoreReady = _useState24[1];
|
|
97
|
+
storeReady = _useState22[0],
|
|
98
|
+
setStoreReady = _useState22[1];
|
|
105
99
|
var _useBizStore = useBizStore({
|
|
106
100
|
currentApp: currentApp,
|
|
107
101
|
authority: authority
|
|
@@ -121,7 +115,6 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
121
115
|
loadEvents();
|
|
122
116
|
loadEnvList();
|
|
123
117
|
loadBasicConfigLoad();
|
|
124
|
-
loadCurrentUserLoad();
|
|
125
118
|
} else {
|
|
126
119
|
setLoadEnv(false);
|
|
127
120
|
setLoadEvent(false);
|
|
@@ -166,15 +159,7 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
166
159
|
}
|
|
167
160
|
useEffect(function () {
|
|
168
161
|
loadAuthorityList();
|
|
169
|
-
}, [
|
|
170
|
-
function loadCurrentUserLoad() {
|
|
171
|
-
ajax('/zg/web/v2/company/currentUser', {
|
|
172
|
-
method: 'get'
|
|
173
|
-
}).then(function (res) {
|
|
174
|
-
var _res$data;
|
|
175
|
-
setCurrentUser(res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.user);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
162
|
+
}, []);
|
|
178
163
|
function loadBasicConfigLoad() {
|
|
179
164
|
setLoadUsers(true);
|
|
180
165
|
ajax('/zg/web/v2/system/config', {
|
|
@@ -237,14 +222,11 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
237
222
|
eventGroupList: store === null || store === void 0 ? void 0 : store.eventGroupList,
|
|
238
223
|
userPropList: store === null || store === void 0 ? void 0 : store.userPropList,
|
|
239
224
|
eventEnvList: store === null || store === void 0 ? void 0 : store.envPropList,
|
|
225
|
+
authority: authority,
|
|
226
|
+
basicConfig: basicConfig,
|
|
240
227
|
eventIdMap: store === null || store === void 0 ? void 0 : store.eventIdMap,
|
|
241
228
|
eventNameMap: store === null || store === void 0 ? void 0 : store.eventNameMap,
|
|
242
|
-
currentProject: currentProject,
|
|
243
|
-
projectList: projectList,
|
|
244
|
-
basicConfig: basicConfig,
|
|
245
229
|
userGroupList: userGroupList,
|
|
246
|
-
authority: authority,
|
|
247
|
-
currentUser: currentUser,
|
|
248
230
|
groupLoading: groupLoading,
|
|
249
231
|
setUserGroupList: setUserGroupList,
|
|
250
232
|
tagList: tagList,
|