@zgfe/business-lib 1.0.15-alpha.0 → 1.0.15-user.10
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 +52 -6
- package/es/assets/theme.js +24 -14
- 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/demo/index.js +6 -5
- 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/demo/index.js +11 -2
- package/es/eventSelector/index.js +40 -7
- package/es/eventSelector/listPanel.js +37 -30
- package/es/eventSelector/option.d.ts +0 -2
- package/es/eventSelector/option.js +1 -11
- package/es/eventSelector/styles/index.less +5 -3
- package/es/eventSelector/types.d.ts +7 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +3 -2
- 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 +12 -7
- 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 +11 -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 +18 -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 +20 -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 +5 -2
- package/es/assets/theme.d.ts +0 -15
|
@@ -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,15 @@
|
|
|
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;
|
|
312
|
+
overflow: auto;
|
|
303
313
|
overflow: auto !important;
|
|
314
|
+
&:not(:last-child) {
|
|
315
|
+
padding-bottom: 0 !important;
|
|
316
|
+
}
|
|
304
317
|
}
|
|
305
318
|
}
|
|
306
319
|
|
|
@@ -370,10 +383,6 @@
|
|
|
370
383
|
&::before {
|
|
371
384
|
width: 0 !important;
|
|
372
385
|
}
|
|
373
|
-
|
|
374
|
-
&.ant-table-cell-fix-left-last {
|
|
375
|
-
border-right: 1px solid @border-color-base!important;
|
|
376
|
-
}
|
|
377
386
|
}
|
|
378
387
|
|
|
379
388
|
.ant-table-tbody {
|
|
@@ -389,7 +398,7 @@
|
|
|
389
398
|
|
|
390
399
|
&.ant-table-cell-fix-left {
|
|
391
400
|
&.ant-table-cell-fix-left-last {
|
|
392
|
-
border-right: 1px solid @border-color-base
|
|
401
|
+
// border-right: 1px solid @border-color-base;
|
|
393
402
|
}
|
|
394
403
|
}
|
|
395
404
|
}
|
|
@@ -399,8 +408,33 @@
|
|
|
399
408
|
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
|
|
400
409
|
background: color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
401
410
|
}
|
|
411
|
+
.ant-table-thead {
|
|
412
|
+
.ant-table-cell {
|
|
413
|
+
&.ant-table-column-has-sorters {
|
|
414
|
+
.ant-table-column-sorters {
|
|
415
|
+
justify-content: flex-start;
|
|
416
|
+
.ant-table-column-title {
|
|
417
|
+
flex: none;
|
|
418
|
+
}
|
|
419
|
+
.ant-table-column-sorter {
|
|
420
|
+
margin-left: @margin-xs;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
402
426
|
}
|
|
403
427
|
|
|
428
|
+
//气泡弹框
|
|
429
|
+
.ant-popover-inner {
|
|
430
|
+
border-radius: @border-radius-small;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
//tooltip
|
|
434
|
+
.ant-tooltip-inner {
|
|
435
|
+
padding: @margin-sm @margin-md;
|
|
436
|
+
border-radius: @border-radius-normal;
|
|
437
|
+
}
|
|
404
438
|
/* 提示框 */
|
|
405
439
|
.ant-tooltip-inner {
|
|
406
440
|
padding: @padding-sm @padding-md!important;
|
|
@@ -441,3 +475,15 @@
|
|
|
441
475
|
.ant-form-item-explain-error {
|
|
442
476
|
color: @error-color!important;
|
|
443
477
|
}
|
|
478
|
+
|
|
479
|
+
//dropdown
|
|
480
|
+
.ant-dropdown {
|
|
481
|
+
z-index: 6666 !important;
|
|
482
|
+
}
|
|
483
|
+
//message
|
|
484
|
+
.ant-message {
|
|
485
|
+
z-index: 99999 !important;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.ant-picker {
|
|
489
|
+
}
|
package/es/assets/theme.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
'
|
|
5
|
-
|
|
6
|
-
'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
(function (global, factory) {
|
|
4
|
+
(typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = global || self, factory(global.acorn = {}));
|
|
5
|
+
})(this, function (exports) {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
exports.theme = {
|
|
9
|
+
'primary-color': '#165dff',
|
|
10
|
+
'border-color-base': '#ECEDF0',
|
|
11
|
+
'background-color-base': '#fafafb',
|
|
12
|
+
'text-color': '#021429',
|
|
13
|
+
// 正文
|
|
14
|
+
'text-color-secondary': '#5f6085',
|
|
15
|
+
// 次要
|
|
16
|
+
'tooltip-bg': '#242541',
|
|
17
|
+
'error-color': '#fb5547',
|
|
18
|
+
'shadow-color': 'rgba(0, 0, 0, 0.1)',
|
|
19
|
+
'box-shadow-base': '0px 4px 10px rgba(0, 0, 0, 0.1)',
|
|
20
|
+
'btn-text-hover-bg': '#cacdd4',
|
|
21
|
+
'warning-color': '#FD9F41',
|
|
22
|
+
'border-color-split': '#E8EFFF'
|
|
23
|
+
};
|
|
24
|
+
});
|
|
@@ -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
|
});
|
|
@@ -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: props.theme,
|
|
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: props.theme,
|
|
160
160
|
size: "base",
|
|
161
161
|
disable: props.operate === OperateTypes.IsNull || props.operate === OperateTypes.IsNotNull,
|
|
162
162
|
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
|
|
@@ -23,14 +23,15 @@ export default (function () {
|
|
|
23
23
|
|
|
24
24
|
var _useState = useState({
|
|
25
25
|
condition: {
|
|
26
|
+
attrId: 0,
|
|
26
27
|
propCategory: 'userProp',
|
|
27
28
|
type: 2,
|
|
28
|
-
operator: '
|
|
29
|
-
values: ['
|
|
30
|
-
|
|
29
|
+
operator: 'gt',
|
|
30
|
+
values: ['72000', '1'],
|
|
31
|
+
dimensionSub: 'duration',
|
|
31
32
|
attrName: 'duration',
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
category: 'fixed',
|
|
34
|
+
subtype: 2
|
|
34
35
|
}
|
|
35
36
|
}),
|
|
36
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -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
|
});
|
|
@@ -35,7 +35,16 @@ var EventDemo = function EventDemo() {
|
|
|
35
35
|
setValue(data);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
return /*#__PURE__*/React.createElement("div",
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
style: {
|
|
40
|
+
height: '500px',
|
|
41
|
+
overflow: 'auto'
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
style: {
|
|
45
|
+
height: '700px'
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
|
|
39
48
|
value: {
|
|
40
49
|
eventGroupList: store.eventGroupList
|
|
41
50
|
}
|
|
@@ -43,7 +52,7 @@ var EventDemo = function EventDemo() {
|
|
|
43
52
|
defaultValue: value,
|
|
44
53
|
alias: "\u522B\u540D",
|
|
45
54
|
onChange: onChange
|
|
46
|
-
})));
|
|
55
|
+
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u4E8B\u4EF6\u662F\uFF1A", JSON.stringify(value))));
|
|
47
56
|
};
|
|
48
57
|
|
|
49
58
|
export default (function () {
|