@zgfe/business-lib 1.0.22-bugfix.3 → 1.0.23-alpha.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.
@@ -73,7 +73,6 @@
73
73
  border: none;
74
74
 
75
75
  &.ant-input-affix-wrapper {
76
- height: @height-base !important;
77
76
  background-color: @background-color-gray !important;
78
77
 
79
78
  input {
@@ -15,7 +15,7 @@ import { BizAttributeSelector, BizGlobalDataContext } from '@zgfe/business-lib';
15
15
  import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
16
16
  import eventData from '../../mock/event';
17
17
  import envData from '../../mock/env';
18
- import userData from '../../mock/user';
18
+ import userData from './userData.js';
19
19
  import convertAttributeData from '../util';
20
20
  export default (function () {
21
21
  var _useState = useState({
@@ -0,0 +1,290 @@
1
+ export default [{
2
+ dimension_sub: 'name',
3
+ value_dict: false,
4
+ name: 'name',
5
+ isMultiple: 0,
6
+ id: 23,
7
+ text: '名称',
8
+ category: 'fixed',
9
+ type: 1,
10
+ alias_name: null
11
+ }, {
12
+ dimension_sub: 'is_anonymous',
13
+ value_dict: false,
14
+ name: 'is_anonymous',
15
+ isMultiple: 0,
16
+ id: 0,
17
+ text: '实名/匿名',
18
+ category: 'fixed',
19
+ type: 1,
20
+ alias_name: null
21
+ }, {
22
+ dimension_sub: 'app_user_id',
23
+ value_dict: false,
24
+ name: 'app_user_id',
25
+ isMultiple: 0,
26
+ id: -1,
27
+ text: '用户ID',
28
+ category: 'fixed',
29
+ type: 1,
30
+ alias_name: null
31
+ }, {
32
+ dimension_sub: 'zg_id',
33
+ value_dict: false,
34
+ name: 'zg_id',
35
+ isMultiple: 0,
36
+ id: 0,
37
+ text: '系统ID',
38
+ category: 'fixed',
39
+ type: 2,
40
+ alias_name: null
41
+ }, {
42
+ dimension_sub: 'first_visit_time',
43
+ value_dict: false,
44
+ name: 'first_visit_time',
45
+ isMultiple: 0,
46
+ id: 0,
47
+ text: '首次访问时间',
48
+ category: 'fixed',
49
+ type: 3,
50
+ alias_name: null
51
+ }, {
52
+ dimension_sub: 'last_visit_time',
53
+ value_dict: false,
54
+ name: 'last_visit_time',
55
+ isMultiple: 0,
56
+ id: 0,
57
+ text: '最后一次访问时间',
58
+ category: 'fixed',
59
+ type: 3,
60
+ alias_name: null
61
+ }, {
62
+ dimension_sub: 'visit_times',
63
+ value_dict: false,
64
+ name: 'visit_times',
65
+ isMultiple: 0,
66
+ id: 0,
67
+ text: '近30天访问次数',
68
+ category: 'fixed',
69
+ type: 2,
70
+ alias_name: null
71
+ }, {
72
+ dimension_sub: 'duration',
73
+ subtype: 2,
74
+ value_dict: false,
75
+ name: 'duration',
76
+ isMultiple: 0,
77
+ id: 0,
78
+ text: '近30天访问时长',
79
+ category: 'fixed',
80
+ type: 2,
81
+ alias_name: null
82
+ }, {
83
+ dimension_sub: 'current_country',
84
+ value_dict: false,
85
+ name: 'current_country',
86
+ isMultiple: 0,
87
+ id: 0,
88
+ text: '国家',
89
+ category: 'fixed',
90
+ type: 1,
91
+ alias_name: null
92
+ }, {
93
+ dimension_sub: 'current_area',
94
+ value_dict: false,
95
+ name: 'current_area',
96
+ isMultiple: 0,
97
+ id: 0,
98
+ text: '省份',
99
+ category: 'fixed',
100
+ type: 1,
101
+ alias_name: null
102
+ }, {
103
+ dimension_sub: 'current_city',
104
+ value_dict: false,
105
+ name: 'current_city',
106
+ isMultiple: 0,
107
+ id: 0,
108
+ text: '城市',
109
+ category: 'fixed',
110
+ type: 1,
111
+ alias_name: null
112
+ }, {
113
+ dimension_sub: 'user_referer_url',
114
+ value_dict: false,
115
+ name: 'user_referer_url',
116
+ isMultiple: 0,
117
+ id: 0,
118
+ text: '首次来源URL',
119
+ category: 'fixed',
120
+ type: 1,
121
+ alias_name: null
122
+ }, {
123
+ dimension_sub: 'first_website',
124
+ value_dict: false,
125
+ name: 'first_website',
126
+ isMultiple: 0,
127
+ id: 0,
128
+ text: '首次来源域名',
129
+ category: 'fixed',
130
+ type: 1,
131
+ alias_name: null
132
+ }, {
133
+ dimension_sub: 'first_utm_source',
134
+ value_dict: false,
135
+ name: 'first_utm_source',
136
+ isMultiple: 0,
137
+ id: 0,
138
+ text: '首次utm_source',
139
+ category: 'fixed',
140
+ type: 1,
141
+ alias_name: null
142
+ }, {
143
+ dimension_sub: 'first_utm_medium',
144
+ value_dict: false,
145
+ name: 'first_utm_medium',
146
+ isMultiple: 0,
147
+ id: 0,
148
+ text: '首次utm_medium',
149
+ category: 'fixed',
150
+ type: 1,
151
+ alias_name: null
152
+ }, {
153
+ dimension_sub: 'first_utm_campaign',
154
+ value_dict: false,
155
+ name: 'first_utm_campaign',
156
+ isMultiple: 0,
157
+ id: 0,
158
+ text: '首次utm_campaign',
159
+ category: 'fixed',
160
+ type: 1,
161
+ alias_name: null
162
+ }, {
163
+ dimension_sub: 'first_utm_content',
164
+ value_dict: false,
165
+ name: 'first_utm_content',
166
+ isMultiple: 0,
167
+ id: 0,
168
+ text: '首次utm_content',
169
+ category: 'fixed',
170
+ type: 1,
171
+ alias_name: null
172
+ }, {
173
+ dimension_sub: 'first_utm_term',
174
+ value_dict: false,
175
+ name: 'first_utm_term',
176
+ isMultiple: 0,
177
+ id: 0,
178
+ text: '首次utm_term',
179
+ category: 'fixed',
180
+ type: 1,
181
+ alias_name: null
182
+ }, {
183
+ dimension_sub: 'current_browser_brand',
184
+ value_dict: false,
185
+ name: 'current_browser_brand',
186
+ isMultiple: 0,
187
+ id: 0,
188
+ text: '浏览器品牌',
189
+ category: 'fixed',
190
+ type: 1,
191
+ alias_name: null
192
+ }, {
193
+ dimension_sub: 'current_browser_version',
194
+ value_dict: false,
195
+ name: 'current_browser_version',
196
+ isMultiple: 0,
197
+ id: 0,
198
+ text: '浏览器版本',
199
+ category: 'fixed',
200
+ type: 2,
201
+ alias_name: null
202
+ }, {
203
+ dimension_sub: 'current_os',
204
+ value_dict: false,
205
+ name: 'current_os',
206
+ isMultiple: 0,
207
+ id: 0,
208
+ text: '操作系统',
209
+ category: 'fixed',
210
+ type: 1,
211
+ alias_name: null
212
+ }, {
213
+ dimension_sub: 'current_ov',
214
+ value_dict: false,
215
+ name: 'current_ov',
216
+ isMultiple: 0,
217
+ id: 0,
218
+ text: '系统版本',
219
+ category: 'fixed',
220
+ type: 2,
221
+ alias_name: null
222
+ }, {
223
+ dimension_sub: 'current_resolution_h',
224
+ value_dict: false,
225
+ name: 'current_resolution_h',
226
+ isMultiple: 0,
227
+ id: 0,
228
+ text: '屏幕高度',
229
+ category: 'fixed',
230
+ type: 2,
231
+ alias_name: null
232
+ }, {
233
+ dimension_sub: 'current_resolution_l',
234
+ value_dict: false,
235
+ name: 'current_resolution_l',
236
+ isMultiple: 0,
237
+ id: 0,
238
+ text: '屏幕宽度',
239
+ category: 'fixed',
240
+ type: 2,
241
+ alias_name: null
242
+ }, {
243
+ dimension_sub: 'user_attr',
244
+ encryption_type: 0,
245
+ hidden: 0,
246
+ value_dict: false,
247
+ name: '电话',
248
+ isMultiple: 0,
249
+ id: 22,
250
+ text: '电话',
251
+ category: 'custom',
252
+ type: 1,
253
+ alias_name: ''
254
+ }, {
255
+ dimension_sub: 'user_attr',
256
+ encryption_type: 0,
257
+ hidden: 0,
258
+ value_dict: false,
259
+ name: '性别',
260
+ isMultiple: 0,
261
+ id: 24,
262
+ text: '性别',
263
+ category: 'custom',
264
+ type: 1,
265
+ alias_name: ''
266
+ }, {
267
+ dimension_sub: 'user_attr',
268
+ encryption_type: 0,
269
+ hidden: 0,
270
+ value_dict: false,
271
+ name: '年龄',
272
+ isMultiple: 0,
273
+ id: 25,
274
+ text: '年龄',
275
+ category: 'custom',
276
+ type: 2,
277
+ alias_name: ''
278
+ }, {
279
+ dimension_sub: 'user_attr',
280
+ encryption_type: 0,
281
+ hidden: 0,
282
+ value_dict: false,
283
+ name: '地址',
284
+ isMultiple: 0,
285
+ id: 21,
286
+ text: '地址',
287
+ category: 'custom',
288
+ type: 1,
289
+ alias_name: ''
290
+ }];
@@ -149,6 +149,7 @@ var AttrListPanel = function AttrListPanel(props) {
149
149
  disableItemlist === null || disableItemlist === void 0 ? void 0 : disableItemlist.forEach(function (item) {
150
150
  if (item.key === option.key) disabled = true;
151
151
  });
152
+ console.log('>>>>>>>>>', option === null || option === void 0 ? void 0 : option.key);
152
153
  childList.push( /*#__PURE__*/React.createElement(Option, {
153
154
  option: option,
154
155
  key: option === null || option === void 0 ? void 0 : option.key,
@@ -61,7 +61,7 @@ export default function convertAttributeData(store) {
61
61
  id: prop.id || 0,
62
62
  alias: prop.alias_name,
63
63
  category: prop.category,
64
- key: "userProp-".concat(prop.dimension_sub),
64
+ key: "userProp-".concat(prop.name),
65
65
  label: prop.text || prop.name,
66
66
  name: prop.name,
67
67
  propCategory: 'userProp',
@@ -1,4 +1,10 @@
1
1
  import React from 'react';
2
+ import { BizDnd } from '@zgfe/business-lib';
3
+ import styles from './styles/index.less';
2
4
  export default (function () {
3
- return /*#__PURE__*/React.createElement("div", null, "dnd demo");
5
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizDnd.Container, {
6
+ className: styles.container
7
+ }, /*#__PURE__*/React.createElement(BizDnd.Item, {
8
+ className: styles.item
9
+ }, "xxx")));
4
10
  });
@@ -0,0 +1,14 @@
1
+ @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
+ .container {
3
+ padding: @padding-md;
4
+ border: 1px solid @border-color-base;
5
+ border-radius: @border-radius-normal;
6
+ }
7
+ .item {
8
+ display: inline-block;
9
+ width: 300px;
10
+ height: 150px;
11
+ text-align: center;
12
+ background: @background-color-base;
13
+ border-radius: @border-radius-normal;
14
+ }
package/es/dnd/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  import React from 'react';
2
- declare const BizDnd: React.FC;
2
+ import { DndTypes } from './types';
3
+ declare const BizDnd: {
4
+ Container: React.FC<DndTypes.ContainerProps>;
5
+ Item: React.FC<DndTypes.ItemProps>;
6
+ };
3
7
  export default BizDnd;
package/es/dnd/index.js CHANGED
@@ -1,7 +1,14 @@
1
1
  import React from 'react';
2
+ import BizDndItem from './item';
2
3
 
3
- var BizDnd = function BizDnd() {
4
- return /*#__PURE__*/React.createElement("div", null, "dnd");
4
+ var Container = function Container(props) {
5
+ return /*#__PURE__*/React.createElement("div", {
6
+ className: "".concat(props.className)
7
+ }, props.children);
5
8
  };
6
9
 
10
+ var BizDnd = {
11
+ Container: Container,
12
+ Item: BizDndItem
13
+ };
7
14
  export default BizDnd;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DndTypes } from './types';
3
+ declare const BizDndItem: React.FC<DndTypes.ItemProps>;
4
+ export default BizDndItem;
package/es/dnd/item.js ADDED
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+
3
+ var BizDndItem = function BizDndItem(props) {
4
+ return /*#__PURE__*/React.createElement("div", {
5
+ className: "".concat(props.className)
6
+ }, props.children);
7
+ };
8
+
9
+ export default BizDndItem;
package/es/dnd/types.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  export declare namespace DndTypes {
2
- interface Props {
2
+ interface ContainerProps {
3
3
  className?: string;
4
- itemClassName?: string;
5
- draddingClassName?: string;
6
4
  tempClassName?: string;
5
+ onChange?: () => void;
6
+ }
7
+ interface ItemProps {
8
+ className?: string;
9
+ draddingClassName?: string;
10
+ keyField: string;
11
+ data: Record<string, any>;
7
12
  }
8
13
  }
package/es/index.d.ts CHANGED
@@ -24,7 +24,8 @@ import BizAddToScene from './addToScene';
24
24
  import BizAddToPanel from './addToPanel';
25
25
  import setGlobalConfig from './config';
26
26
  import BizCycleTime from './cycleTime';
27
- export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
27
+ import BizDnd from './dnd';
28
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
28
29
  export type { UserGroupTypes } from './userGroup/types';
29
30
  export type { BizSelectTypes } from './select/types';
30
31
  export type { AttributeSelect } from './attributeSelector/types';
package/es/index.js CHANGED
@@ -23,4 +23,5 @@ import BizAddToScene from './addToScene';
23
23
  import BizAddToPanel from './addToPanel';
24
24
  import setGlobalConfig from './config';
25
25
  import BizCycleTime from './cycleTime';
26
- export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
26
+ import BizDnd from './dnd';
27
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
package/es/mock/user.d.ts CHANGED
@@ -8,6 +8,9 @@ declare const _default: ({
8
8
  type: number;
9
9
  alias_name: null;
10
10
  subtype?: undefined;
11
+ encryption_type?: undefined;
12
+ hidden?: undefined;
13
+ isMultiple?: undefined;
11
14
  } | {
12
15
  dimension_sub: string;
13
16
  subtype: number;
@@ -18,5 +21,21 @@ declare const _default: ({
18
21
  category: string;
19
22
  type: number;
20
23
  alias_name: null;
24
+ encryption_type?: undefined;
25
+ hidden?: undefined;
26
+ isMultiple?: undefined;
27
+ } | {
28
+ dimension_sub: string;
29
+ encryption_type: number;
30
+ hidden: number;
31
+ value_dict: boolean;
32
+ name: string;
33
+ isMultiple: number;
34
+ id: number;
35
+ text: string;
36
+ category: string;
37
+ type: number;
38
+ alias_name: string;
39
+ subtype?: undefined;
21
40
  })[];
22
41
  export default _default;
package/es/mock/user.js CHANGED
@@ -215,4 +215,52 @@ export default [{
215
215
  category: 'fixed',
216
216
  type: 2,
217
217
  alias_name: null
218
+ }, {
219
+ dimension_sub: 'user_attr',
220
+ encryption_type: 0,
221
+ hidden: 0,
222
+ value_dict: false,
223
+ name: '电话',
224
+ isMultiple: 0,
225
+ id: 22,
226
+ text: '电话',
227
+ category: 'custom',
228
+ type: 1,
229
+ alias_name: ''
230
+ }, {
231
+ dimension_sub: 'user_attr',
232
+ encryption_type: 0,
233
+ hidden: 0,
234
+ value_dict: false,
235
+ name: '性别',
236
+ isMultiple: 0,
237
+ id: 24,
238
+ text: '性别',
239
+ category: 'custom',
240
+ type: 1,
241
+ alias_name: ''
242
+ }, {
243
+ dimension_sub: 'user_attr',
244
+ encryption_type: 0,
245
+ hidden: 0,
246
+ value_dict: false,
247
+ name: '年龄',
248
+ isMultiple: 0,
249
+ id: 25,
250
+ text: '年龄',
251
+ category: 'custom',
252
+ type: 2,
253
+ alias_name: ''
254
+ }, {
255
+ dimension_sub: 'user_attr',
256
+ encryption_type: 0,
257
+ hidden: 0,
258
+ value_dict: false,
259
+ name: '地址',
260
+ isMultiple: 0,
261
+ id: 21,
262
+ text: '地址',
263
+ category: 'custom',
264
+ type: 1,
265
+ alias_name: ''
218
266
  }];
@@ -36,7 +36,6 @@
36
36
  .biz-condition-item-panel {
37
37
  .biz-condition-item-input {
38
38
  .ant-input {
39
- height: 40px;
40
39
  border: none;
41
40
  }
42
41
  }
@@ -27,17 +27,19 @@ var Text = function Text(props) {
27
27
  userTagsData = _useContext3.userTagsData;
28
28
 
29
29
  function render() {
30
- if (condition.labels) {
31
- return renderTags(condition);
30
+ var data = condition;
31
+
32
+ if (data.labels) {
33
+ return renderTags(data);
32
34
  }
33
35
 
34
- if (condition.eventId === '-4') {
36
+ if (String(condition.eventId) === '-4') {
35
37
  return renderPeriod({
36
38
  before: '活跃于'
37
39
  }, condition.runPeriod);
38
40
  }
39
41
 
40
- if (condition.eventId === '-3') {
42
+ if (String(condition.eventId) === '-3') {
41
43
  return renderPeriod({
42
44
  before: '新增于'
43
45
  }, condition.runPeriod);
@@ -150,7 +150,7 @@ var getTagList = Promise.resolve([{
150
150
  }]);
151
151
  var data = {
152
152
  json: [[{
153
- eventId: '-4',
153
+ eventId: -4,
154
154
  attrs: [],
155
155
  runPeriod: {
156
156
  operator: 'relative',
@@ -161,7 +161,7 @@ var data = {
161
161
  values: ['1']
162
162
  }
163
163
  }, {
164
- eventId: '-3',
164
+ eventId: -3,
165
165
  attrs: [],
166
166
  runPeriod: {
167
167
  operator: 'absolute',
@@ -99,6 +99,7 @@ var UserTagsSelect = function UserTagsSelect(props) {
99
99
  value: handleValue,
100
100
  labelField: labelFields[labelFields.length - 1],
101
101
  multiple: true,
102
+ size: "middle",
102
103
  placeholder: "\u9009\u62E9\u6807\u7B7E",
103
104
  onDelete: onDelete
104
105
  }))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.0.22-bugfix.3",
3
+ "version": "1.0.23-alpha.1",
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": "59bbf75ffce0b29d430ce362f3364f78ee4a026a"
61
+ "gitHead": "70f1208c676545bc2b07571dd3ea1cb4a3e45867"
62
62
  }