@zgfe/business-lib 1.1.72-alpha.4 → 1.1.72-alpha.6
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/userCondition/conditionTypeList.js +1 -1
- package/es/userCondition/conditions/cdpCshCondition.js +3 -3
- package/es/userCondition/conditions/textDesc.js +3 -3
- package/es/userCondition/demo/mockData.d.ts +6 -6
- package/es/userCondition/demo/mockData.js +4 -4
- package/es/userCondition/index.js +1 -1
- package/es/userCondition/orConditions.js +2 -2
- package/es/userCondition/types.d.ts +2 -2
- package/es/userCondition/util.js +1 -1
- package/package.json +2 -2
|
@@ -74,7 +74,7 @@ var ConditionTypeList = function ConditionTypeList(props) {
|
|
|
74
74
|
title: cdpTip
|
|
75
75
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
76
76
|
type: "tishiicon"
|
|
77
|
-
})) : null)) : null,
|
|
77
|
+
})) : null)) : null, openCdpCondition && (!menuNameMap || menuNameMap['dataset']) ? /*#__PURE__*/React.createElement("li", {
|
|
78
78
|
className: "condition-type",
|
|
79
79
|
onClick: function onClick() {
|
|
80
80
|
return onAdd('cdp');
|
|
@@ -191,7 +191,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
191
191
|
if ((data === null || data === void 0 ? void 0 : data.operator) === 'between') {
|
|
192
192
|
data.between = fieldValue;
|
|
193
193
|
} else {
|
|
194
|
-
data.params = fieldValue && fieldValue[0];
|
|
194
|
+
data.params = (field === null || field === void 0 ? void 0 : field.webType) === 'number' ? fieldValue && fieldValue[0] : fieldValue;
|
|
195
195
|
}
|
|
196
196
|
props.onChange(data);
|
|
197
197
|
}, [dataset, field, calculate, operator, fieldValue, subDataset, subField, subcalculate, subOperator]);
|
|
@@ -494,8 +494,8 @@ var CdpCondition = function CdpCondition(props) {
|
|
|
494
494
|
cdpConditions = _useState28[0],
|
|
495
495
|
setCdpConditions = _useState28[1];
|
|
496
496
|
useEffect(function () {
|
|
497
|
-
if (defaultValue && defaultValue.
|
|
498
|
-
setCdpConditions(defaultValue.
|
|
497
|
+
if (defaultValue && defaultValue.data_set_csh) {
|
|
498
|
+
setCdpConditions(defaultValue.data_set_csh);
|
|
499
499
|
}
|
|
500
500
|
}, []);
|
|
501
501
|
var onChangeCondition = function onChangeCondition(condition, index) {
|
|
@@ -37,7 +37,7 @@ var Text = function Text(props) {
|
|
|
37
37
|
if (condition.dataset) {
|
|
38
38
|
return renderCdp(condition);
|
|
39
39
|
}
|
|
40
|
-
if (condition.
|
|
40
|
+
if (condition.data_set_csh) {
|
|
41
41
|
return renderCshCdp(condition);
|
|
42
42
|
}
|
|
43
43
|
var data = condition;
|
|
@@ -377,13 +377,13 @@ var Text = function Text(props) {
|
|
|
377
377
|
}));
|
|
378
378
|
}
|
|
379
379
|
function renderCshCdp(condition) {
|
|
380
|
-
var
|
|
380
|
+
var data_set_csh = condition.data_set_csh;
|
|
381
381
|
return /*#__PURE__*/React.createElement("span", {
|
|
382
382
|
style: {
|
|
383
383
|
backgroundColor: '#effcff',
|
|
384
384
|
padding: '6px 7px'
|
|
385
385
|
}
|
|
386
|
-
},
|
|
386
|
+
}, data_set_csh.map(function (value) {
|
|
387
387
|
if (!value) return null;
|
|
388
388
|
var operator = value.operator,
|
|
389
389
|
_value$params2 = value.params,
|
|
@@ -40,7 +40,7 @@ export declare const conditions: ({
|
|
|
40
40
|
operator: string;
|
|
41
41
|
};
|
|
42
42
|
dataset?: undefined;
|
|
43
|
-
|
|
43
|
+
data_set_csh?: undefined;
|
|
44
44
|
} | {
|
|
45
45
|
dataset: {
|
|
46
46
|
datasetId: number;
|
|
@@ -55,9 +55,9 @@ export declare const conditions: ({
|
|
|
55
55
|
}[];
|
|
56
56
|
attrs?: undefined;
|
|
57
57
|
labels?: undefined;
|
|
58
|
-
|
|
58
|
+
data_set_csh?: undefined;
|
|
59
59
|
} | {
|
|
60
|
-
|
|
60
|
+
data_set_csh: {
|
|
61
61
|
datasetName: string;
|
|
62
62
|
datasetTable: string;
|
|
63
63
|
fieldName: string;
|
|
@@ -79,7 +79,7 @@ export declare const conditions: ({
|
|
|
79
79
|
labels?: undefined;
|
|
80
80
|
dataset?: undefined;
|
|
81
81
|
} | {
|
|
82
|
-
|
|
82
|
+
data_set_csh: {
|
|
83
83
|
datasetName: string;
|
|
84
84
|
datasetTable: string;
|
|
85
85
|
fieldName: string;
|
|
@@ -101,7 +101,7 @@ export declare const conditions: ({
|
|
|
101
101
|
labels?: undefined;
|
|
102
102
|
dataset?: undefined;
|
|
103
103
|
} | {
|
|
104
|
-
|
|
104
|
+
data_set_csh: {
|
|
105
105
|
datasetName: string;
|
|
106
106
|
datasetTable: string;
|
|
107
107
|
fieldName: string;
|
|
@@ -116,7 +116,7 @@ export declare const conditions: ({
|
|
|
116
116
|
labels?: undefined;
|
|
117
117
|
dataset?: undefined;
|
|
118
118
|
} | {
|
|
119
|
-
|
|
119
|
+
data_set_csh: {
|
|
120
120
|
datasetName: string;
|
|
121
121
|
datasetTable: string;
|
|
122
122
|
fieldName: string;
|
|
@@ -159,7 +159,7 @@ export var conditions = [[{
|
|
|
159
159
|
params: ['123']
|
|
160
160
|
}]
|
|
161
161
|
}, {
|
|
162
|
-
|
|
162
|
+
data_set_csh: [{
|
|
163
163
|
datasetName: 'rfm555',
|
|
164
164
|
datasetTable: '99677e4429fd647bc4ff89f669859be168420',
|
|
165
165
|
fieldName: 'price',
|
|
@@ -178,7 +178,7 @@ export var conditions = [[{
|
|
|
178
178
|
}
|
|
179
179
|
}]
|
|
180
180
|
}, {
|
|
181
|
-
|
|
181
|
+
data_set_csh: [{
|
|
182
182
|
datasetName: 'rfm555',
|
|
183
183
|
datasetTable: '99677e4429fd647bc4ff89f669859be168420',
|
|
184
184
|
fieldName: 'price',
|
|
@@ -197,7 +197,7 @@ export var conditions = [[{
|
|
|
197
197
|
}
|
|
198
198
|
}]
|
|
199
199
|
}, {
|
|
200
|
-
|
|
200
|
+
data_set_csh: [{
|
|
201
201
|
datasetName: 'rfm555',
|
|
202
202
|
datasetTable: '99677e4429fd647bc4ff89f669859be168420',
|
|
203
203
|
fieldName: 'price',
|
|
@@ -209,7 +209,7 @@ export var conditions = [[{
|
|
|
209
209
|
params: '123'
|
|
210
210
|
}]
|
|
211
211
|
}, {
|
|
212
|
-
|
|
212
|
+
data_set_csh: [{
|
|
213
213
|
datasetName: 'rfm555',
|
|
214
214
|
datasetTable: '99677e4429fd647bc4ff89f669859be168420',
|
|
215
215
|
fieldName: 'price',
|
|
@@ -68,7 +68,7 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
68
68
|
var showItem = _toConsumableArray(item);
|
|
69
69
|
if (!(showTag && showCdp && (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appVersion) === 2)) {
|
|
70
70
|
item === null || item === void 0 ? void 0 : item.forEach(function (data, index) {
|
|
71
|
-
if (data.dataset && !showCdp || data.labels && !showTag || data.
|
|
71
|
+
if (data.dataset && !showCdp || data.labels && !showTag || data.data_set_csh && (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appVersion) != 2) {
|
|
72
72
|
showItem.splice(index, 1);
|
|
73
73
|
flag = true;
|
|
74
74
|
}
|
|
@@ -123,7 +123,7 @@ var OrConditions = function OrConditions(props) {
|
|
|
123
123
|
} else if (type === 'cdp') {
|
|
124
124
|
data.condition.dataset = newData;
|
|
125
125
|
} else if (type === 'cdp_csh') {
|
|
126
|
-
data.condition.
|
|
126
|
+
data.condition.data_set_csh = newData;
|
|
127
127
|
} else if (type === 'business') {
|
|
128
128
|
data.condition = newData;
|
|
129
129
|
} else if (type === 'order') {
|
|
@@ -180,7 +180,7 @@ var OrConditions = function OrConditions(props) {
|
|
|
180
180
|
dataId: id,
|
|
181
181
|
onChange: onChangeCdp
|
|
182
182
|
});
|
|
183
|
-
} else if (condition.
|
|
183
|
+
} else if (condition.data_set_csh) {
|
|
184
184
|
if (!openCdpCondition) return null;
|
|
185
185
|
conditionDom = /*#__PURE__*/React.createElement(CdpCshCondition, {
|
|
186
186
|
defaultValue: condition,
|
|
@@ -206,7 +206,7 @@ export declare namespace BizUserConditionT {
|
|
|
206
206
|
fieldType?: string;
|
|
207
207
|
webType?: PropType;
|
|
208
208
|
operator?: string;
|
|
209
|
-
params?: string;
|
|
209
|
+
params?: string | string[];
|
|
210
210
|
paramType?: PropType;
|
|
211
211
|
subCondition?: {
|
|
212
212
|
datasetId?: number;
|
|
@@ -223,7 +223,7 @@ export declare namespace BizUserConditionT {
|
|
|
223
223
|
dataset: (BizUserConditionT.CdpConditionDetail | undefined)[];
|
|
224
224
|
}
|
|
225
225
|
interface CdpCshCondition {
|
|
226
|
-
|
|
226
|
+
data_set_csh: (BizUserConditionT.CdpCshConditionDetail | undefined)[];
|
|
227
227
|
}
|
|
228
228
|
type Condition = EventCondition | AddCondition | ActiveCondition | PropCondition | TagsCondition | BusinessCondition | OrderCondition | CdpCondition | CdpCshCondition;
|
|
229
229
|
type Conditions = Condition[][];
|
package/es/userCondition/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.72-alpha.
|
|
3
|
+
"version": "1.1.72-alpha.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react": "^16.12.0 || ^17.0.0",
|
|
59
59
|
"yorkie": "^2.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "af99a8bb928e636cc5757571b1970028247ade6e"
|
|
62
62
|
}
|