@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,39 @@
|
|
|
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
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { BizGroupSelect } from 'business-lib';
|
|
15
|
+
import eventData from '../data/event';
|
|
16
|
+
import envData from '../data/env';
|
|
17
|
+
import userData from '../data/user';
|
|
18
|
+
var options = {
|
|
19
|
+
event: eventData,
|
|
20
|
+
user: userData,
|
|
21
|
+
env: envData
|
|
22
|
+
};
|
|
23
|
+
export default (function () {
|
|
24
|
+
var _useState = useState(['browser_version']),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
attribute = _useState2[0],
|
|
27
|
+
setAttribute = _useState2[1];
|
|
28
|
+
|
|
29
|
+
var handleChange = function handleChange(value) {
|
|
30
|
+
setAttribute(value);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizGroupSelect, {
|
|
34
|
+
defaultValue: attribute,
|
|
35
|
+
options: options,
|
|
36
|
+
eventIds: '24095076,24256188,24143017,24143013',
|
|
37
|
+
onChange: handleChange
|
|
38
|
+
}), /*#__PURE__*/React.createElement("p", null, "\u9009\u62E9\u7684\u5C5E\u6027\u662F\uFF1A", JSON.stringify(attribute)));
|
|
39
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { Button, Form } from 'antd';
|
|
15
|
+
import { BizGroupSelect } from 'business-lib';
|
|
16
|
+
import eventData from '../data/event';
|
|
17
|
+
import envData from '../data/env';
|
|
18
|
+
import userData from '../data/user';
|
|
19
|
+
var options = {
|
|
20
|
+
event: eventData,
|
|
21
|
+
user: userData,
|
|
22
|
+
env: envData
|
|
23
|
+
};
|
|
24
|
+
export default (function () {
|
|
25
|
+
var _Form$useForm = Form.useForm(),
|
|
26
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
27
|
+
form = _Form$useForm2[0];
|
|
28
|
+
|
|
29
|
+
var _useState = useState({
|
|
30
|
+
attr: ['visit_times']
|
|
31
|
+
}),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
formData = _useState2[0],
|
|
34
|
+
setFormData = _useState2[1];
|
|
35
|
+
|
|
36
|
+
var onFinish = function onFinish(values) {
|
|
37
|
+
setFormData(values);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var onFinishFailed = function onFinishFailed(errorInfo) {
|
|
41
|
+
console.log('Failed:', errorInfo);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form, {
|
|
45
|
+
form: form,
|
|
46
|
+
onFinish: onFinish,
|
|
47
|
+
onFinishFailed: onFinishFailed,
|
|
48
|
+
initialValues: formData
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
50
|
+
label: "\u5C5E\u6027",
|
|
51
|
+
name: "attr"
|
|
52
|
+
}, /*#__PURE__*/React.createElement(BizGroupSelect, {
|
|
53
|
+
options: options,
|
|
54
|
+
eventIds: '24095076,24256188,24143017,24143013'
|
|
55
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
56
|
+
wrapperCol: {
|
|
57
|
+
offset: 8,
|
|
58
|
+
span: 16
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
61
|
+
type: "primary",
|
|
62
|
+
htmlType: "submit"
|
|
63
|
+
}, "Submit"))), /*#__PURE__*/React.createElement("p", null, JSON.stringify(formData)));
|
|
64
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { BizAttributeSelector } from 'business-lib';
|
|
15
|
+
import eventData from '../data/event';
|
|
16
|
+
import envData from '../data/env';
|
|
17
|
+
import userData from '../data/user';
|
|
18
|
+
var options = {
|
|
19
|
+
event: eventData,
|
|
20
|
+
user: userData,
|
|
21
|
+
env: envData
|
|
22
|
+
};
|
|
23
|
+
export default (function () {
|
|
24
|
+
var _useState = useState('browser_version'),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
attribute = _useState2[0],
|
|
27
|
+
setAttribute = _useState2[1];
|
|
28
|
+
|
|
29
|
+
var handleChange = function handleChange(value) {
|
|
30
|
+
setAttribute(value);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
34
|
+
defaultValue: attribute,
|
|
35
|
+
options: options,
|
|
36
|
+
disabled: ['项目id'],
|
|
37
|
+
eventIds: '24095076,24256188,24143017,24143013',
|
|
38
|
+
onChange: handleChange,
|
|
39
|
+
showUserProp: false,
|
|
40
|
+
showEventEnv: false,
|
|
41
|
+
showEventProp: false
|
|
42
|
+
}), /*#__PURE__*/React.createElement("p", null, "\u9009\u62E9\u7684\u5C5E\u6027\u662F\uFF1A", attribute));
|
|
43
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { Button, Form } from 'antd';
|
|
15
|
+
import { BizAttributeSelector } from 'business-lib';
|
|
16
|
+
import eventData from '../data/event';
|
|
17
|
+
import envData from '../data/env';
|
|
18
|
+
import userData from '../data/user';
|
|
19
|
+
var options = {
|
|
20
|
+
event: eventData,
|
|
21
|
+
user: userData,
|
|
22
|
+
env: envData
|
|
23
|
+
};
|
|
24
|
+
export default (function () {
|
|
25
|
+
var _Form$useForm = Form.useForm(),
|
|
26
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
27
|
+
form = _Form$useForm2[0];
|
|
28
|
+
|
|
29
|
+
var _useState = useState({
|
|
30
|
+
attr: 'visit_times'
|
|
31
|
+
}),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
formData = _useState2[0],
|
|
34
|
+
setFormData = _useState2[1];
|
|
35
|
+
|
|
36
|
+
var onFinish = function onFinish(values) {
|
|
37
|
+
setFormData(values);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var onFinishFailed = function onFinishFailed(errorInfo) {
|
|
41
|
+
console.log('Failed:', errorInfo);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form, {
|
|
45
|
+
form: form,
|
|
46
|
+
onFinish: onFinish,
|
|
47
|
+
onFinishFailed: onFinishFailed,
|
|
48
|
+
initialValues: formData
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
50
|
+
label: "\u5C5E\u6027",
|
|
51
|
+
name: "attr"
|
|
52
|
+
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
53
|
+
options: options,
|
|
54
|
+
showUserProp: true,
|
|
55
|
+
showEventEnv: true,
|
|
56
|
+
responseType: 'object'
|
|
57
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
58
|
+
wrapperCol: {
|
|
59
|
+
offset: 8,
|
|
60
|
+
span: 16
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
63
|
+
type: "primary",
|
|
64
|
+
htmlType: "submit"
|
|
65
|
+
}, "Submit"))), /*#__PURE__*/React.createElement("p", null, JSON.stringify(formData)));
|
|
66
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { AttributeProps, AttrsListProps } from './index';
|
|
4
|
+
interface AttributeGroupProps extends AttributeProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description 若组件是表单选项,value就是form的initialValues,也是组件的默认选项
|
|
7
|
+
* @description.zh-CN
|
|
8
|
+
* @default -
|
|
9
|
+
*/
|
|
10
|
+
value?: Array<string | number | AttrsListProps>;
|
|
11
|
+
/**
|
|
12
|
+
* @description 默认选项
|
|
13
|
+
* @description.zh-CN
|
|
14
|
+
* @default -
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: Array<string | number | AttrsListProps>;
|
|
17
|
+
/**
|
|
18
|
+
* @description 最多个数
|
|
19
|
+
* @description.zh-CN
|
|
20
|
+
* @default 3
|
|
21
|
+
*/
|
|
22
|
+
maxAttrGroup?: number;
|
|
23
|
+
/**
|
|
24
|
+
* @description 选中 option 时,调用此函数
|
|
25
|
+
* @description.zh-CN
|
|
26
|
+
* @default -
|
|
27
|
+
*/
|
|
28
|
+
onChange: (valueObject: object[] | (string | number)[], value: object[] | (string | number)[]) => void;
|
|
29
|
+
}
|
|
30
|
+
declare const BizGroupSelect: React.FC<AttributeGroupProps>;
|
|
31
|
+
export default BizGroupSelect;
|