@zgfe/business-lib 1.1.7-tag6.2 → 1.1.7-test-origin1.0
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/addToPanel/index.js
CHANGED
|
@@ -44,10 +44,15 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
44
44
|
groupList = _useState4[0],
|
|
45
45
|
setGroupList = _useState4[1];
|
|
46
46
|
|
|
47
|
-
var _useState5 = useState(
|
|
47
|
+
var _useState5 = useState(),
|
|
48
48
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
formData = _useState6[0],
|
|
50
|
+
setFormData = _useState6[1];
|
|
51
|
+
|
|
52
|
+
var _useState7 = useState(false),
|
|
53
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
54
|
+
loading = _useState8[0],
|
|
55
|
+
setLoading = _useState8[1];
|
|
51
56
|
|
|
52
57
|
var _useContext = useContext(BizGlobalDataContext),
|
|
53
58
|
currentApp = _useContext.currentApp,
|
|
@@ -56,6 +61,10 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
56
61
|
isDemo = _useContext.isDemo;
|
|
57
62
|
|
|
58
63
|
useEffect(function () {
|
|
64
|
+
if (props.defaultValue) {
|
|
65
|
+
setFormData(props.defaultValue);
|
|
66
|
+
}
|
|
67
|
+
|
|
59
68
|
queryGroups();
|
|
60
69
|
}, []);
|
|
61
70
|
|
|
@@ -75,7 +84,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
75
84
|
return;
|
|
76
85
|
}
|
|
77
86
|
|
|
78
|
-
setGroupList(res.panels
|
|
87
|
+
setGroupList(res.panels);
|
|
79
88
|
}).catch(function () {
|
|
80
89
|
notification.error({
|
|
81
90
|
message: '获取看板列表失败'
|
|
@@ -214,7 +223,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
214
223
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
215
224
|
ref: refForm,
|
|
216
225
|
onFinish: onSubmit,
|
|
217
|
-
initialValues:
|
|
226
|
+
initialValues: formData,
|
|
218
227
|
requiredMark: false
|
|
219
228
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
220
229
|
label: "\u770B\u677F",
|
|
@@ -134,18 +134,9 @@
|
|
|
134
134
|
|
|
135
135
|
.ant-picker-input > input {
|
|
136
136
|
color: @text-color!important;
|
|
137
|
-
&[disabled] {
|
|
138
|
-
color: @disabled-color!important;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&.ant-picker-disabled {
|
|
143
|
-
span {
|
|
144
|
-
color: @disabled-color!important;
|
|
145
|
-
}
|
|
146
137
|
}
|
|
147
138
|
|
|
148
|
-
&:hover
|
|
139
|
+
&:hover,
|
|
149
140
|
&.ant-picker-focused {
|
|
150
141
|
.__default-hover() !important;
|
|
151
142
|
border-color: @border-color-base!important;
|
|
@@ -5,14 +5,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
7
|
import React, { useContext } from 'react';
|
|
8
|
+
import { RightOutlined } from '@ant-design/icons';
|
|
8
9
|
import BizEventSelector from '../../eventSelector';
|
|
9
10
|
import RunTimesCondition from './runTimesCondition';
|
|
10
11
|
import PeriodCondition from './periodCondition';
|
|
11
12
|
import PropCondition from './propCondition';
|
|
12
13
|
import './styles/eventCondition.less';
|
|
13
14
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
14
|
-
import { Tooltip } from 'antd';
|
|
15
|
-
import IconFont from '../../icon/iconFont';
|
|
16
15
|
|
|
17
16
|
var EventCondition = function EventCondition(props) {
|
|
18
17
|
var _useContext = useContext(BizUserConditionContext),
|
|
@@ -80,14 +79,10 @@ var EventCondition = function EventCondition(props) {
|
|
|
80
79
|
placeholder: "\u9009\u62E9\u4E00\u4E2A\u4E8B\u4EF6",
|
|
81
80
|
destroyPopupOnHide: true,
|
|
82
81
|
defaultSelectAble: false
|
|
83
|
-
})), /*#__PURE__*/React.createElement(
|
|
84
|
-
title: "\u6DFB\u52A0\u7B5B\u9009"
|
|
85
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
86
83
|
className: "".concat(classPrefix, "-event-condition-expand-attr"),
|
|
87
84
|
onClick: onAddAttr
|
|
88
|
-
}, /*#__PURE__*/React.createElement(
|
|
89
|
-
type: "shaixuan"
|
|
90
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
}, /*#__PURE__*/React.createElement(RightOutlined, null))), /*#__PURE__*/React.createElement("div", {
|
|
91
86
|
className: "".concat(classPrefix, "-event-condition-right")
|
|
92
87
|
}, condition.attrs.length && condition.eventId ? /*#__PURE__*/React.createElement("div", {
|
|
93
88
|
className: "".concat(classPrefix, "-event-condition-attrs")
|
package/es/userCondition/util.js
CHANGED
|
@@ -133,25 +133,22 @@ export function buildSelectLayer(data) {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
export function buildTagsGroup(list) {
|
|
136
|
+
var groupOrder = ['基本标签', '活跃标签', '行为标签', '预测标签', '其它标签'];
|
|
137
|
+
var groupsMap = {};
|
|
136
138
|
var options = [];
|
|
137
139
|
list.forEach(function (label) {
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (options[index]) {
|
|
142
|
-
options[index].children.push(label);
|
|
140
|
+
if (Object.hasOwn(groupsMap, label.labelGroup)) {
|
|
141
|
+
groupsMap[label.labelGroup].children.push(_objectSpread({}, label));
|
|
143
142
|
} else {
|
|
144
|
-
|
|
143
|
+
var group = {
|
|
145
144
|
labelGroup: label.labelGroup,
|
|
146
145
|
children: [_objectSpread({}, label)]
|
|
147
146
|
};
|
|
147
|
+
groupsMap[label.labelGroup] = group;
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (item) {
|
|
153
|
-
result.push(item);
|
|
154
|
-
}
|
|
150
|
+
groupOrder.map(function (group) {
|
|
151
|
+
groupsMap[group] && options.push(groupsMap[group]);
|
|
155
152
|
});
|
|
156
|
-
return
|
|
153
|
+
return options;
|
|
157
154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.7-
|
|
3
|
+
"version": "1.1.7-test-origin1.0",
|
|
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": "7253a8ad1612a216410ded6fd399127a8e986435"
|
|
64
64
|
}
|