@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
|
@@ -50,14 +50,15 @@
|
|
|
50
50
|
.__default-hover();
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
&.active
|
|
53
|
+
&.active {
|
|
54
54
|
color: #fff;
|
|
55
55
|
background: @primary-color;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
&:not(.active).disabled {
|
|
59
59
|
color: @disabled-color;
|
|
60
60
|
cursor: not-allowed;
|
|
61
|
+
|
|
61
62
|
&:hover {
|
|
62
63
|
background: none;
|
|
63
64
|
}
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
cursor: not-allowed;
|
|
87
88
|
|
|
88
89
|
&:hover {
|
|
89
|
-
background-color:
|
|
90
|
+
background-color: none;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -297,14 +297,9 @@
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
.ant-modal-body {
|
|
300
|
-
max-height: 400px;
|
|
301
|
-
// &:not(:last-child) {
|
|
302
|
-
// padding-bottom: 0;
|
|
303
|
-
// }
|
|
304
300
|
max-height: 400px !important;
|
|
305
301
|
padding-top: @padding-xs !important;
|
|
306
302
|
padding-bottom: 0 !important;
|
|
307
|
-
overflow: auto;
|
|
308
303
|
overflow: auto !important;
|
|
309
304
|
}
|
|
310
305
|
}
|
|
@@ -394,7 +389,7 @@
|
|
|
394
389
|
|
|
395
390
|
&.ant-table-cell-fix-left {
|
|
396
391
|
&.ant-table-cell-fix-left-last {
|
|
397
|
-
|
|
392
|
+
border-right: 1px solid @border-color-base!important;
|
|
398
393
|
}
|
|
399
394
|
}
|
|
400
395
|
}
|
|
@@ -404,33 +399,8 @@
|
|
|
404
399
|
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
|
|
405
400
|
background: color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
406
401
|
}
|
|
407
|
-
.ant-table-thead {
|
|
408
|
-
.ant-table-cell {
|
|
409
|
-
&.ant-table-column-has-sorters {
|
|
410
|
-
.ant-table-column-sorters {
|
|
411
|
-
justify-content: flex-start;
|
|
412
|
-
.ant-table-column-title {
|
|
413
|
-
flex: none;
|
|
414
|
-
}
|
|
415
|
-
.ant-table-column-sorter {
|
|
416
|
-
margin-left: @margin-xs;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
//气泡弹框
|
|
425
|
-
.ant-popover-inner {
|
|
426
|
-
border-radius: @border-radius-small;
|
|
427
402
|
}
|
|
428
403
|
|
|
429
|
-
//tooltip
|
|
430
|
-
.ant-tooltip-inner {
|
|
431
|
-
padding: @margin-sm @margin-md;
|
|
432
|
-
border-radius: @border-radius-normal;
|
|
433
|
-
}
|
|
434
404
|
/* 提示框 */
|
|
435
405
|
.ant-tooltip-inner {
|
|
436
406
|
padding: @padding-sm @padding-md!important;
|
|
@@ -471,12 +441,3 @@
|
|
|
471
441
|
.ant-form-item-explain-error {
|
|
472
442
|
color: @error-color!important;
|
|
473
443
|
}
|
|
474
|
-
|
|
475
|
-
//dropdown
|
|
476
|
-
.ant-dropdown {
|
|
477
|
-
z-index: 6666 !important;
|
|
478
|
-
}
|
|
479
|
-
//message
|
|
480
|
-
.ant-message {
|
|
481
|
-
z-index: 99999 !important;
|
|
482
|
-
}
|
package/es/assets/theme.js
CHANGED
|
@@ -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: "secondary",
|
|
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: "secondary",
|
|
83
83
|
options: options,
|
|
84
84
|
onChange: onChange
|
|
85
85
|
});
|
|
@@ -143,7 +143,7 @@ var StringList = function StringList(props) {
|
|
|
143
143
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
144
144
|
multiple: true,
|
|
145
145
|
enableCreate: true,
|
|
146
|
-
theme:
|
|
146
|
+
theme: "secondary",
|
|
147
147
|
size: "base",
|
|
148
148
|
className: "".concat(classPrefix, "-multi-select"),
|
|
149
149
|
options: [],
|
|
@@ -156,7 +156,7 @@ var StringList = function StringList(props) {
|
|
|
156
156
|
value: current,
|
|
157
157
|
multiple: true,
|
|
158
158
|
enableCreate: true,
|
|
159
|
-
theme:
|
|
159
|
+
theme: "secondary",
|
|
160
160
|
size: "base",
|
|
161
161
|
disable: props.operate === OperateTypes.IsNull || props.operate === OperateTypes.IsNotNull,
|
|
162
162
|
labelField: "name",
|
|
@@ -27,8 +27,7 @@ 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
|
|
31
|
-
theme = props.theme;
|
|
30
|
+
includeToday = props.includeToday;
|
|
32
31
|
var initValue = [moment().subtract(1, 'weeks').format('YYYY-MM-DD'), moment().subtract(includeToday ? 0 : 1, 'days').format('YYYY-MM-DD')];
|
|
33
32
|
|
|
34
33
|
var _useState = useState(),
|
|
@@ -120,14 +119,14 @@ var ValuesList = function ValuesList(props) {
|
|
|
120
119
|
return /*#__PURE__*/React.createElement(BizSelect, {
|
|
121
120
|
disable: true,
|
|
122
121
|
className: "".concat(classPrefix, "-multi-select"),
|
|
123
|
-
theme:
|
|
122
|
+
theme: "secondary",
|
|
123
|
+
size: "base",
|
|
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,
|
|
131
130
|
attr: attr,
|
|
132
131
|
operate: operate,
|
|
133
132
|
value: current,
|
|
@@ -140,7 +139,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
140
139
|
},
|
|
141
140
|
keyField: "value",
|
|
142
141
|
labelField: "label",
|
|
143
|
-
theme:
|
|
142
|
+
theme: "secondary",
|
|
144
143
|
className: "".concat(classPrefix, "-input-select"),
|
|
145
144
|
onChange: onChangeUnit,
|
|
146
145
|
options: propSubtype
|
|
@@ -23,13 +23,14 @@ export default (function () {
|
|
|
23
23
|
|
|
24
24
|
var _useState = useState({
|
|
25
25
|
condition: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
propCategory: 'userProp',
|
|
27
|
+
type: 2,
|
|
28
|
+
operator: 'lt',
|
|
29
|
+
values: ['25200', '1'],
|
|
30
|
+
subtype: 2,
|
|
31
|
+
attrName: 'duration',
|
|
32
|
+
attrId: 0,
|
|
33
|
+
category: 'fixed'
|
|
33
34
|
}
|
|
34
35
|
}),
|
|
35
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -28,9 +28,7 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
28
28
|
enableEventProp = props.enableEventProp,
|
|
29
29
|
enableUserProp = props.enableUserProp,
|
|
30
30
|
enableEnvProp = props.enableEnvProp,
|
|
31
|
-
disableItemList = props.disableItemList
|
|
32
|
-
border = props.border,
|
|
33
|
-
theme = props.theme;
|
|
31
|
+
disableItemList = props.disableItemList;
|
|
34
32
|
|
|
35
33
|
var _useState = useState(),
|
|
36
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -134,7 +132,7 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
134
132
|
};
|
|
135
133
|
|
|
136
134
|
return /*#__PURE__*/React.createElement("div", {
|
|
137
|
-
className:
|
|
135
|
+
className: classPrefix
|
|
138
136
|
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
139
137
|
loading: ready,
|
|
140
138
|
active: true,
|
|
@@ -150,13 +148,10 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
150
148
|
enableEnvProp: enableEnvProp,
|
|
151
149
|
disableItemList: disableItemList,
|
|
152
150
|
onChange: onChangeAttr,
|
|
153
|
-
onDelete: onDelete
|
|
154
|
-
theme: theme,
|
|
155
|
-
destroyPopupOnHide: props.destroyPopupOnHide
|
|
151
|
+
onDelete: onDelete
|
|
156
152
|
}), /*#__PURE__*/React.createElement("div", {
|
|
157
153
|
className: "".concat(classPrefix, "-panel")
|
|
158
154
|
}, /*#__PURE__*/React.createElement(BizOperateList, {
|
|
159
|
-
theme: theme,
|
|
160
155
|
attr: attr,
|
|
161
156
|
defaultValue: operate,
|
|
162
157
|
onChange: onChangeOperate
|
|
@@ -164,13 +159,8 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
164
159
|
attr: attr,
|
|
165
160
|
operate: operate,
|
|
166
161
|
defaultValue: values,
|
|
167
|
-
onChange: onChangeValues
|
|
168
|
-
theme: theme
|
|
162
|
+
onChange: onChangeValues
|
|
169
163
|
}))));
|
|
170
164
|
};
|
|
171
165
|
|
|
172
|
-
BizConditionItem.defaultProps = {
|
|
173
|
-
border: true,
|
|
174
|
-
theme: 'secondary'
|
|
175
|
-
};
|
|
176
166
|
export default BizConditionItem;
|
|
@@ -6,7 +6,6 @@ interface BasicAttrTypes {
|
|
|
6
6
|
enableUserProp?: boolean;
|
|
7
7
|
enableEnvProp?: boolean;
|
|
8
8
|
disableItemList?: (EventProp | UserProp | EnvProp)[];
|
|
9
|
-
theme?: string;
|
|
10
9
|
}
|
|
11
10
|
export declare namespace AttrConditionTypes {
|
|
12
11
|
interface ItemValue {
|
|
@@ -29,8 +28,6 @@ export declare namespace AttrConditionTypes {
|
|
|
29
28
|
value?: ItemValue;
|
|
30
29
|
onChange?: (value: ItemValue) => void;
|
|
31
30
|
onDelete?: (value?: ItemValue) => void;
|
|
32
|
-
border?: boolean;
|
|
33
|
-
destroyPopupOnHide?: boolean;
|
|
34
31
|
}
|
|
35
32
|
interface GroupProp extends BasicAttrTypes {
|
|
36
33
|
defaultValue?: GroupValue;
|
|
@@ -26,8 +26,7 @@ import SelectHandle from '../select/handle';
|
|
|
26
26
|
|
|
27
27
|
var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
28
28
|
var enableDelete = props.enableDelete,
|
|
29
|
-
placeholder = props.placeholder
|
|
30
|
-
theme = props.theme;
|
|
29
|
+
placeholder = props.placeholder;
|
|
31
30
|
|
|
32
31
|
var _useState = useState(),
|
|
33
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -121,15 +120,14 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
121
120
|
width: width
|
|
122
121
|
},
|
|
123
122
|
visible: visible,
|
|
124
|
-
onVisibleChange: onVisibleChange
|
|
125
|
-
destroyPopupOnHide: props.destroyPopupOnHide
|
|
123
|
+
onVisibleChange: onVisibleChange
|
|
126
124
|
}, /*#__PURE__*/React.createElement("div", {
|
|
127
125
|
style: {
|
|
128
126
|
width: '100%'
|
|
129
127
|
}
|
|
130
128
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
131
129
|
ref: boxRef,
|
|
132
|
-
theme:
|
|
130
|
+
theme: "secondary",
|
|
133
131
|
border: false,
|
|
134
132
|
label: currentAttr === null || currentAttr === void 0 ? void 0 : currentAttr.label,
|
|
135
133
|
placeholder: placeholder
|
|
@@ -147,9 +145,7 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
147
145
|
BizAttributeSelector.defaultProps = {
|
|
148
146
|
enableDelete: false,
|
|
149
147
|
placeholder: '请选择',
|
|
150
|
-
theme: 'secondary',
|
|
151
148
|
propSymbol: '*',
|
|
152
|
-
optionsHeaderTip: '带*的属性每日凌晨更新'
|
|
153
|
-
destroyPopupOnHide: false
|
|
149
|
+
optionsHeaderTip: '带*的属性每日凌晨更新'
|
|
154
150
|
};
|
|
155
151
|
export default BizAttributeSelector;
|
|
@@ -1,11 +1,3 @@
|
|
|
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
|
-
|
|
9
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
2
|
|
|
11
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."); }
|
|
@@ -19,7 +11,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
19
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
12
|
|
|
21
13
|
import { Anchor, Button } from 'antd';
|
|
22
|
-
import React, { useContext, useEffect,
|
|
14
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
23
15
|
import { BizGlobalDataContext } from '..';
|
|
24
16
|
import BizSearchInput from '../searchInput';
|
|
25
17
|
import Option from './option';
|
|
@@ -54,17 +46,6 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
54
46
|
currentAttr = _useState6[0],
|
|
55
47
|
setCurrentAttr = _useState6[1];
|
|
56
48
|
|
|
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]);
|
|
68
49
|
var disableItemlist = (_props$disableItemLis = props.disableItemList) === null || _props$disableItemLis === void 0 ? void 0 : _props$disableItemLis.map(function (item) {
|
|
69
50
|
if (item.propCategory === 'envProp') {
|
|
70
51
|
item.key = "envProp-".concat(item.name);
|
|
@@ -88,17 +69,23 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
88
69
|
|
|
89
70
|
if (enableEventProp) {
|
|
90
71
|
var hasAnchor = false;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
72
|
+
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
73
|
+
group.eventList.forEach(function (event) {
|
|
74
|
+
if (event.isDelete || event.isStop) return;
|
|
75
|
+
if (eventIdList && eventIdList.length && !eventIdList.includes(event.id)) return;
|
|
76
|
+
var group = {
|
|
77
|
+
isEvent: true,
|
|
78
|
+
groupName: event.alias || event.name,
|
|
79
|
+
anchor: hasAnchor ? String(Math.random()) : anchor.event,
|
|
80
|
+
key: "event-".concat(event.id),
|
|
81
|
+
children: []
|
|
82
|
+
};
|
|
83
|
+
hasAnchor = true;
|
|
84
|
+
event.attrList.forEach(function (attr) {
|
|
85
|
+
group.children.push(attr);
|
|
86
|
+
});
|
|
87
|
+
list.push(group);
|
|
88
|
+
});
|
|
102
89
|
});
|
|
103
90
|
}
|
|
104
91
|
|
|
@@ -123,7 +110,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
123
110
|
}
|
|
124
111
|
|
|
125
112
|
setOptionList(list);
|
|
126
|
-
}, [
|
|
113
|
+
}, [eventGroupList, userPropList, eventEnvList, eventIdList]);
|
|
127
114
|
useEffect(function () {
|
|
128
115
|
setCurrentAttr(props.value);
|
|
129
116
|
}, [props.value]);
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
flex-direction: row;
|
|
6
6
|
.__select-handle();
|
|
7
7
|
&:hover .biz-attr-select-del-icon {
|
|
8
|
-
display:
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
8
|
+
display: inline-block;
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
11
|
&-del-icon {
|
|
@@ -15,6 +13,8 @@
|
|
|
15
13
|
flex: none;
|
|
16
14
|
width: @icon-width;
|
|
17
15
|
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,10 +9,6 @@ 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
|
-
}
|
|
16
12
|
export interface AnalysisEvent {
|
|
17
13
|
id: number;
|
|
18
14
|
name: string;
|
|
@@ -21,7 +17,6 @@ export interface AnalysisEvent {
|
|
|
21
17
|
isDelete?: boolean;
|
|
22
18
|
isStop?: boolean;
|
|
23
19
|
isOverview?: boolean;
|
|
24
|
-
eventHidden?: ShowStatus;
|
|
25
20
|
}
|
|
26
21
|
export interface EventGroup {
|
|
27
22
|
id: number;
|
|
@@ -77,8 +72,6 @@ export declare namespace AttributeSelect {
|
|
|
77
72
|
optionsHeaderTip?: string;
|
|
78
73
|
onChange?: (value: Value) => void;
|
|
79
74
|
onDelete?: (value?: Value) => void;
|
|
80
|
-
theme?: string;
|
|
81
|
-
destroyPopupOnHide?: boolean;
|
|
82
75
|
}
|
|
83
76
|
interface Option {
|
|
84
77
|
groupName: string;
|
|
@@ -12,11 +12,4 @@ export var PropCategory;
|
|
|
12
12
|
PropCategory["EventProp"] = "eventProp";
|
|
13
13
|
PropCategory["UserProp"] = "userProp";
|
|
14
14
|
PropCategory["EnvProp"] = "envProp";
|
|
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
|
+
})(PropCategory || (PropCategory = {}));
|
|
@@ -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) return;
|
|
18
|
+
if (e.is_delete || e.is_stop) return;
|
|
19
19
|
var event = {
|
|
20
20
|
alias: e.alias_name,
|
|
21
21
|
attrList: e.event_attrs.map(function (item) {
|
|
@@ -35,8 +35,7 @@ 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
|
|
39
|
-
eventHidden: e.event_hidden
|
|
38
|
+
name: e.event_name
|
|
40
39
|
};
|
|
41
40
|
group.eventList.push(event);
|
|
42
41
|
});
|
|
@@ -22,8 +22,6 @@ 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,
|
|
27
25
|
defaultSelectAble = props.defaultSelectAble;
|
|
28
26
|
|
|
29
27
|
var _useState = useState(),
|
|
@@ -125,7 +123,7 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
125
123
|
};
|
|
126
124
|
|
|
127
125
|
return /*#__PURE__*/React.createElement("div", {
|
|
128
|
-
className:
|
|
126
|
+
className: classPrefix
|
|
129
127
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
130
128
|
overlay: /*#__PURE__*/React.createElement(EventListPanel, {
|
|
131
129
|
value: currentValue,
|
|
@@ -142,13 +140,12 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
142
140
|
onVisibleChange: onVisibleChange,
|
|
143
141
|
getPopupContainer: props.popupContainer ? function () {
|
|
144
142
|
return document.getElementById(selectId);
|
|
145
|
-
} : undefined
|
|
146
|
-
destroyPopupOnHide: props.defaultSelectAble
|
|
143
|
+
} : undefined
|
|
147
144
|
}, /*#__PURE__*/React.createElement("div", {
|
|
148
145
|
className: "".concat(classPrefix, "-handle"),
|
|
149
146
|
id: selectId
|
|
150
147
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
151
|
-
theme:
|
|
148
|
+
theme: "secondary",
|
|
152
149
|
border: false,
|
|
153
150
|
label: getLabel(),
|
|
154
151
|
placeholder: placeholder
|
|
@@ -158,9 +155,6 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
158
155
|
BizEventSelector.defaultProps = {
|
|
159
156
|
showAllEvent: true,
|
|
160
157
|
defaultSelectAble: true,
|
|
161
|
-
popupContainer: true
|
|
162
|
-
border: true,
|
|
163
|
-
theme: 'secondary',
|
|
164
|
-
destroyPopupOnHide: false
|
|
158
|
+
popupContainer: true
|
|
165
159
|
};
|
|
166
160
|
export default BizEventSelector;
|
|
@@ -24,7 +24,6 @@ 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';
|
|
28
27
|
import BizSearchInput from '../searchInput';
|
|
29
28
|
import EventListOption from './option';
|
|
30
29
|
|
|
@@ -202,7 +201,6 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
202
201
|
}, showList === null || showList === void 0 ? void 0 : showList.map(function (e) {
|
|
203
202
|
var _currentValue$event;
|
|
204
203
|
|
|
205
|
-
if (e.eventHidden === ShowStatus.hidden) return null;
|
|
206
204
|
return /*#__PURE__*/React.createElement(EventListOption, {
|
|
207
205
|
label: e.alias || e.name,
|
|
208
206
|
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
|
-
&.border {
|
|
5
|
-
.biz-event-select-handle {
|
|
6
|
-
.__select-handle();
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
4
|
position: relative;
|
|
5
|
+
|
|
6
|
+
&-handle {
|
|
7
|
+
.__select-handle();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
10
|
&-list-panel {
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: row;
|
|
@@ -22,10 +22,6 @@ 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;
|
|
29
25
|
onChange?: (val: Value) => void;
|
|
30
26
|
}
|
|
31
27
|
interface DropdownProps {
|
package/es/index.d.ts
CHANGED
|
@@ -14,16 +14,15 @@ import BizChart from './chart';
|
|
|
14
14
|
import BizTable from './table';
|
|
15
15
|
import IconFont from './icon/iconFont';
|
|
16
16
|
import { util, ajax } from './utils';
|
|
17
|
-
import theme from './assets/theme';
|
|
17
|
+
import theme from './assets/theme.js';
|
|
18
18
|
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';
|
|
23
22
|
import BizAddToScene from './addToScene';
|
|
24
23
|
import BizAddToPanel from './addToPanel';
|
|
25
24
|
import setGlobalConfig from './config';
|
|
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,
|
|
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, };
|
|
27
26
|
export type { UserGroupTypes } from './userGroup/types';
|
|
28
27
|
export type { BizSelectTypes } from './select/types';
|
|
29
28
|
export type { AttributeSelect } from './attributeSelector/types';
|
package/es/index.js
CHANGED
|
@@ -13,13 +13,12 @@ import BizChart from './chart';
|
|
|
13
13
|
import BizTable from './table';
|
|
14
14
|
import IconFont from './icon/iconFont';
|
|
15
15
|
import { util, ajax } from './utils';
|
|
16
|
-
import theme from './assets/theme';
|
|
16
|
+
import theme from './assets/theme.js';
|
|
17
17
|
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';
|
|
22
21
|
import BizAddToScene from './addToScene';
|
|
23
22
|
import BizAddToPanel from './addToPanel';
|
|
24
23
|
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,
|
|
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 };
|