@zgfe/business-lib 1.0.15-user.2 → 1.0.15
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/es/assets/styles/chunks.less +4 -3
- package/es/assets/styles/resetAntd.less +1 -40
- package/es/assets/theme.js +2 -0
- package/es/attrConditions/components/operateList.d.ts +0 -1
- package/es/attrConditions/components/operateList.js +2 -2
- package/es/attrConditions/components/stringList.d.ts +0 -1
- package/es/attrConditions/components/stringList.js +2 -2
- package/es/attrConditions/components/valuesList.d.ts +0 -1
- package/es/attrConditions/components/valuesList.js +4 -5
- package/es/attrConditions/demo/index.js +8 -7
- package/es/attrConditions/index.js +4 -14
- package/es/attrConditions/styles/index.less +2 -3
- package/es/attrConditions/types.d.ts +0 -3
- package/es/attrConditions/utils/operates.js +2 -2
- package/es/attributeSelector/index.js +4 -8
- package/es/attributeSelector/listPanel.js +19 -32
- package/es/attributeSelector/styles/index.less +3 -3
- package/es/attributeSelector/types.d.ts +0 -7
- package/es/attributeSelector/types.js +1 -8
- package/es/attributeSelector/util.js +2 -3
- package/es/eventSelector/index.js +4 -10
- package/es/eventSelector/listPanel.js +0 -2
- package/es/eventSelector/styles/index.less +5 -5
- package/es/eventSelector/types.d.ts +0 -4
- package/es/index.d.ts +2 -3
- package/es/index.js +2 -3
- package/es/mock/event.js +0 -214
- package/es/select/demo/index.js +4 -10
- package/es/select/demo/multiple.js +3 -10
- package/es/select/handle.js +2 -4
- package/es/select/index.d.ts +2 -2
- package/es/select/index.js +5 -7
- package/es/select/overlay.js +1 -1
- package/es/select/styles/handle.less +13 -23
- package/es/select/types.d.ts +1 -3
- package/es/userCondition/conditionTypeList.js +3 -14
- package/es/userCondition/conditionWrap.js +2 -4
- package/es/userCondition/conditions/eventCondition.js +4 -14
- package/es/userCondition/conditions/periodCondition.js +10 -20
- package/es/userCondition/conditions/propCondition.js +8 -28
- package/es/userCondition/conditions/runTimesCondition.js +2 -2
- package/es/userCondition/conditions/styles/eventCondition.less +6 -8
- package/es/userCondition/conditions/styles/periodCondition.less +0 -3
- package/es/userCondition/conditions/styles/propCondition.less +3 -3
- package/es/userCondition/conditions/styles/runTimesCondition.less +0 -3
- package/es/userCondition/demo/index.js +31 -234
- package/es/userCondition/index.d.ts +1 -1
- package/es/userCondition/index.js +11 -32
- package/es/userCondition/orConditions.js +28 -70
- package/es/userCondition/relationLabel.js +1 -6
- package/es/userCondition/styles/conditionTypeList.less +1 -1
- package/es/userCondition/styles/conditionWrap.less +0 -3
- package/es/userCondition/styles/index.less +1 -20
- package/es/userCondition/styles/orConditions.less +2 -20
- package/es/userCondition/styles/relationLabel.less +3 -4
- package/es/userCondition/types.d.ts +2 -21
- package/es/userCondition/util.d.ts +1 -5
- package/es/userCondition/util.js +0 -42
- package/es/utils/type.d.ts +2 -2
- package/package.json +2 -5
- package/es/assets/theme.d.ts +0 -15
- package/es/select/demo/children.d.ts +0 -2
- package/es/select/demo/children.js +0 -81
- package/es/userCondition/conditions/constants.d.ts +0 -21
- package/es/userCondition/conditions/constants.js +0 -21
- package/es/userCondition/conditions/styles/tagsCondition.less +0 -18
- package/es/userCondition/conditions/styles/textDesc.less +0 -17
- package/es/userCondition/conditions/tagsCondition.d.ts +0 -9
- package/es/userCondition/conditions/tagsCondition.js +0 -107
- package/es/userCondition/conditions/textDesc.d.ts +0 -9
- package/es/userCondition/conditions/textDesc.js +0 -197
- package/es/userTagsSelector/cascaderOverlay.d.ts +0 -5
- package/es/userTagsSelector/cascaderOverlay.js +0 -114
- package/es/userTagsSelector/components/search/index.d.ts +0 -8
- package/es/userTagsSelector/components/search/index.js +0 -16
- package/es/userTagsSelector/components/search/index.less +0 -6
- package/es/userTagsSelector/context.d.ts +0 -3
- package/es/userTagsSelector/context.js +0 -2
- package/es/userTagsSelector/demo/index.d.ts +0 -2
- package/es/userTagsSelector/demo/index.js +0 -48
- package/es/userTagsSelector/groups/groupOption.d.ts +0 -5
- package/es/userTagsSelector/groups/groupOption.js +0 -42
- package/es/userTagsSelector/groups/index.d.ts +0 -4
- package/es/userTagsSelector/groups/index.js +0 -86
- package/es/userTagsSelector/groups/styles/index.less +0 -0
- package/es/userTagsSelector/groups/styles/option.less +0 -50
- package/es/userTagsSelector/index.d.ts +0 -6
- package/es/userTagsSelector/index.js +0 -110
- package/es/userTagsSelector/multipleCheckPanel/checkOption.d.ts +0 -5
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +0 -45
- package/es/userTagsSelector/multipleCheckPanel/index.d.ts +0 -4
- package/es/userTagsSelector/multipleCheckPanel/index.js +0 -80
- package/es/userTagsSelector/multipleCheckPanel/styles/index.less +0 -0
- package/es/userTagsSelector/multipleCheckPanel/styles/option.less +0 -39
- package/es/userTagsSelector/styles/cascaderOverlay.less +0 -27
- package/es/userTagsSelector/styles/index.less +0 -10
- package/es/userTagsSelector/types.d.ts +0 -67
- package/es/userTagsSelector/types.js +0 -1
- package/es/userTagsSelector/util.d.ts +0 -4
- package/es/userTagsSelector/util.js +0 -38
package/es/mock/event.js
CHANGED
|
@@ -131,139 +131,6 @@ 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
|
-
}]
|
|
267
134
|
}, {
|
|
268
135
|
groupId: 4200,
|
|
269
136
|
groupName: '注册',
|
|
@@ -354,87 +221,6 @@ export default [{
|
|
|
354
221
|
groupId: 4199,
|
|
355
222
|
groupName: '官网',
|
|
356
223
|
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
|
-
}, {
|
|
438
224
|
plats: [3],
|
|
439
225
|
click_analysis: false,
|
|
440
226
|
mark_type: null,
|
package/es/select/demo/index.js
CHANGED
|
@@ -48,18 +48,12 @@ var disabledList = [{
|
|
|
48
48
|
value: 'not equal'
|
|
49
49
|
}, {
|
|
50
50
|
value: 'not begin with'
|
|
51
|
-
}, {
|
|
52
|
-
name: '不是',
|
|
53
|
-
value: 'not equal'
|
|
54
51
|
}];
|
|
55
52
|
export default (function () {
|
|
56
|
-
var _useState = useState(
|
|
57
|
-
name: '
|
|
58
|
-
value: '
|
|
59
|
-
},
|
|
60
|
-
name: '是',
|
|
61
|
-
value: 'equal'
|
|
62
|
-
}])),
|
|
53
|
+
var _useState = useState({
|
|
54
|
+
name: '不是',
|
|
55
|
+
value: 'not equal'
|
|
56
|
+
}),
|
|
63
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
64
58
|
data = _useState2[0],
|
|
65
59
|
setData = _useState2[1];
|
|
@@ -40,13 +40,10 @@ var stringOperate = [{
|
|
|
40
40
|
name: '是空值',
|
|
41
41
|
value: 'is null'
|
|
42
42
|
}, {
|
|
43
|
-
name: '不是空值
|
|
43
|
+
name: '不是空值',
|
|
44
44
|
value: 'is not null'
|
|
45
45
|
}];
|
|
46
46
|
var disabledList = [{
|
|
47
|
-
name: '是',
|
|
48
|
-
value: 'equal'
|
|
49
|
-
}, {
|
|
50
47
|
name: '不包含',
|
|
51
48
|
value: 'not contains'
|
|
52
49
|
}, {
|
|
@@ -54,10 +51,7 @@ var disabledList = [{
|
|
|
54
51
|
value: 'not begin with'
|
|
55
52
|
}];
|
|
56
53
|
export default (function () {
|
|
57
|
-
var _useState = useState(
|
|
58
|
-
name: '包含',
|
|
59
|
-
value: 'contains'
|
|
60
|
-
}])),
|
|
54
|
+
var _useState = useState(),
|
|
61
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
56
|
data = _useState2[0],
|
|
63
57
|
setData = _useState2[1];
|
|
@@ -79,7 +73,6 @@ export default (function () {
|
|
|
79
73
|
onChange: onChange,
|
|
80
74
|
disableItemList: disabledList,
|
|
81
75
|
multiple: true,
|
|
82
|
-
enableCreate: true
|
|
83
|
-
value: data
|
|
76
|
+
enableCreate: true
|
|
84
77
|
}), /*#__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)));
|
|
85
78
|
});
|
package/es/select/handle.js
CHANGED
|
@@ -81,13 +81,11 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
81
81
|
color: "#fff"
|
|
82
82
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
83
83
|
closable: true,
|
|
84
|
-
|
|
84
|
+
className: "".concat(classPrefix, "-tag"),
|
|
85
85
|
onClose: function onClose() {
|
|
86
86
|
onDelete(item);
|
|
87
87
|
}
|
|
88
|
-
},
|
|
89
|
-
className: "".concat(classPrefix, "-tag-label")
|
|
90
|
-
}, item[labelField])));
|
|
88
|
+
}, item[labelField]));
|
|
91
89
|
}) : !focus ? /*#__PURE__*/React.createElement("span", {
|
|
92
90
|
className: "".concat(classPrefix, "-holder")
|
|
93
91
|
}, placeholder || '请选择') : '', /*#__PURE__*/React.createElement(Input, {
|
package/es/select/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React 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<
|
|
5
|
+
declare const BizSelect: React.FC<BizSelectTypes.Props>;
|
|
6
6
|
export default BizSelect;
|
package/es/select/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
64
64
|
useEffect(function () {
|
|
65
65
|
var _boxRef$current;
|
|
66
66
|
|
|
67
|
-
setWidth((
|
|
67
|
+
setWidth(((_boxRef$current = boxRef.current) === null || _boxRef$current === void 0 ? void 0 : _boxRef$current.width) || 200);
|
|
68
68
|
|
|
69
69
|
if (props.defaultValue) {
|
|
70
70
|
setCurrent(getValue(props.defaultValue));
|
|
@@ -159,7 +159,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
159
159
|
setSearchValue('');
|
|
160
160
|
|
|
161
161
|
if (!props.multiple) {
|
|
162
|
-
|
|
162
|
+
setVisible(false);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
if (props.onChange) props.onChange(option);
|
|
@@ -167,7 +167,6 @@ var BizSelect = function BizSelect(props) {
|
|
|
167
167
|
|
|
168
168
|
var onVisibleChange = function onVisibleChange(flag) {
|
|
169
169
|
setVisible(flag);
|
|
170
|
-
props.onVisibleChange && props.onVisibleChange(flag);
|
|
171
170
|
};
|
|
172
171
|
|
|
173
172
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
@@ -179,7 +178,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
179
178
|
onChange: onChange
|
|
180
179
|
})),
|
|
181
180
|
disabled: props.disable,
|
|
182
|
-
destroyPopupOnHide:
|
|
181
|
+
destroyPopupOnHide: true,
|
|
183
182
|
overlayStyle: {
|
|
184
183
|
minWidth: minDropdownWidth || 0,
|
|
185
184
|
width: overlayWidth || width
|
|
@@ -194,7 +193,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
194
193
|
className: "".concat(classPrefix, "-handle ").concat(props.className ? props.className : ''),
|
|
195
194
|
ref: selectRef,
|
|
196
195
|
id: selectId
|
|
197
|
-
},
|
|
196
|
+
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
198
197
|
ref: boxRef,
|
|
199
198
|
value: current,
|
|
200
199
|
labelField: labelField,
|
|
@@ -215,7 +214,6 @@ var BizSelect = function BizSelect(props) {
|
|
|
215
214
|
BizSelect.defaultProps = {
|
|
216
215
|
labelField: 'label',
|
|
217
216
|
keyField: 'id',
|
|
218
|
-
popupContainer: true
|
|
219
|
-
destroyPopupOnHide: true
|
|
217
|
+
popupContainer: true
|
|
220
218
|
};
|
|
221
219
|
export default BizSelect;
|
package/es/select/overlay.js
CHANGED
|
@@ -100,7 +100,7 @@ var SelectOverlay = function SelectOverlay(props) {
|
|
|
100
100
|
if (searchValue && !new RegExp(searchValue, 'i').test(option[labelField])) return;
|
|
101
101
|
var disabled = false;
|
|
102
102
|
disableItemList === null || disableItemList === void 0 ? void 0 : disableItemList.forEach(function (item) {
|
|
103
|
-
if (item[keyField] === option[keyField]) {
|
|
103
|
+
if (item[keyField] === option[keyField] && (!current || current && ids.indexOf(option[keyField]) < 0)) {
|
|
104
104
|
disabled = true;
|
|
105
105
|
}
|
|
106
106
|
});
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
height: auto;
|
|
46
46
|
min-height: @height-lg;
|
|
47
47
|
overflow: visible;
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
&.sm {
|
|
50
50
|
height: auto;
|
|
51
51
|
min-height: @height-sm;
|
|
@@ -87,29 +87,19 @@
|
|
|
87
87
|
font-size: @font-size-lg;
|
|
88
88
|
transform: translateY(-50%);
|
|
89
89
|
}
|
|
90
|
-
&-input {
|
|
91
|
-
#biz-select-handle-tag {
|
|
92
|
-
display: flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
margin: 2px 4px 2px 0;
|
|
95
|
-
padding: 0 4px;
|
|
96
|
-
padding-top: 1px;
|
|
97
|
-
padding-bottom: 1px;
|
|
98
|
-
background: none;
|
|
99
|
-
border-color: #cacdd4;
|
|
100
|
-
border-radius: @border-radius-small;
|
|
101
|
-
&-label {
|
|
102
|
-
min-width: 0;
|
|
103
|
-
max-width: 100px;
|
|
104
|
-
overflow: hidden;
|
|
105
|
-
text-overflow: ellipsis;
|
|
106
|
-
}
|
|
107
|
-
&:hover {
|
|
108
|
-
.__default-hover();
|
|
109
90
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
91
|
+
&-tag {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
margin: 2px 4px 2px 0;
|
|
95
|
+
background: none;
|
|
96
|
+
border-color: #cacdd4;
|
|
97
|
+
|
|
98
|
+
&:hover {
|
|
99
|
+
.__default-hover();
|
|
100
|
+
|
|
101
|
+
.anticon {
|
|
102
|
+
color: @primary-color;
|
|
113
103
|
}
|
|
114
104
|
}
|
|
115
105
|
}
|
package/es/select/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare namespace BizSelectTypes {
|
|
|
6
6
|
}
|
|
7
7
|
interface Option {
|
|
8
8
|
icon?: ReactNode;
|
|
9
|
-
[otherProp: string
|
|
9
|
+
[otherProp: string]: any;
|
|
10
10
|
}
|
|
11
11
|
interface Props {
|
|
12
12
|
disable?: boolean;
|
|
@@ -34,8 +34,6 @@ export declare namespace BizSelectTypes {
|
|
|
34
34
|
notFound?: string | ReactNode;
|
|
35
35
|
loading?: boolean;
|
|
36
36
|
onChange?: (val: Option) => void;
|
|
37
|
-
onVisibleChange?: (visible: boolean) => void;
|
|
38
|
-
destroyPopupOnHide?: boolean;
|
|
39
37
|
}
|
|
40
38
|
interface OverlayProps {
|
|
41
39
|
option?: Option;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Space } from 'antd';
|
|
3
3
|
import { PlusOutlined } from '@ant-design/icons';
|
|
4
4
|
import './styles/conditionTypeList.less';
|
|
5
|
-
import { BizUserConditionContext } from '.';
|
|
6
5
|
|
|
7
6
|
var ConditionTypeList = function ConditionTypeList(props) {
|
|
8
7
|
var onAdd = props.onAdd,
|
|
9
8
|
label = props.label,
|
|
10
9
|
show = props.show;
|
|
11
|
-
|
|
12
|
-
var _useContext = useContext(BizUserConditionContext),
|
|
13
|
-
textMode = _useContext.textMode,
|
|
14
|
-
openTagCondition = _useContext.openTagCondition;
|
|
15
|
-
|
|
16
|
-
if (!show || textMode) return null;
|
|
10
|
+
if (!show) return null;
|
|
17
11
|
return /*#__PURE__*/React.createElement("div", {
|
|
18
12
|
className: "biz-user-condition-type-list"
|
|
19
13
|
}, label ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -40,12 +34,7 @@ var ConditionTypeList = function ConditionTypeList(props) {
|
|
|
40
34
|
onClick: function onClick() {
|
|
41
35
|
return onAdd('prop');
|
|
42
36
|
}
|
|
43
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u5C5E\u6027\u6EE1\u8DB3")))
|
|
44
|
-
className: "condition-type",
|
|
45
|
-
onClick: function onClick() {
|
|
46
|
-
return onAdd('tag');
|
|
47
|
-
}
|
|
48
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u6807\u7B7E"))) : null));
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u5C5E\u6027\u6EE1\u8DB3")))));
|
|
49
38
|
};
|
|
50
39
|
|
|
51
40
|
ConditionTypeList.defaultProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { CloseOutlined } from '@ant-design/icons';
|
|
3
3
|
import './styles/conditionWrap.less';
|
|
4
4
|
|
|
5
5
|
var ConditionWrap = function ConditionWrap(props) {
|
|
@@ -12,9 +12,7 @@ var ConditionWrap = function ConditionWrap(props) {
|
|
|
12
12
|
onClick: function onClick() {
|
|
13
13
|
return props.onDelte();
|
|
14
14
|
}
|
|
15
|
-
}, /*#__PURE__*/React.createElement(
|
|
16
|
-
type: "qingchu"
|
|
17
|
-
})));
|
|
15
|
+
}, /*#__PURE__*/React.createElement(CloseOutlined, null)));
|
|
18
16
|
};
|
|
19
17
|
|
|
20
18
|
export default ConditionWrap;
|
|
@@ -4,19 +4,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
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
6
|
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { RightOutlined } from '@ant-design/icons';
|
|
9
9
|
import BizEventSelector from '../../eventSelector';
|
|
10
10
|
import RunTimesCondition from './runTimesCondition';
|
|
11
11
|
import PeriodCondition from './periodCondition';
|
|
12
12
|
import PropCondition from './propCondition';
|
|
13
13
|
import './styles/eventCondition.less';
|
|
14
|
-
import {
|
|
14
|
+
import { classPrefix } from '..';
|
|
15
15
|
|
|
16
16
|
var EventCondition = function EventCondition(props) {
|
|
17
|
-
var _useContext = useContext(BizUserConditionContext),
|
|
18
|
-
isRealTime = _useContext.isRealTime;
|
|
19
|
-
|
|
20
17
|
var condition = props.condition,
|
|
21
18
|
dataId = props.dataId;
|
|
22
19
|
|
|
@@ -26,7 +23,6 @@ var EventCondition = function EventCondition(props) {
|
|
|
26
23
|
|
|
27
24
|
function onEventChange(data) {
|
|
28
25
|
var event = data.event;
|
|
29
|
-
console.log(condition);
|
|
30
26
|
onChange(_objectSpread(_objectSpread({}, condition), {}, {
|
|
31
27
|
eventId: event.id
|
|
32
28
|
}));
|
|
@@ -74,12 +70,7 @@ var EventCondition = function EventCondition(props) {
|
|
|
74
70
|
id: condition.eventId
|
|
75
71
|
}
|
|
76
72
|
},
|
|
77
|
-
onChange: onEventChange
|
|
78
|
-
border: false,
|
|
79
|
-
theme: "normal",
|
|
80
|
-
placeholder: "\u9009\u62E9\u4E00\u4E2A\u4E8B\u4EF6",
|
|
81
|
-
destroyPopupOnHide: true,
|
|
82
|
-
defaultSelectAble: false
|
|
73
|
+
onChange: onEventChange
|
|
83
74
|
})), /*#__PURE__*/React.createElement("div", {
|
|
84
75
|
className: "".concat(classPrefix, "-event-condition-expand-attr"),
|
|
85
76
|
onClick: onAddAttr
|
|
@@ -106,8 +97,7 @@ var EventCondition = function EventCondition(props) {
|
|
|
106
97
|
dataId: dataId,
|
|
107
98
|
runPeriod: condition.runPeriod,
|
|
108
99
|
onChange: onPeriodChange,
|
|
109
|
-
isEvent: true
|
|
110
|
-
isRealTime: isRealTime
|
|
100
|
+
isEvent: true
|
|
111
101
|
})))));
|
|
112
102
|
};
|
|
113
103
|
|
|
@@ -4,14 +4,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
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
6
|
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import BizSelect from '../../select';
|
|
9
9
|
import { Input, DatePicker, Checkbox } from 'antd';
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import './styles/periodCondition.less';
|
|
12
12
|
import { classPrefix } from '..';
|
|
13
|
-
import { operatorMap } from './constants';
|
|
14
13
|
var RangePicker = DatePicker.RangePicker;
|
|
14
|
+
var operatorMap = {
|
|
15
|
+
relative: '最近',
|
|
16
|
+
absolute: '固定时段',
|
|
17
|
+
unlimited_time: '任意时间',
|
|
18
|
+
join_time: '新增后'
|
|
19
|
+
};
|
|
15
20
|
|
|
16
21
|
var PeriodCondition = function PeriodCondition(props) {
|
|
17
22
|
var dataId = props.dataId,
|
|
@@ -31,21 +36,11 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
31
36
|
text: '任意时间',
|
|
32
37
|
value: 'unlimited_time'
|
|
33
38
|
}, {
|
|
34
|
-
text: '
|
|
39
|
+
text: '新增后',
|
|
35
40
|
value: 'join_time'
|
|
36
41
|
}]);
|
|
37
42
|
}
|
|
38
43
|
|
|
39
|
-
var unit = useMemo(function () {
|
|
40
|
-
if (runPeriod.operator === 'absolute' || runPeriod.operator === 'unlimited_time') {
|
|
41
|
-
return '';
|
|
42
|
-
} else if (runPeriod.operator === 'relative') {
|
|
43
|
-
return '天';
|
|
44
|
-
} else if (runPeriod.operator === 'join_time') {
|
|
45
|
-
return '天内';
|
|
46
|
-
}
|
|
47
|
-
}, [runPeriod.operator]);
|
|
48
|
-
|
|
49
44
|
function onChange(data) {
|
|
50
45
|
props.onChange(dataId, data);
|
|
51
46
|
}
|
|
@@ -132,12 +127,7 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
132
127
|
}, label) : null, /*#__PURE__*/React.createElement("div", {
|
|
133
128
|
className: "".concat(classPrefix, "-period-condition-operator")
|
|
134
129
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
135
|
-
|
|
136
|
-
style: {
|
|
137
|
-
lineHeight: '29px'
|
|
138
|
-
}
|
|
139
|
-
}, "*\u7528\u6237\u65B0\u589E\u6570\u636E\u4E3A\u6BCF\u65E5\u51CC\u6668\u751F\u6210") : null,
|
|
140
|
-
overlayWidth: isEvent ? 210 : 114,
|
|
130
|
+
overlayWidth: 129,
|
|
141
131
|
options: options,
|
|
142
132
|
labelField: "text",
|
|
143
133
|
keyField: "value",
|
|
@@ -150,7 +140,7 @@ var PeriodCondition = function PeriodCondition(props) {
|
|
|
150
140
|
className: "".concat(classPrefix, "-period-condition-values")
|
|
151
141
|
}, renderValues()), /*#__PURE__*/React.createElement("div", {
|
|
152
142
|
className: "".concat(classPrefix, "-period-condition-unit")
|
|
153
|
-
},
|
|
143
|
+
}, "\u5929"), props.isRealTime && runPeriod.operator === 'relative' ? /*#__PURE__*/React.createElement("div", {
|
|
154
144
|
className: "".concat(classPrefix, "-period-condition-today")
|
|
155
145
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
156
146
|
checked: runPeriod.values[1] === '1',
|