@zgfe/business-lib 1.0.18-esfix.0 → 1.0.18-esfix.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/es/assets/styles/chunks.less +3 -4
- package/es/assets/styles/resetAntd.less +47 -11
- package/es/attrConditions/components/operateList.d.ts +1 -0
- package/es/attrConditions/components/operateList.js +2 -2
- package/es/attrConditions/components/stringList.d.ts +1 -0
- package/es/attrConditions/components/stringList.js +2 -2
- package/es/attrConditions/components/valuesList.d.ts +1 -0
- package/es/attrConditions/components/valuesList.js +5 -4
- package/es/attrConditions/index.js +14 -4
- package/es/attrConditions/styles/index.less +5 -4
- package/es/attrConditions/types.d.ts +3 -0
- package/es/attrConditions/utils/operates.js +2 -2
- package/es/attributeSelector/index.js +8 -4
- package/es/attributeSelector/listPanel.js +32 -19
- package/es/attributeSelector/styles/index.less +3 -3
- package/es/attributeSelector/types.d.ts +7 -0
- package/es/attributeSelector/types.js +8 -1
- package/es/attributeSelector/util.js +3 -2
- package/es/eventSelector/index.js +10 -4
- package/es/eventSelector/listPanel.js +2 -0
- package/es/eventSelector/styles/index.less +5 -5
- package/es/eventSelector/types.d.ts +4 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/mock/event.js +214 -0
- package/es/select/demo/children.d.ts +2 -0
- package/es/select/demo/children.js +81 -0
- package/es/select/demo/customLabel.d.ts +2 -0
- package/es/select/demo/customLabel.js +23 -0
- package/es/select/demo/index.js +10 -4
- package/es/select/demo/multiple.js +10 -3
- package/es/select/handle.js +4 -2
- package/es/select/index.d.ts +2 -2
- package/es/select/index.js +7 -5
- package/es/select/option.js +8 -2
- package/es/select/overlay.js +5 -3
- package/es/select/styles/handle.less +23 -13
- package/es/select/types.d.ts +5 -1
- package/es/userCondition/conditionTypeList.js +29 -6
- package/es/userCondition/conditionWrap.js +4 -2
- package/es/userCondition/conditions/constants.d.ts +24 -0
- package/es/userCondition/conditions/constants.js +41 -0
- package/es/userCondition/conditions/eventCondition.js +13 -4
- package/es/userCondition/conditions/periodCondition.js +21 -10
- package/es/userCondition/conditions/propCondition.js +25 -6
- package/es/userCondition/conditions/runTimesCondition.js +2 -2
- package/es/userCondition/conditions/styles/eventCondition.less +9 -7
- package/es/userCondition/conditions/styles/periodCondition.less +12 -0
- package/es/userCondition/conditions/styles/propCondition.less +11 -3
- package/es/userCondition/conditions/styles/runTimesCondition.less +3 -0
- package/es/userCondition/conditions/styles/tagsCondition.less +20 -0
- package/es/userCondition/conditions/styles/textDesc.less +17 -0
- package/es/userCondition/conditions/tagsCondition.d.ts +9 -0
- package/es/userCondition/conditions/tagsCondition.js +107 -0
- package/es/userCondition/conditions/textDesc.d.ts +9 -0
- package/es/userCondition/conditions/textDesc.js +241 -0
- package/es/userCondition/demo/index.js +260 -31
- package/es/userCondition/index.d.ts +1 -1
- package/es/userCondition/index.js +52 -10
- package/es/userCondition/orConditions.js +69 -28
- package/es/userCondition/relationLabel.js +6 -1
- package/es/userCondition/styles/conditionTypeList.less +1 -1
- package/es/userCondition/styles/conditionWrap.less +3 -0
- package/es/userCondition/styles/index.less +21 -1
- package/es/userCondition/styles/orConditions.less +20 -2
- package/es/userCondition/styles/relationLabel.less +5 -4
- package/es/userCondition/types.d.ts +28 -2
- package/es/userCondition/util.d.ts +5 -1
- package/es/userCondition/util.js +42 -0
- package/es/userTagsSelector/cascaderOverlay.d.ts +5 -0
- package/es/userTagsSelector/cascaderOverlay.js +114 -0
- package/es/userTagsSelector/components/search/index.d.ts +8 -0
- package/es/userTagsSelector/components/search/index.js +16 -0
- package/es/userTagsSelector/components/search/index.less +6 -0
- package/es/userTagsSelector/context.d.ts +3 -0
- package/es/userTagsSelector/context.js +2 -0
- package/es/userTagsSelector/demo/index.d.ts +2 -0
- package/es/userTagsSelector/demo/index.js +48 -0
- package/es/userTagsSelector/groups/groupOption.d.ts +5 -0
- package/es/userTagsSelector/groups/groupOption.js +42 -0
- package/es/userTagsSelector/groups/index.d.ts +4 -0
- package/es/userTagsSelector/groups/index.js +86 -0
- package/es/userTagsSelector/groups/styles/index.less +0 -0
- package/es/userTagsSelector/groups/styles/option.less +50 -0
- package/es/userTagsSelector/index.d.ts +6 -0
- package/es/userTagsSelector/index.js +110 -0
- package/es/userTagsSelector/multipleCheckPanel/checkOption.d.ts +5 -0
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +45 -0
- package/es/userTagsSelector/multipleCheckPanel/index.d.ts +4 -0
- package/es/userTagsSelector/multipleCheckPanel/index.js +80 -0
- package/es/userTagsSelector/multipleCheckPanel/styles/index.less +0 -0
- package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -0
- package/es/userTagsSelector/styles/cascaderOverlay.less +27 -0
- package/es/userTagsSelector/styles/index.less +10 -0
- package/es/userTagsSelector/types.d.ts +67 -0
- package/es/userTagsSelector/types.js +1 -0
- package/es/userTagsSelector/util.d.ts +4 -0
- package/es/userTagsSelector/util.js +38 -0
- package/es/utils/type.d.ts +2 -2
- package/package.json +6 -7
|
@@ -50,15 +50,14 @@
|
|
|
50
50
|
.__default-hover();
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
&.active {
|
|
53
|
+
&.active:not(.biz-select-option-multiple) {
|
|
54
54
|
color: #fff;
|
|
55
55
|
background: @primary-color;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
&.disabled {
|
|
59
59
|
color: @disabled-color;
|
|
60
60
|
cursor: not-allowed;
|
|
61
|
-
|
|
62
61
|
&:hover {
|
|
63
62
|
background: none;
|
|
64
63
|
}
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
cursor: not-allowed;
|
|
88
87
|
|
|
89
88
|
&:hover {
|
|
90
|
-
background-color:
|
|
89
|
+
background-color: unset;
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
|
|
@@ -144,6 +144,14 @@
|
|
|
144
144
|
.ant-picker-active-bar {
|
|
145
145
|
display: none !important;
|
|
146
146
|
}
|
|
147
|
+
|
|
148
|
+
&.ant-picker-range {
|
|
149
|
+
background-color: @background-color-base;
|
|
150
|
+
border: none;
|
|
151
|
+
&.ant-picker-large {
|
|
152
|
+
height: 40px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
/*日历下拉框*/
|
|
@@ -297,10 +305,14 @@
|
|
|
297
305
|
}
|
|
298
306
|
|
|
299
307
|
.ant-modal-body {
|
|
308
|
+
max-height: 400px;
|
|
300
309
|
max-height: 400px !important;
|
|
301
310
|
padding-top: @padding-xs !important;
|
|
302
|
-
padding-bottom: 0 !important;
|
|
311
|
+
// padding-bottom: 0 !important;
|
|
303
312
|
overflow: auto !important;
|
|
313
|
+
&:not(:last-child) {
|
|
314
|
+
padding-bottom: 0 !important;
|
|
315
|
+
}
|
|
304
316
|
}
|
|
305
317
|
}
|
|
306
318
|
|
|
@@ -370,10 +382,6 @@
|
|
|
370
382
|
&::before {
|
|
371
383
|
width: 0 !important;
|
|
372
384
|
}
|
|
373
|
-
|
|
374
|
-
&.ant-table-cell-fix-left-last {
|
|
375
|
-
border-right: 1px solid @border-color-base!important;
|
|
376
|
-
}
|
|
377
385
|
}
|
|
378
386
|
|
|
379
387
|
.ant-table-tbody {
|
|
@@ -386,12 +394,6 @@
|
|
|
386
394
|
|
|
387
395
|
.ant-table-tbody > tr > td {
|
|
388
396
|
line-height: 15px !important;
|
|
389
|
-
|
|
390
|
-
&.ant-table-cell-fix-left {
|
|
391
|
-
&.ant-table-cell-fix-left-last {
|
|
392
|
-
border-right: 1px solid @border-color-base!important;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
397
|
}
|
|
396
398
|
}
|
|
397
399
|
|
|
@@ -399,8 +401,33 @@
|
|
|
399
401
|
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
|
|
400
402
|
background: color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
401
403
|
}
|
|
404
|
+
.ant-table-thead {
|
|
405
|
+
.ant-table-cell {
|
|
406
|
+
&.ant-table-column-has-sorters {
|
|
407
|
+
.ant-table-column-sorters {
|
|
408
|
+
justify-content: flex-start;
|
|
409
|
+
.ant-table-column-title {
|
|
410
|
+
flex: none;
|
|
411
|
+
}
|
|
412
|
+
.ant-table-column-sorter {
|
|
413
|
+
margin-left: @margin-xs;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
//气泡弹框
|
|
422
|
+
.ant-popover-inner {
|
|
423
|
+
border-radius: @border-radius-small;
|
|
402
424
|
}
|
|
403
425
|
|
|
426
|
+
//tooltip
|
|
427
|
+
.ant-tooltip-inner {
|
|
428
|
+
padding: @margin-sm @margin-md;
|
|
429
|
+
border-radius: @border-radius-normal;
|
|
430
|
+
}
|
|
404
431
|
/* 提示框 */
|
|
405
432
|
.ant-tooltip-inner {
|
|
406
433
|
padding: @padding-sm @padding-md!important;
|
|
@@ -432,3 +459,12 @@
|
|
|
432
459
|
.ant-form-item-explain-error {
|
|
433
460
|
color: @error-color!important;
|
|
434
461
|
}
|
|
462
|
+
|
|
463
|
+
//dropdown
|
|
464
|
+
.ant-dropdown {
|
|
465
|
+
z-index: 6666 !important;
|
|
466
|
+
}
|
|
467
|
+
//message
|
|
468
|
+
.ant-message {
|
|
469
|
+
z-index: 99999 !important;
|
|
470
|
+
}
|
|
@@ -67,7 +67,7 @@ var BizOperateList = function BizOperateList(props) {
|
|
|
67
67
|
if (!props.attr || !current || !options.length) {
|
|
68
68
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
69
69
|
className: "".concat(classPrefix, "-single-select"),
|
|
70
|
-
theme:
|
|
70
|
+
theme: props.theme,
|
|
71
71
|
disable: true,
|
|
72
72
|
options: []
|
|
73
73
|
});
|
|
@@ -79,7 +79,7 @@ var BizOperateList = function BizOperateList(props) {
|
|
|
79
79
|
value: current,
|
|
80
80
|
labelField: "name",
|
|
81
81
|
keyField: "value",
|
|
82
|
-
theme:
|
|
82
|
+
theme: props.theme,
|
|
83
83
|
options: options,
|
|
84
84
|
onChange: onChange
|
|
85
85
|
});
|
|
@@ -164,7 +164,7 @@ var StringList = function StringList(props) {
|
|
|
164
164
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
165
165
|
multiple: true,
|
|
166
166
|
enableCreate: true,
|
|
167
|
-
theme:
|
|
167
|
+
theme: props.theme,
|
|
168
168
|
size: "base",
|
|
169
169
|
className: "".concat(classPrefix, "-multi-select"),
|
|
170
170
|
options: [],
|
|
@@ -177,7 +177,7 @@ var StringList = function StringList(props) {
|
|
|
177
177
|
value: current,
|
|
178
178
|
multiple: true,
|
|
179
179
|
enableCreate: true,
|
|
180
|
-
theme:
|
|
180
|
+
theme: props.theme,
|
|
181
181
|
size: "base",
|
|
182
182
|
disable: props.operate === OperateTypes.IsNull || props.operate === OperateTypes.IsNotNull,
|
|
183
183
|
labelField: "name",
|
|
@@ -27,7 +27,8 @@ var ValuesList = function ValuesList(props) {
|
|
|
27
27
|
var attr = props.attr,
|
|
28
28
|
defaultValue = props.defaultValue,
|
|
29
29
|
operate = props.operate,
|
|
30
|
-
includeToday = props.includeToday
|
|
30
|
+
includeToday = props.includeToday,
|
|
31
|
+
theme = props.theme;
|
|
31
32
|
var initValue = [moment().subtract(1, 'weeks').format('YYYY-MM-DD'), moment().subtract(includeToday ? 0 : 1, 'days').format('YYYY-MM-DD')];
|
|
32
33
|
|
|
33
34
|
var _useState = useState(),
|
|
@@ -119,14 +120,14 @@ var ValuesList = function ValuesList(props) {
|
|
|
119
120
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
120
121
|
disable: true,
|
|
121
122
|
className: "".concat(classPrefix, "-multi-select"),
|
|
122
|
-
theme:
|
|
123
|
-
size: "base",
|
|
123
|
+
theme: theme,
|
|
124
124
|
options: []
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
if (attr.type === PropType.STRING) {
|
|
129
129
|
return /*#__PURE__*/React.createElement(StringList, {
|
|
130
|
+
theme: theme,
|
|
130
131
|
attr: attr,
|
|
131
132
|
operate: operate,
|
|
132
133
|
value: current,
|
|
@@ -139,7 +140,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
139
140
|
},
|
|
140
141
|
keyField: "value",
|
|
141
142
|
labelField: "label",
|
|
142
|
-
theme:
|
|
143
|
+
theme: props.theme,
|
|
143
144
|
className: "".concat(classPrefix, "-input-select"),
|
|
144
145
|
onChange: onChangeUnit,
|
|
145
146
|
options: propSubtype
|
|
@@ -28,7 +28,9 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
28
28
|
enableEventProp = props.enableEventProp,
|
|
29
29
|
enableUserProp = props.enableUserProp,
|
|
30
30
|
enableEnvProp = props.enableEnvProp,
|
|
31
|
-
disableItemList = props.disableItemList
|
|
31
|
+
disableItemList = props.disableItemList,
|
|
32
|
+
border = props.border,
|
|
33
|
+
theme = props.theme;
|
|
32
34
|
|
|
33
35
|
var _useState = useState(),
|
|
34
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -132,7 +134,7 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
132
134
|
};
|
|
133
135
|
|
|
134
136
|
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: classPrefix
|
|
137
|
+
className: [classPrefix, border ? 'border' : ''].join(' ')
|
|
136
138
|
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
137
139
|
loading: ready,
|
|
138
140
|
active: true,
|
|
@@ -148,10 +150,13 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
148
150
|
enableEnvProp: enableEnvProp,
|
|
149
151
|
disableItemList: disableItemList,
|
|
150
152
|
onChange: onChangeAttr,
|
|
151
|
-
onDelete: onDelete
|
|
153
|
+
onDelete: onDelete,
|
|
154
|
+
theme: theme,
|
|
155
|
+
destroyPopupOnHide: props.destroyPopupOnHide
|
|
152
156
|
}), /*#__PURE__*/React.createElement("div", {
|
|
153
157
|
className: "".concat(classPrefix, "-panel")
|
|
154
158
|
}, /*#__PURE__*/React.createElement(BizOperateList, {
|
|
159
|
+
theme: theme,
|
|
155
160
|
attr: attr,
|
|
156
161
|
defaultValue: operate,
|
|
157
162
|
onChange: onChangeOperate
|
|
@@ -159,8 +164,13 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
159
164
|
attr: attr,
|
|
160
165
|
operate: operate,
|
|
161
166
|
defaultValue: values,
|
|
162
|
-
onChange: onChangeValues
|
|
167
|
+
onChange: onChangeValues,
|
|
168
|
+
theme: theme
|
|
163
169
|
}))));
|
|
164
170
|
};
|
|
165
171
|
|
|
172
|
+
BizConditionItem.defaultProps = {
|
|
173
|
+
border: true,
|
|
174
|
+
theme: 'secondary'
|
|
175
|
+
};
|
|
166
176
|
export default BizConditionItem;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
/* 筛选条件 */
|
|
4
4
|
.biz-condition-item {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
&.border {
|
|
6
|
+
.__select-handle();
|
|
7
|
+
}
|
|
7
8
|
&-panel {
|
|
8
9
|
display: flex;
|
|
9
10
|
width: 100%;
|
|
@@ -60,15 +61,15 @@
|
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
&-input {
|
|
64
|
+
flex: 1;
|
|
63
65
|
.ant-input-group-addon {
|
|
64
|
-
background-color: @background-color-gray !important;
|
|
66
|
+
// background-color: @background-color-gray !important;
|
|
65
67
|
border: none;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
&-select {
|
|
69
71
|
width: 60px;
|
|
70
72
|
border: none;
|
|
71
|
-
border-left: 1px solid @border-color-split;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -6,6 +6,7 @@ interface BasicAttrTypes {
|
|
|
6
6
|
enableUserProp?: boolean;
|
|
7
7
|
enableEnvProp?: boolean;
|
|
8
8
|
disableItemList?: (EventProp | UserProp | EnvProp)[];
|
|
9
|
+
theme?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare namespace AttrConditionTypes {
|
|
11
12
|
interface ItemValue {
|
|
@@ -28,6 +29,8 @@ export declare namespace AttrConditionTypes {
|
|
|
28
29
|
value?: ItemValue;
|
|
29
30
|
onChange?: (value: ItemValue) => void;
|
|
30
31
|
onDelete?: (value?: ItemValue) => void;
|
|
32
|
+
border?: boolean;
|
|
33
|
+
destroyPopupOnHide?: boolean;
|
|
31
34
|
}
|
|
32
35
|
interface GroupProp extends BasicAttrTypes {
|
|
33
36
|
defaultValue?: GroupValue;
|
|
@@ -26,7 +26,8 @@ import SelectHandle from '../select/handle';
|
|
|
26
26
|
|
|
27
27
|
var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
28
28
|
var enableDelete = props.enableDelete,
|
|
29
|
-
placeholder = props.placeholder
|
|
29
|
+
placeholder = props.placeholder,
|
|
30
|
+
theme = props.theme;
|
|
30
31
|
|
|
31
32
|
var _useState = useState(),
|
|
32
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -120,14 +121,15 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
120
121
|
width: width
|
|
121
122
|
},
|
|
122
123
|
visible: visible,
|
|
123
|
-
onVisibleChange: onVisibleChange
|
|
124
|
+
onVisibleChange: onVisibleChange,
|
|
125
|
+
destroyPopupOnHide: props.destroyPopupOnHide
|
|
124
126
|
}, /*#__PURE__*/React.createElement("div", {
|
|
125
127
|
style: {
|
|
126
128
|
width: '100%'
|
|
127
129
|
}
|
|
128
130
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
129
131
|
ref: boxRef,
|
|
130
|
-
theme:
|
|
132
|
+
theme: theme,
|
|
131
133
|
border: false,
|
|
132
134
|
label: currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.label,
|
|
133
135
|
placeholder: placeholder
|
|
@@ -145,7 +147,9 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
145
147
|
BizAttributeSelector.defaultProps = {
|
|
146
148
|
enableDelete: false,
|
|
147
149
|
placeholder: '请选择',
|
|
150
|
+
theme: 'secondary',
|
|
148
151
|
propSymbol: '*',
|
|
149
|
-
optionsHeaderTip: '带*的属性每日凌晨更新'
|
|
152
|
+
optionsHeaderTip: '带*的属性每日凌晨更新',
|
|
153
|
+
destroyPopupOnHide: false
|
|
150
154
|
};
|
|
151
155
|
export default BizAttributeSelector;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
+
|
|
1
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
10
|
|
|
3
11
|
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."); }
|
|
@@ -11,7 +19,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
11
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
20
|
|
|
13
21
|
import { Anchor, Button } from 'antd';
|
|
14
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
22
|
+
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
15
23
|
import { BizGlobalDataContext } from '..';
|
|
16
24
|
import BizSearchInput from '../searchInput';
|
|
17
25
|
import Option from './option';
|
|
@@ -46,6 +54,17 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
46
54
|
currentAttr = _useState6[0],
|
|
47
55
|
setCurrentAttr = _useState6[1];
|
|
48
56
|
|
|
57
|
+
var eventIdMap = useMemo(function () {
|
|
58
|
+
var eventIdMap = {};
|
|
59
|
+
var eventList = (eventGroupList || []).reduce(function (pre, group) {
|
|
60
|
+
return [].concat(_toConsumableArray(pre), _toConsumableArray(group.eventList));
|
|
61
|
+
}, []);
|
|
62
|
+
eventList.forEach(function (event) {
|
|
63
|
+
if (eventIdMap[event.id]) return;
|
|
64
|
+
eventIdMap[event.id] = event;
|
|
65
|
+
});
|
|
66
|
+
return eventIdMap;
|
|
67
|
+
}, [eventGroupList]);
|
|
49
68
|
var disableItemlist = (_props$disableItemLis = props.disableItemList) === null || _props$disableItemLis === void 0 ? void 0 : _props$disableItemLis.map(function (item) {
|
|
50
69
|
if (item.propCategory === 'envProp') {
|
|
51
70
|
item.key = "envProp-".concat(item.name);
|
|
@@ -69,23 +88,17 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
69
88
|
|
|
70
89
|
if (enableEventProp) {
|
|
71
90
|
var hasAnchor = false;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
hasAnchor = true;
|
|
84
|
-
event.attrList.forEach(function (attr) {
|
|
85
|
-
group.children.push(attr);
|
|
86
|
-
});
|
|
87
|
-
list.push(group);
|
|
88
|
-
});
|
|
91
|
+
eventIdList === null || eventIdList === void 0 ? void 0 : eventIdList.forEach(function (id) {
|
|
92
|
+
var event = eventIdMap[id];
|
|
93
|
+
if (!event) return;
|
|
94
|
+
var group = {
|
|
95
|
+
isEvent: true,
|
|
96
|
+
groupName: event.alias || event.name,
|
|
97
|
+
anchor: hasAnchor ? String(Math.random()) : anchor.event,
|
|
98
|
+
key: "event-".concat(event.id),
|
|
99
|
+
children: event.attrList.slice()
|
|
100
|
+
};
|
|
101
|
+
list.push(group);
|
|
89
102
|
});
|
|
90
103
|
}
|
|
91
104
|
|
|
@@ -110,7 +123,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
setOptionList(list);
|
|
113
|
-
}, [
|
|
126
|
+
}, [eventIdMap, userPropList, eventEnvList, eventIdList]);
|
|
114
127
|
useEffect(function () {
|
|
115
128
|
setCurrentAttr(props.value);
|
|
116
129
|
}, [props.value]);
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
flex-direction: row;
|
|
6
6
|
.__select-handle();
|
|
7
7
|
&:hover .biz-attr-select-del-icon {
|
|
8
|
-
display:
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
13
|
&-del-icon {
|
|
@@ -13,8 +15,6 @@
|
|
|
13
15
|
flex: none;
|
|
14
16
|
width: @icon-width;
|
|
15
17
|
color: @text-color-secondary;
|
|
16
|
-
line-height: 2em;
|
|
17
|
-
text-align: center;
|
|
18
18
|
border-radius: @border-radius-small;
|
|
19
19
|
|
|
20
20
|
&:hover {
|
|
@@ -9,6 +9,10 @@ export declare enum PropCategory {
|
|
|
9
9
|
UserProp = "userProp",
|
|
10
10
|
EnvProp = "envProp"
|
|
11
11
|
}
|
|
12
|
+
export declare enum ShowStatus {
|
|
13
|
+
show = 0,
|
|
14
|
+
hidden = 1
|
|
15
|
+
}
|
|
12
16
|
export interface AnalysisEvent {
|
|
13
17
|
id: number;
|
|
14
18
|
name: string;
|
|
@@ -17,6 +21,7 @@ export interface AnalysisEvent {
|
|
|
17
21
|
isDelete?: boolean;
|
|
18
22
|
isStop?: boolean;
|
|
19
23
|
isOverview?: boolean;
|
|
24
|
+
eventHidden?: ShowStatus;
|
|
20
25
|
}
|
|
21
26
|
export interface EventGroup {
|
|
22
27
|
id: number;
|
|
@@ -72,6 +77,8 @@ export declare namespace AttributeSelect {
|
|
|
72
77
|
optionsHeaderTip?: string;
|
|
73
78
|
onChange?: (value: Value) => void;
|
|
74
79
|
onDelete?: (value?: Value) => void;
|
|
80
|
+
theme?: string;
|
|
81
|
+
destroyPopupOnHide?: boolean;
|
|
75
82
|
}
|
|
76
83
|
interface Option {
|
|
77
84
|
groupName: string;
|
|
@@ -12,4 +12,11 @@ export var PropCategory;
|
|
|
12
12
|
PropCategory["EventProp"] = "eventProp";
|
|
13
13
|
PropCategory["UserProp"] = "userProp";
|
|
14
14
|
PropCategory["EnvProp"] = "envProp";
|
|
15
|
-
})(PropCategory || (PropCategory = {}));
|
|
15
|
+
})(PropCategory || (PropCategory = {}));
|
|
16
|
+
|
|
17
|
+
export var ShowStatus;
|
|
18
|
+
|
|
19
|
+
(function (ShowStatus) {
|
|
20
|
+
ShowStatus[ShowStatus["show"] = 0] = "show";
|
|
21
|
+
ShowStatus[ShowStatus["hidden"] = 1] = "hidden";
|
|
22
|
+
})(ShowStatus || (ShowStatus = {}));
|
|
@@ -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
|
|
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:
|
|
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
|
|
|
@@ -193,6 +194,7 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
193
194
|
}, showList === null || showList === void 0 ? void 0 : showList.map(function (e) {
|
|
194
195
|
var _currentValue$event;
|
|
195
196
|
|
|
197
|
+
if (e.eventHidden === ShowStatus.hidden) return null;
|
|
196
198
|
return /*#__PURE__*/React.createElement(EventListOption, {
|
|
197
199
|
label: e.alias || e.name,
|
|
198
200
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 };
|