@zgfe/business-lib 1.1.66 → 1.1.67-beta.3
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/iconfont/demo_index.html +118 -3
- package/es/assets/iconfont/iconfont.css +23 -3
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +35 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/assets/styles/chunks.less +18 -0
- package/es/assets/styles/variable.less +1 -0
- package/es/attrCondition/group.d.ts +2 -2
- package/es/attrCondition/group.js +10 -6
- package/es/attrCondition/index.js +43 -7
- package/es/attrCondition/styles/index.less +23 -7
- package/es/attrCondition/useAttrCondition.d.ts +3 -1
- package/es/attrCondition/useAttrCondition.js +2 -1
- package/es/attrCondition/useConditionGroup.js +14 -3
- package/es/attrConditions/components/stringList.d.ts +1 -0
- package/es/attrConditions/components/stringList.js +1 -0
- package/es/attrConditions/components/valuesList.d.ts +1 -0
- package/es/attrConditions/components/valuesList.js +6 -1
- package/es/attrConditions/index.js +4 -2
- package/es/attrConditions/types.d.ts +1 -0
- package/es/attributeSelector/demo/disable.js +6 -1
- package/es/attributeSelector/index.js +8 -13
- package/es/attributeSelector/styles/index.less +8 -19
- package/es/attributeSelector/types.d.ts +2 -1
- package/es/context/index.d.ts +4 -0
- package/es/context/index.js +2 -1
- package/es/eventSelector/index.js +0 -1
- package/es/eventSelector/listPanel.d.ts +10 -0
- package/es/eventSelector/listPanel.js +9 -9
- package/es/eventSelector/option.js +5 -2
- package/es/formulaTarget/components/formula/data.d.ts +16 -0
- package/es/formulaTarget/components/formula/data.js +40 -0
- package/es/formulaTarget/components/formula/demo.d.ts +2 -0
- package/es/formulaTarget/components/formula/demo.js +76 -0
- package/es/formulaTarget/components/formula/index.d.ts +6 -0
- package/es/formulaTarget/components/formula/index.js +132 -0
- package/es/formulaTarget/components/formula/index.less +68 -0
- package/es/formulaTarget/components/formula/types.d.ts +24 -0
- package/es/formulaTarget/components/formula/types.js +1 -0
- package/es/formulaTarget/components/formula/util.d.ts +28 -0
- package/es/formulaTarget/components/formula/util.js +245 -0
- package/es/formulaTarget/components/formulaItem/data.d.ts +2 -0
- package/es/formulaTarget/components/formulaItem/data.js +4 -0
- package/es/formulaTarget/components/formulaItem/index.d.ts +4 -0
- package/es/formulaTarget/components/formulaItem/index.js +190 -0
- package/es/formulaTarget/components/formulaItem/types.d.ts +10 -0
- package/es/formulaTarget/components/formulaItem/types.js +1 -0
- package/es/formulaTarget/components/panel/data.d.ts +8 -0
- package/es/formulaTarget/components/panel/data.js +32 -0
- package/es/formulaTarget/components/panel/demo.d.ts +2 -0
- package/es/formulaTarget/components/panel/demo.js +59 -0
- package/es/formulaTarget/components/panel/index.d.ts +6 -0
- package/es/formulaTarget/components/panel/index.js +162 -0
- package/es/formulaTarget/components/panel/index.less +131 -0
- package/es/formulaTarget/components/panel/item.d.ts +5 -0
- package/es/formulaTarget/components/panel/item.js +76 -0
- package/es/formulaTarget/components/panel/types.d.ts +13 -0
- package/es/formulaTarget/components/panel/types.js +1 -0
- package/es/formulaTarget/components/symbol/index.d.ts +7 -0
- package/es/formulaTarget/components/symbol/index.js +48 -0
- package/es/formulaTarget/components/symbol/index.less +48 -0
- package/es/formulaTarget/demo/group.d.ts +2 -0
- package/es/formulaTarget/demo/group.js +92 -0
- package/es/formulaTarget/demo/index.d.ts +2 -0
- package/es/formulaTarget/demo/index.js +21 -0
- package/es/formulaTarget/index.d.ts +5 -0
- package/es/formulaTarget/index.js +201 -0
- package/es/formulaTarget/styles/index.less +69 -0
- package/es/formulaTarget/types.d.ts +18 -0
- package/es/formulaTarget/types.js +1 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/select/handle.js +9 -2
- package/es/select/styles/handle.less +1 -0
- package/es/select/types.d.ts +1 -0
- package/es/targetConditionGroup/components/targetDimension.js +0 -2
- package/es/targetConditionGroup/demo/group.js +8 -7
- package/es/targetConditionGroup/demo/index.js +1 -0
- package/es/targetConditionGroup/index.js +19 -9
- package/es/targetConditionGroup/styles/index.less +31 -6
- package/es/targetConditionGroup/types.d.ts +1 -0
- package/es/targetSelector/index.js +11 -69
- package/es/targetSelector/optionIcon.js +3 -0
- package/es/targetSelector/styles/index.less +27 -13
- package/es/userGroup/index.js +5 -9
- package/es/userGroup/styles/index.less +9 -10
- package/package.json +2 -2
package/es/select/handle.js
CHANGED
|
@@ -66,6 +66,12 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
66
66
|
props.onVisible && props.onVisible();
|
|
67
67
|
}
|
|
68
68
|
}, [focus]);
|
|
69
|
+
var onClick = function onClick(e) {
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
if (props.disable) return;
|
|
72
|
+
setFocus(true);
|
|
73
|
+
inputRef.current.focus();
|
|
74
|
+
};
|
|
69
75
|
var searchInputWidth = useMemo(function () {
|
|
70
76
|
if (textRef.current && searchValue) {
|
|
71
77
|
textRef.current.innerText = searchValue;
|
|
@@ -111,7 +117,8 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
111
117
|
className: "".concat(classPrefix, "-tag-label")
|
|
112
118
|
}, item[labelField])));
|
|
113
119
|
}) : !focus ? /*#__PURE__*/React.createElement("span", {
|
|
114
|
-
className: "".concat(classPrefix, "-holder")
|
|
120
|
+
className: "".concat(classPrefix, "-holder"),
|
|
121
|
+
onClick: onClick
|
|
115
122
|
}, placeholder || '请选择') : '', /*#__PURE__*/React.createElement(Input, {
|
|
116
123
|
ref: inputRef,
|
|
117
124
|
autoFocus: focus,
|
|
@@ -136,7 +143,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
136
143
|
className: "".concat(classPrefix, "-content")
|
|
137
144
|
}, showSelectIcon && ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.icon) && /*#__PURE__*/React.createElement("span", {
|
|
138
145
|
className: "".concat(classPrefix, "-icon")
|
|
139
|
-
}, props.value.icon), props.label || props.value && props.value[labelField] || /*#__PURE__*/React.createElement("span", {
|
|
146
|
+
}, props.value.icon), props.children || props.label || props.value && props.value[labelField] || /*#__PURE__*/React.createElement("span", {
|
|
140
147
|
className: "".concat(classPrefix, "-holder")
|
|
141
148
|
}, placeholder || '请选择')), /*#__PURE__*/React.createElement(IconFont, {
|
|
142
149
|
className: "".concat(classPrefix, "-expand-icon"),
|
package/es/select/types.d.ts
CHANGED
|
@@ -129,8 +129,6 @@ var BizTargetDimension = function BizTargetDimension(props) {
|
|
|
129
129
|
}, /*#__PURE__*/React.createElement("div", {
|
|
130
130
|
className: "".concat(classPrefix, "-dimension")
|
|
131
131
|
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
132
|
-
theme: "secondary",
|
|
133
|
-
border: false,
|
|
134
132
|
label: "".concat(dimensionParent ? dimensionParent.label : '').concat(dimension === null || dimension === void 0 ? void 0 : dimension.label)
|
|
135
133
|
})));
|
|
136
134
|
};
|
|
@@ -41,6 +41,10 @@ export default (function () {
|
|
|
41
41
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
42
|
enableAdd = _useState6[0],
|
|
43
43
|
setEnableAdd = _useState6[1];
|
|
44
|
+
var _useState7 = useState(false),
|
|
45
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
+
enableDelete = _useState8[0],
|
|
47
|
+
setEnableDelete = _useState8[1];
|
|
44
48
|
var _Form$useForm = Form.useForm(),
|
|
45
49
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
46
50
|
form = _Form$useForm2[0];
|
|
@@ -55,6 +59,7 @@ export default (function () {
|
|
|
55
59
|
useEffect(function () {
|
|
56
60
|
var flag = true,
|
|
57
61
|
show = true;
|
|
62
|
+
console.log(target.targets, target.targets.length > 1);
|
|
58
63
|
if ((target === null || target === void 0 ? void 0 : target.targets) && target.targets.length > 0) {
|
|
59
64
|
if (target.targets[0] && target.targets[0].eventId === -100) {
|
|
60
65
|
flag = false;
|
|
@@ -63,6 +68,7 @@ export default (function () {
|
|
|
63
68
|
show = false;
|
|
64
69
|
}
|
|
65
70
|
}
|
|
71
|
+
setEnableDelete(target.targets.length > 1);
|
|
66
72
|
setShowOverview(show);
|
|
67
73
|
setEnableAdd(flag);
|
|
68
74
|
}, [target === null || target === void 0 ? void 0 : target.targets]);
|
|
@@ -87,14 +93,9 @@ export default (function () {
|
|
|
87
93
|
return /*#__PURE__*/React.createElement(Form.Item, _objectSpread(_objectSpread({}, field), {}, {
|
|
88
94
|
key: field.key
|
|
89
95
|
}), /*#__PURE__*/React.createElement(BizTargetCondition, {
|
|
96
|
+
enableDelete: enableDelete,
|
|
90
97
|
onDelete: function onDelete() {
|
|
91
|
-
|
|
92
|
-
remove(field.name);
|
|
93
|
-
} else {
|
|
94
|
-
form.setFieldsValue({
|
|
95
|
-
targets: [initValue]
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
+
remove(field.name);
|
|
98
99
|
}
|
|
99
100
|
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
100
101
|
showAllEvent: showOverview,
|
|
@@ -14,11 +14,11 @@ import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
|
14
14
|
import BizTargetSelector from '../targetSelector';
|
|
15
15
|
import BizTargetDimension from './components/targetDimension';
|
|
16
16
|
import './styles/index.less';
|
|
17
|
-
import
|
|
18
|
-
import { Skeleton } from 'antd';
|
|
17
|
+
import { Skeleton, Tooltip } from 'antd';
|
|
19
18
|
import _ from 'lodash';
|
|
20
19
|
import BizGlobalDataContext from '../context';
|
|
21
20
|
import { BuiltinIndicators } from '../constants/common';
|
|
21
|
+
import { BizAttrConditionGroup, IconFont } from '..';
|
|
22
22
|
export var classPrefix = 'biz-target';
|
|
23
23
|
var BizTargetCondition = function BizTargetCondition(props) {
|
|
24
24
|
var _targetData$value2, _targetData$value2$gr, _targetData$value3, _targetData$value3$ev, _targetData$value4, _targetData$value4$ev, _targetData$value5, _targetData$value5$ev, _targetData$value6, _targetData$value6$ev, _targetData$value7, _targetData$value7$ev;
|
|
@@ -44,7 +44,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
44
44
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
45
45
|
enableAdd = _useState8[0],
|
|
46
46
|
setEnableAdd = _useState8[1];
|
|
47
|
-
var _useState9 = useState(
|
|
47
|
+
var _useState9 = useState(props.enableDelete),
|
|
48
48
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
49
49
|
enableDelete = _useState10[0],
|
|
50
50
|
setEnableDelete = _useState10[1];
|
|
@@ -90,7 +90,9 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
90
90
|
canAdd = count < max;
|
|
91
91
|
}
|
|
92
92
|
setEnableAdd(canAdd);
|
|
93
|
-
|
|
93
|
+
if (props.enableDelete !== undefined) {
|
|
94
|
+
setEnableDelete(canDelete);
|
|
95
|
+
}
|
|
94
96
|
} else {
|
|
95
97
|
setEnableAdd(false);
|
|
96
98
|
}
|
|
@@ -212,12 +214,14 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
212
214
|
}
|
|
213
215
|
};
|
|
214
216
|
var onAdd = function onAdd() {
|
|
217
|
+
if (!enableAdd) return;
|
|
215
218
|
setIsAdd(true);
|
|
216
219
|
setTimeout(function () {
|
|
217
220
|
conditionRef.current.add();
|
|
218
221
|
}, 0);
|
|
219
222
|
};
|
|
220
223
|
var onDelete = function onDelete() {
|
|
224
|
+
if (!(props.enableDelete !== undefined ? props.enableDelete : enableDelete)) return;
|
|
221
225
|
if (props.onDelete) props.onDelete();
|
|
222
226
|
};
|
|
223
227
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -232,16 +236,22 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
232
236
|
className: "".concat(classPrefix, "-content")
|
|
233
237
|
}, /*#__PURE__*/React.createElement(BizTargetSelector, {
|
|
234
238
|
value: targetData,
|
|
235
|
-
enableAdd: enableAdd,
|
|
236
|
-
enableDelete: enableDelete,
|
|
237
|
-
onAdd: onAdd,
|
|
238
|
-
onDelete: onDelete,
|
|
239
239
|
onChange: onChangeTarget
|
|
240
240
|
}, props.children), (targetData === null || targetData === void 0 ? void 0 : (_targetData$value2 = targetData.value) === null || _targetData$value2 === void 0 ? void 0 : (_targetData$value2$gr = _targetData$value2.group) === null || _targetData$value2$gr === void 0 ? void 0 : _targetData$value2$gr.id) === -2 || (targetData === null || targetData === void 0 ? void 0 : (_targetData$value3 = targetData.value) === null || _targetData$value3 === void 0 ? void 0 : (_targetData$value3$ev = _targetData$value3.event) === null || _targetData$value3$ev === void 0 ? void 0 : _targetData$value3$ev.isBuiltIn) ? null : /*#__PURE__*/React.createElement(BizTargetDimension, {
|
|
241
241
|
eventId: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value4 = targetData.value) === null || _targetData$value4 === void 0 ? void 0 : (_targetData$value4$ev = _targetData$value4.event) === null || _targetData$value4$ev === void 0 ? void 0 : _targetData$value4$ev.id) ? targetData === null || targetData === void 0 ? void 0 : (_targetData$value5 = targetData.value) === null || _targetData$value5 === void 0 ? void 0 : (_targetData$value5$ev = _targetData$value5.event) === null || _targetData$value5$ev === void 0 ? void 0 : _targetData$value5$ev.id : undefined,
|
|
242
242
|
value: dimension,
|
|
243
243
|
onChange: onChangeDimension
|
|
244
|
-
})
|
|
244
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
245
|
+
title: "\u6DFB\u52A0\u5C5E\u6027\u7B5B\u9009"
|
|
246
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
247
|
+
className: "".concat(classPrefix, "-icon ").concat(!enableAdd ? 'disabled' : ''),
|
|
248
|
+
type: "shaixuan",
|
|
249
|
+
onClick: onAdd
|
|
250
|
+
})), /*#__PURE__*/React.createElement(IconFont, {
|
|
251
|
+
className: "".concat(classPrefix, "-icon delete ").concat(!(props.enableDelete !== undefined ? props.enableDelete : enableDelete) ? 'disabled' : ''),
|
|
252
|
+
type: "qingchu",
|
|
253
|
+
onClick: onDelete
|
|
254
|
+
})), (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
245
255
|
ref: conditionRef,
|
|
246
256
|
value: filters,
|
|
247
257
|
onlyAnd: props.onlyAnd,
|
|
@@ -3,25 +3,50 @@
|
|
|
3
3
|
.biz-target {
|
|
4
4
|
&-content {
|
|
5
5
|
display: flex;
|
|
6
|
+
align-items: center;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
.biz-target-select {
|
|
9
|
-
|
|
10
|
+
min-width: 160px;
|
|
11
|
+
max-width: calc(100% - 208px);
|
|
12
|
+
&:hover {
|
|
13
|
+
.biz-event-select {
|
|
14
|
+
max-width: calc(100% - 18px);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.biz-event-select {
|
|
18
|
+
max-width: 100%;
|
|
19
|
+
}
|
|
20
|
+
.biz-select-handle-content {
|
|
21
|
+
max-width: calc(100% - 19px);
|
|
22
|
+
}
|
|
10
23
|
}
|
|
11
24
|
|
|
12
|
-
.biz-condition {
|
|
13
|
-
margin-top:
|
|
25
|
+
.biz-attr-condition-group {
|
|
26
|
+
margin-top: 12px;
|
|
14
27
|
}
|
|
15
28
|
|
|
16
29
|
&-dimension {
|
|
17
|
-
width:
|
|
18
|
-
margin-left:
|
|
19
|
-
.__select-handle();
|
|
30
|
+
width: 100px;
|
|
31
|
+
margin-left: 16px;
|
|
20
32
|
}
|
|
21
33
|
&-dropmenu,
|
|
22
34
|
&-submenu {
|
|
23
35
|
width: 120px;
|
|
24
36
|
}
|
|
37
|
+
|
|
38
|
+
&-icon {
|
|
39
|
+
margin-left: 16px;
|
|
40
|
+
.__icon();
|
|
41
|
+
|
|
42
|
+
&.shaixuan {
|
|
43
|
+
font-size: 20px !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.delete {
|
|
47
|
+
font-size: 16px !important;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
25
50
|
.biz-event-select.focus {
|
|
26
51
|
box-shadow: none;
|
|
27
52
|
}
|
|
@@ -6,15 +6,11 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import BizEventNameEditBox from './editBox';
|
|
9
|
-
import { Dropdown } from 'antd';
|
|
10
9
|
import './styles/index.less';
|
|
11
10
|
import BizTargetOptionIcon from './optionIcon';
|
|
12
|
-
import BizTargetOptionMenu from './optionMenu';
|
|
13
11
|
export var classPrefix = 'biz-target-select';
|
|
14
12
|
var BizTargetSelector = function BizTargetSelector(props) {
|
|
15
13
|
var _targetData$event;
|
|
16
|
-
var enableAdd = props.enableAdd,
|
|
17
|
-
enableDelete = props.enableDelete;
|
|
18
14
|
var _useState = useState(''),
|
|
19
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
16
|
alias = _useState2[0],
|
|
@@ -27,10 +23,6 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
27
23
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
28
24
|
showEditModal = _useState6[0],
|
|
29
25
|
setShowEditModal = _useState6[1];
|
|
30
|
-
var _useState7 = useState(false),
|
|
31
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
32
|
-
visible = _useState8[0],
|
|
33
|
-
setVisible = _useState8[1];
|
|
34
26
|
useEffect(function () {
|
|
35
27
|
if (!props.defaultValue) return;
|
|
36
28
|
setAlias(props.defaultValue.alias || '');
|
|
@@ -41,26 +33,6 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
41
33
|
setAlias(props.value.alias || '');
|
|
42
34
|
setTargetData(props.value.value || undefined);
|
|
43
35
|
}, [props.value]);
|
|
44
|
-
var onClickIcon = function onClickIcon(name) {
|
|
45
|
-
setVisible(false);
|
|
46
|
-
if (name === 'edit') {
|
|
47
|
-
setShowEditModal(true);
|
|
48
|
-
} else if (name === 'add') {
|
|
49
|
-
if (props.onAdd && enableAdd) {
|
|
50
|
-
props.onAdd({
|
|
51
|
-
alias: alias,
|
|
52
|
-
value: targetData
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
} else if (name === 'delete') {
|
|
56
|
-
if (props.onDelete && enableDelete) {
|
|
57
|
-
props.onDelete({
|
|
58
|
-
alias: alias,
|
|
59
|
-
value: targetData
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
36
|
var onCancelEdit = function onCancelEdit() {
|
|
65
37
|
setShowEditModal(false);
|
|
66
38
|
};
|
|
@@ -79,13 +51,10 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
79
51
|
value: value
|
|
80
52
|
});
|
|
81
53
|
};
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
87
|
-
focus = _useState10[0],
|
|
88
|
-
setFocus = _useState10[1];
|
|
54
|
+
var _useState7 = useState(false),
|
|
55
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
56
|
+
focus = _useState8[0],
|
|
57
|
+
setFocus = _useState8[1];
|
|
89
58
|
var onVisibleChange = function onVisibleChange(flag) {
|
|
90
59
|
setFocus(flag);
|
|
91
60
|
};
|
|
@@ -96,45 +65,18 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
96
65
|
value: targetData,
|
|
97
66
|
onChange: onChange,
|
|
98
67
|
onVisibleChange: onVisibleChange
|
|
99
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
100
|
-
className: "".concat(classPrefix, "-option-list")
|
|
101
|
-
}, /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
102
|
-
name: "add",
|
|
103
|
-
icon: "shaixuan",
|
|
104
|
-
title: "\u6DFB\u52A0\u7B5B\u9009",
|
|
105
|
-
enabled: enableAdd,
|
|
106
|
-
onClick: onClickIcon
|
|
107
68
|
}), /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
108
|
-
name: "
|
|
109
|
-
icon: "
|
|
110
|
-
title: "\
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
onOpenChange: onOpenChange,
|
|
116
|
-
dropdownRender: function dropdownRender() {
|
|
117
|
-
return /*#__PURE__*/React.createElement(BizTargetOptionMenu, {
|
|
118
|
-
onClick: onClickIcon,
|
|
119
|
-
enableAdd: enableAdd,
|
|
120
|
-
enableDelete: enableDelete
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
trigger: ['click']
|
|
124
|
-
}, /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
125
|
-
name: "more",
|
|
126
|
-
icon: "gengduocaozuo1",
|
|
127
|
-
title: "\u7F16\u8F91\u522B\u540D\u3001\u7B5B\u9009\u3001\u5220\u9664",
|
|
128
|
-
enabled: true
|
|
129
|
-
}))), showEditModal && /*#__PURE__*/React.createElement(BizEventNameEditBox, {
|
|
69
|
+
name: "add",
|
|
70
|
+
icon: "bianji-tianchong",
|
|
71
|
+
title: "\u7F16\u8F91\u522B\u540D",
|
|
72
|
+
onClick: function onClick() {
|
|
73
|
+
return setShowEditModal(true);
|
|
74
|
+
}
|
|
75
|
+
}), showEditModal && /*#__PURE__*/React.createElement(BizEventNameEditBox, {
|
|
130
76
|
defaultValue: alias,
|
|
131
77
|
disabled: targetData === null || targetData === void 0 ? void 0 : (_targetData$event = targetData.event) === null || _targetData$event === void 0 ? void 0 : _targetData$event.name,
|
|
132
78
|
onCancel: onCancelEdit,
|
|
133
79
|
onChange: onChangeAlias
|
|
134
80
|
}));
|
|
135
81
|
};
|
|
136
|
-
BizTargetSelector.defaultProps = {
|
|
137
|
-
enableAdd: true,
|
|
138
|
-
enableDelete: true
|
|
139
|
-
};
|
|
140
82
|
export default BizTargetSelector;
|
|
@@ -3,11 +3,33 @@
|
|
|
3
3
|
.biz-target-select {
|
|
4
4
|
position: relative;
|
|
5
5
|
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
height: 32px;
|
|
8
|
+
padding: 0;
|
|
9
|
+
line-height: 32px;
|
|
10
|
+
background-color: @background-color-base;
|
|
11
|
+
border-color: @background-color-base;
|
|
6
12
|
.__select-handle();
|
|
7
13
|
|
|
14
|
+
&:hover {
|
|
15
|
+
border-color: @primary-color;
|
|
16
|
+
.biz-target-select-option-icon {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
&:focus {
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
.biz-select-handle-input {
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.biz-select-handle-input.middle {
|
|
28
|
+
height: 30px;
|
|
29
|
+
line-height: 30px;
|
|
30
|
+
}
|
|
8
31
|
.biz-event-select {
|
|
9
32
|
flex: 1;
|
|
10
|
-
width: 0;
|
|
11
33
|
}
|
|
12
34
|
|
|
13
35
|
.biz-event-select-handle {
|
|
@@ -16,22 +38,14 @@
|
|
|
16
38
|
border: none;
|
|
17
39
|
}
|
|
18
40
|
|
|
19
|
-
&:hover {
|
|
20
|
-
.biz-target-select-option-icon {
|
|
21
|
-
display: inline-block;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&-option-list {
|
|
26
|
-
display: flex;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
41
|
&-option-icon {
|
|
30
42
|
display: none;
|
|
31
43
|
flex: none;
|
|
32
|
-
width:
|
|
44
|
+
width: 16px;
|
|
45
|
+
height: @height-sm;
|
|
46
|
+
margin-right: 4px;
|
|
33
47
|
color: @text-color-secondary;
|
|
34
|
-
line-height: @height-
|
|
48
|
+
line-height: @height-sm;
|
|
35
49
|
text-align: center;
|
|
36
50
|
border-radius: @border-radius-small;
|
|
37
51
|
|
package/es/userGroup/index.js
CHANGED
|
@@ -7,9 +7,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useContext, useEffect, useState } from 'react';
|
|
8
8
|
import './styles/index.less';
|
|
9
9
|
import BizSelect from '../select';
|
|
10
|
-
import BizTargetOptionIcon from '../targetSelector/optionIcon';
|
|
11
10
|
import { Skeleton } from 'antd';
|
|
12
11
|
import BizGlobalDataContext from '../context';
|
|
12
|
+
import { IconFont } from '..';
|
|
13
13
|
var BizUserGroup = function BizUserGroup(props) {
|
|
14
14
|
var enableDelete = props.enableDelete,
|
|
15
15
|
keyField = props.keyField,
|
|
@@ -60,19 +60,15 @@ var BizUserGroup = function BizUserGroup(props) {
|
|
|
60
60
|
options: props.options || userGroupList,
|
|
61
61
|
keyField: keyField,
|
|
62
62
|
labelField: labelField,
|
|
63
|
-
theme: "secondary",
|
|
64
|
-
border: false,
|
|
65
63
|
disableItemList: props.disableItemList,
|
|
66
64
|
onChange: onChange,
|
|
67
65
|
minDropdownWidth: 284,
|
|
68
66
|
onVisibleChange: onVisibleChange
|
|
69
|
-
}), /*#__PURE__*/React.createElement(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
title: "\u5220\u9664",
|
|
73
|
-
enabled: enableDelete,
|
|
67
|
+
}), enableDelete ? /*#__PURE__*/React.createElement(IconFont, {
|
|
68
|
+
className: "".concat(classPrefix, "-icon delete ").concat(!enableDelete ? 'disabled' : ''),
|
|
69
|
+
type: "qingchu",
|
|
74
70
|
onClick: onClickDelete
|
|
75
|
-
})));
|
|
71
|
+
}) : null));
|
|
76
72
|
};
|
|
77
73
|
BizUserGroup.defaultProps = {
|
|
78
74
|
keyField: 'id',
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
.biz-user {
|
|
4
4
|
position: relative;
|
|
5
5
|
display: flex;
|
|
6
|
-
|
|
6
|
+
align-items: center;
|
|
7
|
+
|
|
7
8
|
.biz-select-handle {
|
|
8
|
-
|
|
9
|
-
width: 100
|
|
10
|
-
padding: 0;
|
|
11
|
-
border: none;
|
|
12
|
-
border-radius: 0;
|
|
9
|
+
min-width: 208px;
|
|
10
|
+
max-width: calc(100% - 56px);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
|
|
13
|
+
&-icon {
|
|
14
|
+
.__icon();
|
|
15
|
+
margin-left: 16px;
|
|
16
|
+
font-size: 16px !important;
|
|
18
17
|
}
|
|
19
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.67-beta.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react": "^16.12.0 || ^17.0.0",
|
|
61
61
|
"yorkie": "^2.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "60b424a819cbf1465a05510288a93b9cda0b67d0"
|
|
64
64
|
}
|