@zgfe/business-lib 1.2.35-ht.0 → 1.2.35
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/attrCondition/useAttrCondition.d.ts +1 -0
- package/es/attrCondition/useAttrCondition.js +6 -2
- package/es/attrConditions/index.js +2 -0
- package/es/attrConditions/types.d.ts +1 -0
- package/es/chart/index.js +1 -7
- package/es/chart/types.d.ts +0 -1
- package/es/datePicker/utils.js +1 -1
- package/es/eventSelector/demo/index.js +0 -1
- package/es/eventSelector/index.js +2 -13
- package/es/eventSelector/styles/index.less +0 -16
- package/es/eventSelector/types.d.ts +0 -2
- package/es/userCondition/conditions/eventCondition.js +1 -1
- package/es/userCondition/conditions/propCondition.js +9 -1
- package/es/userCondition/conditions/textDesc.js +1 -1
- package/es/userCondition/demo/index.js +1 -1
- package/es/userCondition/index.js +2 -1
- package/es/userCondition/orConditions.js +1 -1
- package/es/userCondition/types.d.ts +9 -1
- package/es/userCondition/types.js +3 -0
- package/es/userCondition/util.d.ts +1 -1
- package/es/userCondition/util.js +5 -3
- package/package.json +2 -2
|
@@ -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;
|
|
@@ -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) {
|
package/es/chart/index.js
CHANGED
|
@@ -42,8 +42,7 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
42
42
|
autoHeight = props.autoHeight,
|
|
43
43
|
isHideLegend = props.isHideLegend,
|
|
44
44
|
tooltipTrigger = props.tooltipTrigger,
|
|
45
|
-
muit_yAxis = props.muit_yAxis
|
|
46
|
-
unContainLabel = props.unContainLabel;
|
|
45
|
+
muit_yAxis = props.muit_yAxis;
|
|
47
46
|
var _useState = useState({}),
|
|
48
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
48
|
chartOption = _useState2[0],
|
|
@@ -118,11 +117,6 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
118
117
|
eOption.grid.right = '1%';
|
|
119
118
|
eOption.grid.left = '1%';
|
|
120
119
|
}
|
|
121
|
-
if (type === 'muit_y' && unContainLabel) {
|
|
122
|
-
eOption.grid.right = '130';
|
|
123
|
-
eOption.grid.left = '50';
|
|
124
|
-
eOption.grid.containLabel = false;
|
|
125
|
-
}
|
|
126
120
|
} else if (type === 'map') {
|
|
127
121
|
var series = isCity ? citySeries(data) : provinceSeries(data);
|
|
128
122
|
var maxMin = maxMinValue(series[0]);
|
package/es/chart/types.d.ts
CHANGED
package/es/datePicker/utils.js
CHANGED
|
@@ -25,7 +25,7 @@ function getAbsoluteDate(unit, count, maxDate) {
|
|
|
25
25
|
case DatePickerTypes.Unit.quarter:
|
|
26
26
|
res.endDate = maxDate;
|
|
27
27
|
var firstOfQuarter = new Date(maxDate.getTime() - (maxDate.getDate() - 1) * dayTime);
|
|
28
|
-
firstOfQuarter.setMonth(firstOfQuarter.getMonth() - firstOfQuarter.getMonth() % 3 - 3 * (count - 1));
|
|
28
|
+
firstOfQuarter.setMonth(firstOfQuarter.getMonth() + 1 - (firstOfQuarter.getMonth() + 1) % 3 - 3 * (count - 1));
|
|
29
29
|
res.startDate = new Date(firstOfQuarter);
|
|
30
30
|
break;
|
|
31
31
|
}
|
|
@@ -21,7 +21,6 @@ var EventDemo = function EventDemo() {
|
|
|
21
21
|
console.log('选中值', data);
|
|
22
22
|
};
|
|
23
23
|
return /*#__PURE__*/React.createElement(InnerDemo, null, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
24
|
-
enableDelete: true,
|
|
25
24
|
showAllEvent: false,
|
|
26
25
|
showBuiltInTarget: false,
|
|
27
26
|
popupContainer: false,
|
|
@@ -13,7 +13,6 @@ import './styles/index.less';
|
|
|
13
13
|
import { BuiltinIndicators } from '../constants/common';
|
|
14
14
|
import _ from 'lodash';
|
|
15
15
|
import useChanged from '../hooks/useChanged';
|
|
16
|
-
import BizTargetOptionIcon from '../targetSelector/optionIcon';
|
|
17
16
|
export var classPrefix = 'biz-event-select';
|
|
18
17
|
var BizEventSelector = function BizEventSelector(props) {
|
|
19
18
|
var alias = props.alias,
|
|
@@ -22,8 +21,7 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
22
21
|
border = props.border,
|
|
23
22
|
theme = props.theme,
|
|
24
23
|
defaultSelectAble = props.defaultSelectAble,
|
|
25
|
-
disableVirtualEventShow = props.disableVirtualEventShow
|
|
26
|
-
enableDelete = props.enableDelete;
|
|
24
|
+
disableVirtualEventShow = props.disableVirtualEventShow;
|
|
27
25
|
var _useState = useState(),
|
|
28
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29
27
|
currentValue = _useState2[0],
|
|
@@ -62,9 +60,6 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
62
60
|
setCurrentValue(data);
|
|
63
61
|
}
|
|
64
62
|
}, props.value);
|
|
65
|
-
function onDelete(e) {
|
|
66
|
-
if (props.onDelete) props.onDelete(currentValue, e);
|
|
67
|
-
}
|
|
68
63
|
var getValue = function getValue(param) {
|
|
69
64
|
var res = {};
|
|
70
65
|
var allEvents = props.showBuiltInTarget ? eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.concat(BuiltinIndicators) : eventGroupList;
|
|
@@ -150,13 +145,7 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
150
145
|
}, [visible]);
|
|
151
146
|
return /*#__PURE__*/React.createElement("div", {
|
|
152
147
|
className: [classPrefix, border ? 'border' : ''].join(' ')
|
|
153
|
-
},
|
|
154
|
-
name: "delete",
|
|
155
|
-
icon: "qingchu",
|
|
156
|
-
title: "\u5220\u9664",
|
|
157
|
-
enabled: true,
|
|
158
|
-
onClick: onDelete
|
|
159
|
-
}) : null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
148
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
160
149
|
dropdownRender: function dropdownRender() {
|
|
161
150
|
return /*#__PURE__*/React.createElement(EventListPanel, {
|
|
162
151
|
value: props.multiple ? checkedEventList : currentValue,
|
|
@@ -3,22 +3,6 @@
|
|
|
3
3
|
.biz-event-select {
|
|
4
4
|
position: relative;
|
|
5
5
|
border-radius: 4px;
|
|
6
|
-
.__select-handle();
|
|
7
|
-
|
|
8
|
-
&:hover {
|
|
9
|
-
.biz-target-select-option-icon {
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
float: right;
|
|
14
|
-
margin-top: 4px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.biz-event-select-handle {
|
|
19
|
-
border: none !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
6
|
&.border {
|
|
23
7
|
.biz-event-select-handle {
|
|
24
8
|
.__select-handle();
|
|
@@ -31,14 +31,12 @@ export declare namespace EventSelectTypes {
|
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
showAllEvent?: boolean;
|
|
33
33
|
popupContainer?: boolean;
|
|
34
|
-
enableDelete?: boolean;
|
|
35
34
|
onVisibleChange?: (visible: boolean) => void;
|
|
36
35
|
border?: boolean;
|
|
37
36
|
theme?: string;
|
|
38
37
|
size?: SizeType;
|
|
39
38
|
destroyPopupOnHide?: boolean;
|
|
40
39
|
onChange?: (val: Value | AnalysisEvent[]) => void;
|
|
41
|
-
onDelete?: (val: Value | AnalysisEvent[] | undefined, e: Value | AnalysisEvent[]) => void;
|
|
42
40
|
filter?: (evt: AnalysisEvent) => boolean;
|
|
43
41
|
disableVirtualEventShow?: boolean;
|
|
44
42
|
}
|
|
@@ -107,7 +107,7 @@ var EventCondition = function EventCondition(props) {
|
|
|
107
107
|
onChange: onEventChange,
|
|
108
108
|
border: false,
|
|
109
109
|
theme: "normal",
|
|
110
|
-
placeholder:
|
|
110
|
+
placeholder: (condition === null || condition === void 0 ? void 0 : condition.placeholder) ? condition.placeholder : '选择一个事件',
|
|
111
111
|
destroyPopupOnHide: true,
|
|
112
112
|
defaultSelectAble: false,
|
|
113
113
|
popupContainer: false
|
|
@@ -55,7 +55,8 @@ var PropCondition = function PropCondition(props) {
|
|
|
55
55
|
attrs.forEach(function (attr) {
|
|
56
56
|
var attrId = attr.attrId,
|
|
57
57
|
attrName = attr.attrName,
|
|
58
|
-
operator = attr.operator
|
|
58
|
+
operator = attr.operator,
|
|
59
|
+
placeholder = attr.placeholder;
|
|
59
60
|
if ((attrName || attrId) && operator) {
|
|
60
61
|
attr.operator = transformNumberOperate(operator, false);
|
|
61
62
|
list.push({
|
|
@@ -66,6 +67,7 @@ var PropCondition = function PropCondition(props) {
|
|
|
66
67
|
} else {
|
|
67
68
|
list.push({
|
|
68
69
|
attr: attr,
|
|
70
|
+
placeholder: placeholder,
|
|
69
71
|
id: Math.random()
|
|
70
72
|
});
|
|
71
73
|
}
|
|
@@ -138,6 +140,12 @@ var PropCondition = function PropCondition(props) {
|
|
|
138
140
|
if (userPropsMap[attrName] && userPropsMap[attrName].subtype) {
|
|
139
141
|
props.defaultValue.subtype = userPropsMap[attrName].subtype;
|
|
140
142
|
}
|
|
143
|
+
} else {
|
|
144
|
+
if (item.placeholder) {
|
|
145
|
+
props.value = _objectSpread(_objectSpread({}, props.value), {}, {
|
|
146
|
+
placeholder: item.placeholder || ''
|
|
147
|
+
});
|
|
148
|
+
}
|
|
141
149
|
}
|
|
142
150
|
if (isEvent) {
|
|
143
151
|
props.eventIdList = [eventId];
|
|
@@ -336,7 +336,7 @@ var Text = function Text(props) {
|
|
|
336
336
|
style: {
|
|
337
337
|
margin: '0 4px'
|
|
338
338
|
}
|
|
339
|
-
}, "\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", null, 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.aum) && /*#__PURE__*/React.createElement("span", null, tag && tag[1].labelName + ':' + ((_tag$ = tag[2]) === null || _tag$ === void 0 ? void 0 : _tag$.layerLabelName)));
|
|
339
|
+
}, "\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", null, 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.aum) && /*#__PURE__*/React.createElement("span", null, tag && tag[1].labelName + ':' + ((_tag$ = tag[2]) === null || _tag$ === void 0 ? void 0 : _tag$.layerLabelName)));
|
|
340
340
|
}), /*#__PURE__*/React.createElement("span", null, ")")));
|
|
341
341
|
}
|
|
342
342
|
function renderCdp(condition) {
|
|
@@ -165,7 +165,7 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
165
165
|
setDataList(showList);
|
|
166
166
|
}
|
|
167
167
|
function onAdd(type) {
|
|
168
|
-
var condition = buildCondition(type);
|
|
168
|
+
var condition = buildCondition(type, props.labelCreateType);
|
|
169
169
|
var newValue = [].concat(_toConsumableArray(value), [[condition]]);
|
|
170
170
|
setValue(newValue);
|
|
171
171
|
var newData = {
|
|
@@ -252,6 +252,7 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
252
252
|
return /*#__PURE__*/React.createElement(OrConditions, {
|
|
253
253
|
showAndDesc: i > 0,
|
|
254
254
|
orConditions: item.orConditions,
|
|
255
|
+
labelCreateType: props.labelCreateType,
|
|
255
256
|
key: item.id,
|
|
256
257
|
onChange: function onChange(data) {
|
|
257
258
|
_onChange(item.id, data);
|
|
@@ -55,7 +55,7 @@ var OrConditions = function OrConditions(props) {
|
|
|
55
55
|
setShowList(showList);
|
|
56
56
|
}
|
|
57
57
|
function onAdd(type) {
|
|
58
|
-
var condition = buildCondition(type);
|
|
58
|
+
var condition = buildCondition(type, props.labelCreateType);
|
|
59
59
|
var newData = {
|
|
60
60
|
id: Math.random(),
|
|
61
61
|
condition: condition
|
|
@@ -21,7 +21,10 @@ export declare enum LabelCreateType {
|
|
|
21
21
|
eventPreference = 6,
|
|
22
22
|
sqlCreateTable = 8,
|
|
23
23
|
aum = 9,
|
|
24
|
-
fundingSource = 10
|
|
24
|
+
fundingSource = 10,
|
|
25
|
+
lostUser = 11,
|
|
26
|
+
riskLevel = 12,
|
|
27
|
+
financeValue = 13
|
|
25
28
|
}
|
|
26
29
|
export interface RunTimesI {
|
|
27
30
|
operator: '>' | '=' | '<' | '>=' | '<=' | '>=' | 'not equal' | 'between';
|
|
@@ -66,6 +69,7 @@ export declare namespace BizUserConditionT {
|
|
|
66
69
|
openOrderDataCondition?: boolean;
|
|
67
70
|
openCondition?: boolean;
|
|
68
71
|
cdpTip?: string;
|
|
72
|
+
labelCreateType?: number;
|
|
69
73
|
}
|
|
70
74
|
interface BusinessPropsI {
|
|
71
75
|
dataId: number;
|
|
@@ -109,6 +113,7 @@ export declare namespace BizUserConditionT {
|
|
|
109
113
|
attrType: 'cont-string' | 'cont-num' | 'cont-date';
|
|
110
114
|
category: 'fixed' | 'custom';
|
|
111
115
|
propCategory?: string;
|
|
116
|
+
placeholder?: string;
|
|
112
117
|
}
|
|
113
118
|
interface AttrsCondition {
|
|
114
119
|
attrId: number;
|
|
@@ -137,6 +142,7 @@ export declare namespace BizUserConditionT {
|
|
|
137
142
|
runTimes: RunTimesI;
|
|
138
143
|
runPeriod: RunPeriodI;
|
|
139
144
|
eventId: number;
|
|
145
|
+
placeholder?: string;
|
|
140
146
|
}
|
|
141
147
|
interface AddCondition {
|
|
142
148
|
eventId: '-3';
|
|
@@ -250,6 +256,7 @@ export declare namespace OrConditionsT {
|
|
|
250
256
|
onChange: (value: any[]) => void;
|
|
251
257
|
orConditions: BizUserConditionT.Conditions[number];
|
|
252
258
|
showAndDesc: boolean;
|
|
259
|
+
labelCreateType?: number;
|
|
253
260
|
}
|
|
254
261
|
interface ShowItemI {
|
|
255
262
|
id: number;
|
|
@@ -270,6 +277,7 @@ export declare namespace PropConditionType {
|
|
|
270
277
|
attr: BizUserConditionT.AttrCondition;
|
|
271
278
|
id: number;
|
|
272
279
|
default?: BizUserConditionT.AttrCondition;
|
|
280
|
+
placeholder?: string;
|
|
273
281
|
}[];
|
|
274
282
|
interface PropsI extends AllConditionBasePropsI<any> {
|
|
275
283
|
isEvent?: boolean;
|
|
@@ -10,6 +10,9 @@ export var LabelCreateType;
|
|
|
10
10
|
LabelCreateType[LabelCreateType["sqlCreateTable"] = 8] = "sqlCreateTable";
|
|
11
11
|
LabelCreateType[LabelCreateType["aum"] = 9] = "aum";
|
|
12
12
|
LabelCreateType[LabelCreateType["fundingSource"] = 10] = "fundingSource";
|
|
13
|
+
LabelCreateType[LabelCreateType["lostUser"] = 11] = "lostUser";
|
|
14
|
+
LabelCreateType[LabelCreateType["riskLevel"] = 12] = "riskLevel";
|
|
15
|
+
LabelCreateType[LabelCreateType["financeValue"] = 13] = "financeValue";
|
|
13
16
|
})(LabelCreateType || (LabelCreateType = {}));
|
|
14
17
|
export var PropType;
|
|
15
18
|
(function (PropType) {
|
|
@@ -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.BusinessCondition | BizUserConditionT.EventCondition | BizUserConditionT.AddCondition | BizUserConditionT.OrderCondition | BizUserConditionT.ActiveCondition | BizUserConditionT.PropCondition | BizUserConditionT.CdpCondition | BizUserConditionT.CdpCshCondition;
|
|
3
|
+
export declare function buildCondition(type: BizUserConditionT.ConditionType, labelCreateType?: number): BizUserConditionT.BusinessCondition | BizUserConditionT.EventCondition | BizUserConditionT.AddCondition | BizUserConditionT.OrderCondition | BizUserConditionT.ActiveCondition | BizUserConditionT.PropCondition | BizUserConditionT.CdpCondition | BizUserConditionT.CdpCshCondition;
|
|
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
|
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
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
7
|
import { LabelCreateType } from './types';
|
|
8
|
-
export function buildCondition(type) {
|
|
8
|
+
export function buildCondition(type, labelCreateType) {
|
|
9
9
|
switch (type) {
|
|
10
10
|
case 'add':
|
|
11
11
|
var condition = {
|
|
@@ -46,13 +46,15 @@ export function buildCondition(type) {
|
|
|
46
46
|
runPeriod: {
|
|
47
47
|
operator: 'relative',
|
|
48
48
|
values: ['30', '0']
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
|
+
placeholder: labelCreateType === LabelCreateType.lostUser ? '进入App' : ''
|
|
50
51
|
};
|
|
51
52
|
case 'prop':
|
|
52
53
|
return {
|
|
53
54
|
eventId: undefined,
|
|
54
55
|
attrs: [{
|
|
55
|
-
attrId: 0
|
|
56
|
+
attrId: 0,
|
|
57
|
+
placeholder: labelCreateType === LabelCreateType.riskLevel ? '风险等级' : ''
|
|
56
58
|
}]
|
|
57
59
|
};
|
|
58
60
|
case 'tag':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.35
|
|
3
|
+
"version": "1.2.35",
|
|
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": "b7e470b4977dbe869688a24edf0cf9cc7389bbec",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|