@zgfe/business-lib 1.1.34-alpha.2 → 1.1.34-alpha.21
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/addToPanel/index.js +7 -1
- package/es/addToScene/index.js +1 -1
- package/es/assets/colorIcon/demo.css +539 -0
- package/es/assets/colorIcon/demo_index.html +741 -0
- package/es/assets/colorIcon/iconfont.css +112 -0
- package/es/assets/colorIcon/iconfont.js +43 -0
- package/es/assets/colorIcon/iconfont.json +177 -0
- package/es/assets/colorIcon/iconfont.svg +67 -0
- package/es/assets/colorIcon/iconfont.ttf +0 -0
- package/es/assets/colorIcon/iconfont.woff +0 -0
- package/es/assets/colorIcon/iconfont.woff2 +0 -0
- package/es/assets/iconfont/demo_index.html +95 -3
- package/es/assets/iconfont/iconfont.css +19 -3
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +28 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/assets/theme.js +1 -2
- package/es/attrConditions/components/stringList.js +0 -1
- package/es/attrConditions/components/valuesList.js +1 -0
- package/es/attrConditions/demo/group.js +3 -2
- package/es/attrConditions/demo/index.js +1 -11
- package/es/attrConditions/index.d.ts +3 -1
- package/es/attrConditions/index.js +24 -19
- package/es/attrConditions/types.d.ts +1 -1
- package/es/attributeSelector/index.js +10 -8
- package/es/attributeSelector/types.d.ts +4 -0
- package/es/attributeSelector/util.js +5 -1
- package/es/chart/util/formatOption.js +1 -1
- package/es/colorIcon/demo/index.d.ts +3 -0
- package/es/colorIcon/demo/index.js +10 -0
- package/es/colorIcon/index.d.ts +9 -0
- package/es/colorIcon/index.js +19 -0
- package/es/constants/apis.d.ts +6 -0
- package/es/constants/apis.js +7 -1
- package/es/constants/common.d.ts +11 -0
- package/es/constants/common.js +35 -0
- package/es/context/index.d.ts +4 -1
- package/es/cycleTime/month.js +17 -15
- package/es/datePicker/index.d.ts +1 -1
- package/es/datePicker/index.js +1 -1
- package/es/datePicker/styles/index.less +1 -1
- package/es/demoWrapper/content.d.ts +2 -1
- package/es/demoWrapper/content.js +25 -12
- package/es/demoWrapper/demo/index.js +5 -3
- package/es/demoWrapper/head.d.ts +3 -1
- package/es/demoWrapper/head.js +17 -5
- package/es/demoWrapper/index.js +18 -10
- package/es/dialog/index.js +1 -1
- package/es/eventSelector/demo/index.js +1 -0
- package/es/eventSelector/index.js +15 -10
- package/es/eventSelector/listPanel.js +33 -7
- package/es/eventSelector/types.d.ts +2 -0
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/select/handle.js +6 -2
- package/es/select/index.js +13 -11
- package/es/socket/demo/demo.d.ts +2 -0
- package/es/socket/demo/demo.js +145 -0
- package/es/socket/demo/index.less +27 -0
- package/es/socket/index.d.ts +33 -0
- package/es/socket/index.js +304 -0
- package/es/socket/types.d.ts +38 -0
- package/es/socket/types.js +28 -0
- package/es/targetConditionGroup/components/targetDimension.js +29 -27
- package/es/targetConditionGroup/data/operates.js +0 -3
- package/es/targetConditionGroup/demo/index.js +2 -1
- package/es/targetConditionGroup/index.js +65 -34
- package/es/targetConditionGroup/types.d.ts +1 -0
- package/es/targetSelector/index.js +9 -7
- package/es/userCondition/conditionTypeList.js +11 -8
- package/es/userCondition/conditions/business/operatorCondition.d.ts +11 -0
- package/es/userCondition/conditions/business/operatorCondition.js +181 -0
- package/es/userCondition/conditions/business/paramsCondition.d.ts +9 -0
- package/es/userCondition/conditions/business/paramsCondition.js +79 -0
- package/es/userCondition/conditions/businessCondition.d.ts +2 -8
- package/es/userCondition/conditions/businessCondition.js +37 -203
- package/es/userCondition/conditions/cdpCondition.js +1 -1
- package/es/userCondition/conditions/dataAttribute.js +78 -274
- package/es/userCondition/conditions/eventCondition.js +7 -4
- package/es/userCondition/conditions/order/runPeriodCondition.d.ts +11 -0
- package/es/userCondition/conditions/order/runPeriodCondition.js +142 -0
- package/es/userCondition/conditions/order/runTimesCondition.d.ts +11 -0
- package/es/userCondition/conditions/order/runTimesCondition.js +112 -0
- package/es/userCondition/conditions/textDesc.d.ts +1 -1
- package/es/userCondition/conditions/textDesc.js +160 -2
- package/es/userCondition/conditions/timeDimension.d.ts +1 -0
- package/es/userCondition/conditions/timeDimension.js +26 -76
- package/es/userCondition/demo/business.d.ts +3 -0
- package/es/userCondition/demo/business.js +71 -0
- package/es/userCondition/index.js +14 -2
- package/es/userCondition/orConditions.js +9 -4
- package/es/userCondition/types.d.ts +42 -8
- package/es/userCondition/types.js +8 -1
- package/es/userCondition/util.d.ts +1 -1
- package/es/userCondition/util.js +7 -4
- package/es/userTagsSelector/index.js +5 -3
- package/es/utils/ajax.js +0 -1
- package/package.json +60 -60
|
@@ -0,0 +1,71 @@
|
|
|
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 React, { useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import eventData from '../../mock/event';
|
|
9
|
+
import envData from '../../mock/env';
|
|
10
|
+
import userData from '../../mock/user';
|
|
11
|
+
import { BizUserCondition, BizGlobalDataContext, convertAttributeData } from '@zgfe/business-lib';
|
|
12
|
+
import { conditions, tagList } from './mockData';
|
|
13
|
+
import '@zgfe/business-lib/es/assets/iconfont/iconfont.css';
|
|
14
|
+
var getTagList = Promise.resolve(tagList);
|
|
15
|
+
export default (function () {
|
|
16
|
+
var _useState = useState({
|
|
17
|
+
eventGroupList: [],
|
|
18
|
+
userPropList: [],
|
|
19
|
+
eventEnvList: []
|
|
20
|
+
}),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
setStore = _useState2[1];
|
|
23
|
+
var _useState3 = useState([]),
|
|
24
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
25
|
+
userTagsData = _useState4[0],
|
|
26
|
+
setUserTagsData = _useState4[1];
|
|
27
|
+
var newStore = convertAttributeData({
|
|
28
|
+
eventList: eventData,
|
|
29
|
+
userPropList: userData,
|
|
30
|
+
envPropList: envData
|
|
31
|
+
});
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
setStore(newStore);
|
|
34
|
+
}, []);
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
getTagList.then(function (list) {
|
|
37
|
+
setUserTagsData(list);
|
|
38
|
+
});
|
|
39
|
+
}, []);
|
|
40
|
+
var defaultValue = useMemo(function () {
|
|
41
|
+
return conditions;
|
|
42
|
+
}, [conditions]);
|
|
43
|
+
function onChange(value) {
|
|
44
|
+
console.log('change:', JSON.parse(JSON.stringify(value)));
|
|
45
|
+
}
|
|
46
|
+
var descDom = /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
47
|
+
openCondition: false,
|
|
48
|
+
defaultValue: defaultValue,
|
|
49
|
+
openBusinessDataCondition: true,
|
|
50
|
+
openOrderDataCondition: true,
|
|
51
|
+
onChange: onChange,
|
|
52
|
+
eventAttrNum: 3,
|
|
53
|
+
userTagsData: userTagsData,
|
|
54
|
+
isRealTime: true
|
|
55
|
+
});
|
|
56
|
+
return /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
|
|
57
|
+
value: {
|
|
58
|
+
eventGroupList: newStore.eventGroupList,
|
|
59
|
+
userPropList: newStore.userPropList,
|
|
60
|
+
eventEnvList: newStore.envPropList,
|
|
61
|
+
currentApp: {
|
|
62
|
+
appId: 181,
|
|
63
|
+
platform: 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
style: {
|
|
68
|
+
display: 'inline-block'
|
|
69
|
+
}
|
|
70
|
+
}, descDom));
|
|
71
|
+
});
|
|
@@ -26,6 +26,9 @@ export var BizUserConditionContext = /*#__PURE__*/createContext({
|
|
|
26
26
|
textMode: false,
|
|
27
27
|
openTagCondition: false,
|
|
28
28
|
openCdpCondition: false,
|
|
29
|
+
openBusinessDataCondition: false,
|
|
30
|
+
openOrderDataCondition: false,
|
|
31
|
+
openCondition: true,
|
|
29
32
|
userTagsData: [],
|
|
30
33
|
envNameList: [],
|
|
31
34
|
userPropsMap: {},
|
|
@@ -42,7 +45,10 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
42
45
|
defaultValue = props.defaultValue,
|
|
43
46
|
openTagCondition = props.openTagCondition,
|
|
44
47
|
openCdpCondition = props.openCdpCondition,
|
|
48
|
+
openBusinessDataCondition = props.openBusinessDataCondition,
|
|
49
|
+
openOrderDataCondition = props.openOrderDataCondition,
|
|
45
50
|
userTagsData = props.userTagsData,
|
|
51
|
+
openCondition = props.openCondition,
|
|
46
52
|
cdpTip = props.cdpTip;
|
|
47
53
|
var _useState = useState([]),
|
|
48
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -58,10 +64,10 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
58
64
|
var showTag = openTagCondition && (!menuNameMap || menuNameMap['userTags']);
|
|
59
65
|
var showCdp = openCdpCondition && (!menuNameMap || menuNameMap['dataset']);
|
|
60
66
|
var flag = false;
|
|
61
|
-
defaultValue.forEach(function (item) {
|
|
67
|
+
defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.forEach(function (item) {
|
|
62
68
|
var showItem = _toConsumableArray(item);
|
|
63
69
|
if (!(showTag && showCdp)) {
|
|
64
|
-
item.forEach(function (data, index) {
|
|
70
|
+
item === null || item === void 0 ? void 0 : item.forEach(function (data, index) {
|
|
65
71
|
if (data.dataset && !showCdp || data.labels && !showTag) {
|
|
66
72
|
showItem.splice(index, 1);
|
|
67
73
|
flag = true;
|
|
@@ -216,6 +222,9 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
216
222
|
textMode: props.textMode,
|
|
217
223
|
openTagCondition: openTagCondition,
|
|
218
224
|
openCdpCondition: openCdpCondition,
|
|
225
|
+
openCondition: openCondition,
|
|
226
|
+
openBusinessDataCondition: openBusinessDataCondition,
|
|
227
|
+
openOrderDataCondition: openOrderDataCondition,
|
|
219
228
|
cdpTip: cdpTip,
|
|
220
229
|
userTagsData: userTagsData !== null && userTagsData !== void 0 ? userTagsData : [],
|
|
221
230
|
isRealTime: props.isRealTime,
|
|
@@ -254,6 +263,9 @@ BizUserCondition.defaultProps = {
|
|
|
254
263
|
andConditionNum: 5,
|
|
255
264
|
textMode: false,
|
|
256
265
|
openTagCondition: false,
|
|
266
|
+
openBusinessDataCondition: false,
|
|
267
|
+
openOrderDataCondition: false,
|
|
268
|
+
openCondition: true,
|
|
257
269
|
userTagsData: [],
|
|
258
270
|
isRealTime: false
|
|
259
271
|
};
|
|
@@ -10,6 +10,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import React, { useContext, useEffect, useState } from 'react';
|
|
12
12
|
import { BizUserConditionContext } from '.';
|
|
13
|
+
import { eventIdType } from './types';
|
|
13
14
|
import './styles/orConditions.less';
|
|
14
15
|
import { util } from '../utils';
|
|
15
16
|
import ConditionTypeList from './conditionTypeList';
|
|
@@ -117,6 +118,10 @@ var OrConditions = function OrConditions(props) {
|
|
|
117
118
|
data.condition.labels = newData;
|
|
118
119
|
} else if (type === 'cdp') {
|
|
119
120
|
data.condition.dataset = newData;
|
|
121
|
+
} else if (type === 'business') {
|
|
122
|
+
data.condition = newData;
|
|
123
|
+
} else if (type === 'order') {
|
|
124
|
+
data.condition = newData;
|
|
120
125
|
}
|
|
121
126
|
}
|
|
122
127
|
newValue.push(data.condition);
|
|
@@ -177,14 +182,14 @@ var OrConditions = function OrConditions(props) {
|
|
|
177
182
|
dataId: id,
|
|
178
183
|
onChange: onChangeAttrs
|
|
179
184
|
});
|
|
180
|
-
} else if (String(conditionData.eventId) ===
|
|
185
|
+
} else if (String(conditionData.eventId) === eventIdType.addTo) {
|
|
181
186
|
conditionDom = /*#__PURE__*/React.createElement(PeriodCondition, {
|
|
182
187
|
label: "\u65B0\u589E\u4E8E",
|
|
183
188
|
dataId: id,
|
|
184
189
|
onChange: onChangeRunPeriod,
|
|
185
190
|
runPeriod: conditionData.runPeriod
|
|
186
191
|
});
|
|
187
|
-
} else if (String(conditionData.eventId) ===
|
|
192
|
+
} else if (String(conditionData.eventId) === eventIdType.beActiveIn) {
|
|
188
193
|
conditionDom = /*#__PURE__*/React.createElement(PeriodCondition, {
|
|
189
194
|
label: "\u6D3B\u8DC3\u4E8E",
|
|
190
195
|
isRealTime: true,
|
|
@@ -192,14 +197,14 @@ var OrConditions = function OrConditions(props) {
|
|
|
192
197
|
onChange: onChangeRunPeriod,
|
|
193
198
|
runPeriod: conditionData.runPeriod
|
|
194
199
|
});
|
|
195
|
-
} else if (String(conditionData.eventId) ===
|
|
200
|
+
} else if (String(conditionData.eventId) === eventIdType.businessData) {
|
|
196
201
|
conditionDom = /*#__PURE__*/React.createElement(BusinessCondition, {
|
|
197
202
|
label: "\u4E1A\u52A1\u6570\u636E",
|
|
198
203
|
dataId: id,
|
|
199
204
|
onChange: onChangeEvent,
|
|
200
205
|
condition: condition
|
|
201
206
|
});
|
|
202
|
-
} else if (String(conditionData.eventId) ===
|
|
207
|
+
} else if (String(conditionData.eventId) === eventIdType.orderData) {
|
|
203
208
|
conditionDom = /*#__PURE__*/React.createElement(BusinessCondition, {
|
|
204
209
|
label: "\u8BA2\u5355\u6570\u636E",
|
|
205
210
|
dataId: id,
|
|
@@ -7,10 +7,18 @@ export interface RunPeriodI {
|
|
|
7
7
|
operator: 'relative' | 'unlimited_time' | 'join_time' | 'absolute';
|
|
8
8
|
values: string[];
|
|
9
9
|
}
|
|
10
|
+
export interface RunPeriodII {
|
|
11
|
+
operator: 'relative' | 'unlimited_time' | 'join_time' | 'absolute';
|
|
12
|
+
values: any[];
|
|
13
|
+
}
|
|
10
14
|
export interface RunTimesI {
|
|
11
15
|
operator: '>' | '=' | '<' | '>=' | '<=' | '>=' | 'not equal' | 'between';
|
|
12
16
|
values: string[];
|
|
13
17
|
}
|
|
18
|
+
export interface RunTimesII {
|
|
19
|
+
operator: '>' | '=' | '<' | '>=' | '<=' | '>=' | 'not equal' | 'between';
|
|
20
|
+
values: any[];
|
|
21
|
+
}
|
|
14
22
|
export interface AllConditionBasePropsI<T> {
|
|
15
23
|
dataId: number;
|
|
16
24
|
onChange: (dataId: number, newData: T) => void;
|
|
@@ -23,6 +31,12 @@ export declare enum PropType {
|
|
|
23
31
|
NUMBER2 = "number",
|
|
24
32
|
DATE2 = "date"
|
|
25
33
|
}
|
|
34
|
+
export declare enum eventIdType {
|
|
35
|
+
addTo = "-3",
|
|
36
|
+
beActiveIn = "-4",
|
|
37
|
+
businessData = "-14",
|
|
38
|
+
orderData = "-13"
|
|
39
|
+
}
|
|
26
40
|
export declare namespace BizUserConditionT {
|
|
27
41
|
type ConditionType = 'add' | 'active' | 'event' | 'prop' | 'tag' | 'cdp' | 'order' | 'business';
|
|
28
42
|
interface PropsI {
|
|
@@ -36,8 +50,20 @@ export declare namespace BizUserConditionT {
|
|
|
36
50
|
userTagsData?: UserTagsDataI[];
|
|
37
51
|
isRealTime?: boolean;
|
|
38
52
|
openCdpCondition?: boolean;
|
|
53
|
+
openBusinessDataCondition?: boolean;
|
|
54
|
+
openOrderDataCondition?: boolean;
|
|
55
|
+
openCondition?: boolean;
|
|
39
56
|
cdpTip?: string;
|
|
40
57
|
}
|
|
58
|
+
interface BusinessPropsI {
|
|
59
|
+
dataId: number;
|
|
60
|
+
condition: BizUserConditionT.BusinessCondition;
|
|
61
|
+
openBusinessDataCondition?: boolean;
|
|
62
|
+
openOrderDataCondition?: boolean;
|
|
63
|
+
label?: string | React.ReactDOM;
|
|
64
|
+
index?: number;
|
|
65
|
+
onChange: (dataId: number, newData: any) => void;
|
|
66
|
+
}
|
|
41
67
|
interface UserTagsDataI {
|
|
42
68
|
appId: number;
|
|
43
69
|
createTime: string;
|
|
@@ -80,12 +106,17 @@ export declare namespace BizUserConditionT {
|
|
|
80
106
|
category: 'fixed' | 'custom';
|
|
81
107
|
computeType: string;
|
|
82
108
|
}
|
|
109
|
+
interface paramsListCondition {
|
|
110
|
+
masterList: [];
|
|
111
|
+
bizDataAttrList: [];
|
|
112
|
+
paramsList: [];
|
|
113
|
+
}
|
|
83
114
|
interface TimeDimensionsCondition {
|
|
84
115
|
timeDimension: number;
|
|
85
116
|
timeOperator: string;
|
|
86
117
|
timeValues: number[];
|
|
87
118
|
frequencyOperator: string;
|
|
88
|
-
frequencyValues:
|
|
119
|
+
frequencyValues: any[];
|
|
89
120
|
}
|
|
90
121
|
interface EventCondition {
|
|
91
122
|
attrs: AttrCondition[];
|
|
@@ -102,17 +133,20 @@ export declare namespace BizUserConditionT {
|
|
|
102
133
|
}
|
|
103
134
|
interface BusinessCondition {
|
|
104
135
|
typeId: undefined;
|
|
136
|
+
typeName: undefined;
|
|
137
|
+
paramsList: paramsListCondition[];
|
|
105
138
|
attrs: AttrsCondition[];
|
|
106
139
|
timeDimensions: TimeDimensionsCondition[];
|
|
107
|
-
runTimes:
|
|
108
|
-
runPeriod:
|
|
140
|
+
runTimes: RunTimesII;
|
|
141
|
+
runPeriod: RunPeriodII;
|
|
109
142
|
eventId: -14;
|
|
110
143
|
}
|
|
111
144
|
interface OrderCondition {
|
|
112
145
|
attrs: AttrsCondition[];
|
|
113
146
|
timeDimensions: TimeDimensionsCondition[];
|
|
114
|
-
|
|
115
|
-
|
|
147
|
+
paramsList: paramsListCondition[];
|
|
148
|
+
runTimes: RunTimesII;
|
|
149
|
+
runPeriod: RunPeriodII;
|
|
116
150
|
eventId: -13;
|
|
117
151
|
}
|
|
118
152
|
interface ActiveCondition {
|
|
@@ -158,15 +192,15 @@ export declare namespace BizUserConditionT {
|
|
|
158
192
|
interface CdpCondition {
|
|
159
193
|
dataset: (BizUserConditionT.CdpConditionDetail | undefined)[];
|
|
160
194
|
}
|
|
161
|
-
type Condition = EventCondition | AddCondition | ActiveCondition | PropCondition | TagsCondition | BusinessCondition | CdpCondition;
|
|
195
|
+
type Condition = EventCondition | AddCondition | ActiveCondition | PropCondition | TagsCondition | BusinessCondition | OrderCondition | CdpCondition;
|
|
162
196
|
type Conditions = Condition[][];
|
|
163
|
-
type OtherCondition = EventCondition | AddCondition | ActiveCondition | PropCondition;
|
|
197
|
+
type OtherCondition = EventCondition | AddCondition | ActiveCondition | PropCondition | BusinessCondition | OrderCondition;
|
|
164
198
|
interface ShowItemI {
|
|
165
199
|
id: number;
|
|
166
200
|
orConditions: Conditions[number];
|
|
167
201
|
}
|
|
168
202
|
type ShowListT = ShowItemI[];
|
|
169
|
-
type GlobalContext = Pick<BizUserConditionT.PropsI, 'orConditionNum' | 'eventAttrNum' | 'openTagCondition' | 'userTagsData' | 'openCdpCondition' | 'textMode' | 'isRealTime' | 'cdpTip'> & {
|
|
203
|
+
type GlobalContext = Pick<BizUserConditionT.PropsI, 'orConditionNum' | 'eventAttrNum' | 'openTagCondition' | 'userTagsData' | 'openCdpCondition' | 'openBusinessDataCondition' | 'openOrderDataCondition' | 'openCondition' | 'textMode' | 'isRealTime' | 'cdpTip'> & {
|
|
170
204
|
envNameList: string[];
|
|
171
205
|
userPropsMap: {
|
|
172
206
|
[key: string]: UserProp;
|
|
@@ -6,4 +6,11 @@ export var PropType;
|
|
|
6
6
|
PropType["STRING2"] = "string";
|
|
7
7
|
PropType["NUMBER2"] = "number";
|
|
8
8
|
PropType["DATE2"] = "date";
|
|
9
|
-
})(PropType || (PropType = {}));
|
|
9
|
+
})(PropType || (PropType = {}));
|
|
10
|
+
export var eventIdType;
|
|
11
|
+
(function (eventIdType) {
|
|
12
|
+
eventIdType["addTo"] = "-3";
|
|
13
|
+
eventIdType["beActiveIn"] = "-4";
|
|
14
|
+
eventIdType["businessData"] = "-14";
|
|
15
|
+
eventIdType["orderData"] = "-13";
|
|
16
|
+
})(eventIdType || (eventIdType = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalContextProps } from '../context';
|
|
2
2
|
import type { BizUserConditionT, Unpacked } from './types';
|
|
3
|
-
export declare function buildCondition(type: BizUserConditionT.ConditionType): BizUserConditionT.
|
|
3
|
+
export declare function buildCondition(type: BizUserConditionT.ConditionType): BizUserConditionT.BusinessCondition | BizUserConditionT.EventCondition | BizUserConditionT.AddCondition | BizUserConditionT.OrderCondition | BizUserConditionT.ActiveCondition | BizUserConditionT.PropCondition | BizUserConditionT.CdpCondition;
|
|
4
4
|
export declare function transformNumberOperate(key: string, output?: boolean): string;
|
|
5
5
|
export declare function findEvent(eventId: number, eventGroupList: Unpacked<GlobalContextProps, 'eventGroupList'>): import("../attributeSelector/types").AnalysisEvent | null;
|
|
6
6
|
export declare function findPropAndEnv(name: string, list: Unpacked<GlobalContextProps, 'userPropList' | 'eventEnvList'>): import("../attributeSelector/types").UserProp | import("../attributeSelector/types").EnvProp | null;
|
package/es/userCondition/util.js
CHANGED
|
@@ -71,15 +71,17 @@ export function buildCondition(type) {
|
|
|
71
71
|
return {
|
|
72
72
|
eventId: -14,
|
|
73
73
|
typeId: undefined,
|
|
74
|
+
typeName: undefined,
|
|
74
75
|
runTimes: {
|
|
75
76
|
operator: '>=',
|
|
76
|
-
values: [
|
|
77
|
+
values: [1]
|
|
77
78
|
},
|
|
78
79
|
attrs: [],
|
|
80
|
+
paramsList: [],
|
|
79
81
|
timeDimensions: [],
|
|
80
82
|
runPeriod: {
|
|
81
83
|
operator: 'relative',
|
|
82
|
-
values: [
|
|
84
|
+
values: [30, '0']
|
|
83
85
|
}
|
|
84
86
|
};
|
|
85
87
|
case 'order':
|
|
@@ -87,13 +89,14 @@ export function buildCondition(type) {
|
|
|
87
89
|
eventId: -13,
|
|
88
90
|
runTimes: {
|
|
89
91
|
operator: '>=',
|
|
90
|
-
values: [
|
|
92
|
+
values: [1]
|
|
91
93
|
},
|
|
92
94
|
attrs: [],
|
|
95
|
+
paramsList: [],
|
|
93
96
|
timeDimensions: [],
|
|
94
97
|
runPeriod: {
|
|
95
98
|
operator: 'relative',
|
|
96
|
-
values: [
|
|
99
|
+
values: [30, '0']
|
|
97
100
|
}
|
|
98
101
|
};
|
|
99
102
|
}
|
|
@@ -81,13 +81,15 @@ var UserTagsSelect = function UserTagsSelect(props) {
|
|
|
81
81
|
return /*#__PURE__*/React.createElement("div", {
|
|
82
82
|
className: classPrefix
|
|
83
83
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
84
|
-
|
|
84
|
+
dropdownRender: function dropdownRender() {
|
|
85
|
+
return renderOverlay();
|
|
86
|
+
},
|
|
85
87
|
trigger: ['click'],
|
|
86
88
|
overlayStyle: {
|
|
87
89
|
minWidth: 0
|
|
88
90
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
onOpenChange: onVisibleChange,
|
|
92
|
+
open: visible,
|
|
91
93
|
destroyPopupOnHide: props.destroyPopupOnHide
|
|
92
94
|
}, /*#__PURE__*/React.createElement("div", {
|
|
93
95
|
className: "".concat(classPrefix, "-handle")
|
package/es/utils/ajax.js
CHANGED
|
@@ -62,7 +62,6 @@ function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
|
|
|
62
62
|
if (new RegExp("".concat(ResponseStatus.success, "$")).test(apiResult.code)) {
|
|
63
63
|
flag = true;
|
|
64
64
|
} else if (new RegExp("".concat(ResponseStatus.notLogin)).test(apiResult.code)) {
|
|
65
|
-
flag = true;
|
|
66
65
|
message = '账户未登录或登录已失效';
|
|
67
66
|
} else if (new RegExp("".concat(ResponseStatus.noPermission)).test(apiResult.code)) {
|
|
68
67
|
window.location.href = '/webapp/app/noPermission';
|
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"name": "@zgfe/business-lib",
|
|
3
|
+
"version": "1.1.34-alpha.21",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"start": "dumi dev",
|
|
6
|
+
"docs:build": "dumi build",
|
|
7
|
+
"docs:deploy": "gh-pages -d docs-dist",
|
|
8
|
+
"build": "father-build",
|
|
9
|
+
"deploy": "npm run docs:build && npm run docs:deploy",
|
|
10
|
+
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
11
|
+
"test": "umi-test",
|
|
12
|
+
"test:coverage": "umi-test --coverage",
|
|
13
|
+
"prepublishOnly": "npm run build",
|
|
14
|
+
"pub": "lerna publish"
|
|
15
|
+
},
|
|
16
|
+
"module": "es/index.js",
|
|
17
|
+
"typings": "es/index.d.ts",
|
|
18
|
+
"gitHooks": {
|
|
19
|
+
"pre-commit": "lint-staged"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"es"
|
|
23
|
+
],
|
|
24
|
+
"lint-staged": {
|
|
25
|
+
"*.{js,jsx,less,md,json}": [
|
|
26
|
+
"prettier --write"
|
|
23
27
|
],
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"react": "^16.12.0 || ^17.0.0",
|
|
60
|
-
"yorkie": "^2.0.0"
|
|
61
|
-
},
|
|
62
|
-
"gitHead": "b2e287ebcfeaa841e1f4e10bd9891e58f3223e95"
|
|
28
|
+
"*.ts?(x)": [
|
|
29
|
+
"prettier --parser=typescript --write"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@types/js-cookie": "^3.0.2",
|
|
34
|
+
"@types/qs": "^6.9.7",
|
|
35
|
+
"axios": "^0.26.1",
|
|
36
|
+
"babel-plugin-import": "^1.13.3",
|
|
37
|
+
"echarts": "^5.3.2",
|
|
38
|
+
"echarts-for-react": "^3.0.2",
|
|
39
|
+
"js-cookie": "^3.0.1",
|
|
40
|
+
"lerna": "^4.0.0",
|
|
41
|
+
"rc-virtual-list": "^3.4.8",
|
|
42
|
+
"react-infinite-scroll-component": "^6.1.0",
|
|
43
|
+
"umi-request": "^1.4.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@testing-library/jest-dom": "^5.15.1",
|
|
47
|
+
"@testing-library/react": "^12.1.2",
|
|
48
|
+
"@types/jest": "^27.0.3",
|
|
49
|
+
"@types/lodash": "^4.14.182",
|
|
50
|
+
"@umijs/fabric": "^2.8.1",
|
|
51
|
+
"@umijs/test": "^3.0.5",
|
|
52
|
+
"antd": "^4.22.8",
|
|
53
|
+
"dumi": "^1.1.0",
|
|
54
|
+
"father-build": "^1.17.2",
|
|
55
|
+
"gh-pages": "^3.0.0",
|
|
56
|
+
"lint-staged": "^10.0.7",
|
|
57
|
+
"lodash": "^4.17.21",
|
|
58
|
+
"prettier": "^2.2.1",
|
|
59
|
+
"react": "^16.12.0 || ^17.0.0",
|
|
60
|
+
"yorkie": "^2.0.0"
|
|
61
|
+
},
|
|
62
|
+
"gitHead": "b2e287ebcfeaa841e1f4e10bd9891e58f3223e95"
|
|
63
63
|
}
|