@zgfe/business-lib 1.0.0-beta.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/README.md +12 -0
- package/es/analysisLayout/demo/index.d.ts +3 -0
- package/es/analysisLayout/demo/index.js +30 -0
- package/es/analysisLayout/demo/index.less +12 -0
- package/es/analysisLayout/index.d.ts +13 -0
- package/es/analysisLayout/index.js +153 -0
- package/es/analysisLayout/index.less +115 -0
- package/es/attributeSelector/data/env.d.ts +11 -0
- package/es/attributeSelector/data/env.js +181 -0
- package/es/attributeSelector/data/event.d.ts +237 -0
- package/es/attributeSelector/data/event.js +3483 -0
- package/es/attributeSelector/data/user.d.ts +22 -0
- package/es/attributeSelector/data/user.js +218 -0
- package/es/attributeSelector/demo/multi.d.ts +2 -0
- package/es/attributeSelector/demo/multi.js +39 -0
- package/es/attributeSelector/demo/multiForm.d.ts +2 -0
- package/es/attributeSelector/demo/multiForm.js +64 -0
- package/es/attributeSelector/demo/single.d.ts +2 -0
- package/es/attributeSelector/demo/single.js +43 -0
- package/es/attributeSelector/demo/singleForm.d.ts +2 -0
- package/es/attributeSelector/demo/singleForm.js +66 -0
- package/es/attributeSelector/group.d.ts +31 -0
- package/es/attributeSelector/group.js +225 -0
- package/es/attributeSelector/index.d.ts +110 -0
- package/es/attributeSelector/index.js +578 -0
- package/es/attributeSelector/index.less +172 -0
- package/es/chart/chartConfig.d.ts +28 -0
- package/es/chart/chartConfig.js +256 -0
- package/es/chart/color.d.ts +1 -0
- package/es/chart/color.js +1 -0
- package/es/chart/demo/bar.d.ts +2 -0
- package/es/chart/demo/bar.js +19 -0
- package/es/chart/demo/data.d.ts +11 -0
- package/es/chart/demo/data.js +37 -0
- package/es/chart/demo/index.d.ts +2 -0
- package/es/chart/demo/index.js +9 -0
- package/es/chart/demo/pie.d.ts +2 -0
- package/es/chart/demo/pie.js +30 -0
- package/es/chart/index.d.ts +63 -0
- package/es/chart/index.js +76 -0
- package/es/chart/index.less +38 -0
- package/es/chart/style/circle.svg +4 -0
- package/es/commonStyle/icon.less +147 -0
- package/es/commonStyle/index.less +171 -0
- package/es/commonStyle/select.less +101 -0
- package/es/commonStyle/theme.less +432 -0
- package/es/commonStyle/variable.less +124 -0
- package/es/datePicker/data.d.ts +9 -0
- package/es/datePicker/data.js +65 -0
- package/es/datePicker/demo/form.d.ts +2 -0
- package/es/datePicker/demo/form.js +53 -0
- package/es/datePicker/demo/index.d.ts +2 -0
- package/es/datePicker/demo/index.js +30 -0
- package/es/datePicker/index.d.ts +29 -0
- package/es/datePicker/index.js +207 -0
- package/es/datePicker/index.less +388 -0
- package/es/dialog/components/list.d.ts +15 -0
- package/es/dialog/components/list.js +57 -0
- package/es/dialog/components/selectToInput.d.ts +43 -0
- package/es/dialog/components/selectToInput.js +107 -0
- package/es/dialog/components/style/list.less +59 -0
- package/es/dialog/components/style/tab.less +61 -0
- package/es/dialog/components/tab.d.ts +9 -0
- package/es/dialog/components/tab.js +50 -0
- package/es/dialog/data/chart.d.ts +11 -0
- package/es/dialog/data/chart.js +62 -0
- package/es/dialog/demo/index.d.ts +2 -0
- package/es/dialog/demo/index.js +122 -0
- package/es/dialog/demo/index2.d.ts +2 -0
- package/es/dialog/demo/index2.js +79 -0
- package/es/dialog/demo/index3.d.ts +2 -0
- package/es/dialog/demo/index3.js +61 -0
- package/es/dialog/index.d.ts +68 -0
- package/es/dialog/index.js +188 -0
- package/es/dialog/style/index.less +70 -0
- package/es/eventSelector/cascade.less +120 -0
- package/es/eventSelector/demo/form.d.ts +2 -0
- package/es/eventSelector/demo/form.js +89 -0
- package/es/eventSelector/demo/index.d.ts +2 -0
- package/es/eventSelector/demo/index.js +69 -0
- package/es/eventSelector/demo/nodata.d.ts +2 -0
- package/es/eventSelector/demo/nodata.js +13 -0
- package/es/eventSelector/index.d.ts +27 -0
- package/es/eventSelector/index.js +390 -0
- package/es/eventSelector/type.d.ts +41 -0
- package/es/eventSelector/type.js +1 -0
- package/es/globalAttributes/demo/data/env.d.ts +11 -0
- package/es/globalAttributes/demo/data/env.js +181 -0
- package/es/globalAttributes/demo/data/event.d.ts +237 -0
- package/es/globalAttributes/demo/data/event.js +3483 -0
- package/es/globalAttributes/demo/data/user.d.ts +22 -0
- package/es/globalAttributes/demo/data/user.js +218 -0
- package/es/globalAttributes/demo/index.d.ts +2 -0
- package/es/globalAttributes/demo/index.js +50 -0
- package/es/globalAttributes/index.d.ts +46 -0
- package/es/globalAttributes/index.js +116 -0
- package/es/index.d.ts +23 -0
- package/es/index.js +25 -0
- package/es/multipleSelector/demo/index.d.ts +2 -0
- package/es/multipleSelector/demo/index.js +35 -0
- package/es/multipleSelector/index.d.ts +36 -0
- package/es/multipleSelector/index.js +109 -0
- package/es/multipleSelector/index.less +138 -0
- package/es/select/demo/index.d.ts +2 -0
- package/es/select/demo/index.js +22 -0
- package/es/select/index.d.ts +42 -0
- package/es/select/index.js +142 -0
- package/es/table/demo/data/color.d.ts +1 -0
- package/es/table/demo/data/color.js +1 -0
- package/es/table/demo/data/data.d.ts +11 -0
- package/es/table/demo/data/data.js +37 -0
- package/es/table/demo/data/table.d.ts +4 -0
- package/es/table/demo/data/table.js +37 -0
- package/es/table/demo/index.d.ts +3 -0
- package/es/table/demo/index.js +171 -0
- package/es/table/demo/index.less +8 -0
- package/es/table/demo/index2.d.ts +2 -0
- package/es/table/demo/index2.js +9 -0
- package/es/table/index.d.ts +32 -0
- package/es/table/index.js +80 -0
- package/es/table/index.less +102 -0
- package/es/targetConditionGroup/components/conditionGroup.d.ts +30 -0
- package/es/targetConditionGroup/components/conditionGroup.js +111 -0
- package/es/targetConditionGroup/components/conditionItem.d.ts +47 -0
- package/es/targetConditionGroup/components/conditionItem.js +259 -0
- package/es/targetConditionGroup/components/style/group.less +47 -0
- package/es/targetConditionGroup/components/style/index.less +16 -0
- package/es/targetConditionGroup/data/operates.d.ts +36 -0
- package/es/targetConditionGroup/data/operates.js +98 -0
- package/es/targetConditionGroup/demo/data/env.d.ts +11 -0
- package/es/targetConditionGroup/demo/data/env.js +181 -0
- package/es/targetConditionGroup/demo/data/event.d.ts +237 -0
- package/es/targetConditionGroup/demo/data/event.js +3483 -0
- package/es/targetConditionGroup/demo/data/user.d.ts +22 -0
- package/es/targetConditionGroup/demo/data/user.js +218 -0
- package/es/targetConditionGroup/demo/form.d.ts +2 -0
- package/es/targetConditionGroup/demo/form.js +96 -0
- package/es/targetConditionGroup/demo/index.d.ts +2 -0
- package/es/targetConditionGroup/demo/index.js +73 -0
- package/es/targetConditionGroup/demo/item.d.ts +2 -0
- package/es/targetConditionGroup/demo/item.js +5 -0
- package/es/targetConditionGroup/index.d.ts +53 -0
- package/es/targetConditionGroup/index.js +265 -0
- package/es/targetConditionGroup/index.less +65 -0
- package/es/targetConditionGroup/type.d.ts +50 -0
- package/es/targetConditionGroup/type.js +1 -0
- package/es/targetSelector/components/BizCascadeBox.d.ts +34 -0
- package/es/targetSelector/components/BizCascadeBox.js +213 -0
- package/es/targetSelector/components/BizEventNameEditBox.d.ts +20 -0
- package/es/targetSelector/components/BizEventNameEditBox.js +57 -0
- package/es/targetSelector/demo/form.d.ts +2 -0
- package/es/targetSelector/demo/form.js +133 -0
- package/es/targetSelector/demo/index.d.ts +2 -0
- package/es/targetSelector/demo/index.js +107 -0
- package/es/targetSelector/demo/nodata.d.ts +2 -0
- package/es/targetSelector/demo/nodata.js +13 -0
- package/es/targetSelector/index.d.ts +40 -0
- package/es/targetSelector/index.js +204 -0
- package/es/targetSelector/index.less +53 -0
- package/es/userGroup/demo/cluster.d.ts +3 -0
- package/es/userGroup/demo/cluster.js +102 -0
- package/es/userGroup/demo/index.d.ts +3 -0
- package/es/userGroup/demo/index.js +115 -0
- package/es/userGroup/demo/index.less +3 -0
- package/es/userGroup/index.d.ts +79 -0
- package/es/userGroup/index.js +134 -0
- package/es/userGroup/index.less +2 -0
- package/es/userGroup/userCluster.d.ts +63 -0
- package/es/userGroup/userCluster.js +254 -0
- package/es/utils/ajax.d.ts +7 -0
- package/es/utils/ajax.js +139 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/index.js +3 -0
- package/es/utils/type.d.ts +54 -0
- package/es/utils/type.js +1 -0
- package/es/utils/util.d.ts +67 -0
- package/es/utils/util.js +204 -0
- package/package.json +55 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: ({
|
|
2
|
+
dimension_sub: string;
|
|
3
|
+
value_dict: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
id: number;
|
|
6
|
+
text: string;
|
|
7
|
+
category: string;
|
|
8
|
+
type: number;
|
|
9
|
+
alias_name: null;
|
|
10
|
+
subtype?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
dimension_sub: string;
|
|
13
|
+
subtype: number;
|
|
14
|
+
value_dict: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
id: number;
|
|
17
|
+
text: string;
|
|
18
|
+
category: string;
|
|
19
|
+
type: number;
|
|
20
|
+
alias_name: null;
|
|
21
|
+
})[];
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
export default [{
|
|
2
|
+
dimension_sub: 'name',
|
|
3
|
+
value_dict: false,
|
|
4
|
+
name: 'name',
|
|
5
|
+
id: 0,
|
|
6
|
+
text: '名称',
|
|
7
|
+
category: 'fixed',
|
|
8
|
+
type: 1,
|
|
9
|
+
alias_name: null
|
|
10
|
+
}, {
|
|
11
|
+
dimension_sub: 'is_anonymous',
|
|
12
|
+
value_dict: false,
|
|
13
|
+
name: 'is_anonymous',
|
|
14
|
+
id: 0,
|
|
15
|
+
text: '实名/匿名',
|
|
16
|
+
category: 'fixed',
|
|
17
|
+
type: 1,
|
|
18
|
+
alias_name: null
|
|
19
|
+
}, {
|
|
20
|
+
dimension_sub: 'app_user_id',
|
|
21
|
+
value_dict: false,
|
|
22
|
+
name: 'app_user_id',
|
|
23
|
+
id: -1,
|
|
24
|
+
text: '用户ID',
|
|
25
|
+
category: 'fixed',
|
|
26
|
+
type: 1,
|
|
27
|
+
alias_name: null
|
|
28
|
+
}, {
|
|
29
|
+
dimension_sub: 'zg_id',
|
|
30
|
+
value_dict: false,
|
|
31
|
+
name: 'zg_id',
|
|
32
|
+
id: 0,
|
|
33
|
+
text: '诸葛ID',
|
|
34
|
+
category: 'fixed',
|
|
35
|
+
type: 2,
|
|
36
|
+
alias_name: null
|
|
37
|
+
}, {
|
|
38
|
+
dimension_sub: 'first_visit_time',
|
|
39
|
+
value_dict: false,
|
|
40
|
+
name: 'first_visit_time',
|
|
41
|
+
id: 0,
|
|
42
|
+
text: '首次访问时间',
|
|
43
|
+
category: 'fixed',
|
|
44
|
+
type: 3,
|
|
45
|
+
alias_name: null
|
|
46
|
+
}, {
|
|
47
|
+
dimension_sub: 'last_visit_time',
|
|
48
|
+
value_dict: false,
|
|
49
|
+
name: 'last_visit_time',
|
|
50
|
+
id: 0,
|
|
51
|
+
text: '最后一次访问时间',
|
|
52
|
+
category: 'fixed',
|
|
53
|
+
type: 3,
|
|
54
|
+
alias_name: null
|
|
55
|
+
}, {
|
|
56
|
+
dimension_sub: 'visit_times',
|
|
57
|
+
value_dict: false,
|
|
58
|
+
name: 'visit_times',
|
|
59
|
+
id: 0,
|
|
60
|
+
text: '近30天访问次数',
|
|
61
|
+
category: 'fixed',
|
|
62
|
+
type: 2,
|
|
63
|
+
alias_name: null
|
|
64
|
+
}, {
|
|
65
|
+
dimension_sub: 'duration',
|
|
66
|
+
subtype: 2,
|
|
67
|
+
value_dict: false,
|
|
68
|
+
name: 'duration',
|
|
69
|
+
id: 0,
|
|
70
|
+
text: '近30天访问时长',
|
|
71
|
+
category: 'fixed',
|
|
72
|
+
type: 2,
|
|
73
|
+
alias_name: null
|
|
74
|
+
}, {
|
|
75
|
+
dimension_sub: 'current_country',
|
|
76
|
+
value_dict: false,
|
|
77
|
+
name: 'current_country',
|
|
78
|
+
id: 0,
|
|
79
|
+
text: '国家',
|
|
80
|
+
category: 'fixed',
|
|
81
|
+
type: 1,
|
|
82
|
+
alias_name: null
|
|
83
|
+
}, {
|
|
84
|
+
dimension_sub: 'current_area',
|
|
85
|
+
value_dict: false,
|
|
86
|
+
name: 'current_area',
|
|
87
|
+
id: 0,
|
|
88
|
+
text: '省份',
|
|
89
|
+
category: 'fixed',
|
|
90
|
+
type: 1,
|
|
91
|
+
alias_name: null
|
|
92
|
+
}, {
|
|
93
|
+
dimension_sub: 'current_city',
|
|
94
|
+
value_dict: false,
|
|
95
|
+
name: 'current_city',
|
|
96
|
+
id: 0,
|
|
97
|
+
text: '城市',
|
|
98
|
+
category: 'fixed',
|
|
99
|
+
type: 1,
|
|
100
|
+
alias_name: null
|
|
101
|
+
}, {
|
|
102
|
+
dimension_sub: 'user_referer_url',
|
|
103
|
+
value_dict: false,
|
|
104
|
+
name: 'user_referer_url',
|
|
105
|
+
id: 0,
|
|
106
|
+
text: '首次来源URL',
|
|
107
|
+
category: 'fixed',
|
|
108
|
+
type: 1,
|
|
109
|
+
alias_name: null
|
|
110
|
+
}, {
|
|
111
|
+
dimension_sub: 'first_website',
|
|
112
|
+
value_dict: false,
|
|
113
|
+
name: 'first_website',
|
|
114
|
+
id: 0,
|
|
115
|
+
text: '首次来源域名',
|
|
116
|
+
category: 'fixed',
|
|
117
|
+
type: 1,
|
|
118
|
+
alias_name: null
|
|
119
|
+
}, {
|
|
120
|
+
dimension_sub: 'first_utm_source',
|
|
121
|
+
value_dict: false,
|
|
122
|
+
name: 'first_utm_source',
|
|
123
|
+
id: 0,
|
|
124
|
+
text: '首次utm_source',
|
|
125
|
+
category: 'fixed',
|
|
126
|
+
type: 1,
|
|
127
|
+
alias_name: null
|
|
128
|
+
}, {
|
|
129
|
+
dimension_sub: 'first_utm_medium',
|
|
130
|
+
value_dict: false,
|
|
131
|
+
name: 'first_utm_medium',
|
|
132
|
+
id: 0,
|
|
133
|
+
text: '首次utm_medium',
|
|
134
|
+
category: 'fixed',
|
|
135
|
+
type: 1,
|
|
136
|
+
alias_name: null
|
|
137
|
+
}, {
|
|
138
|
+
dimension_sub: 'first_utm_campaign',
|
|
139
|
+
value_dict: false,
|
|
140
|
+
name: 'first_utm_campaign',
|
|
141
|
+
id: 0,
|
|
142
|
+
text: '首次utm_campaign',
|
|
143
|
+
category: 'fixed',
|
|
144
|
+
type: 1,
|
|
145
|
+
alias_name: null
|
|
146
|
+
}, {
|
|
147
|
+
dimension_sub: 'first_utm_content',
|
|
148
|
+
value_dict: false,
|
|
149
|
+
name: 'first_utm_content',
|
|
150
|
+
id: 0,
|
|
151
|
+
text: '首次utm_content',
|
|
152
|
+
category: 'fixed',
|
|
153
|
+
type: 1,
|
|
154
|
+
alias_name: null
|
|
155
|
+
}, {
|
|
156
|
+
dimension_sub: 'first_utm_term',
|
|
157
|
+
value_dict: false,
|
|
158
|
+
name: 'first_utm_term',
|
|
159
|
+
id: 0,
|
|
160
|
+
text: '首次utm_term',
|
|
161
|
+
category: 'fixed',
|
|
162
|
+
type: 1,
|
|
163
|
+
alias_name: null
|
|
164
|
+
}, {
|
|
165
|
+
dimension_sub: 'current_browser_brand',
|
|
166
|
+
value_dict: false,
|
|
167
|
+
name: 'current_browser_brand',
|
|
168
|
+
id: 0,
|
|
169
|
+
text: '浏览器品牌',
|
|
170
|
+
category: 'fixed',
|
|
171
|
+
type: 1,
|
|
172
|
+
alias_name: null
|
|
173
|
+
}, {
|
|
174
|
+
dimension_sub: 'current_browser_version',
|
|
175
|
+
value_dict: false,
|
|
176
|
+
name: 'current_browser_version',
|
|
177
|
+
id: 0,
|
|
178
|
+
text: '浏览器版本',
|
|
179
|
+
category: 'fixed',
|
|
180
|
+
type: 2,
|
|
181
|
+
alias_name: null
|
|
182
|
+
}, {
|
|
183
|
+
dimension_sub: 'current_os',
|
|
184
|
+
value_dict: false,
|
|
185
|
+
name: 'current_os',
|
|
186
|
+
id: 0,
|
|
187
|
+
text: '操作系统',
|
|
188
|
+
category: 'fixed',
|
|
189
|
+
type: 1,
|
|
190
|
+
alias_name: null
|
|
191
|
+
}, {
|
|
192
|
+
dimension_sub: 'current_ov',
|
|
193
|
+
value_dict: false,
|
|
194
|
+
name: 'current_ov',
|
|
195
|
+
id: 0,
|
|
196
|
+
text: '系统版本',
|
|
197
|
+
category: 'fixed',
|
|
198
|
+
type: 2,
|
|
199
|
+
alias_name: null
|
|
200
|
+
}, {
|
|
201
|
+
dimension_sub: 'current_resolution_h',
|
|
202
|
+
value_dict: false,
|
|
203
|
+
name: 'current_resolution_h',
|
|
204
|
+
id: 0,
|
|
205
|
+
text: '屏幕高度',
|
|
206
|
+
category: 'fixed',
|
|
207
|
+
type: 2,
|
|
208
|
+
alias_name: null
|
|
209
|
+
}, {
|
|
210
|
+
dimension_sub: 'current_resolution_l',
|
|
211
|
+
value_dict: false,
|
|
212
|
+
name: 'current_resolution_l',
|
|
213
|
+
id: 0,
|
|
214
|
+
text: '屏幕宽度',
|
|
215
|
+
category: 'fixed',
|
|
216
|
+
type: 2,
|
|
217
|
+
alias_name: null
|
|
218
|
+
}];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
|
|
17
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
|
|
19
|
+
import { Button, Form } from 'antd';
|
|
20
|
+
import React, { useState } from 'react';
|
|
21
|
+
import { BizTargetCondition } from 'business-lib';
|
|
22
|
+
import eventData from './data/event';
|
|
23
|
+
import envData from './data/env';
|
|
24
|
+
import userData from './data/user';
|
|
25
|
+
var attrsData = {
|
|
26
|
+
operator: 'and',
|
|
27
|
+
attrs: [{
|
|
28
|
+
attr_id: 5461056,
|
|
29
|
+
attr_name: '支付方式',
|
|
30
|
+
operator: 'equal',
|
|
31
|
+
params: ['BlackBerry'],
|
|
32
|
+
attrType: 'cont-string',
|
|
33
|
+
category: 'custom'
|
|
34
|
+
}]
|
|
35
|
+
};
|
|
36
|
+
var attrOption = {
|
|
37
|
+
event: eventData,
|
|
38
|
+
user: userData,
|
|
39
|
+
env: envData
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var targetData = _objectSpread({
|
|
43
|
+
aliasName: '别名',
|
|
44
|
+
eventId: '7086289'
|
|
45
|
+
}, attrsData);
|
|
46
|
+
|
|
47
|
+
export default (function () {
|
|
48
|
+
var _Form$useForm = Form.useForm(),
|
|
49
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
50
|
+
form = _Form$useForm2[0];
|
|
51
|
+
|
|
52
|
+
var _useState = useState(''),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
formData = _useState2[0],
|
|
55
|
+
setFormData = _useState2[1];
|
|
56
|
+
|
|
57
|
+
var onFinish = function onFinish(values) {
|
|
58
|
+
setFormData(JSON.stringify(values));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var onFinishFailed = function onFinishFailed(errorInfo) {
|
|
62
|
+
console.log('Failed:', errorInfo);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form, {
|
|
66
|
+
form: form,
|
|
67
|
+
onFinish: onFinish,
|
|
68
|
+
onFinishFailed: onFinishFailed,
|
|
69
|
+
initialValues: {
|
|
70
|
+
target: targetData
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
73
|
+
label: "\u6307\u6807",
|
|
74
|
+
name: "target"
|
|
75
|
+
}, /*#__PURE__*/React.createElement(BizTargetCondition, {
|
|
76
|
+
fieldNames: {
|
|
77
|
+
label: 'event_name',
|
|
78
|
+
value: 'event_id',
|
|
79
|
+
groupLabel: 'groupName',
|
|
80
|
+
groupValue: 'groupId',
|
|
81
|
+
children: 'eventList'
|
|
82
|
+
},
|
|
83
|
+
options: {
|
|
84
|
+
eventOption: eventData,
|
|
85
|
+
attrOption: attrOption
|
|
86
|
+
}
|
|
87
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
88
|
+
wrapperCol: {
|
|
89
|
+
offset: 8,
|
|
90
|
+
span: 16
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
93
|
+
type: "primary",
|
|
94
|
+
htmlType: "submit"
|
|
95
|
+
}, "Submit"))), /*#__PURE__*/React.createElement("p", null, formData));
|
|
96
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
|
|
13
|
+
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; }
|
|
14
|
+
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
+
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
|
|
19
|
+
import React, { useState } from 'react';
|
|
20
|
+
import { BizTargetCondition } from 'business-lib';
|
|
21
|
+
import eventData from './data/event';
|
|
22
|
+
import envData from './data/env';
|
|
23
|
+
import userData from './data/user';
|
|
24
|
+
var attrsData = {
|
|
25
|
+
operator: 'and',
|
|
26
|
+
attrs: [{
|
|
27
|
+
attr_id: 5461056,
|
|
28
|
+
attr_name: '支付方式',
|
|
29
|
+
operator: 'equal',
|
|
30
|
+
params: ['BlackBerry'],
|
|
31
|
+
attrType: 'cont-string',
|
|
32
|
+
category: 'custom'
|
|
33
|
+
}]
|
|
34
|
+
};
|
|
35
|
+
var attrOption = {
|
|
36
|
+
event: eventData,
|
|
37
|
+
user: userData,
|
|
38
|
+
env: envData
|
|
39
|
+
};
|
|
40
|
+
export default (function () {
|
|
41
|
+
var _useState = useState(_objectSpread({
|
|
42
|
+
aliasName: '',
|
|
43
|
+
eventId: 7086289
|
|
44
|
+
}, attrsData)),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
target = _useState2[0],
|
|
47
|
+
setTarget = _useState2[1];
|
|
48
|
+
|
|
49
|
+
var handleChange = function handleChange(data) {
|
|
50
|
+
setTarget(function () {
|
|
51
|
+
return _objectSpread({}, data);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizTargetCondition, {
|
|
56
|
+
defaultValue: _objectSpread({
|
|
57
|
+
aliasName: '4444',
|
|
58
|
+
eventId: 7086289
|
|
59
|
+
}, attrsData),
|
|
60
|
+
options: {
|
|
61
|
+
eventOption: eventData,
|
|
62
|
+
attrOption: attrOption
|
|
63
|
+
},
|
|
64
|
+
fieldNames: {
|
|
65
|
+
label: 'event_name',
|
|
66
|
+
value: 'event_id',
|
|
67
|
+
groupLabel: 'groupName',
|
|
68
|
+
groupValue: 'groupId',
|
|
69
|
+
children: 'eventList'
|
|
70
|
+
},
|
|
71
|
+
onChange: handleChange
|
|
72
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C\uFF1A", JSON.stringify(target)));
|
|
73
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OptionType, TargetCondition } from './type';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface TargetConditionProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description 默认值
|
|
7
|
+
* @default {}
|
|
8
|
+
*/
|
|
9
|
+
defaultValue?: TargetCondition;
|
|
10
|
+
/**
|
|
11
|
+
* @description 默认值
|
|
12
|
+
* @default {}
|
|
13
|
+
*/
|
|
14
|
+
value?: TargetCondition;
|
|
15
|
+
/**
|
|
16
|
+
* @description 数据化配置选项内容
|
|
17
|
+
* @description.zh-CN
|
|
18
|
+
* @default -
|
|
19
|
+
*/
|
|
20
|
+
options?: OptionType;
|
|
21
|
+
/**
|
|
22
|
+
* @description 属性最多个数
|
|
23
|
+
* @description.zh-CN
|
|
24
|
+
* @default 3
|
|
25
|
+
*/
|
|
26
|
+
max?: number;
|
|
27
|
+
/**
|
|
28
|
+
* @description 自定义指标下拉框 label、value 的字段
|
|
29
|
+
* @description.zh-CN
|
|
30
|
+
* @default { label: 'name', value: 'id', groupLabel: 'name', groupValue: 'id' }
|
|
31
|
+
*/
|
|
32
|
+
fieldNames?: {
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
groupLabel: string;
|
|
36
|
+
groupValue: string;
|
|
37
|
+
children: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @description 指标删除回调
|
|
41
|
+
* @description.zh-CN
|
|
42
|
+
* @default
|
|
43
|
+
*/
|
|
44
|
+
onDelete?: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* @description 改变回调
|
|
47
|
+
* @description.zh-CN
|
|
48
|
+
* @default
|
|
49
|
+
*/
|
|
50
|
+
onChange?: (data: TargetCondition) => void;
|
|
51
|
+
}
|
|
52
|
+
declare const BizTargetCondition: React.FC<TargetConditionProps>;
|
|
53
|
+
export default BizTargetCondition;
|