@zgfe/business-lib 1.0.18 → 1.0.19

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.
Files changed (104) hide show
  1. package/es/addToPanel/index.js +1 -0
  2. package/es/addToScene/index.js +1 -0
  3. package/es/assets/styles/chunks.less +3 -4
  4. package/es/assets/styles/resetAntd.less +47 -11
  5. package/es/attrConditions/components/operateList.d.ts +1 -0
  6. package/es/attrConditions/components/operateList.js +2 -2
  7. package/es/attrConditions/components/stringList.d.ts +1 -0
  8. package/es/attrConditions/components/stringList.js +2 -2
  9. package/es/attrConditions/components/valuesList.d.ts +1 -1
  10. package/es/attrConditions/components/valuesList.js +11 -12
  11. package/es/attrConditions/demo/group.js +13 -1
  12. package/es/attrConditions/group.js +14 -0
  13. package/es/attrConditions/index.js +16 -5
  14. package/es/attrConditions/styles/index.less +39 -5
  15. package/es/attrConditions/types.d.ts +4 -0
  16. package/es/attrConditions/utils/operates.js +2 -2
  17. package/es/attributeSelector/index.js +8 -4
  18. package/es/attributeSelector/listPanel.js +32 -19
  19. package/es/attributeSelector/styles/index.less +3 -3
  20. package/es/attributeSelector/types.d.ts +7 -0
  21. package/es/attributeSelector/types.js +8 -1
  22. package/es/attributeSelector/util.js +3 -2
  23. package/es/eventSelector/index.js +10 -4
  24. package/es/eventSelector/listPanel.js +18 -23
  25. package/es/eventSelector/styles/index.less +5 -5
  26. package/es/eventSelector/types.d.ts +4 -0
  27. package/es/index.d.ts +2 -1
  28. package/es/index.js +2 -1
  29. package/es/mock/event.js +214 -0
  30. package/es/select/demo/children.d.ts +2 -0
  31. package/es/select/demo/children.js +81 -0
  32. package/es/select/demo/customLabel.d.ts +2 -0
  33. package/es/select/demo/customLabel.js +23 -0
  34. package/es/select/demo/index.js +10 -4
  35. package/es/select/demo/multiple.js +10 -3
  36. package/es/select/handle.js +4 -2
  37. package/es/select/index.d.ts +2 -2
  38. package/es/select/index.js +7 -5
  39. package/es/select/option.js +8 -2
  40. package/es/select/overlay.js +5 -3
  41. package/es/select/styles/handle.less +23 -13
  42. package/es/select/types.d.ts +5 -1
  43. package/es/userCondition/conditionTypeList.js +29 -6
  44. package/es/userCondition/conditionWrap.js +4 -2
  45. package/es/userCondition/conditions/constants.d.ts +24 -0
  46. package/es/userCondition/conditions/constants.js +41 -0
  47. package/es/userCondition/conditions/eventCondition.js +13 -4
  48. package/es/userCondition/conditions/periodCondition.js +21 -10
  49. package/es/userCondition/conditions/propCondition.js +25 -6
  50. package/es/userCondition/conditions/runTimesCondition.js +2 -2
  51. package/es/userCondition/conditions/styles/eventCondition.less +9 -7
  52. package/es/userCondition/conditions/styles/periodCondition.less +12 -0
  53. package/es/userCondition/conditions/styles/propCondition.less +11 -3
  54. package/es/userCondition/conditions/styles/runTimesCondition.less +3 -0
  55. package/es/userCondition/conditions/styles/tagsCondition.less +20 -0
  56. package/es/userCondition/conditions/styles/textDesc.less +17 -0
  57. package/es/userCondition/conditions/tagsCondition.d.ts +9 -0
  58. package/es/userCondition/conditions/tagsCondition.js +107 -0
  59. package/es/userCondition/conditions/textDesc.d.ts +9 -0
  60. package/es/userCondition/conditions/textDesc.js +241 -0
  61. package/es/userCondition/demo/index.js +259 -31
  62. package/es/userCondition/index.d.ts +1 -1
  63. package/es/userCondition/index.js +52 -10
  64. package/es/userCondition/orConditions.js +69 -28
  65. package/es/userCondition/relationLabel.js +6 -1
  66. package/es/userCondition/styles/conditionTypeList.less +1 -1
  67. package/es/userCondition/styles/conditionWrap.less +3 -0
  68. package/es/userCondition/styles/index.less +21 -1
  69. package/es/userCondition/styles/orConditions.less +20 -2
  70. package/es/userCondition/styles/relationLabel.less +5 -4
  71. package/es/userCondition/types.d.ts +28 -2
  72. package/es/userCondition/util.d.ts +5 -1
  73. package/es/userCondition/util.js +42 -0
  74. package/es/userTagsSelector/cascaderOverlay.d.ts +5 -0
  75. package/es/userTagsSelector/cascaderOverlay.js +114 -0
  76. package/es/userTagsSelector/components/search/index.d.ts +8 -0
  77. package/es/userTagsSelector/components/search/index.js +16 -0
  78. package/es/userTagsSelector/components/search/index.less +6 -0
  79. package/es/userTagsSelector/context.d.ts +3 -0
  80. package/es/userTagsSelector/context.js +2 -0
  81. package/es/userTagsSelector/demo/index.d.ts +2 -0
  82. package/es/userTagsSelector/demo/index.js +48 -0
  83. package/es/userTagsSelector/groups/groupOption.d.ts +5 -0
  84. package/es/userTagsSelector/groups/groupOption.js +42 -0
  85. package/es/userTagsSelector/groups/index.d.ts +4 -0
  86. package/es/userTagsSelector/groups/index.js +86 -0
  87. package/es/userTagsSelector/groups/styles/index.less +0 -0
  88. package/es/userTagsSelector/groups/styles/option.less +50 -0
  89. package/es/userTagsSelector/index.d.ts +6 -0
  90. package/es/userTagsSelector/index.js +110 -0
  91. package/es/userTagsSelector/multipleCheckPanel/checkOption.d.ts +5 -0
  92. package/es/userTagsSelector/multipleCheckPanel/checkOption.js +45 -0
  93. package/es/userTagsSelector/multipleCheckPanel/index.d.ts +4 -0
  94. package/es/userTagsSelector/multipleCheckPanel/index.js +80 -0
  95. package/es/userTagsSelector/multipleCheckPanel/styles/index.less +0 -0
  96. package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -0
  97. package/es/userTagsSelector/styles/cascaderOverlay.less +27 -0
  98. package/es/userTagsSelector/styles/index.less +10 -0
  99. package/es/userTagsSelector/types.d.ts +67 -0
  100. package/es/userTagsSelector/types.js +1 -0
  101. package/es/userTagsSelector/util.d.ts +4 -0
  102. package/es/userTagsSelector/util.js +38 -0
  103. package/es/utils/type.d.ts +2 -2
  104. package/package.json +6 -7
