@zgfe/business-lib 1.2.70-hxd.23 → 1.2.70-hxd.25
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/addToScene/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import BizGlobalDataContext from '../context';
|
|
|
14
14
|
import Apis from '../constants/apis';
|
|
15
15
|
import request from '../utils/ajax';
|
|
16
16
|
import IconFont from '../icon/iconFont';
|
|
17
|
+
import { eventApi } from '../utils';
|
|
17
18
|
export var classPrefix = 'biz-addtoscene';
|
|
18
19
|
var BizAddToScene = function BizAddToScene(props) {
|
|
19
20
|
var params = props.params;
|
|
@@ -84,13 +85,7 @@ var BizAddToScene = function BizAddToScene(props) {
|
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
function queryGroups() {
|
|
87
|
-
|
|
88
|
-
method: 'post',
|
|
89
|
-
data: {
|
|
90
|
-
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
91
|
-
platform: 0
|
|
92
|
-
}
|
|
93
|
-
}).then(function (res) {
|
|
88
|
+
eventApi.fetchAllEvents(currentApp === null || currentApp === void 0 ? void 0 : currentApp.id, 0, false).then(function (res) {
|
|
94
89
|
if (!res) {
|
|
95
90
|
notification.error({
|
|
96
91
|
message: '获取常用场景分类列表失败'
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AttributeSelect } from './types';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
|
|
5
|
-
defaultProps?: Partial<P>;
|
|
6
|
-
};
|
|
7
|
-
declare const BizAttributeSelector: FCWithDefaultProps<AttributeSelect.Props>;
|
|
4
|
+
declare const BizAttributeSelector: React.FC<AttributeSelect.Props>;
|
|
8
5
|
export default BizAttributeSelector;
|
|
@@ -43,7 +43,6 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
43
43
|
_useState6 = _slicedToArray(_useState5, 1),
|
|
44
44
|
id = _useState6[0];
|
|
45
45
|
var _useContext = useContext(BizGlobalDataContext),
|
|
46
|
-
eventGroupList = _useContext.eventGroupList,
|
|
47
46
|
userPropList = _useContext.userPropList,
|
|
48
47
|
eventEnvList = _useContext.eventEnvList;
|
|
49
48
|
var boxRef = useRef(null);
|
|
@@ -57,7 +56,7 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
57
56
|
setCurrentAttr(getValue(props.defaultValue));
|
|
58
57
|
}, []);
|
|
59
58
|
useEffect(function () {
|
|
60
|
-
setCurrentAttr(getValue(props.value));
|
|
59
|
+
if (getValue(props.value)) setCurrentAttr(getValue(props.value));
|
|
61
60
|
}, [props.value, props.extra]);
|
|
62
61
|
function getValue(param) {
|
|
63
62
|
var res = undefined;
|
|
@@ -66,14 +65,12 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
66
65
|
if (attr.id === param.id && attr.name === (param.name || param.value)) res = attr;
|
|
67
66
|
});
|
|
68
67
|
} else if ((param === null || param === void 0 ? void 0 : param.propCategory) === 'eventProp') {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
if (res && param.step !== undefined) res.step = param.step;
|
|
68
|
+
if (param.id && (param.label || param.alias)) {
|
|
69
|
+
res = _.cloneDeep(param);
|
|
70
|
+
}
|
|
71
|
+
if (res && param.step !== undefined) {
|
|
72
|
+
res.step = param.step;
|
|
73
|
+
}
|
|
77
74
|
} else if ((param === null || param === void 0 ? void 0 : param.propCategory) === 'userProp') {
|
|
78
75
|
var _concat;
|
|
79
76
|
(_concat = (extraUser ? extraUser : []).concat(userPropList ? userPropList : [])) === null || _concat === void 0 ? void 0 : _concat.forEach(function (attr) {
|
|
@@ -31,6 +31,7 @@ export default function convertAttributeData(store) {
|
|
|
31
31
|
propCategory: 'eventProp',
|
|
32
32
|
type: item.prop_type,
|
|
33
33
|
realTime: true,
|
|
34
|
+
encryptionType: item.encryption_type,
|
|
34
35
|
dimensionSub: item.dimension_sub || 'event_attr'
|
|
35
36
|
};
|
|
36
37
|
}),
|
|
@@ -66,6 +67,7 @@ export default function convertAttributeData(store) {
|
|
|
66
67
|
propCategory: 'envProp',
|
|
67
68
|
type: prop.type,
|
|
68
69
|
realTime: true,
|
|
70
|
+
encryptionType: prop.encryption_type,
|
|
69
71
|
dimensionSub: prop.dimension_sub || prop.name
|
|
70
72
|
};
|
|
71
73
|
});
|
|
@@ -77,6 +79,7 @@ export default function convertAttributeData(store) {
|
|
|
77
79
|
category: prop.category,
|
|
78
80
|
key: "userProp-".concat(prop.name, "-").concat(prop.id || 0),
|
|
79
81
|
label: prop.text || prop.name,
|
|
82
|
+
encryptionType: prop.encryption_type,
|
|
80
83
|
name: prop.name,
|
|
81
84
|
propCategory: 'userProp',
|
|
82
85
|
type: prop.type,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.70-hxd.
|
|
3
|
+
"version": "1.2.70-hxd.25",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "72853755f749b8edf7fe2ffa9aecbbc1656fd11c",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|