@zgfe/business-lib 1.0.8 → 1.0.11
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/components/addPanel.d.ts +7 -0
- package/es/addToPanel/components/addPanel.js +101 -0
- package/es/addToPanel/components/radioGroup.d.ts +7 -0
- package/es/addToPanel/components/radioGroup.js +29 -0
- package/es/addToPanel/components/styleList.d.ts +5 -0
- package/es/{dialog/components/tab.js → addToPanel/components/styleList.js} +9 -6
- package/es/{dialog/demo/index2.d.ts → addToPanel/demo/edit.d.ts} +0 -0
- package/es/{dialog/components/list.js → addToPanel/demo/edit.js} +63 -44
- package/es/{dialog/demo/index3.d.ts → addToPanel/demo/index.d.ts} +0 -0
- package/es/addToPanel/demo/index.js +78 -0
- package/es/addToPanel/index.d.ts +6 -0
- package/es/addToPanel/index.js +253 -0
- package/es/addToPanel/styles/addPanel.less +25 -0
- package/es/addToPanel/styles/index.less +6 -0
- package/es/{dialog/components/styles/tab.less → addToPanel/styles/style.less} +7 -2
- package/es/addToPanel/types.d.ts +56 -0
- package/es/addToPanel/types.js +1 -0
- package/es/addToScene/addGroup.d.ts +11 -0
- package/es/addToScene/addGroup.js +34 -0
- package/es/addToScene/demo/index.d.ts +2 -0
- package/es/addToScene/demo/index.js +34 -0
- package/es/addToScene/index.d.ts +6 -0
- package/es/addToScene/index.js +192 -0
- package/es/addToScene/styles/index.less +23 -0
- package/es/addToScene/types.d.ts +29 -0
- package/es/addToScene/types.js +1 -0
- package/es/analysisLayout/demo/index.d.ts +1 -0
- package/es/analysisLayout/demo/index.js +7 -1
- package/es/analysisLayout/index.d.ts +1 -0
- package/es/analysisLayout/index.js +2 -1
- package/es/analysisLayout/index.less +3 -2
- package/es/assets/styles/chunks.less +19 -3
- package/es/assets/styles/resetAntd.less +61 -20
- package/es/assets/styles/variable.less +8 -1
- package/es/assets/theme.d.ts +3 -0
- package/es/assets/theme.js +4 -1
- package/es/attrConditions/components/stringList.js +4 -3
- package/es/attributeSelector/demo/index.js +1 -1
- package/es/attributeSelector/index.js +12 -2
- package/es/attributeSelector/styles/index.less +2 -1
- package/es/chart/demo/index.js +36 -4
- package/es/chart/index.d.ts +1 -1
- package/es/chart/index.js +16 -5
- package/es/config.d.ts +15 -0
- package/es/config.js +8 -0
- package/es/constants/apis.d.ts +8 -0
- package/es/constants/apis.js +8 -0
- package/es/datePicker/styles/index.less +4 -0
- package/es/dialog/demo/index.d.ts +0 -29
- package/es/dialog/demo/index.js +6 -130
- package/es/dialog/index.d.ts +1 -2
- package/es/dialog/index.js +15 -183
- package/es/dialog/types.d.ts +2 -74
- package/es/eventSelector/listPanel.js +8 -0
- package/es/eventSelector/styles/index.less +11 -5
- package/es/index.d.ts +4 -1
- package/es/index.js +4 -1
- package/es/select/index.js +4 -2
- package/es/select/overlay.js +3 -1
- package/es/select/styles/handle.less +2 -0
- package/es/select/styles/index.less +0 -3
- package/es/select/types.d.ts +2 -0
- package/es/targetSelector/styles/index.less +3 -1
- package/es/userGroup/demo/index.js +4 -1
- package/es/userGroup/index.js +1 -1
- package/es/utils/ajax.d.ts +33 -7
- package/es/utils/ajax.js +212 -111
- package/package.json +4 -3
- package/es/dialog/components/itemNode.d.ts +0 -10
- package/es/dialog/components/itemNode.js +0 -109
- package/es/dialog/components/list.d.ts +0 -5
- package/es/dialog/components/selectToInput.d.ts +0 -6
- package/es/dialog/components/selectToInput.js +0 -175
- package/es/dialog/components/styles/handle.less +0 -39
- package/es/dialog/components/styles/list.less +0 -60
- package/es/dialog/components/tab.d.ts +0 -5
- package/es/dialog/data/data.d.ts +0 -20
- package/es/dialog/data/data.js +0 -73
- package/es/dialog/demo/index2.js +0 -109
- package/es/dialog/demo/index3.js +0 -61
package/es/dialog/index.js
CHANGED
|
@@ -1,207 +1,39 @@
|
|
|
1
|
-
var _excluded = ["width", "initialValues", "fields", "visible", "showMark", "layout"];
|
|
2
|
-
|
|
3
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
|
-
|
|
5
1
|
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; }
|
|
6
2
|
|
|
7
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
4
|
|
|
9
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; }
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
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."); }
|
|
14
|
-
|
|
15
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16
|
-
|
|
17
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
18
|
-
|
|
19
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
-
|
|
21
|
-
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."); }
|
|
22
|
-
|
|
23
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
|
-
|
|
25
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
26
|
-
|
|
27
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
28
|
-
|
|
29
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
|
-
|
|
31
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
32
|
-
|
|
33
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
34
|
-
|
|
35
|
-
import { Form, Modal } from 'antd';
|
|
36
|
-
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import { Modal } from 'antd';
|
|
8
|
+
import React from 'react';
|
|
37
9
|
import './styles/index.less';
|
|
38
|
-
import ItemNode from './components/itemNode';
|
|
39
10
|
export var classPrefix = 'biz-dialog';
|
|
40
11
|
|
|
41
12
|
var BizDialog = function BizDialog(props) {
|
|
42
|
-
|
|
43
|
-
initialValues = props.initialValues,
|
|
44
|
-
fields = props.fields,
|
|
45
|
-
visible = props.visible,
|
|
46
|
-
showMark = props.showMark,
|
|
47
|
-
layout = props.layout,
|
|
48
|
-
res = _objectWithoutProperties(props, _excluded);
|
|
49
|
-
|
|
50
|
-
var _Form$useForm = Form.useForm(),
|
|
51
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
52
|
-
form = _Form$useForm2[0];
|
|
53
|
-
|
|
54
|
-
var _useState = useState(fields),
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
-
formFields = _useState2[0],
|
|
57
|
-
setFormFields = _useState2[1];
|
|
58
|
-
|
|
59
|
-
useEffect(function () {
|
|
60
|
-
if (visible) {
|
|
61
|
-
form.resetFields();
|
|
62
|
-
}
|
|
63
|
-
}, [visible]);
|
|
64
|
-
useEffect(function () {
|
|
65
|
-
setFormFields(function () {
|
|
66
|
-
return _toConsumableArray(fields);
|
|
67
|
-
});
|
|
68
|
-
}, [fields]);
|
|
69
|
-
|
|
70
|
-
var onOk = function onOk() {
|
|
71
|
-
form.validateFields().then(function (values) {
|
|
72
|
-
props.onOk && props.onOk(values);
|
|
73
|
-
}).catch(function (info) {
|
|
74
|
-
console.log('Validate Failed:', info);
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
var onCancel = function onCancel() {
|
|
79
|
-
if (props.onCancel) props.onCancel();
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return /*#__PURE__*/React.createElement(Modal, _objectSpread(_objectSpread({
|
|
83
|
-
width: width,
|
|
84
|
-
centered: true,
|
|
85
|
-
visible: visible,
|
|
13
|
+
return /*#__PURE__*/React.createElement(Modal, _objectSpread({
|
|
86
14
|
maskStyle: {
|
|
87
15
|
background: '#021429',
|
|
88
16
|
opacity: 0.8
|
|
89
17
|
},
|
|
90
18
|
bodyStyle: {
|
|
91
19
|
borderRadius: '10px'
|
|
92
|
-
},
|
|
93
|
-
cancelText: "\u53D6\u6D88",
|
|
94
|
-
okText: "\u786E\u5B9A",
|
|
95
|
-
closable: false
|
|
96
|
-
}, res), {}, {
|
|
97
|
-
onCancel: onCancel,
|
|
98
|
-
onOk: onOk
|
|
99
|
-
}), /*#__PURE__*/React.createElement(Form, {
|
|
100
|
-
className: classPrefix,
|
|
101
|
-
form: form,
|
|
102
|
-
requiredMark: showMark,
|
|
103
|
-
initialValues: initialValues,
|
|
104
|
-
layout: layout
|
|
105
|
-
}, formFields === null || formFields === void 0 ? void 0 : formFields.map(function (item) {
|
|
106
|
-
if (item.dependenceFields && Object.keys(item.dependenceFields).length > 0) {
|
|
107
|
-
var keys = Object.keys(item.dependenceFields);
|
|
108
|
-
var dependenceFields = item.dependenceFields;
|
|
109
|
-
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
110
|
-
key: item.name,
|
|
111
|
-
noStyle: true,
|
|
112
|
-
shouldUpdate: function shouldUpdate(prevValues, curValues) {
|
|
113
|
-
var flag = false;
|
|
114
|
-
|
|
115
|
-
var _iterator = _createForOfIteratorHelper(keys),
|
|
116
|
-
_step;
|
|
117
|
-
|
|
118
|
-
try {
|
|
119
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
120
|
-
var key = _step.value;
|
|
121
|
-
|
|
122
|
-
if (item.dependencekeys && item.dependencekeys[key]) {
|
|
123
|
-
var dKey = item.dependencekeys[key];
|
|
124
|
-
|
|
125
|
-
if (prevValues[key][dKey] !== curValues[key][dKey]) {
|
|
126
|
-
flag = true;
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
if (prevValues[key] !== curValues[key]) {
|
|
131
|
-
flag = true;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
} catch (err) {
|
|
137
|
-
_iterator.e(err);
|
|
138
|
-
} finally {
|
|
139
|
-
_iterator.f();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return flag;
|
|
143
|
-
}
|
|
144
|
-
}, function (_ref) {
|
|
145
|
-
var getFieldValue = _ref.getFieldValue;
|
|
146
|
-
var flag = true;
|
|
147
|
-
|
|
148
|
-
var _iterator2 = _createForOfIteratorHelper(keys),
|
|
149
|
-
_step2;
|
|
150
|
-
|
|
151
|
-
try {
|
|
152
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
153
|
-
var key = _step2.value;
|
|
154
|
-
|
|
155
|
-
if (getFieldValue(key) !== dependenceFields[key]) {
|
|
156
|
-
flag = false;
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
} catch (err) {
|
|
161
|
-
_iterator2.e(err);
|
|
162
|
-
} finally {
|
|
163
|
-
_iterator2.f();
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return flag ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
167
|
-
label: item.label,
|
|
168
|
-
name: item.name,
|
|
169
|
-
hidden: item.hidden,
|
|
170
|
-
rules: item.rules,
|
|
171
|
-
help: item.help,
|
|
172
|
-
wrapperCol: {
|
|
173
|
-
offset: !item.label && layout === 'horizontal' ? 2 : 0
|
|
174
|
-
},
|
|
175
|
-
shouldUpdate: true
|
|
176
|
-
}, /*#__PURE__*/React.createElement(ItemNode, {
|
|
177
|
-
field: item,
|
|
178
|
-
fieldNames: item.fieldNames
|
|
179
|
-
})) : null;
|
|
180
|
-
});
|
|
181
|
-
} else {
|
|
182
|
-
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
183
|
-
key: item.name,
|
|
184
|
-
label: item.label,
|
|
185
|
-
name: item.name,
|
|
186
|
-
hidden: item.hidden,
|
|
187
|
-
rules: item.rules,
|
|
188
|
-
help: item.help,
|
|
189
|
-
wrapperCol: {
|
|
190
|
-
offset: !item.label && layout === 'horizontal' ? 2 : 0
|
|
191
|
-
},
|
|
192
|
-
shouldUpdate: true
|
|
193
|
-
}, /*#__PURE__*/React.createElement(ItemNode, {
|
|
194
|
-
field: item,
|
|
195
|
-
fieldNames: item.fieldNames
|
|
196
|
-
}));
|
|
197
20
|
}
|
|
198
|
-
}))
|
|
21
|
+
}, props), props.children);
|
|
199
22
|
};
|
|
200
23
|
|
|
201
24
|
BizDialog.defaultProps = {
|
|
202
25
|
width: 520,
|
|
203
26
|
visible: false,
|
|
204
|
-
|
|
205
|
-
|
|
27
|
+
cancelText: '取消',
|
|
28
|
+
okText: '确定',
|
|
29
|
+
closable: false,
|
|
30
|
+
centered: true,
|
|
31
|
+
okButtonProps: {
|
|
32
|
+
size: 'large'
|
|
33
|
+
},
|
|
34
|
+
cancelButtonProps: {
|
|
35
|
+
size: 'large',
|
|
36
|
+
type: 'text'
|
|
37
|
+
}
|
|
206
38
|
};
|
|
207
39
|
export default BizDialog;
|
package/es/dialog/types.d.ts
CHANGED
|
@@ -1,77 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { BizSelectTypes } from '../select/types';
|
|
4
|
-
export declare namespace TabTypes {
|
|
5
|
-
interface Props {
|
|
6
|
-
value?: string;
|
|
7
|
-
options: Array<TabItem>;
|
|
8
|
-
onChange?: (value: string) => void;
|
|
9
|
-
}
|
|
10
|
-
interface TabItemChild {
|
|
11
|
-
label: string;
|
|
12
|
-
value: string;
|
|
13
|
-
icon: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface TabItem extends TabItemChild {
|
|
17
|
-
children?: Array<TabItemChild>;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export interface SelectInputProps {
|
|
21
|
-
name?: string;
|
|
22
|
-
extendName?: string;
|
|
23
|
-
value?: string;
|
|
24
|
-
onChange?: (value?: BizSelectTypes.Option | undefined) => void;
|
|
25
|
-
}
|
|
26
|
-
export interface ItemProps {
|
|
27
|
-
id: string | number;
|
|
28
|
-
title?: string;
|
|
29
|
-
content?: string;
|
|
30
|
-
icon?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ListProps {
|
|
33
|
-
value?: string | number;
|
|
34
|
-
options?: Array<ItemProps>;
|
|
35
|
-
onChange?: (value: string | number) => void;
|
|
36
|
-
}
|
|
1
|
+
import { ModalProps } from 'antd';
|
|
37
2
|
export declare namespace DialogTypes {
|
|
38
|
-
|
|
39
|
-
label: string;
|
|
40
|
-
value: string;
|
|
41
|
-
}
|
|
42
|
-
interface Option {
|
|
43
|
-
[otherProp: string]: any;
|
|
44
|
-
}
|
|
45
|
-
export interface FieldProps {
|
|
46
|
-
label?: string;
|
|
47
|
-
type?: string;
|
|
48
|
-
value?: string | number;
|
|
49
|
-
dependenceFields?: {
|
|
50
|
-
[pro: string]: string;
|
|
51
|
-
};
|
|
52
|
-
dependencekeys?: {
|
|
53
|
-
[pro: string]: string;
|
|
54
|
-
};
|
|
55
|
-
placeholder?: string;
|
|
56
|
-
direction?: 'horizontal' | 'vertical';
|
|
57
|
-
options?: Option[];
|
|
58
|
-
extendName?: string;
|
|
59
|
-
fieldNames?: FieldOption;
|
|
60
|
-
children?: Array<string>;
|
|
61
|
-
multiple?: boolean;
|
|
62
|
-
selectType?: 'group' | 'normal';
|
|
63
|
-
enableSearch?: boolean;
|
|
64
|
-
overlayWidth?: number;
|
|
65
|
-
extra?: (option: Option) => ReactNode;
|
|
66
|
-
onChange?: (value?: any) => void;
|
|
67
|
-
}
|
|
68
|
-
export interface Props {
|
|
69
|
-
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
70
|
-
fields: Array<FieldProps & FormItemProps>;
|
|
71
|
-
initialValues?: object;
|
|
72
|
-
showMark?: boolean;
|
|
73
|
-
onOk?: (data: object) => void;
|
|
74
|
-
onCancel?: () => void;
|
|
3
|
+
interface Props extends ModalProps {
|
|
75
4
|
}
|
|
76
|
-
export {};
|
|
77
5
|
}
|
|
@@ -134,6 +134,14 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
134
134
|
setCurrentGroup(currentValue === null || currentValue === void 0 ? void 0 : currentValue.group);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
if (!groupList || !groupList.length || !groupList[0].eventList || !groupList[0].eventList.length) {
|
|
138
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: "".concat(classPrefix, "-nodata-panel")
|
|
140
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "".concat(classPrefix, "-nodata")
|
|
142
|
+
}, "\u6682\u65E0\u6570\u636E"));
|
|
143
|
+
}
|
|
144
|
+
|
|
137
145
|
return /*#__PURE__*/React.createElement("div", {
|
|
138
146
|
className: "".concat(classPrefix, "-list-panel")
|
|
139
147
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
flex-direction: row;
|
|
11
11
|
width: 477px;
|
|
12
12
|
max-height: 400px;
|
|
13
|
+
padding: 0;
|
|
13
14
|
.__select-panel();
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
&-left {
|
|
17
18
|
flex: none;
|
|
18
19
|
width: 192px;
|
|
19
|
-
padding:
|
|
20
|
+
padding: @padding-xs;
|
|
20
21
|
overflow-y: auto;
|
|
21
22
|
border-right: 1px solid @border-color-base;
|
|
22
23
|
}
|
|
@@ -25,21 +26,26 @@
|
|
|
25
26
|
display: flex;
|
|
26
27
|
flex: 1;
|
|
27
28
|
flex-direction: column;
|
|
28
|
-
padding:
|
|
29
|
+
padding: @padding-xs;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
&-search {
|
|
32
33
|
flex: none;
|
|
33
34
|
margin-bottom: @margin-sm;
|
|
34
|
-
&.ant-input-affix-wrapper {
|
|
35
|
-
border-radius: @border-radius-normal;
|
|
36
|
-
}
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
&-list {
|
|
40
38
|
flex: 1;
|
|
41
39
|
overflow-y: auto;
|
|
42
40
|
}
|
|
41
|
+
&-nodata-panel {
|
|
42
|
+
width: 284px;
|
|
43
|
+
.__select-panel();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-nodata {
|
|
47
|
+
.__select-nodata();
|
|
48
|
+
}
|
|
43
49
|
|
|
44
50
|
&-option {
|
|
45
51
|
.__select-option();
|
package/es/index.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ import convertAttributeData from './attributeSelector/util';
|
|
|
19
19
|
import BizGlobalDataContext from './context';
|
|
20
20
|
import BizUserCondition from './userCondition';
|
|
21
21
|
import BizSearchInput from './searchInput';
|
|
22
|
-
|
|
22
|
+
import BizAddToScene from './addToScene';
|
|
23
|
+
import BizAddToPanel from './addToPanel';
|
|
24
|
+
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, setGlobalConfig, };
|
|
23
26
|
export type { UserGroupTypes } from './userGroup/types';
|
|
24
27
|
export type { BizSelectTypes } from './select/types';
|
|
25
28
|
export type { AttributeSelect } from './attributeSelector/types';
|
package/es/index.js
CHANGED
|
@@ -18,4 +18,7 @@ import convertAttributeData from './attributeSelector/util';
|
|
|
18
18
|
import BizGlobalDataContext from './context';
|
|
19
19
|
import BizUserCondition from './userCondition';
|
|
20
20
|
import BizSearchInput from './searchInput';
|
|
21
|
-
|
|
21
|
+
import BizAddToScene from './addToScene';
|
|
22
|
+
import BizAddToPanel from './addToPanel';
|
|
23
|
+
import setGlobalConfig from './config';
|
|
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 };
|
package/es/select/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["overlayWidth", "labelField", "keyField"];
|
|
1
|
+
var _excluded = ["overlayWidth", "minDropdownWidth", "labelField", "keyField"];
|
|
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
|
|
|
@@ -32,6 +32,7 @@ export var classPrefix = 'biz-select';
|
|
|
32
32
|
|
|
33
33
|
var BizSelect = function BizSelect(props) {
|
|
34
34
|
var overlayWidth = props.overlayWidth,
|
|
35
|
+
minDropdownWidth = props.minDropdownWidth,
|
|
35
36
|
labelField = props.labelField,
|
|
36
37
|
keyField = props.keyField,
|
|
37
38
|
res = _objectWithoutProperties(props, _excluded);
|
|
@@ -175,7 +176,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
175
176
|
disabled: props.disable,
|
|
176
177
|
destroyPopupOnHide: true,
|
|
177
178
|
overlayStyle: {
|
|
178
|
-
minWidth: 0,
|
|
179
|
+
minWidth: minDropdownWidth || 0,
|
|
179
180
|
width: overlayWidth || width
|
|
180
181
|
},
|
|
181
182
|
trigger: ['click'],
|
|
@@ -192,6 +193,7 @@ var BizSelect = function BizSelect(props) {
|
|
|
192
193
|
ref: boxRef,
|
|
193
194
|
value: current,
|
|
194
195
|
labelField: labelField,
|
|
196
|
+
placeholder: props.placeholder,
|
|
195
197
|
keyField: keyField,
|
|
196
198
|
disable: props.disable,
|
|
197
199
|
multiple: props.multiple,
|
package/es/select/overlay.js
CHANGED
|
@@ -164,7 +164,9 @@ var SelectOverlay = function SelectOverlay(props) {
|
|
|
164
164
|
if (showList && showList.length) {
|
|
165
165
|
return showList;
|
|
166
166
|
} else {
|
|
167
|
-
return /*#__PURE__*/React.createElement("span",
|
|
167
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
168
|
+
className: "".concat(classPrefix, "-nodata")
|
|
169
|
+
}, "\u6682\u65E0\u6570\u636E");
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
&.lg {
|
|
24
24
|
height: @height-lg;
|
|
25
|
+
font-size: @font-size-lg;
|
|
25
26
|
line-height: @height-lg;
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
top: 50%;
|
|
83
84
|
right: 8px;
|
|
84
85
|
flex: none;
|
|
86
|
+
color: @text-color-secondary;
|
|
85
87
|
font-size: @font-size-lg;
|
|
86
88
|
transform: translateY(-50%);
|
|
87
89
|
}
|
package/es/select/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare namespace BizSelectTypes {
|
|
|
10
10
|
}
|
|
11
11
|
interface Props {
|
|
12
12
|
disable?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
13
14
|
defaultValue?: Option | Option[];
|
|
14
15
|
value?: Option | Option[];
|
|
15
16
|
className?: string;
|
|
@@ -18,6 +19,7 @@ export declare namespace BizSelectTypes {
|
|
|
18
19
|
size?: 'lg' | 'base' | 'sm';
|
|
19
20
|
border?: boolean;
|
|
20
21
|
multiple?: boolean;
|
|
22
|
+
minDropdownWidth?: number;
|
|
21
23
|
options: Group[] | Option[];
|
|
22
24
|
extra?: (option: Option) => ReactNode;
|
|
23
25
|
dropdownExtra?: ReactNode;
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
display: none;
|
|
30
30
|
flex: none;
|
|
31
31
|
width: @icon-width;
|
|
32
|
+
color: @text-color-secondary;
|
|
32
33
|
line-height: 2em;
|
|
33
34
|
text-align: center;
|
|
34
35
|
border-radius: @border-radius-small;
|
|
@@ -67,7 +68,8 @@
|
|
|
67
68
|
top: 45px;
|
|
68
69
|
left: 0;
|
|
69
70
|
z-index: 1000;
|
|
70
|
-
width:
|
|
71
|
+
width: 100%;
|
|
72
|
+
min-width: 280px;
|
|
71
73
|
.__select-panel();
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -44,7 +44,10 @@ var UserGroupDemo = function UserGroupDemo() {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
className: "biz-user-group-demo"
|
|
47
|
+
className: "biz-user-group-demo",
|
|
48
|
+
style: {
|
|
49
|
+
width: '200px'
|
|
50
|
+
}
|
|
48
51
|
}, /*#__PURE__*/React.createElement(BizUserGroup, {
|
|
49
52
|
options: groupOptions,
|
|
50
53
|
onChange: handleChange,
|
package/es/userGroup/index.js
CHANGED
|
@@ -68,7 +68,7 @@ var BizUserGroup = function BizUserGroup(props) {
|
|
|
68
68
|
border: false,
|
|
69
69
|
disableItemList: props.disableItemList,
|
|
70
70
|
onChange: onChange,
|
|
71
|
-
|
|
71
|
+
minDropdownWidth: 284
|
|
72
72
|
}), /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
73
73
|
name: "delete",
|
|
74
74
|
icon: "qingchu",
|
package/es/utils/ajax.d.ts
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { RequestOptionsInit } from 'umi-request';
|
|
2
|
+
declare enum ResponseStatus {
|
|
3
|
+
success = 200,
|
|
4
|
+
exists = 201,
|
|
5
|
+
fail = 500,
|
|
6
|
+
sysNotInit = 501,
|
|
7
|
+
sysInited = 502,
|
|
8
|
+
notLoggin = 503,
|
|
9
|
+
paramError = 504,
|
|
10
|
+
success2 = 106000,
|
|
11
|
+
fail2 = 106001,
|
|
12
|
+
paramError2 = 106002,
|
|
13
|
+
paramError3 = 106003
|
|
14
|
+
}
|
|
15
|
+
export interface InterfaceApiResult<T> {
|
|
16
|
+
code: ResponseStatus;
|
|
17
|
+
data?: T;
|
|
18
|
+
msg?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class ApiResult<T> implements InterfaceApiResult<T> {
|
|
21
|
+
code: ResponseStatus;
|
|
22
|
+
data?: T;
|
|
23
|
+
msg?: string;
|
|
24
|
+
constructor(code: ResponseStatus, data: any, message?: string);
|
|
25
|
+
}
|
|
26
|
+
declare function request<T>(url: string, options?: RequestOptionsInit & {
|
|
27
|
+
optionsWrapper?: (url: string, options?: RequestOptionsInit) => {
|
|
28
|
+
url: string;
|
|
29
|
+
options?: RequestOptionsInit;
|
|
30
|
+
};
|
|
31
|
+
responseWrapper?: (url: string, apiResult: ApiResult<T>) => ApiResult<T>;
|
|
32
|
+
}): Promise<InterfaceApiResult<T> | null>;
|
|
33
|
+
export default request;
|