@@ -15,7 +15,7 @@ export default function convertAttributeData(store) {
15
15
  eventList: []
16
16
  };
17
17
  group_.eventList.forEach(function (e) {
18
- if (e.is_delete || e.is_stop) return;
18
+ if (e.is_delete) return;
19
19
  var event = {
20
20
  alias: e.alias_name,
21
21
  attrList: e.event_attrs.map(function (item) {
@@ -35,7 +35,8 @@ export default function convertAttributeData(store) {
35
35
  id: e.event_id,
36
36
  isDelete: e.is_delete,
37
37
  isStop: e.is_stop,
38
- name: e.event_name
38
+ name: e.event_name,
39
+ eventHidden: e.event_hidden
39
40
  };
40
41
  group.eventList.push(event);
41
42
  });
@@ -22,6 +22,8 @@ var BizEventSelector = function BizEventSelector(props) {
22
22
  var alias = props.alias,
23
23
  placeholder = props.placeholder,
24
24
  showAllEvent = props.showAllEvent,
25
+ border = props.border,
26
+ theme = props.theme,
25
27
  defaultSelectAble = props.defaultSelectAble;
26
28
 
27
29
  var _useState = useState(),
@@ -123,7 +125,7 @@ var BizEventSelector = function BizEventSelector(props) {
123
125
  };
124
126
 
125
127
  return /*#__PURE__*/React.createElement("div", {
126
- className: classPrefix
128
+ className: [classPrefix, border ? 'border' : ''].join(' ')
127
129
  }, /*#__PURE__*/React.createElement(Dropdown, {
128
130
  overlay: /*#__PURE__*/React.createElement(EventListPanel, {
129
131
  value: currentValue,
@@ -140,12 +142,13 @@ var BizEventSelector = function BizEventSelector(props) {
140
142
  onVisibleChange: onVisibleChange,
141
143
  getPopupContainer: props.popupContainer ? function () {
142
144
  return document.getElementById(selectId);
143
- } : undefined
145
+ } : undefined,
146
+ destroyPopupOnHide: props.defaultSelectAble
144
147
  }, /*#__PURE__*/React.createElement("div", {
145
148
  className: "".concat(classPrefix, "-handle"),
146
149
  id: selectId
147
150
  }, /*#__PURE__*/React.createElement(SelectHandle, {
148
- theme: "secondary",
151
+ theme: theme,
149
152
  border: false,
150
153
  label: getLabel(),
151
154
  placeholder: placeholder
@@ -155,6 +158,9 @@ var BizEventSelector = function BizEventSelector(props) {
155
158
  BizEventSelector.defaultProps = {
156
159
  showAllEvent: true,
157
160
  defaultSelectAble: true,
158
- popupContainer: true
161
+ popupContainer: true,
162
+ border: true,
163
+ theme: 'secondary',
164
+ destroyPopupOnHide: false
159
165
  };
160
166
  export default BizEventSelector;
@@ -24,6 +24,7 @@ import React, { useContext, useEffect, useState } from 'react';
24
24
  import InfiniteScroll from 'react-infinite-scroll-component';
25
25
  import { classPrefix } from '.';
26
26
  import { BizGlobalDataContext } from '..';
27
+ import { ShowStatus } from '../attributeSelector/types';
27
28
  import BizSearchInput from '../searchInput';
28
29
  import EventListOption from './option';
29
30
 
@@ -49,25 +50,20 @@ var EventListPanel = function EventListPanel(props) {
49
50
  currentGroup = _useState6[0],
50
51
  setCurrentGroup = _useState6[1];
51
52
 
52
- var _useState7 = useState(),
53
+ var _useState7 = useState([]),
53
54
  _useState8 = _slicedToArray(_useState7, 2),
54
- currentSelectGroup = _useState8[0],
55
- setCurrentSelectGroup = _useState8[1];
55
+ searchEventList = _useState8[0],
56
+ setSearchEventList = _useState8[1];
56
57
 
57
58
  var _useState9 = useState([]),
58
59
  _useState10 = _slicedToArray(_useState9, 2),
59
- searchEventList = _useState10[0],
60
- setSearchEventList = _useState10[1];
60
+ showList = _useState10[0],
61
+ setShowList = _useState10[1];
61
62
 
62
- var _useState11 = useState([]),
63
+ var _useState11 = useState(),
63
64
  _useState12 = _slicedToArray(_useState11, 2),
64
- showList = _useState12[0],
65
- setShowList = _useState12[1];
66
-
67
- var _useState13 = useState(),
68
- _useState14 = _slicedToArray(_useState13, 2),
69
- currentValue = _useState14[0],
70
- setCurrentValue = _useState14[1];
65
+ currentValue = _useState12[0],
66
+ setCurrentValue = _useState12[1];
71
67
 
72
68
  var overviewData = {
73
69
  id: -100,
@@ -97,7 +93,6 @@ var EventListPanel = function EventListPanel(props) {
97
93
  return [group].concat(_toConsumableArray(list));
98
94
  });
99
95
  setCurrentGroup(group);
100
- setCurrentSelectGroup(group);
101
96
  }, []);
102
97
  useEffect(function () {
103
98
  setCurrentValue(props.value);
@@ -139,10 +134,7 @@ var EventListPanel = function EventListPanel(props) {
139
134
  resVal.group = g;
140
135
  resVal.event = searchEventList[0];
141
136
  setCurrentValue(resVal);
142
- setCurrentSelectGroup(g);
143
137
  if (props.onChange) props.onChange(resVal);
144
- } else {
145
- setCurrentSelectGroup(g);
146
138
  }
147
139
  }
148
140
 
@@ -165,7 +157,7 @@ var EventListPanel = function EventListPanel(props) {
165
157
  count: group.eventList.length,
166
158
  label: group.name || '未分组',
167
159
  key: group.id || 'overview',
168
- checked: (currentSelectGroup === null || currentSelectGroup === void 0 ? void 0 : currentSelectGroup.id) === group.id,
160
+ checked: (currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id) === group.id,
169
161
  data: group,
170
162
  onClick: onClickGroup
171
163
  });
@@ -178,21 +170,24 @@ var EventListPanel = function EventListPanel(props) {
178
170
  },
179
171
  placeholder: "\u641C\u7D22\u57CB\u70B9\u4E8B\u4EF6"
180
172
  }), /*#__PURE__*/React.createElement("div", {
181
- className: "".concat(classPrefix, "-list")
173
+ className: "".concat(classPrefix, "-list"),
174
+ id: "scrollableDiv"
182
175
  }, /*#__PURE__*/React.createElement(InfiniteScroll, {
183
- dataLength: (showList === null || showList === void 0 ? void 0 : showList.length) || 0,
184
- next: loadMoreData,
185
- hasMore: (showList === null || showList === void 0 ? void 0 : showList.length) < searchEventList.length,
176
+ dataLength: showList.length,
177
+ hasMore: showList.length < searchEventList.length,
186
178
  loader: /*#__PURE__*/React.createElement(Skeleton, {
187
179
  paragraph: {
188
180
  rows: 1
189
181
  },
190
182
  active: true
191
183
  }),
192
- scrollableTarget: "scrollableDiv"
184
+ next: loadMoreData,
185
+ scrollableTarget: "scrollableDiv",
186
+ key: Math.random()
193
187
  }, showList === null || showList === void 0 ? void 0 : showList.map(function (e) {
194
188
  var _currentValue$event;
195
189
 
190
+ if (e.eventHidden === ShowStatus.hidden) return null;
196
191
  return /*#__PURE__*/React.createElement(EventListOption, {
197
192
  label: e.alias || e.name,
198
193
  key: "".concat(currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id, "-").concat(e.id),
@@ -1,12 +1,12 @@
1
1
  @import '../../assets/styles/inner.less';
2
2
 
3
3
  .biz-event-select {
4
- position: relative;
5
-
6
- &-handle {
7
- .__select-handle();
4
+ &.border {
5
+ .biz-event-select-handle {
6
+ .__select-handle();
7
+ }
8
8
  }
9
-
9
+ position: relative;
10
10
  &-list-panel {
11
11
  display: flex;
12
12
  flex-direction: row;
@@ -22,6 +22,10 @@ export declare namespace EventSelectTypes {
22
22
  showAllEvent?: boolean;
23
23
  defaultSelectAble?: boolean;
24
24
  popupContainer?: boolean;
25
+ onVisibleChange?: (visible: boolean) => void;
26
+ border?: boolean;
27
+ theme?: string;
28
+ destroyPopupOnHide?: boolean;
25
29
  onChange?: (val: Value) => void;
26
30
  }
27
31
  interface DropdownProps {
package/es/index.d.ts CHANGED
@@ -19,10 +19,11 @@ import convertAttributeData from './attributeSelector/util';
19
19
  import BizGlobalDataContext from './context';
20
20
  import BizUserCondition from './userCondition';
21
21
  import BizSearchInput from './searchInput';
22
+ import BizUserTagsSelect from './userTagsSelector';
22
23
  import BizAddToScene from './addToScene';
23
24
  import BizAddToPanel from './addToPanel';
24
25
  import setGlobalConfig from './config';
25
- export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, ajax, util, theme, convertAttributeData, setGlobalConfig, };
26
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
26
27
  export type { UserGroupTypes } from './userGroup/types';
27
28
  export type { BizSelectTypes } from './select/types';
28
29
  export type { AttributeSelect } from './attributeSelector/types';
package/es/index.js CHANGED
@@ -18,7 +18,8 @@ import convertAttributeData from './attributeSelector/util';
18
18
  import BizGlobalDataContext from './context';
19
19
  import BizUserCondition from './userCondition';
20
20
  import BizSearchInput from './searchInput';
21
+ import BizUserTagsSelect from './userTagsSelector';
21
22
  import BizAddToScene from './addToScene';
22
23
  import BizAddToPanel from './addToPanel';
23
24
  import setGlobalConfig from './config';
24
- export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, ajax, util, theme, convertAttributeData, setGlobalConfig };
25
+ export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
package/es/mock/event.js CHANGED
@@ -131,6 +131,139 @@ export default [{
131
131
  insert_time: '2018-11-26 14:46:48',
132
132
  owner: 'zg'
133
133
  }]
134
+ }, {
135
+ groupId: 6666,
136
+ groupName: '微信2',
137
+ eventList: [{
138
+ plats: [3],
139
+ click_analysis: false,
140
+ mark_type: null,
141
+ event_id: 24143017,
142
+ event_name: '微信-关注公众号',
143
+ event_hidden: 0,
144
+ event_type: 0,
145
+ is_stop: 0,
146
+ is_delete: 0,
147
+ alias_name: null,
148
+ event_attrs: [{
149
+ hidden: 0,
150
+ dimension_sub: 'event_attr',
151
+ encryption_type: 0,
152
+ alias_name: '',
153
+ value_dict: false,
154
+ attr_id: 30183430,
155
+ attr_name: '扫码场景描述',
156
+ event_id: 24143017,
157
+ prop_type: 1,
158
+ is_stop: 0
159
+ }, {
160
+ hidden: 0,
161
+ dimension_sub: 'event_attr',
162
+ encryption_type: 0,
163
+ alias_name: '',
164
+ value_dict: false,
165
+ attr_id: 30183425,
166
+ attr_name: '二维码ticket',
167
+ event_id: 24143017,
168
+ prop_type: 1,
169
+ is_stop: 0
170
+ }, {
171
+ hidden: 0,
172
+ dimension_sub: 'event_attr',
173
+ encryption_type: 0,
174
+ alias_name: '',
175
+ value_dict: false,
176
+ attr_id: 30183429,
177
+ attr_name: '公众号app_id',
178
+ event_id: 24143017,
179
+ prop_type: 1,
180
+ is_stop: 0
181
+ }, {
182
+ hidden: 0,
183
+ dimension_sub: 'event_attr',
184
+ encryption_type: 0,
185
+ alias_name: '',
186
+ value_dict: true,
187
+ attr_id: 30183423,
188
+ attr_name: '关注来源',
189
+ event_id: 24143017,
190
+ prop_type: 1,
191
+ is_stop: 0
192
+ }, {
193
+ hidden: 0,
194
+ dimension_sub: 'event_attr',
195
+ encryption_type: 0,
196
+ alias_name: '',
197
+ value_dict: false,
198
+ attr_id: 30183428,
199
+ attr_name: '用户open_id',
200
+ event_id: 24143017,
201
+ prop_type: 1,
202
+ is_stop: 0
203
+ }, {
204
+ hidden: 0,
205
+ dimension_sub: 'event_attr',
206
+ encryption_type: 0,
207
+ alias_name: '',
208
+ value_dict: false,
209
+ attr_id: 30183427,
210
+ attr_name: '公众号名称',
211
+ event_id: 24143017,
212
+ prop_type: 1,
213
+ is_stop: 0
214
+ }],
215
+ stop_date_time: null,
216
+ insert_time: '2018-11-26 14:46:48',
217
+ owner: 'zg'
218
+ }, {
219
+ plats: [3],
220
+ click_analysis: false,
221
+ mark_type: null,
222
+ event_id: 24143016,
223
+ event_name: '微信-取消关注公众号',
224
+ event_hidden: 0,
225
+ event_type: 0,
226
+ is_stop: 0,
227
+ is_delete: 0,
228
+ alias_name: null,
229
+ event_attrs: [{
230
+ hidden: 0,
231
+ dimension_sub: 'event_attr',
232
+ encryption_type: 0,
233
+ alias_name: '',
234
+ value_dict: false,
235
+ attr_id: 30183431,
236
+ attr_name: '用户open_id',
237
+ event_id: 24143016,
238
+ prop_type: 1,
239
+ is_stop: 0
240
+ }, {
241
+ hidden: 0,
242
+ dimension_sub: 'event_attr',
243
+ encryption_type: 0,
244
+ alias_name: '',
245
+ value_dict: false,
246
+ attr_id: 30183426,
247
+ attr_name: '公众号名称',
248
+ event_id: 24143016,
249
+ prop_type: 1,
250
+ is_stop: 0
251
+ }, {
252
+ hidden: 0,
253
+ dimension_sub: 'event_attr',
254
+ encryption_type: 0,
255
+ alias_name: '',
256
+ value_dict: false,
257
+ attr_id: 30183424,
258
+ attr_name: '公众号app_id',
259
+ event_id: 24143016,
260
+ prop_type: 1,
261
+ is_stop: 0
262
+ }],
263
+ stop_date_time: null,
264
+ insert_time: '2018-11-26 14:46:48',
265
+ owner: 'zg'
266
+ }]
134
267
  }, {
135
268
  groupId: 4200,
136
269
  groupName: '注册',
@@ -221,6 +354,87 @@ export default [{
221
354
  groupId: 4199,
222
355
  groupName: '官网',
223
356
  eventList: [{
357
+ plats: [3],
358
+ click_analysis: false,
359
+ mark_type: null,
360
+ event_id: 24143017,
361
+ event_name: '微信-关注公众号',
362
+ event_hidden: 0,
363
+ event_type: 0,
364
+ is_stop: 0,
365
+ is_delete: 0,
366
+ alias_name: null,
367
+ event_attrs: [{
368
+ hidden: 0,
369
+ dimension_sub: 'event_attr',
370
+ encryption_type: 0,
371
+ alias_name: '',
372
+ value_dict: false,
373
+ attr_id: 30183430,
374
+ attr_name: '扫码场景描述',
375
+ event_id: 24143017,
376
+ prop_type: 1,
377
+ is_stop: 0
378
+ }, {
379
+ hidden: 0,
380
+ dimension_sub: 'event_attr',
381
+ encryption_type: 0,
382
+ alias_name: '',
383
+ value_dict: false,
384
+ attr_id: 30183425,
385
+ attr_name: '二维码ticket',
386
+ event_id: 24143017,
387
+ prop_type: 1,
388
+ is_stop: 0
389
+ }, {
390
+ hidden: 0,
391
+ dimension_sub: 'event_attr',
392
+ encryption_type: 0,
393
+ alias_name: '',
394
+ value_dict: false,
395
+ attr_id: 30183429,
396
+ attr_name: '公众号app_id',
397
+ event_id: 24143017,
398
+ prop_type: 1,
399
+ is_stop: 0
400
+ }, {
401
+ hidden: 0,
402
+ dimension_sub: 'event_attr',
403
+ encryption_type: 0,
404
+ alias_name: '',
405
+ value_dict: true,
406
+ attr_id: 30183423,
407
+ attr_name: '关注来源',
408
+ event_id: 24143017,
409
+ prop_type: 1,
410
+ is_stop: 0
411
+ }, {
412
+ hidden: 0,
413
+ dimension_sub: 'event_attr',
414
+ encryption_type: 0,
415
+ alias_name: '',
416
+ value_dict: false,
417
+ attr_id: 30183428,
418
+ attr_name: '用户open_id',
419
+ event_id: 24143017,
420
+ prop_type: 1,
421
+ is_stop: 0
422
+ }, {
423
+ hidden: 0,
424
+ dimension_sub: 'event_attr',
425
+ encryption_type: 0,
426
+ alias_name: '',
427
+ value_dict: false,
428
+ attr_id: 30183427,
429
+ attr_name: '公众号名称',
430
+ event_id: 24143017,
431
+ prop_type: 1,
432
+ is_stop: 0
433
+ }],
434
+ stop_date_time: null,
435
+ insert_time: '2018-11-26 14:46:48',
436
+ owner: 'zg'
437
+ }, {
224
438
  plats: [3],
225
439
  click_analysis: false,
226
440
  mark_type: null,
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,81 @@
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 { BizSelect } from '@zgfe/business-lib';
15
+ import { Button } from 'antd';
16
+ var stringOperate = [{
17
+ name: '是',
18
+ value: 'equal'
19
+ }, {
20
+ name: '包含',
21
+ value: 'contains'
22
+ }, {
23
+ name: '不是',
24
+ value: 'not equal'
25
+ }, {
26
+ name: '不包含',
27
+ value: 'not contains'
28
+ }, {
29
+ name: '开头是',
30
+ value: 'begin with'
31
+ }, {
32
+ name: '结尾是',
33
+ value: 'end with'
34
+ }, {
35
+ name: '开头不是',
36
+ value: 'not begin with'
37
+ }, {
38
+ name: '结尾不是',
39
+ value: 'not end with'
40
+ }, {
41
+ name: '是空值',
42
+ value: 'is null'
43
+ }, {
44
+ name: '不是空值',
45
+ value: 'is not null'
46
+ }];
47
+ var disabledList = [{
48
+ value: 'not equal'
49
+ }, {
50
+ value: 'not begin with'
51
+ }];
52
+ export default (function () {
53
+ var _useState = useState([{
54
+ name: '不是',
55
+ value: 'not equal'
56
+ }]),
57
+ _useState2 = _slicedToArray(_useState, 2),
58
+ data = _useState2[0],
59
+ setData = _useState2[1];
60
+
61
+ var onChange = function onChange(value) {
62
+ console.log(value);
63
+ setData(function () {
64
+ return value;
65
+ });
66
+ };
67
+
68
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizSelect, {
69
+ options: stringOperate,
70
+ value: data,
71
+ labelField: "name",
72
+ keyField: "value",
73
+ theme: "secondary",
74
+ popupContainer: true,
75
+ onChange: onChange,
76
+ disableItemList: disabledList,
77
+ multiple: true
78
+ }, /*#__PURE__*/React.createElement(Button, {
79
+ type: "primary"
80
+ }, "\u70B9\u51FB\u6253\u5F00\u4E0B\u62C9")));
81
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { BizSelect } from '@zgfe/business-lib';
3
+ import userData from '../../mock/user';
4
+ import convertAttributeData from '../../attributeSelector/util';
5
+ export default (function () {
6
+ var store = convertAttributeData({
7
+ userPropList: userData
8
+ });
9
+
10
+ function renderLabel(node, option) {
11
+ return /*#__PURE__*/React.createElement(React.Fragment, null, node, option.realTime ? '*' : null);
12
+ }
13
+
14
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizSelect, {
15
+ options: store.userPropList,
16
+ customLabel: renderLabel,
17
+ labelField: "name",
18
+ keyField: "name",
19
+ theme: "secondary",
20
+ popupContainer: true,
21
+ enableSearch: true
22
+ }));
23
+ });
@@ -48,12 +48,18 @@ var disabledList = [{
48
48
  value: 'not equal'
49
49
  }, {
50
50
  value: 'not begin with'
51
+ }, {
52
+ name: '不是',
53
+ value: 'not equal'
51
54
  }];
52
55
  export default (function () {
53
- var _useState = useState({
54
- name: '不是',
55
- value: 'not equal'
56
- }),
56
+ var _useState = useState([].concat(disabledList, [{
57
+ name: '不是空值',
58
+ value: 'is not null'
59
+ }, {
60
+ name: '是',
61
+ value: 'equal'
62
+ }])),
57
63
  _useState2 = _slicedToArray(_useState, 2),
58
64
  data = _useState2[0],
59
65
  setData = _useState2[1];
@@ -40,10 +40,13 @@ var stringOperate = [{
40
40
  name: '是空值',
41
41
  value: 'is null'
42
42
  }, {
43
- name: '不是空值',
43
+ name: '不是空值aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
44
44
  value: 'is not null'
45
45
  }];
46
46
  var disabledList = [{
47
+ name: '是',
48
+ value: 'equal'
49
+ }, {
47
50
  name: '不包含',
48
51
  value: 'not contains'
49
52
  }, {
@@ -51,7 +54,10 @@ var disabledList = [{
51
54
  value: 'not begin with'
52
55
  }];
53
56
  export default (function () {
54
- var _useState = useState(),
57
+ var _useState = useState([].concat(disabledList, [{
58
+ name: '包含',
59
+ value: 'contains'
60
+ }])),
55
61
  _useState2 = _slicedToArray(_useState, 2),
56
62
  data = _useState2[0],
57
63
  setData = _useState2[1];
@@ -73,6 +79,7 @@ export default (function () {
73
79
  onChange: onChange,
74
80
  disableItemList: disabledList,
75
81
  multiple: true,
76
- enableCreate: true
82
+ enableCreate: true,
83
+ value: data
77
84
  }), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u503C\u662F\uFF1A", JSON.stringify(data)));
78
85
  });
@@ -78,11 +78,13 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
78
78
  color: "#fff"
79
79
  }, /*#__PURE__*/React.createElement(Tag, {
80
80
  closable: true,
81
- className: "".concat(classPrefix, "-tag"),
81
+ id: "".concat(classPrefix, "-tag"),
82
82
  onClose: function onClose() {
83
83
  onDelete(item);
84
84
  }
85
- }, item[labelField]));
85
+ }, /*#__PURE__*/React.createElement("div", {
86
+ className: "".concat(classPrefix, "-tag-label")
87
+ }, item[labelField])));
86
88
  }) : !focus ? /*#__PURE__*/React.createElement("span", {
87
89
  className: "".concat(classPrefix, "-holder")
88
90
  }, placeholder || '请选择') : '', /*#__PURE__*/React.createElement(Input, {
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import React, { PropsWithChildren } from 'react';
2
2
  import './styles/index.less';
3
3
  import { BizSelectTypes } from './types';
4
4
  export declare const classPrefix = "biz-select";
5
- declare const BizSelect: React.FC<BizSelectTypes.Props>;
5
+ declare const BizSelect: React.FC<PropsWithChildren<BizSelectTypes.Props>>;
6
6
  export default BizSelect;