@zgfe/business-lib 1.2.34-tags.1 → 1.2.34-tags.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,13 +63,13 @@ var PropCondition = function PropCondition(props) {
|
|
|
63
63
|
list.push({
|
|
64
64
|
attr: attr,
|
|
65
65
|
default: attr,
|
|
66
|
-
placeholder: placeholder,
|
|
66
|
+
placeholder: placeholder || '请选择属性',
|
|
67
67
|
id: Math.random()
|
|
68
68
|
});
|
|
69
69
|
} else {
|
|
70
70
|
list.push({
|
|
71
71
|
attr: attr,
|
|
72
|
-
placeholder: placeholder,
|
|
72
|
+
placeholder: placeholder || '请选择属性',
|
|
73
73
|
id: Math.random()
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -129,11 +129,9 @@ var PropCondition = function PropCondition(props) {
|
|
|
129
129
|
category = _item$default.category,
|
|
130
130
|
operator = _item$default.operator,
|
|
131
131
|
params = _item$default.params,
|
|
132
|
-
attrType = _item$default.attrType
|
|
133
|
-
placeholder = _item$default.placeholder;
|
|
132
|
+
attrType = _item$default.attrType;
|
|
134
133
|
props.defaultValue = {
|
|
135
134
|
attrName: attrName,
|
|
136
|
-
placeholder: placeholder,
|
|
137
135
|
category: category || 'custom',
|
|
138
136
|
operator: operator,
|
|
139
137
|
values: params || [],
|
|
@@ -144,10 +142,17 @@ var PropCondition = function PropCondition(props) {
|
|
|
144
142
|
if (userPropsMap[attrName] && userPropsMap[attrName].subtype) {
|
|
145
143
|
props.defaultValue.subtype = userPropsMap[attrName].subtype;
|
|
146
144
|
}
|
|
145
|
+
} else {
|
|
146
|
+
if (item.placeholder) {
|
|
147
|
+
props.value = _objectSpread(_objectSpread({}, props.value), {}, {
|
|
148
|
+
placeholder: item.placeholder || ''
|
|
149
|
+
});
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
if (isEvent) {
|
|
149
153
|
props.eventIdList = [eventId];
|
|
150
154
|
}
|
|
155
|
+
console.log('renderAttr', props);
|
|
151
156
|
return /*#__PURE__*/React.createElement("div", {
|
|
152
157
|
className: "".concat(classPrefix, "-prop-condition-attr"),
|
|
153
158
|
key: id
|
|
@@ -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 = {
|
|
@@ -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;
|
|
@@ -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 = {
|
|
@@ -52,7 +52,8 @@ export function buildCondition(type) {
|
|
|
52
52
|
return {
|
|
53
53
|
eventId: undefined,
|
|
54
54
|
attrs: [{
|
|
55
|
-
attrId: 0
|
|
55
|
+
attrId: 0,
|
|
56
|
+
placeholder: labelCreateType === LabelCreateType.financeValue ? '风险等级' : ''
|
|
56
57
|
}]
|
|
57
58
|
};
|
|
58
59
|
case 'tag':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.34-tags.
|
|
3
|
+
"version": "1.2.34-tags.2",
|
|
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": "528cbad3dd6181fb3877ccb46450e5e9fdbf0274",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|