@zgfe/business-lib 1.1.34-alpha.5 → 1.1.34-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.
|
@@ -122,13 +122,13 @@ var BusinessCondition = function BusinessCondition(props) {
|
|
|
122
122
|
newData.values = [startDate, endDate];
|
|
123
123
|
}
|
|
124
124
|
if (newData.operator === 'relative') {
|
|
125
|
-
newData.values = [
|
|
125
|
+
newData.values = [30, '0'];
|
|
126
126
|
}
|
|
127
127
|
if (newData.operator === 'unlimited_time') {
|
|
128
|
-
newData.values = [
|
|
128
|
+
newData.values = [30, '0'];
|
|
129
129
|
}
|
|
130
130
|
if (newData.operator === 'join_time') {
|
|
131
|
-
newData.values = [
|
|
131
|
+
newData.values = [3, '0'];
|
|
132
132
|
}
|
|
133
133
|
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
134
134
|
runPeriod: newData
|
|
@@ -149,7 +149,7 @@ var BusinessCondition = function BusinessCondition(props) {
|
|
|
149
149
|
var newValue = newData.target.value;
|
|
150
150
|
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
151
151
|
runPeriod: _objectSpread(_objectSpread({}, condition.runPeriod), {}, {
|
|
152
|
-
values: [newValue, '0']
|
|
152
|
+
values: [Number(newValue), '0']
|
|
153
153
|
})
|
|
154
154
|
}));
|
|
155
155
|
}
|
|
@@ -183,7 +183,7 @@ var BusinessCondition = function BusinessCondition(props) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
var onOperateChange = function onOperateChange(operate) {
|
|
186
|
-
condition.runTimes.values = [condition.runTimes.values[0]];
|
|
186
|
+
condition.runTimes.values = [Number(condition.runTimes.values[0])];
|
|
187
187
|
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
188
188
|
runTimes: _objectSpread(_objectSpread({}, condition.runTimes), {}, {
|
|
189
189
|
operator: operate.value
|
|
@@ -192,7 +192,7 @@ var BusinessCondition = function BusinessCondition(props) {
|
|
|
192
192
|
};
|
|
193
193
|
var onOperateInput0Change = function onOperateInput0Change(value) {
|
|
194
194
|
var newValue = value.target.value;
|
|
195
|
-
condition.runTimes.values[0] = newValue;
|
|
195
|
+
condition.runTimes.values[0] = Number(newValue);
|
|
196
196
|
onChange(_objectSpread({}, condition));
|
|
197
197
|
};
|
|
198
198
|
var onOperateInput1Change = function onOperateInput1Change(value) {
|
|
@@ -212,7 +212,7 @@ var BusinessCondition = function BusinessCondition(props) {
|
|
|
212
212
|
if (key === 'time dimension') {
|
|
213
213
|
var _condition$timeDimens2;
|
|
214
214
|
var obj = {
|
|
215
|
-
frequencyValues: [
|
|
215
|
+
frequencyValues: [1],
|
|
216
216
|
frequencyOperator: '>',
|
|
217
217
|
timeDimension: 1,
|
|
218
218
|
timeOperator: 'all',
|
|
@@ -58,10 +58,10 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
58
58
|
var showTag = openTagCondition && (!menuNameMap || menuNameMap['userTags']);
|
|
59
59
|
var showCdp = openCdpCondition && (!menuNameMap || menuNameMap['dataset']);
|
|
60
60
|
var flag = false;
|
|
61
|
-
defaultValue.forEach(function (item) {
|
|
61
|
+
defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.forEach(function (item) {
|
|
62
62
|
var showItem = _toConsumableArray(item);
|
|
63
63
|
if (!(showTag && showCdp)) {
|
|
64
|
-
item.forEach(function (data, index) {
|
|
64
|
+
item === null || item === void 0 ? void 0 : item.forEach(function (data, index) {
|
|
65
65
|
if (data.dataset && !showCdp || data.labels && !showTag) {
|
|
66
66
|
showItem.splice(index, 1);
|
|
67
67
|
flag = true;
|
|
@@ -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;
|
|
@@ -85,7 +93,7 @@ export declare namespace BizUserConditionT {
|
|
|
85
93
|
timeOperator: string;
|
|
86
94
|
timeValues: number[];
|
|
87
95
|
frequencyOperator: string;
|
|
88
|
-
frequencyValues:
|
|
96
|
+
frequencyValues: any[];
|
|
89
97
|
}
|
|
90
98
|
interface EventCondition {
|
|
91
99
|
attrs: AttrCondition[];
|
|
@@ -104,15 +112,15 @@ export declare namespace BizUserConditionT {
|
|
|
104
112
|
typeId: undefined;
|
|
105
113
|
attrs: AttrsCondition[];
|
|
106
114
|
timeDimensions: TimeDimensionsCondition[];
|
|
107
|
-
runTimes:
|
|
108
|
-
runPeriod:
|
|
115
|
+
runTimes: RunTimesII;
|
|
116
|
+
runPeriod: RunPeriodII;
|
|
109
117
|
eventId: -14;
|
|
110
118
|
}
|
|
111
119
|
interface OrderCondition {
|
|
112
120
|
attrs: AttrsCondition[];
|
|
113
121
|
timeDimensions: TimeDimensionsCondition[];
|
|
114
|
-
runTimes:
|
|
115
|
-
runPeriod:
|
|
122
|
+
runTimes: RunTimesII;
|
|
123
|
+
runPeriod: RunPeriodII;
|
|
116
124
|
eventId: -13;
|
|
117
125
|
}
|
|
118
126
|
interface ActiveCondition {
|
package/es/userCondition/util.js
CHANGED
|
@@ -73,13 +73,13 @@ export function buildCondition(type) {
|
|
|
73
73
|
typeId: undefined,
|
|
74
74
|
runTimes: {
|
|
75
75
|
operator: '>=',
|
|
76
|
-
values: [
|
|
76
|
+
values: [1]
|
|
77
77
|
},
|
|
78
78
|
attrs: [],
|
|
79
79
|
timeDimensions: [],
|
|
80
80
|
runPeriod: {
|
|
81
81
|
operator: 'relative',
|
|
82
|
-
values: [
|
|
82
|
+
values: [30, '0']
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
case 'order':
|
|
@@ -87,13 +87,13 @@ export function buildCondition(type) {
|
|
|
87
87
|
eventId: -13,
|
|
88
88
|
runTimes: {
|
|
89
89
|
operator: '>=',
|
|
90
|
-
values: [
|
|
90
|
+
values: [1]
|
|
91
91
|
},
|
|
92
92
|
attrs: [],
|
|
93
93
|
timeDimensions: [],
|
|
94
94
|
runPeriod: {
|
|
95
95
|
operator: 'relative',
|
|
96
|
-
values: [
|
|
96
|
+
values: [30, '0']
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
}
|