@zgfe/business-lib 1.0.1-beta.0 → 1.0.5
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/analysisLayout/index.js +11 -9
- package/es/attrConditions/components/stringList.js +1 -0
- package/es/attrConditions/components/valuesList.js +4 -2
- package/es/attrConditions/group.js +1 -2
- package/es/attributeSelector/index.js +6 -4
- package/es/attributeSelector/listPanel.js +11 -9
- package/es/chart/index.js +12 -10
- package/es/components/iconFont.d.ts +4 -1
- package/es/components/iconFont.js +8 -4
- package/es/dialog/components/itemNode.d.ts +1 -0
- package/es/dialog/components/itemNode.js +15 -13
- package/es/dialog/components/list.js +7 -5
- package/es/dialog/components/selectToInput.js +8 -6
- package/es/dialog/index.js +14 -11
- package/es/dialog/types.d.ts +1 -1
- package/es/eventSelector/listPanel.js +4 -2
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/searchInput/demo/index.d.ts +2 -0
- package/es/searchInput/demo/index.js +5 -0
- package/es/select/handle.d.ts +2 -2
- package/es/select/handle.js +8 -8
- package/es/select/index.js +6 -4
- package/es/table/index.js +12 -10
- package/es/targetConditionGroup/index.js +5 -2
- package/es/targetSelector/index.js +6 -4
- package/es/userCondition/conditionTypeList.d.ts +10 -0
- package/es/userCondition/conditionTypeList.js +43 -0
- package/es/userCondition/conditionWrap.d.ts +7 -0
- package/es/userCondition/conditionWrap.js +18 -0
- package/es/userCondition/conditions/eventCondition.d.ts +8 -0
- package/es/userCondition/conditions/eventCondition.js +104 -0
- package/es/userCondition/conditions/periodCondition.d.ts +11 -0
- package/es/userCondition/conditions/periodCondition.js +156 -0
- package/es/userCondition/conditions/propCondition.d.ts +5 -0
- package/es/userCondition/conditions/propCondition.js +198 -0
- package/es/userCondition/conditions/runTimesCondition.d.ts +9 -0
- package/es/userCondition/conditions/runTimesCondition.js +78 -0
- package/es/userCondition/conditions/styles/eventCondition.less +49 -0
- package/es/userCondition/conditions/styles/periodCondition.less +14 -0
- package/es/userCondition/conditions/styles/propCondition.less +36 -0
- package/es/userCondition/conditions/styles/runTimesCondition.less +16 -0
- package/es/userCondition/demo/index.d.ts +2 -0
- package/es/userCondition/demo/index.js +73 -0
- package/es/userCondition/index.d.ts +7 -0
- package/es/userCondition/index.js +143 -0
- package/es/userCondition/orConditions.d.ts +5 -0
- package/es/userCondition/orConditions.js +202 -0
- package/es/userCondition/relationLabel.d.ts +6 -0
- package/es/userCondition/relationLabel.js +12 -0
- package/es/userCondition/styles/conditionTypeList.less +31 -0
- package/es/userCondition/styles/conditionWrap.less +14 -0
- package/es/userCondition/styles/index.less +13 -0
- package/es/userCondition/styles/orConditions.less +16 -0
- package/es/userCondition/styles/relationLabel.less +18 -0
- package/es/userCondition/types.d.ts +96 -0
- package/es/userCondition/types.js +1 -0
- package/es/userCondition/util.d.ts +3 -0
- package/es/userCondition/util.js +73 -0
- package/es/userGroup/index.js +6 -4
- package/package.json +2 -2
|
@@ -21,12 +21,9 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
21
21
|
leftHandle = props.leftHandle,
|
|
22
22
|
_props$isFixed = props.isFixed,
|
|
23
23
|
isFixed = _props$isFixed === void 0 ? false : _props$isFixed,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
minWidthOfLeft = _props$minWidthOfLeft === void 0 ? 320 : _props$minWidthOfLeft,
|
|
28
|
-
_props$maxWidthOfLeft = props.maxWidthOfLeft,
|
|
29
|
-
maxWidthOfLeft = _props$maxWidthOfLeft === void 0 ? 580 : _props$maxWidthOfLeft,
|
|
24
|
+
defaultLeftWidth = props.defaultLeftWidth,
|
|
25
|
+
minWidthOfLeft = props.minWidthOfLeft,
|
|
26
|
+
maxWidthOfLeft = props.maxWidthOfLeft,
|
|
30
27
|
className = props.className;
|
|
31
28
|
|
|
32
29
|
var _useState = useState(defaultLeftWidth),
|
|
@@ -65,11 +62,11 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
65
62
|
x = 56;
|
|
66
63
|
isDrag = false;
|
|
67
64
|
} else {
|
|
68
|
-
x = minWidthOfLeft;
|
|
65
|
+
x = minWidthOfLeft || 320;
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
if (x > maxWidthOfLeft) x = maxWidthOfLeft;
|
|
69
|
+
if (x > maxWidthOfLeft) x = maxWidthOfLeft || 580;
|
|
73
70
|
setWidth(x);
|
|
74
71
|
}
|
|
75
72
|
};
|
|
@@ -81,7 +78,7 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
81
78
|
|
|
82
79
|
function onCollapse() {
|
|
83
80
|
setShowLeft(function (show) {
|
|
84
|
-
setWidth(show ? 56 :
|
|
81
|
+
setWidth(show ? 56 : minWidthOfLeft);
|
|
85
82
|
return !show;
|
|
86
83
|
});
|
|
87
84
|
}
|
|
@@ -139,4 +136,9 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
139
136
|
}, children)));
|
|
140
137
|
};
|
|
141
138
|
|
|
139
|
+
BizAnalysisLayout.defaultProps = {
|
|
140
|
+
defaultLeftWidth: 320,
|
|
141
|
+
minWidthOfLeft: 320,
|
|
142
|
+
maxWidthOfLeft: 580
|
|
143
|
+
};
|
|
142
144
|
export default BizAnalysisLayout;
|
|
@@ -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
|
-
|
|
31
|
-
includeToday = _props$includeToday === void 0 ? false : _props$includeToday;
|
|
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(),
|
|
@@ -183,4 +182,7 @@ var ValuesList = function ValuesList(props) {
|
|
|
183
182
|
}
|
|
184
183
|
};
|
|
185
184
|
|
|
185
|
+
ValuesList.defaultProps = {
|
|
186
|
+
includeToday: false
|
|
187
|
+
};
|
|
186
188
|
export default ValuesList;
|
|
@@ -26,8 +26,7 @@ import { Skeleton } from 'antd';
|
|
|
26
26
|
|
|
27
27
|
var BizConditionGroup = function BizConditionGroup(props, ref) {
|
|
28
28
|
var eventIdList = props.eventIdList,
|
|
29
|
-
|
|
30
|
-
enableDelete = _props$enableDelete === void 0 ? true : _props$enableDelete,
|
|
29
|
+
enableDelete = props.enableDelete,
|
|
31
30
|
enableEventProp = props.enableEventProp,
|
|
32
31
|
enableUserProp = props.enableUserProp,
|
|
33
32
|
enableEnvProp = props.enableEnvProp,
|
|
@@ -25,10 +25,8 @@ import { BizGlobalDataContext } from '..';
|
|
|
25
25
|
import SelectHandle from '../select/handle';
|
|
26
26
|
|
|
27
27
|
var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
_props$placeholder = props.placeholder,
|
|
31
|
-
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder;
|
|
28
|
+
var enableDelete = props.enableDelete,
|
|
29
|
+
placeholder = props.placeholder;
|
|
32
30
|
|
|
33
31
|
var _useState = useState(),
|
|
34
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -134,4 +132,8 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
134
132
|
}))));
|
|
135
133
|
};
|
|
136
134
|
|
|
135
|
+
BizAttributeSelector.defaultProps = {
|
|
136
|
+
enableDelete: false,
|
|
137
|
+
placeholder: '请选择'
|
|
138
|
+
};
|
|
137
139
|
export default BizAttributeSelector;
|
|
@@ -21,14 +21,10 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
21
21
|
var _props$disableItemLis;
|
|
22
22
|
|
|
23
23
|
var id = props.id,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_props$enableUserProp = props.enableUserProp,
|
|
29
|
-
enableUserProp = _props$enableUserProp === void 0 ? true : _props$enableUserProp,
|
|
30
|
-
_props$eventIdList = props.eventIdList,
|
|
31
|
-
eventIdList = _props$eventIdList === void 0 ? [] : _props$eventIdList;
|
|
24
|
+
enableEnvProp = props.enableEnvProp,
|
|
25
|
+
enableEventProp = props.enableEventProp,
|
|
26
|
+
enableUserProp = props.enableUserProp,
|
|
27
|
+
eventIdList = props.eventIdList;
|
|
32
28
|
|
|
33
29
|
var _useState = useState(''),
|
|
34
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -76,7 +72,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
76
72
|
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
77
73
|
group.eventList.forEach(function (event) {
|
|
78
74
|
if (event.isDelete || event.isStop) return;
|
|
79
|
-
if (eventIdList.length && !eventIdList.includes(event.id)) return;
|
|
75
|
+
if (eventIdList && eventIdList.length && !eventIdList.includes(event.id)) return;
|
|
80
76
|
var group = {
|
|
81
77
|
isEvent: true,
|
|
82
78
|
groupName: event.alias || event.name,
|
|
@@ -203,4 +199,10 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
203
199
|
}, "\u6682\u65E0\u6570\u636E")));
|
|
204
200
|
};
|
|
205
201
|
|
|
202
|
+
AttrListPanel.defaultProps = {
|
|
203
|
+
enableEnvProp: true,
|
|
204
|
+
enableEventProp: false,
|
|
205
|
+
enableUserProp: true,
|
|
206
|
+
eventIdList: []
|
|
207
|
+
};
|
|
206
208
|
export default AttrListPanel;
|
package/es/chart/index.js
CHANGED
|
@@ -30,16 +30,11 @@ var BizChart = function BizChart(props) {
|
|
|
30
30
|
showList = props.showList,
|
|
31
31
|
option = props.option,
|
|
32
32
|
userGroup = props.userGroup,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
isCity = _props$isCity === void 0 ? true : _props$isCity,
|
|
39
|
-
_props$xRotate = props.xRotate,
|
|
40
|
-
xRotate = _props$xRotate === void 0 ? 0 : _props$xRotate,
|
|
41
|
-
_props$yRotate = props.yRotate,
|
|
42
|
-
yRotate = _props$yRotate === void 0 ? 0 : _props$yRotate,
|
|
33
|
+
showAll = props.showAll,
|
|
34
|
+
reverseXAxis = props.reverseXAxis,
|
|
35
|
+
isCity = props.isCity,
|
|
36
|
+
xRotate = props.xRotate,
|
|
37
|
+
yRotate = props.yRotate,
|
|
43
38
|
seriesName = props.seriesName,
|
|
44
39
|
colors = props.colors,
|
|
45
40
|
tooltipFormatter = props.tooltipFormatter,
|
|
@@ -99,4 +94,11 @@ var BizChart = function BizChart(props) {
|
|
|
99
94
|
});
|
|
100
95
|
};
|
|
101
96
|
|
|
97
|
+
BizChart.defaultProps = {
|
|
98
|
+
showAll: false,
|
|
99
|
+
reverseXAxis: false,
|
|
100
|
+
isCity: true,
|
|
101
|
+
xRotate: 0,
|
|
102
|
+
yRotate: 0
|
|
103
|
+
};
|
|
102
104
|
export default BizChart;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconFontProps } from '@ant-design/icons/lib/components/IconFont';
|
|
3
3
|
import '../assets/iconfont/iconfont.css';
|
|
4
|
-
|
|
4
|
+
interface Props extends IconFontProps {
|
|
5
|
+
family?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const IconFont: React.FC<Props>;
|
|
5
8
|
export default IconFont;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "type"];
|
|
1
|
+
var _excluded = ["className", "type", "family"];
|
|
2
2
|
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
@@ -14,17 +14,21 @@ import React, { useMemo } from 'react';
|
|
|
14
14
|
import '../assets/iconfont/iconfont.css';
|
|
15
15
|
|
|
16
16
|
var IconFont = function IconFont(props) {
|
|
17
|
-
var
|
|
18
|
-
className = _props$className === void 0 ? '' : _props$className,
|
|
17
|
+
var className = props.className,
|
|
19
18
|
type = props.type,
|
|
19
|
+
family = props.family,
|
|
20
20
|
rest = _objectWithoutProperties(props, _excluded);
|
|
21
21
|
|
|
22
22
|
var iconClassName = useMemo(function () {
|
|
23
|
-
return "
|
|
23
|
+
return "".concat(family, " ").concat(className, " bs").concat(type);
|
|
24
24
|
}, [className, type]);
|
|
25
25
|
return /*#__PURE__*/React.createElement("span", _objectSpread({
|
|
26
26
|
className: iconClassName
|
|
27
27
|
}, rest));
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
IconFont.defaultProps = {
|
|
31
|
+
className: '',
|
|
32
|
+
family: 'bsicon'
|
|
33
|
+
};
|
|
30
34
|
export default IconFont;
|
|
@@ -13,18 +13,14 @@ var ItemNode = function ItemNode(props) {
|
|
|
13
13
|
label = _props$field.label,
|
|
14
14
|
options = _props$field.options,
|
|
15
15
|
placeholder = _props$field.placeholder,
|
|
16
|
-
_props$field$fieldNam = _props$field.fieldNames,
|
|
17
|
-
fieldNames = _props$field$fieldNam === void 0 ? {
|
|
18
|
-
label: 'label',
|
|
19
|
-
value: 'value'
|
|
20
|
-
} : _props$field$fieldNam,
|
|
21
16
|
extendName = _props$field.extendName,
|
|
22
17
|
direction = _props$field.direction,
|
|
23
18
|
multiple = _props$field.multiple,
|
|
24
19
|
enableSearch = _props$field.enableSearch,
|
|
25
20
|
selectType = _props$field.selectType,
|
|
26
21
|
overlayWidth = _props$field.overlayWidth,
|
|
27
|
-
extra = _props$field.extra
|
|
22
|
+
extra = _props$field.extra,
|
|
23
|
+
fieldNames = props.fieldNames;
|
|
28
24
|
|
|
29
25
|
var onChange = function onChange(data) {
|
|
30
26
|
if (props.onChange) props.onChange(data);
|
|
@@ -57,8 +53,8 @@ var ItemNode = function ItemNode(props) {
|
|
|
57
53
|
className: "".concat(classPrefix, "-select"),
|
|
58
54
|
options: options || [],
|
|
59
55
|
defaultValue: props.value,
|
|
60
|
-
keyField: fieldNames.value,
|
|
61
|
-
labelField: fieldNames.label,
|
|
56
|
+
keyField: fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value,
|
|
57
|
+
labelField: fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label,
|
|
62
58
|
multiple: multiple,
|
|
63
59
|
enableSearch: enableSearch,
|
|
64
60
|
type: selectType,
|
|
@@ -70,8 +66,8 @@ var ItemNode = function ItemNode(props) {
|
|
|
70
66
|
return /*#__PURE__*/React.createElement(BizSelectToInput, {
|
|
71
67
|
value: props.value,
|
|
72
68
|
options: options || [],
|
|
73
|
-
keyField: fieldNames.value,
|
|
74
|
-
labelField: fieldNames.label,
|
|
69
|
+
keyField: fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value,
|
|
70
|
+
labelField: fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label,
|
|
75
71
|
onChange: onChange,
|
|
76
72
|
extendName: extendName
|
|
77
73
|
});
|
|
@@ -89,9 +85,9 @@ var ItemNode = function ItemNode(props) {
|
|
|
89
85
|
direction: direction || 'horizontal'
|
|
90
86
|
}, options && options.map(function (item) {
|
|
91
87
|
return /*#__PURE__*/React.createElement(Radio, {
|
|
92
|
-
key: item[fieldNames.value],
|
|
93
|
-
value: item[fieldNames.value]
|
|
94
|
-
}, item[fieldNames.label]);
|
|
88
|
+
key: item[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value],
|
|
89
|
+
value: item[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value]
|
|
90
|
+
}, item[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label]);
|
|
95
91
|
})));
|
|
96
92
|
} else if (type === 'list') {
|
|
97
93
|
return /*#__PURE__*/React.createElement(BizList, {
|
|
@@ -104,4 +100,10 @@ var ItemNode = function ItemNode(props) {
|
|
|
104
100
|
return /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u76F8\u5173\u7EC4\u4EF6");
|
|
105
101
|
};
|
|
106
102
|
|
|
103
|
+
ItemNode.defaultProps = {
|
|
104
|
+
fieldNames: {
|
|
105
|
+
label: 'label',
|
|
106
|
+
value: 'value'
|
|
107
|
+
}
|
|
108
|
+
};
|
|
107
109
|
export default ItemNode;
|
|
@@ -16,25 +16,24 @@ import { typeMenus } from '../data/data';
|
|
|
16
16
|
import './styles/list.less';
|
|
17
17
|
|
|
18
18
|
var BizList = function BizList(props) {
|
|
19
|
-
var
|
|
20
|
-
options = _props$options === void 0 ? typeMenus : _props$options,
|
|
19
|
+
var options = props.options,
|
|
21
20
|
value = props.value,
|
|
22
21
|
onChange = props.onChange;
|
|
23
22
|
|
|
24
|
-
var _useState = useState(value || options[0].id),
|
|
23
|
+
var _useState = useState(value || options && options[0].id),
|
|
25
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
25
|
selectList = _useState2[0],
|
|
27
26
|
setSelectList = _useState2[1];
|
|
28
27
|
|
|
29
28
|
var classPrefix = 'biz-list';
|
|
30
29
|
useEffect(function () {
|
|
31
|
-
if (!value) {
|
|
30
|
+
if (!value && options) {
|
|
32
31
|
onChange && onChange(options[0].id);
|
|
33
32
|
}
|
|
34
33
|
}, []);
|
|
35
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
35
|
className: classPrefix
|
|
37
|
-
}, options.map(function (item) {
|
|
36
|
+
}, options && options.map(function (item) {
|
|
38
37
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
38
|
key: item.id,
|
|
40
39
|
className: "".concat(classPrefix, "-item ").concat(selectList === item.id ? 'active' : ''),
|
|
@@ -55,4 +54,7 @@ var BizList = function BizList(props) {
|
|
|
55
54
|
}));
|
|
56
55
|
};
|
|
57
56
|
|
|
57
|
+
BizList.defaultProps = {
|
|
58
|
+
options: typeMenus
|
|
59
|
+
};
|
|
58
60
|
export default BizList;
|
|
@@ -31,14 +31,11 @@ import { inputOptions } from '../data/data';
|
|
|
31
31
|
|
|
32
32
|
var BizSelectToInput = function BizSelectToInput(props) {
|
|
33
33
|
var options = props.options,
|
|
34
|
-
|
|
35
|
-
name = _props$name === void 0 ? '' : _props$name,
|
|
34
|
+
name = props.name,
|
|
36
35
|
extendName = props.extendName,
|
|
37
36
|
value = props.value,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_props$labelField = props.labelField,
|
|
41
|
-
labelField = _props$labelField === void 0 ? 'label' : _props$labelField,
|
|
37
|
+
keyField = props.keyField,
|
|
38
|
+
labelField = props.labelField,
|
|
42
39
|
res = _objectWithoutProperties(props, _excluded);
|
|
43
40
|
|
|
44
41
|
var _useState = useState(true),
|
|
@@ -170,4 +167,9 @@ var BizSelectToInput = function BizSelectToInput(props) {
|
|
|
170
167
|
}))))));
|
|
171
168
|
};
|
|
172
169
|
|
|
170
|
+
BizSelectToInput.defaultProps = {
|
|
171
|
+
keyField: 'value',
|
|
172
|
+
labelField: 'label',
|
|
173
|
+
name: ''
|
|
174
|
+
};
|
|
173
175
|
export default BizSelectToInput;
|
package/es/dialog/index.js
CHANGED
|
@@ -39,16 +39,12 @@ import ItemNode from './components/itemNode';
|
|
|
39
39
|
export var classPrefix = 'biz-dialog';
|
|
40
40
|
|
|
41
41
|
var BizDialog = function BizDialog(props) {
|
|
42
|
-
var
|
|
43
|
-
width = _props$width === void 0 ? 520 : _props$width,
|
|
42
|
+
var width = props.width,
|
|
44
43
|
initialValues = props.initialValues,
|
|
45
44
|
fields = props.fields,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
showMark = _props$showMark === void 0 ? false : _props$showMark,
|
|
50
|
-
_props$layout = props.layout,
|
|
51
|
-
layout = _props$layout === void 0 ? 'horizontal' : _props$layout,
|
|
45
|
+
visible = props.visible,
|
|
46
|
+
showMark = props.showMark,
|
|
47
|
+
layout = props.layout,
|
|
52
48
|
res = _objectWithoutProperties(props, _excluded);
|
|
53
49
|
|
|
54
50
|
var _Form$useForm = Form.useForm(),
|
|
@@ -103,7 +99,6 @@ var BizDialog = function BizDialog(props) {
|
|
|
103
99
|
}), /*#__PURE__*/React.createElement(Form, {
|
|
104
100
|
className: classPrefix,
|
|
105
101
|
form: form,
|
|
106
|
-
name: "form_in_modal",
|
|
107
102
|
requiredMark: showMark,
|
|
108
103
|
initialValues: initialValues,
|
|
109
104
|
layout: layout
|
|
@@ -179,7 +174,8 @@ var BizDialog = function BizDialog(props) {
|
|
|
179
174
|
},
|
|
180
175
|
shouldUpdate: true
|
|
181
176
|
}, /*#__PURE__*/React.createElement(ItemNode, {
|
|
182
|
-
field: item
|
|
177
|
+
field: item,
|
|
178
|
+
fieldNames: item.fieldNames
|
|
183
179
|
})) : null;
|
|
184
180
|
});
|
|
185
181
|
} else {
|
|
@@ -195,10 +191,17 @@ var BizDialog = function BizDialog(props) {
|
|
|
195
191
|
},
|
|
196
192
|
shouldUpdate: true
|
|
197
193
|
}, /*#__PURE__*/React.createElement(ItemNode, {
|
|
198
|
-
field: item
|
|
194
|
+
field: item,
|
|
195
|
+
fieldNames: item.fieldNames
|
|
199
196
|
}));
|
|
200
197
|
}
|
|
201
198
|
})));
|
|
202
199
|
};
|
|
203
200
|
|
|
201
|
+
BizDialog.defaultProps = {
|
|
202
|
+
width: 520,
|
|
203
|
+
visible: false,
|
|
204
|
+
showMark: false,
|
|
205
|
+
layout: 'horizontal'
|
|
206
|
+
};
|
|
204
207
|
export default BizDialog;
|
package/es/dialog/types.d.ts
CHANGED
|
@@ -28,8 +28,7 @@ import BizSearchInput from '../searchInput';
|
|
|
28
28
|
import EventListOption from './option';
|
|
29
29
|
|
|
30
30
|
var EventListPanel = function EventListPanel(props) {
|
|
31
|
-
var
|
|
32
|
-
showOverview = _props$showOverview === void 0 ? true : _props$showOverview;
|
|
31
|
+
var showOverview = props.showOverview;
|
|
33
32
|
|
|
34
33
|
var _useState = useState(''),
|
|
35
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -192,4 +191,7 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
192
191
|
})))));
|
|
193
192
|
};
|
|
194
193
|
|
|
194
|
+
EventListPanel.defaultProps = {
|
|
195
|
+
showOverview: true
|
|
196
|
+
};
|
|
195
197
|
export default EventListPanel;
|
package/es/index.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ import { util, ajax } from './utils';
|
|
|
17
17
|
import theme from './assets/theme';
|
|
18
18
|
import convertAttributeData from './attributeSelector/util';
|
|
19
19
|
import BizGlobalDataContext from './context';
|
|
20
|
-
|
|
20
|
+
import BizUserCondition from './userCondition';
|
|
21
|
+
import BizSearchInput from './searchInput';
|
|
22
|
+
export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, ajax, util, theme, convertAttributeData, };
|
|
21
23
|
export type { UserGroupTypes } from './userGroup/types';
|
|
22
24
|
export type { BizSelectTypes } from './select/types';
|
|
23
25
|
export type { AttributeSelect } from './attributeSelector/types';
|
package/es/index.js
CHANGED
|
@@ -16,4 +16,6 @@ import { util, ajax } from './utils';
|
|
|
16
16
|
import theme from './assets/theme';
|
|
17
17
|
import convertAttributeData from './attributeSelector/util';
|
|
18
18
|
import BizGlobalDataContext from './context';
|
|
19
|
-
|
|
19
|
+
import BizUserCondition from './userCondition';
|
|
20
|
+
import BizSearchInput from './searchInput';
|
|
21
|
+
export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, ajax, util, theme, convertAttributeData };
|
package/es/select/handle.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/handle.less';
|
|
3
3
|
import { HandlerTypes } from './types';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const SelectHandle: React.ForwardRefExoticComponent<HandlerTypes & React.RefAttributes<any>>;
|
|
5
|
+
export default SelectHandle;
|
package/es/select/handle.js
CHANGED
|
@@ -14,13 +14,10 @@ import { Input, Tag, Tooltip } from 'antd';
|
|
|
14
14
|
import React, { useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
15
15
|
import IconFont from '../components/iconFont';
|
|
16
16
|
import './styles/handle.less';
|
|
17
|
-
|
|
18
|
-
var SelectHandle = function SelectHandle(props, ref) {
|
|
17
|
+
var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
19
18
|
var placeholder = props.placeholder,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_props$keyField = props.keyField,
|
|
23
|
-
keyField = _props$keyField === void 0 ? 'id' : _props$keyField,
|
|
19
|
+
labelField = props.labelField,
|
|
20
|
+
keyField = props.keyField,
|
|
24
21
|
_props$border = props.border,
|
|
25
22
|
border = _props$border === void 0 ? true : _props$border;
|
|
26
23
|
var classPrefix = 'biz-select-handle';
|
|
@@ -114,6 +111,9 @@ var SelectHandle = function SelectHandle(props, ref) {
|
|
|
114
111
|
className: "".concat(classPrefix, "-expand-icon"),
|
|
115
112
|
type: 'icon-xiangxia'
|
|
116
113
|
}));
|
|
114
|
+
});
|
|
115
|
+
SelectHandle.defaultProps = {
|
|
116
|
+
labelField: 'label',
|
|
117
|
+
keyField: 'id'
|
|
117
118
|
};
|
|
118
|
-
|
|
119
|
-
export default /*#__PURE__*/React.forwardRef(SelectHandle);
|
|
119
|
+
export default SelectHandle;
|
package/es/select/index.js
CHANGED
|
@@ -32,10 +32,8 @@ export var classPrefix = 'biz-select';
|
|
|
32
32
|
|
|
33
33
|
var BizSelect = function BizSelect(props) {
|
|
34
34
|
var overlayWidth = props.overlayWidth,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_props$keyField = props.keyField,
|
|
38
|
-
keyField = _props$keyField === void 0 ? 'id' : _props$keyField,
|
|
35
|
+
labelField = props.labelField,
|
|
36
|
+
keyField = props.keyField,
|
|
39
37
|
res = _objectWithoutProperties(props, _excluded);
|
|
40
38
|
|
|
41
39
|
var _useState = useState(),
|
|
@@ -207,4 +205,8 @@ var BizSelect = function BizSelect(props) {
|
|
|
207
205
|
})));
|
|
208
206
|
};
|
|
209
207
|
|
|
208
|
+
BizSelect.defaultProps = {
|
|
209
|
+
labelField: 'label',
|
|
210
|
+
keyField: 'id'
|
|
211
|
+
};
|
|
210
212
|
export default BizSelect;
|
package/es/table/index.js
CHANGED
|
@@ -29,13 +29,10 @@ import './styles/index.less';
|
|
|
29
29
|
var BizTable = function BizTable(props) {
|
|
30
30
|
var dataSource = props.dataSource,
|
|
31
31
|
columns = props.columns,
|
|
32
|
-
|
|
33
|
-
total = _props$total === void 0 ? dataSource.length : _props$total,
|
|
32
|
+
total = props.total,
|
|
34
33
|
scroll = props.scroll,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_props$pagination = props.pagination,
|
|
38
|
-
pagination = _props$pagination === void 0 ? true : _props$pagination,
|
|
34
|
+
pageSize = props.pageSize,
|
|
35
|
+
pagination = props.pagination,
|
|
39
36
|
res = _objectWithoutProperties(props, _excluded);
|
|
40
37
|
|
|
41
38
|
var _useState = useState(scroll),
|
|
@@ -45,8 +42,9 @@ var BizTable = function BizTable(props) {
|
|
|
45
42
|
|
|
46
43
|
var onChangePage = function onChangePage(page, pageSize) {
|
|
47
44
|
var count = page * pageSize;
|
|
45
|
+
var totalCount = total || dataSource.length;
|
|
48
46
|
|
|
49
|
-
if (pageSize > 10 && (count <=
|
|
47
|
+
if (pageSize > 10 && (count <= totalCount || totalCount - (page - 1) * pageSize > 10)) {
|
|
50
48
|
setScrollData(function (data) {
|
|
51
49
|
return _objectSpread(_objectSpread({}, data), {}, {
|
|
52
50
|
y: (scroll === null || scroll === void 0 ? void 0 : scroll.y) || 490
|
|
@@ -66,12 +64,12 @@ var BizTable = function BizTable(props) {
|
|
|
66
64
|
pagination: pagination && {
|
|
67
65
|
className: 'biz-pagination',
|
|
68
66
|
showSizeChanger: true,
|
|
69
|
-
total: total,
|
|
67
|
+
total: total || dataSource.length,
|
|
70
68
|
showQuickJumper: true,
|
|
71
69
|
showTotal: function showTotal(totalNum) {
|
|
72
|
-
return
|
|
70
|
+
return /*#__PURE__*/React.createElement("span", null, "\u5171 ", /*#__PURE__*/React.createElement("a", {
|
|
73
71
|
className: "biz-table-total"
|
|
74
|
-
}, totalNum), " \u6761")
|
|
72
|
+
}, totalNum), " \u6761");
|
|
75
73
|
},
|
|
76
74
|
onChange: onChangePage
|
|
77
75
|
},
|
|
@@ -79,4 +77,8 @@ var BizTable = function BizTable(props) {
|
|
|
79
77
|
}));
|
|
80
78
|
};
|
|
81
79
|
|
|
80
|
+
BizTable.defaultProps = {
|
|
81
|
+
pageSize: 10,
|
|
82
|
+
pagination: true
|
|
83
|
+
};
|
|
82
84
|
export default BizTable;
|
|
@@ -22,8 +22,7 @@ export var classPrefix = 'biz-target';
|
|
|
22
22
|
var BizTargetCondition = function BizTargetCondition(props) {
|
|
23
23
|
var _targetData$value2, _targetData$value2$ev, _targetData$value3, _targetData$value3$ev, _targetData$value4, _targetData$value4$ev, _targetData$value5, _targetData$value5$ev;
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
max = _props$max === void 0 ? 5 : _props$max;
|
|
25
|
+
var max = props.max;
|
|
27
26
|
|
|
28
27
|
var _useState = useState(),
|
|
29
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -222,10 +221,14 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
222
221
|
ref: conditionRef,
|
|
223
222
|
value: filters,
|
|
224
223
|
enableEventProp: true,
|
|
224
|
+
enableDelete: true,
|
|
225
225
|
eventIdList: (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,
|
|
226
226
|
onChange: onChangeFilters,
|
|
227
227
|
onConditionsCount: setCount
|
|
228
228
|
})));
|
|
229
229
|
};
|
|
230
230
|
|
|
231
|
+
BizTargetCondition.defaultProps = {
|
|
232
|
+
max: 5
|
|
233
|
+
};
|
|
231
234
|
export default BizTargetCondition;
|
|
@@ -21,10 +21,8 @@ export var classPrefix = 'biz-target-select';
|
|
|
21
21
|
var BizTargetSelector = function BizTargetSelector(props) {
|
|
22
22
|
var _targetData$event;
|
|
23
23
|
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
_props$enableDelete = props.enableDelete,
|
|
27
|
-
enableDelete = _props$enableDelete === void 0 ? true : _props$enableDelete;
|
|
24
|
+
var enableAdd = props.enableAdd,
|
|
25
|
+
enableDelete = props.enableDelete;
|
|
28
26
|
|
|
29
27
|
var _useState = useState(''),
|
|
30
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -133,4 +131,8 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
133
131
|
}));
|
|
134
132
|
};
|
|
135
133
|
|
|
134
|
+
BizTargetSelector.defaultProps = {
|
|
135
|
+
enableAdd: true,
|
|
136
|
+
enableDelete: true
|
|
137
|
+
};
|
|
136
138
|
export default BizTargetSelector;
|