@zgfe/business-lib 1.2.70-hxd.7 → 1.2.71-hxd.1
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/index.js +6 -4
- package/es/AUMFormulaTarget/components/panel/cdpCshCondition.js +2 -2
- package/es/AUMFormulaTarget/components/panel/index.less +1 -1
- package/es/AUMFormulaTarget/demo/index.js +1 -1
- package/es/AUMFormulaTarget/index.d.ts +4 -1
- package/es/addToPanel/components/radioGroup.d.ts +4 -1
- package/es/addToPanel/components/styleList.d.ts +4 -1
- package/es/addToPanel/index.d.ts +4 -1
- package/es/addToPanel/index.js +1 -1
- package/es/addToScene/index.js +3 -8
- package/es/amountSelector/demo/index.d.ts +3 -0
- package/es/amountSelector/demo/index.js +9 -0
- package/es/amountSelector/index.d.ts +10 -0
- package/es/amountSelector/index.js +21 -0
- package/es/amountSelector/styles/index.less +27 -0
- package/es/amountSelector/types.d.ts +4 -0
- package/es/amountSelector/types.js +1 -0
- package/es/amountSelector/util.d.ts +3 -0
- package/es/amountSelector/util.js +18 -0
- package/es/assets/colorIcon/demo_index.html +1023 -492
- package/es/assets/colorIcon/iconfont.css +203 -110
- package/es/assets/colorIcon/iconfont.js +13 -14
- package/es/assets/colorIcon/iconfont.json +433 -272
- 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.css +539 -539
- package/es/assets/iconfont/demo_index.html +5563 -5708
- package/es/assets/iconfont/iconfont.css +1015 -975
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +1584 -1689
- package/es/assets/styles/resetAntd.less +6 -2
- package/es/assets/styles/variable.less +1 -1
- package/es/assets/theme.js +1 -1
- package/es/attrCondition/demo/group.js +1 -1
- package/es/attrCondition/group.js +11 -6
- package/es/attrCondition/index.js +11 -6
- package/es/attrCondition/styles/index.less +1 -1
- package/es/attrCondition/useAttrCondition.js +7 -5
- package/es/attrConditions/components/operateList.js +6 -3
- package/es/attrConditions/components/stringList.js +5 -9
- package/es/attrConditions/index.d.ts +4 -1
- package/es/attrConditions/index.js +4 -2
- package/es/attrConditions/types.d.ts +4 -0
- package/es/attrConditions/utils/operates.d.ts +4 -0
- package/es/attrConditions/utils/operates.js +37 -0
- package/es/attributeSelector/index.js +11 -11
- package/es/attributeSelector/listPanel.js +313 -101
- package/es/attributeSelector/types.d.ts +2 -0
- package/es/attributeSelector/util.js +3 -0
- package/es/chart/demo/data/data5 copy.js +2 -2
- package/es/chart/demo/index.js +1 -1
- package/es/chart/demo/line_bar_stack.js +4 -4
- package/es/chart/demo/stack.js +1 -1
- package/es/chart/index.js +10 -12
- package/es/chart/styles/index.less +2 -2
- package/es/chart/util/color.js +1 -1
- package/es/colorIcon/index.js +2 -4
- package/es/constants/apis.d.ts +4 -0
- package/es/constants/apis.js +6 -2
- package/es/constants/common.d.ts +11 -0
- package/es/constants/common.js +31 -0
- package/es/context/index.d.ts +2 -0
- package/es/cycleTime/index.js +6 -8
- package/es/cycleTime/month.js +2 -5
- package/es/dataSetGroup/index.js +0 -1
- package/es/datePicker/index.d.ts +4 -1
- package/es/datePickerV2/demo/index.js +1 -1
- package/es/datePickerV2/index.d.ts +4 -1
- package/es/datePickerV2/index.js +13 -4
- package/es/datePickerV2/popoverContent.js +1 -1
- package/es/datePickerV2/shortcut.js +1 -1
- package/es/datePickerV2/styles/index.less +1 -1
- package/es/datePickerV2/types.d.ts +1 -0
- package/es/datePickerV2/utils.js +8 -2
- package/es/demoWrapper/content.js +9 -10
- package/es/demoWrapper/innerDemo.js +1 -1
- package/es/dialog/index.d.ts +4 -1
- package/es/dnd/demo/index.js +5 -1
- package/es/dnd/demo/styles/index.less +34 -34
- package/es/dnd/index.d.ts +4 -1
- package/es/dnd/item.js +14 -0
- package/es/eventSelector/index.d.ts +4 -1
- package/es/eventSelector/index.js +3 -2
- package/es/eventSelector/listPanel.js +9 -13
- package/es/eventSelector/option.d.ts +1 -0
- package/es/eventSelector/option.js +14 -3
- package/es/eventSelector/styles/index.less +4 -0
- package/es/eventSelector/types.d.ts +1 -0
- package/es/formulaTarget/components/formula/index.js +2 -1
- package/es/formulaTarget/components/formula/index.less +1 -1
- package/es/formulaTarget/components/formula/types.d.ts +1 -0
- package/es/formulaTarget/components/formulaItem/index.js +7 -2
- package/es/formulaTarget/components/formulaItem/types.d.ts +1 -0
- package/es/formulaTarget/components/panel/index.js +2 -1
- package/es/formulaTarget/components/panel/item.js +5 -1
- package/es/formulaTarget/components/panel/types.d.ts +2 -0
- package/es/formulaTarget/index.d.ts +4 -1
- package/es/formulaTarget/index.js +2 -1
- package/es/formulaTarget/types.d.ts +1 -0
- package/es/hooks/useBizStore.js +3 -9
- package/es/icon/iconFont.d.ts +4 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/layout/analysisLayout/index.d.ts +4 -1
- package/es/layout/columnLayout/index.d.ts +4 -1
- package/es/layout/optionTitle/components/btnMenu/index.less +18 -18
- package/es/layout/optionTitle/components/changePanelModal/styles/index.less +3 -3
- package/es/layout/optionTitle/components/title/index.d.ts +1 -2
- package/es/layout/optionTitle/components/title/index.js +10 -6
- package/es/layout/optionTitle/components/title/index.less +43 -43
- package/es/layout/optionTitle/index.js +1 -1
- package/es/layout/optionTitle/styles/index.less +30 -30
- package/es/layout/optionTitle/styles/layout.less +90 -90
- package/es/layout/optionTitle/styles/search.less +27 -27
- package/es/platformSelector/styles/index.less +1 -1
- package/es/productCondition/conditionTypeList.d.ts +4 -1
- package/es/productCondition/conditions/cdpCshCondition.js +9 -6
- package/es/productCondition/conditions/constants.d.ts +2 -0
- package/es/productCondition/conditions/constants.js +2 -0
- package/es/productCondition/conditions/order/runPeriodCondition.js +2 -4
- package/es/productCondition/conditions/periodCondition.d.ts +4 -1
- package/es/productCondition/conditions/propCondition.d.ts +4 -1
- package/es/productCondition/conditions/styles/periodCondition.less +1 -1
- package/es/productCondition/index.d.ts +4 -1
- package/es/productCondition/styles/conditionTypeList.less +4 -2
- package/es/productCondition/styles/relationLabel.less +1 -1
- package/es/productCondition/types.d.ts +3 -1
- package/es/productCondition/util.d.ts +4 -0
- package/es/productCondition/util.js +4 -2
- package/es/quickDatePicker/demo/index.js +31 -11
- package/es/quickDatePicker/index.js +122 -23
- package/es/quickDatePicker/styles/index.less +28 -25
- package/es/quickDatePicker/types.d.ts +13 -0
- package/es/quickDatePicker/utils.d.ts +6 -0
- package/es/quickDatePicker/utils.js +54 -1
- package/es/select/demo/index.js +2 -1
- package/es/select/handle.js +2 -9
- package/es/select/index.d.ts +4 -1
- package/es/select/option.js +1 -1
- package/es/select/overlay.js +2 -2
- package/es/select/styles/handle.less +15 -2
- package/es/socket/demo/demo.js +2 -2
- package/es/subjectWrapper/index.js +3 -1
- package/es/table/demo/data/color.js +1 -1
- package/es/table/index.js +3 -30
- package/es/targetConditionGroup/components/targetDimension.js +147 -53
- package/es/targetConditionGroup/demo/group.js +5 -18
- package/es/targetConditionGroup/index.d.ts +4 -1
- package/es/targetConditionGroup/index.js +12 -10
- package/es/targetConditionGroup/types.d.ts +1 -0
- package/es/targetSelector/editBox.d.ts +1 -0
- package/es/targetSelector/editBox.js +8 -3
- package/es/targetSelector/index.js +2 -1
- package/es/targetSelector/optionIcon.d.ts +4 -1
- package/es/targetSelector/optionIcon.js +3 -0
- package/es/targetSelector/styles/index.less +35 -3
- package/es/userCondition/conditionTypeList.d.ts +4 -1
- package/es/userCondition/conditionTypeList.js +5 -4
- package/es/userCondition/conditions/cdpCondition.js +9 -6
- package/es/userCondition/conditions/cdpCshCondition.js +9 -6
- package/es/userCondition/conditions/constants.d.ts +2 -0
- package/es/userCondition/conditions/constants.js +2 -0
- package/es/userCondition/conditions/dataAttribute.js +11 -7
- package/es/userCondition/conditions/eventCondition.js +16 -24
- package/es/userCondition/conditions/order/runPeriodCondition.d.ts +4 -1
- package/es/userCondition/conditions/periodCondition.d.ts +4 -1
- package/es/userCondition/conditions/periodCondition.js +19 -11
- package/es/userCondition/conditions/propCondition.js +5 -3
- package/es/userCondition/conditions/styles/eventCondition.less +14 -0
- package/es/userCondition/conditions/styles/periodCondition.less +7 -1
- package/es/userCondition/conditions/styles/textDesc.less +3 -4
- package/es/userCondition/conditions/tagsCondition.js +12 -5
- package/es/userCondition/conditions/textDesc.js +9 -5
- package/es/userCondition/demo/index.js +20 -14
- package/es/userCondition/demo/mockData.d.ts +20 -94
- package/es/userCondition/demo/mockData.js +31 -76
- package/es/userCondition/index.d.ts +5 -1
- package/es/userCondition/index.js +37 -21
- package/es/userCondition/styles/conditionTypeList.less +4 -2
- package/es/userCondition/styles/relationLabel.less +1 -1
- package/es/userCondition/types.d.ts +5 -2
- package/es/userCondition/util.d.ts +4 -0
- package/es/userCondition/util.js +4 -2
- package/es/userGroup/demo/index.js +2 -9
- package/es/userGroup/index.d.ts +4 -1
- package/es/userGroup/index.js +63 -15
- package/es/userGroup/overlay.js +17 -3
- package/es/userGroup/styles/index.less +55 -1
- package/es/userGroup/types.d.ts +2 -0
- package/es/userGroup/util.d.ts +2 -0
- package/es/userGroup/util.js +47 -0
- package/es/userGroupHeader/demo/index.js +1 -1
- package/es/userGroupHeader/index.d.ts +1 -0
- package/es/userGroupHeader/index.js +53 -6
- package/es/userGroupHeader/styles/index.less +21 -2
- package/es/userTagsSelector/cascaderOverlay.d.ts +4 -1
- package/es/userTagsSelector/cascaderOverlay.js +9 -2
- package/es/userTagsSelector/components/tagList/index.d.ts +4 -1
- package/es/userTagsSelector/groups/index.d.ts +4 -1
- package/es/userTagsSelector/index.d.ts +4 -1
- package/es/userTagsSelector/index.js +32 -2
- package/es/userTagsSelector/styles/index.less +10 -0
- package/es/userTagsSelector/types.d.ts +2 -0
- package/es/userTagsSelector/util.d.ts +1 -0
- package/es/userTagsSelector/util.js +20 -0
- package/es/utils/ajax.js +63 -26
- package/es/utils/eventApi.d.ts +14 -0
- package/es/utils/eventApi.js +128 -0
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.js +2 -1
- package/es/utils/type.d.ts +1 -0
- package/es/utils/util.d.ts +1 -0
- package/es/utils/util.js +18 -0
- package/package.json +2 -2
- package/es/assets/colorIcon/iconfont.svg +0 -129
|
@@ -15,18 +15,21 @@ import BizSelect from '../../select';
|
|
|
15
15
|
import { PropType } from '../types';
|
|
16
16
|
import './styles/cdpCshCondition.less';
|
|
17
17
|
import _ from 'lodash';
|
|
18
|
-
import { dateOperate, numberOperateCsh, numberTypeCsh, stringOperate, numberOperateCsh2 } from '../../attrConditions/utils/operates';
|
|
18
|
+
import { dateOperate, numberOperateCsh, numberTypeCsh, stringOperate, numberOperateCsh2, stringOperate1 } from '../../attrConditions/utils/operates';
|
|
19
19
|
import { DatePicker, Input } from 'antd';
|
|
20
20
|
import moment from 'moment';
|
|
21
21
|
import { BizUserConditionContext } from '..';
|
|
22
22
|
import request from '../../utils/ajax';
|
|
23
23
|
import Apis from '../../constants/apis';
|
|
24
24
|
import IconFont from '../../icon/iconFont';
|
|
25
|
+
import BizGlobalDataContext from '../../context';
|
|
25
26
|
var classPrefix = 'biz-user-condition-cdp-csh';
|
|
26
27
|
var CdpConditionItem = function CdpConditionItem(props) {
|
|
27
|
-
var _useContext = useContext(
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
29
|
+
basicConfig = _useContext.basicConfig;
|
|
30
|
+
var _useContext2 = useContext(BizUserConditionContext),
|
|
31
|
+
_useContext2$datasetL = _useContext2.datasetList,
|
|
32
|
+
datasetList = _useContext2$datasetL === void 0 ? [] : _useContext2$datasetL;
|
|
30
33
|
var _useState = useState(function () {
|
|
31
34
|
if (props.value) {
|
|
32
35
|
return _objectSpread(_objectSpread({}, props.value), {}, {
|
|
@@ -289,7 +292,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
289
292
|
list = numberOperateCsh;
|
|
290
293
|
break;
|
|
291
294
|
case PropType.STRING2:
|
|
292
|
-
list = stringOperate;
|
|
295
|
+
list = basicConfig && basicConfig.openRegexp ? stringOperate1 : stringOperate;
|
|
293
296
|
break;
|
|
294
297
|
default:
|
|
295
298
|
list = [];
|
|
@@ -314,7 +317,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
314
317
|
options: optionList,
|
|
315
318
|
labelField: "name",
|
|
316
319
|
keyField: "value",
|
|
317
|
-
overlayWidth:
|
|
320
|
+
overlayWidth: 120,
|
|
318
321
|
value: operator,
|
|
319
322
|
onChange: onOperateChange
|
|
320
323
|
}), function () {
|
|
@@ -14,7 +14,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
14
14
|
import BizSelect from '../../select';
|
|
15
15
|
import './styles/runTimesCondition.less';
|
|
16
16
|
import { classPrefix } from '..';
|
|
17
|
-
import { stringOperate, orderTypeList, typeList, computeTypeList } from '../../attrConditions/utils/operates';
|
|
17
|
+
import { stringOperate, orderTypeList, typeList, computeTypeList, stringOperate1 } from '../../attrConditions/utils/operates';
|
|
18
18
|
import moment from 'moment';
|
|
19
19
|
import request from '../../utils/ajax';
|
|
20
20
|
import BizGlobalDataContext from '../../context';
|
|
@@ -22,6 +22,8 @@ import ParamsCondition from './business/paramsCondition';
|
|
|
22
22
|
import OperatorCondition from './business/operatorCondition';
|
|
23
23
|
import Apis from '../../constants/apis';
|
|
24
24
|
var DataAttribute = function DataAttribute(props) {
|
|
25
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
26
|
+
basicConfig = _useContext.basicConfig;
|
|
25
27
|
var condition = props.condition,
|
|
26
28
|
index = props.index,
|
|
27
29
|
onChange = props.onChange;
|
|
@@ -29,8 +31,8 @@ var DataAttribute = function DataAttribute(props) {
|
|
|
29
31
|
var operateList = [];
|
|
30
32
|
switch (condition.attrs[index].attrType) {
|
|
31
33
|
case 'cont-string':
|
|
32
|
-
list = typeList['cont-string'];
|
|
33
|
-
operateList = stringOperate;
|
|
34
|
+
list = basicConfig && basicConfig.openRegexp ? stringOperate1 : typeList['cont-string'];
|
|
35
|
+
operateList = basicConfig && basicConfig.openRegexp ? stringOperate1 : stringOperate;
|
|
34
36
|
break;
|
|
35
37
|
case 'cont-num':
|
|
36
38
|
list = computeTypeList;
|
|
@@ -57,8 +59,8 @@ var DataAttribute = function DataAttribute(props) {
|
|
|
57
59
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
58
60
|
bizDataAttrList = _useState8[0],
|
|
59
61
|
setBizDataAttrList = _useState8[1];
|
|
60
|
-
var
|
|
61
|
-
currentApp =
|
|
62
|
+
var _useContext2 = useContext(BizGlobalDataContext),
|
|
63
|
+
currentApp = _useContext2.currentApp;
|
|
62
64
|
useEffect(function () {
|
|
63
65
|
if (condition === null || condition === void 0 ? void 0 : condition.typeId) {
|
|
64
66
|
queryBizDataAttrList(condition === null || condition === void 0 ? void 0 : condition.typeId);
|
|
@@ -123,7 +125,7 @@ var DataAttribute = function DataAttribute(props) {
|
|
|
123
125
|
});
|
|
124
126
|
switch (operate.propType) {
|
|
125
127
|
case 1:
|
|
126
|
-
setMasterList(typeList['cont-string']);
|
|
128
|
+
setMasterList(basicConfig && basicConfig.openRegexp ? stringOperate1 : typeList['cont-string']);
|
|
127
129
|
condition.attrs[index].attrType = 'cont-string';
|
|
128
130
|
setQueryValueObj({
|
|
129
131
|
keyword: '',
|
|
@@ -152,7 +154,7 @@ var DataAttribute = function DataAttribute(props) {
|
|
|
152
154
|
if (!(condition === null || condition === void 0 ? void 0 : condition.typeId)) {
|
|
153
155
|
switch (operate.propType) {
|
|
154
156
|
case 1:
|
|
155
|
-
setStringOperateList(typeList['cont-string']);
|
|
157
|
+
setStringOperateList(basicConfig && basicConfig.openRegexp ? stringOperate1 : typeList['cont-string']);
|
|
156
158
|
condition.attrs[index].attrType = 'cont-string';
|
|
157
159
|
setQueryValueObj({
|
|
158
160
|
keyword: '',
|
|
@@ -228,8 +230,10 @@ var DataAttribute = function DataAttribute(props) {
|
|
|
228
230
|
},
|
|
229
231
|
labelField: "name",
|
|
230
232
|
keyField: "value",
|
|
233
|
+
overlayWidth: 120,
|
|
231
234
|
onChange: onMasterListChange
|
|
232
235
|
})), /*#__PURE__*/React.createElement(OperatorCondition, {
|
|
236
|
+
key: condition.typeId ? condition.attrs[index].attrType === 'cont-string' || condition.attrs[index].attrType === 'cont-date' ? condition.attrs[index].operator : condition.attrs[index].computeType : condition.attrs[index].attrId,
|
|
233
237
|
queryValueObj: queryValueObj,
|
|
234
238
|
stringOperateList: stringOperateList,
|
|
235
239
|
index: index,
|
|
@@ -15,10 +15,9 @@ import BizEventSelector from '../../eventSelector';
|
|
|
15
15
|
import RunTimesCondition from './runTimesCondition';
|
|
16
16
|
import PeriodCondition from './periodCondition';
|
|
17
17
|
import PropCondition from './propCondition';
|
|
18
|
-
import { DownOutlined } from '@ant-design/icons';
|
|
19
18
|
import './styles/eventCondition.less';
|
|
20
19
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
21
|
-
import {
|
|
20
|
+
import { Button, notification } from 'antd';
|
|
22
21
|
import TimeDimension from './timeDimension';
|
|
23
22
|
import { Tooltip } from 'antd';
|
|
24
23
|
import IconFont from '../../icon/iconFont';
|
|
@@ -28,7 +27,8 @@ import Apis from '../../constants/apis';
|
|
|
28
27
|
var EventCondition = function EventCondition(props) {
|
|
29
28
|
var _condition$timeDimens2, _condition$timeDimens3;
|
|
30
29
|
var _useContext = useContext(BizUserConditionContext),
|
|
31
|
-
isRealTime = _useContext.isRealTime
|
|
30
|
+
isRealTime = _useContext.isRealTime,
|
|
31
|
+
realTimeTags = _useContext.realTimeTags;
|
|
32
32
|
var _useContext2 = useContext(BizGlobalDataContext),
|
|
33
33
|
currentUser = _useContext2.currentUser,
|
|
34
34
|
currentApp = _useContext2.currentApp;
|
|
@@ -66,7 +66,7 @@ var EventCondition = function EventCondition(props) {
|
|
|
66
66
|
}]
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
|
-
var
|
|
69
|
+
var _onClick = function onClick(_ref) {
|
|
70
70
|
var key = _ref.key;
|
|
71
71
|
if (key === 'time dimension') {
|
|
72
72
|
var _condition$timeDimens;
|
|
@@ -87,10 +87,6 @@ var EventCondition = function EventCondition(props) {
|
|
|
87
87
|
}
|
|
88
88
|
onChange(_objectSpread({}, condition));
|
|
89
89
|
};
|
|
90
|
-
var items = [{
|
|
91
|
-
label: '时间维度',
|
|
92
|
-
key: 'time dimension'
|
|
93
|
-
}];
|
|
94
90
|
function onTimeDimensionChange(condition) {
|
|
95
91
|
onChange(_objectSpread({}, condition));
|
|
96
92
|
}
|
|
@@ -202,21 +198,17 @@ var EventCondition = function EventCondition(props) {
|
|
|
202
198
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
203
199
|
type: "qingchu"
|
|
204
200
|
}))));
|
|
205
|
-
}), condition && !(eventRemovedList === null || eventRemovedList === void 0 ? void 0 : eventRemovedList.includes(condition.eventId)) && ((_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.length) < 3 && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType) === 0 || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType) === 2) ? /*#__PURE__*/React.createElement(
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
onClick: function onClick(e) {
|
|
218
|
-
return e.preventDefault();
|
|
219
|
-
}
|
|
220
|
-
}, /*#__PURE__*/React.createElement(Space, null, "\u9AD8\u7EA7\u7B5B\u9009", /*#__PURE__*/React.createElement(DownOutlined, null))))) : null);
|
|
201
|
+
}), condition && !(eventRemovedList === null || eventRemovedList === void 0 ? void 0 : eventRemovedList.includes(condition.eventId)) && ((_condition$timeDimens3 = condition.timeDimensions) === null || _condition$timeDimens3 === void 0 ? void 0 : _condition$timeDimens3.length) < 3 && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType) === 0 || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType) === 2) && realTimeTags !== true ? /*#__PURE__*/React.createElement(Button, {
|
|
202
|
+
className: "".concat(classPrefix, "-event-condition-time"),
|
|
203
|
+
type: "dashed",
|
|
204
|
+
onClick: function onClick() {
|
|
205
|
+
return _onClick({
|
|
206
|
+
key: 'time dimension'
|
|
207
|
+
});
|
|
208
|
+
},
|
|
209
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
210
|
+
type: "tianjia1"
|
|
211
|
+
})
|
|
212
|
+
}, "\u65F6\u95F4\u7EF4\u5EA6") : null);
|
|
221
213
|
};
|
|
222
214
|
export default EventCondition;
|
|
@@ -7,5 +7,8 @@ export interface RunPeriodConditionPropsI extends AllConditionBasePropsI<any> {
|
|
|
7
7
|
dataId: number;
|
|
8
8
|
condition: BizUserConditionT.BusinessCondition;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
type FCWithDefaultProps<P> = React.FC<P> & {
|
|
11
|
+
defaultProps?: Partial<P>;
|
|
12
|
+
};
|
|
13
|
+
declare const RunPeriodCondition: FCWithDefaultProps<RunPeriodConditionPropsI>;
|
|
11
14
|
export default RunPeriodCondition;
|
|
@@ -7,5 +7,8 @@ export interface PeriodConditionPropsI extends AllConditionBasePropsI<RunPeriodI
|
|
|
7
7
|
runPeriod: RunPeriodI;
|
|
8
8
|
isRealTime?: boolean;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
type FCWithDefaultProps<P> = React.FC<P> & {
|
|
11
|
+
defaultProps?: Partial<P>;
|
|
12
|
+
};
|
|
13
|
+
declare const PeriodCondition: FCWithDefaultProps<PeriodConditionPropsI>;
|
|
11
14
|
export default PeriodCondition;
|
|
@@ -4,12 +4,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
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
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
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); }
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
7
|
+
import React, { useMemo, useContext } from 'react';
|
|
8
8
|
import BizSelect from '../../select';
|
|
9
|
-
import {
|
|
9
|
+
import { DatePicker, Checkbox, InputNumber } from 'antd';
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import './styles/periodCondition.less';
|
|
12
|
-
import { classPrefix } from '..';
|
|
12
|
+
import { BizUserConditionContext, classPrefix } from '..';
|
|
13
13
|
import { operatorMap } from './constants';
|
|
14
14
|
var RangePicker = DatePicker.RangePicker;
|
|
15
15
|
var PeriodCondition = function PeriodCondition(props) {
|
|
@@ -17,6 +17,8 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
17
17
|
label = props.label,
|
|
18
18
|
isEvent = props.isEvent,
|
|
19
19
|
runPeriod = props.runPeriod;
|
|
20
|
+
var _useContext = useContext(BizUserConditionContext),
|
|
21
|
+
realTimeTags = _useContext.realTimeTags;
|
|
20
22
|
var options = [{
|
|
21
23
|
text: '最近',
|
|
22
24
|
value: 'relative'
|
|
@@ -33,6 +35,12 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
33
35
|
value: 'join_time'
|
|
34
36
|
}]);
|
|
35
37
|
}
|
|
38
|
+
if (realTimeTags) {
|
|
39
|
+
options = [{
|
|
40
|
+
text: '最近',
|
|
41
|
+
value: 'relative'
|
|
42
|
+
}];
|
|
43
|
+
}
|
|
36
44
|
var unit = useMemo(function () {
|
|
37
45
|
if (runPeriod.operator === 'absolute' || runPeriod.operator === 'unlimited_time') {
|
|
38
46
|
return '';
|
|
@@ -72,9 +80,8 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
72
80
|
values: newValues
|
|
73
81
|
}));
|
|
74
82
|
} else if (runPeriod.operator === 'relative' || runPeriod.operator === 'join_time') {
|
|
75
|
-
var newValue = newData.target.value;
|
|
76
83
|
onChange(_objectSpread(_objectSpread({}, runPeriod), {}, {
|
|
77
|
-
values: [
|
|
84
|
+
values: [newData, runPeriod.values[1]]
|
|
78
85
|
}));
|
|
79
86
|
}
|
|
80
87
|
}
|
|
@@ -91,9 +98,10 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
91
98
|
var operator = runPeriod.operator,
|
|
92
99
|
values = runPeriod.values;
|
|
93
100
|
if (operator === 'relative' || operator === 'join_time') {
|
|
94
|
-
return /*#__PURE__*/React.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
return /*#__PURE__*/React.createElement(InputNumber, {
|
|
102
|
+
max: realTimeTags ? 30 : undefined,
|
|
103
|
+
min: 1,
|
|
104
|
+
value: Number(values[0]),
|
|
97
105
|
onChange: onDateChange,
|
|
98
106
|
style: {
|
|
99
107
|
width: 58
|
|
@@ -116,7 +124,7 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
116
124
|
}, label) : null, /*#__PURE__*/React.createElement("div", {
|
|
117
125
|
className: "".concat(classPrefix, "-period-condition-operator")
|
|
118
126
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
119
|
-
dropdownExtra: isEvent ? /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
dropdownExtra: isEvent && !realTimeTags ? /*#__PURE__*/React.createElement("div", {
|
|
120
128
|
style: {
|
|
121
129
|
lineHeight: '29px'
|
|
122
130
|
}
|
|
@@ -135,12 +143,12 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
135
143
|
className: "".concat(classPrefix, "-period-condition-values")
|
|
136
144
|
}, renderValues()), /*#__PURE__*/React.createElement("div", {
|
|
137
145
|
className: "".concat(classPrefix, "-period-condition-unit")
|
|
138
|
-
}, unit), props.isRealTime && runPeriod.operator === 'relative' ? /*#__PURE__*/React.createElement("div", {
|
|
146
|
+
}, unit), props.isRealTime && runPeriod.operator === 'relative' && !realTimeTags ? /*#__PURE__*/React.createElement("div", {
|
|
139
147
|
className: "".concat(classPrefix, "-period-condition-today")
|
|
140
148
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
141
149
|
checked: runPeriod.values[1] === '1',
|
|
142
150
|
onChange: onChangeToday
|
|
143
|
-
}, "\u4E0D\u5305\u542B\u4ECA\u5929")) : null);
|
|
151
|
+
}, "\u4E0D\u5305\u542B\u4ECA\u5929")) : null, realTimeTags && /*#__PURE__*/React.createElement("div", null, "\uFF0C\u5305\u542B\u4ECA\u5929"));
|
|
144
152
|
};
|
|
145
153
|
PeriodCondition.defaultProps = {
|
|
146
154
|
isEvent: false,
|
|
@@ -35,7 +35,8 @@ var attrNumTypeMap = {
|
|
|
35
35
|
var PropCondition = function PropCondition(props) {
|
|
36
36
|
var _useContext = useContext(BizUserConditionContext),
|
|
37
37
|
envNameList = _useContext.envNameList,
|
|
38
|
-
userPropsMap = _useContext.userPropsMap
|
|
38
|
+
userPropsMap = _useContext.userPropsMap,
|
|
39
|
+
realTimeTags = _useContext.realTimeTags;
|
|
39
40
|
var _useContext2 = useContext(BizUserConditionContext),
|
|
40
41
|
eventAttrNum = _useContext2.eventAttrNum;
|
|
41
42
|
var isEvent = props.isEvent,
|
|
@@ -160,14 +161,15 @@ var PropCondition = function PropCondition(props) {
|
|
|
160
161
|
return _onChange(data, i);
|
|
161
162
|
},
|
|
162
163
|
enableUserProp: !isEvent,
|
|
163
|
-
enableEnvProp: isEvent,
|
|
164
|
+
enableEnvProp: isEvent && !realTimeTags,
|
|
164
165
|
enableEventProp: isEvent,
|
|
165
166
|
onDelete: function onDelete() {
|
|
166
167
|
return onRemoveAttr(i);
|
|
167
168
|
},
|
|
168
169
|
enableDelete: isEvent,
|
|
169
170
|
border: false,
|
|
170
|
-
destroyPopupOnHide: true
|
|
171
|
+
destroyPopupOnHide: true,
|
|
172
|
+
realTimeTags: realTimeTags
|
|
171
173
|
}, props))));
|
|
172
174
|
}
|
|
173
175
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -54,4 +54,18 @@
|
|
|
54
54
|
font-weight: 400;
|
|
55
55
|
font-size: 14px;
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
&-time {
|
|
59
|
+
display: flex !important;
|
|
60
|
+
gap: 4px;
|
|
61
|
+
margin: 13px 0px 0px 38px;
|
|
62
|
+
padding: 4px 16px !important;
|
|
63
|
+
color: #116acc !important;
|
|
64
|
+
font-weight: 400;
|
|
65
|
+
font-size: 14px !important;
|
|
66
|
+
line-height: 14px;
|
|
67
|
+
background: #fff !important;
|
|
68
|
+
border: 1px dashed #116acc !important;
|
|
69
|
+
border-radius: 4px !important;
|
|
70
|
+
}
|
|
57
71
|
}
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
&-values,
|
|
8
8
|
&-unit {
|
|
9
9
|
margin-right: @margin-xs;
|
|
10
|
+
text-wrap-mode: nowrap;
|
|
10
11
|
> input {
|
|
11
12
|
border: none !important;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
&-operator {
|
|
15
|
-
width:
|
|
16
|
+
width: 100px;
|
|
16
17
|
}
|
|
17
18
|
&-values {
|
|
18
19
|
.ant-picker-range.ant-picker-larg {
|
|
@@ -23,4 +24,9 @@
|
|
|
23
24
|
margin-left: @margin-xs;
|
|
24
25
|
white-space: nowrap;
|
|
25
26
|
}
|
|
27
|
+
.ant-input-number {
|
|
28
|
+
background-color: #fafafb;
|
|
29
|
+
border: 1px solid #fafafb;
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
}
|
|
26
32
|
}
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useContext, useState } from 'react';
|
|
13
|
+
import React, { useContext, useState, useEffect } from 'react';
|
|
14
14
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
15
15
|
import BizSelect from '../../select';
|
|
16
16
|
import { operatorMap } from './constants';
|
|
@@ -28,7 +28,8 @@ var options = [{
|
|
|
28
28
|
}];
|
|
29
29
|
var TagsCondition = function TagsCondition(props) {
|
|
30
30
|
var _useContext = useContext(BizUserConditionContext),
|
|
31
|
-
userTagsData = _useContext.userTagsData
|
|
31
|
+
userTagsData = _useContext.userTagsData,
|
|
32
|
+
searchUserTagsData = _useContext.searchUserTagsData;
|
|
32
33
|
var _useContext2 = useContext(BizGlobalDataContext),
|
|
33
34
|
currentApp = _useContext2.currentApp;
|
|
34
35
|
var labels = props.labels,
|
|
@@ -37,8 +38,14 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
37
38
|
var _useState = useState(function () {
|
|
38
39
|
return buildDefaultValues();
|
|
39
40
|
}),
|
|
40
|
-
_useState2 = _slicedToArray(_useState,
|
|
41
|
-
defaultValue = _useState2[0]
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
defaultValue = _useState2[0],
|
|
43
|
+
setDefaultValue = _useState2[1];
|
|
44
|
+
useEffect(function () {
|
|
45
|
+
setDefaultValue(function () {
|
|
46
|
+
return buildDefaultValues();
|
|
47
|
+
});
|
|
48
|
+
}, [userTagsData]);
|
|
42
49
|
function onOperatorChange(operator) {
|
|
43
50
|
onChange(dataId, _objectSpread(_objectSpread({}, labels), {}, {
|
|
44
51
|
operator: operator.value
|
|
@@ -54,7 +61,7 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
54
61
|
}
|
|
55
62
|
function buildDefaultValues() {
|
|
56
63
|
var values = [];
|
|
57
|
-
var findTag = buildSelectLayer(userTagsData);
|
|
64
|
+
var findTag = buildSelectLayer(userTagsData.concat(searchUserTagsData || []));
|
|
58
65
|
labels.values.forEach(function (value) {
|
|
59
66
|
if (_.isNumber(value)) {
|
|
60
67
|
return;
|
|
@@ -13,7 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
import React, { useContext, useMemo } from 'react';
|
|
15
15
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
16
|
-
import { monthTimeOperatorType, monthValuesType, skyTimeOperatorType, timeDimensionType, timeValuesType, typeList, weekTimeOperatorType, weekValuesType, orderTypeList, computeTypeList,
|
|
16
|
+
import { monthTimeOperatorType, monthValuesType, skyTimeOperatorType, timeDimensionType, timeValuesType, typeList, weekTimeOperatorType, weekValuesType, orderTypeList, computeTypeList, stringOperate1 } from '../../attrConditions/utils/operates';
|
|
17
17
|
import BizGlobalDataContext from '../../context';
|
|
18
18
|
import { findEvent, findPropAndEnv, buildSelectLayer } from '../util';
|
|
19
19
|
import { durationHandler, operatorMap } from './constants';
|
|
@@ -149,8 +149,8 @@ var Text = function Text(props) {
|
|
|
149
149
|
var operateList = [];
|
|
150
150
|
switch (item.attrType) {
|
|
151
151
|
case 'cont-string':
|
|
152
|
-
attrTypeList =
|
|
153
|
-
operateList =
|
|
152
|
+
attrTypeList = stringOperate1;
|
|
153
|
+
operateList = stringOperate1;
|
|
154
154
|
break;
|
|
155
155
|
case 'cont-num':
|
|
156
156
|
attrTypeList = computeTypeList;
|
|
@@ -299,7 +299,7 @@ var Text = function Text(props) {
|
|
|
299
299
|
}, /*#__PURE__*/React.createElement("b", null, "\u7528\u6237\u6807\u7B7E")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("b", null, operatorMap[labels.operator])), /*#__PURE__*/React.createElement("span", {
|
|
300
300
|
className: "".concat(classPrefix, "-text-desc-value")
|
|
301
301
|
}, /*#__PURE__*/React.createElement("span", null, "("), labels.values.map(function (value, index) {
|
|
302
|
-
var _tag
|
|
302
|
+
var _tag$, _tag$2, _tag$3, _tag$4, _tag$5, _tag$6;
|
|
303
303
|
if (_.isNumber(value)) {
|
|
304
304
|
return null;
|
|
305
305
|
}
|
|
@@ -313,7 +313,11 @@ var Text = function Text(props) {
|
|
|
313
313
|
style: {
|
|
314
314
|
margin: '0 4px'
|
|
315
315
|
}
|
|
316
|
-
}, "\u6216") : null, tag && (tag[1].labelCreateType === LabelCreateType.firstAndLastUpdate || tag[1].labelCreateType === LabelCreateType.fundingSource || tag[1].labelCreateType === LabelCreateType.eventPreference || tag[1].labelCreateType === LabelCreateType.sqlCreateTable) && /*#__PURE__*/React.createElement("span",
|
|
316
|
+
}, "\u6216") : null, tag && (tag[1].labelCreateType === LabelCreateType.firstAndLastUpdate || tag[1].labelCreateType === LabelCreateType.fundingSource || tag[1].labelCreateType === LabelCreateType.eventPreference || tag[1].labelCreateType === LabelCreateType.sqlCreateTable) && /*#__PURE__*/React.createElement("span", {
|
|
317
|
+
className: "".concat(((_tag$ = tag[2]) === null || _tag$ === void 0 ? void 0 : _tag$.ancestryState) != 1 && ((_tag$2 = tag[2]) === null || _tag$2 === void 0 ? void 0 : _tag$2.ancestryState) !== null ? "".concat(classPrefix, "-text-desc-error") : '')
|
|
318
|
+
}, tag && tag[1].labelName), tag && (tag[1].labelCreateType === LabelCreateType.autoUpdate || tag[1].labelCreateType === LabelCreateType.manualUpdate || tag[1].labelCreateType === LabelCreateType.recencyFrequencyMonetaryUpdate || tag[1].labelCreateType === LabelCreateType.labelOpenApi || tag[1].labelCreateType === LabelCreateType.lostUser || tag[1].labelCreateType === LabelCreateType.riskLevel || tag[1].labelCreateType === LabelCreateType.financeValue || tag[1].labelCreateType === LabelCreateType.financingRange || tag[1].labelCreateType === LabelCreateType.transferScale || tag[1].labelCreateType === LabelCreateType.assetLevel || tag[1].labelCreateType === LabelCreateType.aum) && /*#__PURE__*/React.createElement("span", {
|
|
319
|
+
className: "".concat(((_tag$3 = tag[2]) === null || _tag$3 === void 0 ? void 0 : _tag$3.ancestryState) != 1 && ((_tag$4 = tag[2]) === null || _tag$4 === void 0 ? void 0 : _tag$4.ancestryState) !== null ? "".concat(classPrefix, "-text-desc-error") : '')
|
|
320
|
+
}, tag && (tag[1].id !== ((_tag$5 = tag[2]) === null || _tag$5 === void 0 ? void 0 : _tag$5.layerLabelId) ? tag[1].labelName + ':' + ((_tag$6 = tag[2]) === null || _tag$6 === void 0 ? void 0 : _tag$6.layerLabelName) : tag[1].labelName)));
|
|
317
321
|
}), /*#__PURE__*/React.createElement("span", null, ")")));
|
|
318
322
|
}
|
|
319
323
|
function renderCdp(condition) {
|
|
@@ -19,9 +19,15 @@ export default (function () {
|
|
|
19
19
|
}),
|
|
20
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
21
|
setStore = _useState2[1];
|
|
22
|
-
var _useState3 = useState(
|
|
23
|
-
_useState4 = _slicedToArray(_useState3,
|
|
24
|
-
userTagsData = _useState4[0]
|
|
22
|
+
var _useState3 = useState([]),
|
|
23
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
|
+
userTagsData = _useState4[0],
|
|
25
|
+
setUserTagsData = _useState4[1];
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
setTimeout(function () {
|
|
28
|
+
setUserTagsData(tagList);
|
|
29
|
+
}, 2000);
|
|
30
|
+
}, []);
|
|
25
31
|
var newStore = convertAttributeData({
|
|
26
32
|
eventList: eventData,
|
|
27
33
|
userPropList: userData,
|
|
@@ -36,21 +42,21 @@ export default (function () {
|
|
|
36
42
|
function onChange(value) {
|
|
37
43
|
console.log('change:', JSON.parse(JSON.stringify(value)));
|
|
38
44
|
}
|
|
39
|
-
var descDom = /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
40
|
-
defaultValue: defaultValue,
|
|
41
|
-
onChange: onChange,
|
|
42
|
-
eventAttrNum: 3,
|
|
43
|
-
openTagCondition: true,
|
|
44
|
-
openCdpCondition: true,
|
|
45
|
-
userTagsData: userTagsData,
|
|
46
|
-
isRealTime: true
|
|
47
|
-
});
|
|
48
45
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
49
46
|
needMeta: true,
|
|
50
|
-
defaultApp:
|
|
47
|
+
defaultApp: 155
|
|
51
48
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
49
|
style: {
|
|
53
50
|
display: 'inline-block'
|
|
54
51
|
}
|
|
55
|
-
},
|
|
52
|
+
}, /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
53
|
+
defaultValue: defaultValue,
|
|
54
|
+
onChange: onChange,
|
|
55
|
+
eventAttrNum: 3,
|
|
56
|
+
openTagCondition: true,
|
|
57
|
+
openCdpCondition: true,
|
|
58
|
+
userTagsData: userTagsData,
|
|
59
|
+
isRealTime: true,
|
|
60
|
+
realTimeTags: true
|
|
61
|
+
})));
|
|
56
62
|
});
|