@aloudata/aloudata-design 0.4.8-beta.14 → 0.4.8-beta.16
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/dist/Avatar/component/Avatar/index.js +16 -5
- package/dist/Breadcrumb/index.js +16 -6
- package/dist/Button/index.js +32 -15
- package/dist/Button/style/variables.less +3 -3
- package/dist/Checkbox/component/CheckboxGroup/index.js +10 -4
- package/dist/Checkbox/index.js +8 -1
- package/dist/Checkbox/type.js +1 -0
- package/dist/ConfigProvider/defaultRenderEmpty.js +5 -0
- package/dist/ConfigProvider/sizeContext.js +1 -1
- package/dist/Divider/index.js +3 -0
- package/dist/DoubleCircleIcon/index.js +9 -7
- package/dist/Dropdown/Button.js +11 -7
- package/dist/Dropdown/index.js +9 -3
- package/dist/Dropdown/style/index.less +4 -0
- package/dist/Empty/image/Data.js +2 -0
- package/dist/Empty/image/Search.js +2 -0
- package/dist/Empty/image/SearchSmall.js +2 -0
- package/dist/Empty/image/User.js +2 -0
- package/dist/Empty/image/WorkBook.js +2 -0
- package/dist/Empty/index.js +23 -13
- package/dist/Icon/components/Icon.js +13 -9
- package/dist/Icon/components/createFromScripts.js +8 -2
- package/dist/Input/components/Group/index.js +9 -4
- package/dist/Input/components/Input/index.js +9 -3
- package/dist/Input/components/Password/index.js +10 -5
- package/dist/Input/components/TextArea/index.js +11 -6
- package/dist/Input/style/index.less +1 -1
- package/dist/InputNumber/index.js +12 -7
- package/dist/Menu/SubMenu.js +6 -1
- package/dist/Menu/index.js +7 -2
- package/dist/Menu/style/index.less +5 -0
- package/dist/Modal/index.js +129 -107
- package/dist/Modal/locale.js +6 -4
- package/dist/Modal/style/index.less +2 -1
- package/dist/Navigator/components/Header/index.js +2 -0
- package/dist/Navigator/components/Menu/index.js +19 -8
- package/dist/Navigator/components/MenuItem/index.js +9 -6
- package/dist/Navigator/index.js +7 -5
- package/dist/Popconfirm/index.js +27 -19
- package/dist/Popover/index.js +9 -2
- package/dist/Radio/components/Group/index.js +34 -26
- package/dist/Radio/components/Radio/index.js +18 -10
- package/dist/Select/components/MultipleOption.js +6 -4
- package/dist/Select/components/SingleOption.js +7 -5
- package/dist/Select/index.js +94 -44
- package/dist/Select/style/index.less +1 -0
- package/dist/Spin/CustomIcon/index.js +2 -0
- package/dist/Spin/index.js +10 -1
- package/dist/Steps/components/ProcessIcon/index.js +2 -0
- package/dist/Steps/components/Step/index.js +8 -2
- package/dist/Steps/index.js +10 -8
- package/dist/Switch/index.js +30 -18
- package/dist/Table/Table.js +129 -86
- package/dist/Table/components/Empty/index.js +2 -0
- package/dist/Table/components/Loading/index.js +2 -0
- package/dist/Table/components/TableBodyRowList/index.js +39 -19
- package/dist/Table/components/TableHead/index.js +86 -55
- package/dist/Table/hooks/useFrame.js +24 -9
- package/dist/Table/style/index.less +1 -1
- package/dist/Table/utils.js +27 -8
- package/dist/Tabs/index.js +32 -17
- package/dist/Tooltip/index.js +12 -12
- package/dist/Tooltip/style/index.less +7 -1
- package/dist/Tree/index.js +4 -2
- package/dist/_utils/hooks/useControlledState.js +21 -9
- package/dist/_utils/hooks/useId.js +5 -4
- package/dist/_utils/hooks/usePrefixCls.js +5 -2
- package/dist/index.js +1 -2
- package/dist/locale-provider/index.js +33 -8
- package/dist/message/index.js +7 -3
- package/dist/notification/demo/index.js +1 -0
- package/dist/notification/index.js +48 -39
- package/package.json +2 -2
package/dist/Modal/index.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
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
1
|
var _excluded = ["className", "type", "loading", "size", "disabled", "shape"],
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
_excluded2 = ["className", "children", "okType", "width", "closeIcon", "subTitle", "okButtonProps", "cancelButtonProps", "okText", "cancelText", "icon", "title", "paddingLess"],
|
|
3
|
+
_excluded3 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
4
|
+
_excluded4 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
5
|
+
_excluded5 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
6
|
+
_excluded6 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
7
|
+
_excluded7 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "className", "okText", "cancelText"];
|
|
8
|
+
|
|
9
9
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
|
+
|
|
10
11
|
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; }
|
|
12
|
+
|
|
11
13
|
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; }
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
15
17
|
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; }
|
|
18
|
+
|
|
16
19
|
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; }
|
|
20
|
+
|
|
17
21
|
import { AlertTriangleDuotone, CheckCircleDuotone, CloseLLine, InfoCircleLine } from '@aloudata/icons-react';
|
|
18
22
|
import { Modal as AntdModal } from 'antd';
|
|
19
23
|
import { modalGlobalConfig } from 'antd/lib/modal/confirm';
|
|
@@ -22,23 +26,25 @@ import classNames from 'classnames';
|
|
|
22
26
|
import React from 'react';
|
|
23
27
|
import { btnPrefix, getButtonSizeClass, getButtonType, getDangerStatus, getShape } from "../Button";
|
|
24
28
|
import DoubleCircleIcon from "../DoubleCircleIcon";
|
|
25
|
-
import theme from "../style/themes/default/themeColor.module.less";
|
|
26
|
-
// export type { ModalProps, ModalFuncProps };
|
|
29
|
+
import theme from "../style/themes/default/themeColor.module.less"; // export type { ModalProps, ModalFuncProps };
|
|
27
30
|
|
|
28
31
|
export var destroyFns = [];
|
|
29
32
|
var DEFAULT_WIDTH = 552;
|
|
33
|
+
|
|
30
34
|
function getButtonProps(buttonProps, defaultBtnType, okType) {
|
|
31
35
|
var btnType = okType || defaultBtnType;
|
|
36
|
+
|
|
32
37
|
var buttonClassName = buttonProps.className,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
_buttonProps$type = buttonProps.type,
|
|
39
|
+
type = _buttonProps$type === void 0 ? btnType : _buttonProps$type,
|
|
40
|
+
loading = buttonProps.loading,
|
|
41
|
+
_buttonProps$size = buttonProps.size,
|
|
42
|
+
size = _buttonProps$size === void 0 ? 'middle' : _buttonProps$size,
|
|
43
|
+
disabled = buttonProps.disabled,
|
|
44
|
+
_buttonProps$shape = buttonProps.shape,
|
|
45
|
+
shape = _buttonProps$shape === void 0 ? 'default' : _buttonProps$shape,
|
|
46
|
+
restProps = _objectWithoutProperties(buttonProps, _excluded);
|
|
47
|
+
|
|
42
48
|
return _objectSpread(_objectSpread({}, restProps), {}, {
|
|
43
49
|
disabled: loading ? true : disabled,
|
|
44
50
|
loading: loading,
|
|
@@ -48,10 +54,11 @@ function getButtonProps(buttonProps, defaultBtnType, okType) {
|
|
|
48
54
|
shape: getShape(shape)
|
|
49
55
|
});
|
|
50
56
|
}
|
|
57
|
+
|
|
51
58
|
var ModalTitle = function ModalTitle(_ref) {
|
|
52
59
|
var icon = _ref.icon,
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
title = _ref.title,
|
|
61
|
+
subTitle = _ref.subTitle;
|
|
55
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
63
|
className: 'ald-modal-title-container'
|
|
57
64
|
}, icon, /*#__PURE__*/React.createElement("div", {
|
|
@@ -62,32 +69,33 @@ var ModalTitle = function ModalTitle(_ref) {
|
|
|
62
69
|
className: 'subTitle'
|
|
63
70
|
}, subTitle)));
|
|
64
71
|
};
|
|
72
|
+
|
|
65
73
|
var OriginModal = function OriginModal(props) {
|
|
66
74
|
var className = props.className,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
children = props.children,
|
|
76
|
+
okType = props.okType,
|
|
77
|
+
width = props.width,
|
|
78
|
+
closeIcon = props.closeIcon,
|
|
79
|
+
subTitle = props.subTitle,
|
|
80
|
+
_props$okButtonProps = props.okButtonProps,
|
|
81
|
+
okButtonProps = _props$okButtonProps === void 0 ? {} : _props$okButtonProps,
|
|
82
|
+
_props$cancelButtonPr = props.cancelButtonProps,
|
|
83
|
+
cancelButtonProps = _props$cancelButtonPr === void 0 ? {} : _props$cancelButtonPr,
|
|
84
|
+
_props$okText = props.okText,
|
|
85
|
+
okText = _props$okText === void 0 ? '确定' : _props$okText,
|
|
86
|
+
_props$cancelText = props.cancelText,
|
|
87
|
+
cancelText = _props$cancelText === void 0 ? '取消' : _props$cancelText,
|
|
88
|
+
icon = props.icon,
|
|
89
|
+
title = props.title,
|
|
90
|
+
paddingLess = props.paddingLess,
|
|
91
|
+
restProps = _objectWithoutProperties(props, _excluded2);
|
|
92
|
+
|
|
84
93
|
return /*#__PURE__*/React.createElement(AntdModal, _extends({}, restProps, {
|
|
85
94
|
title: ModalTitle({
|
|
86
95
|
icon: icon,
|
|
87
96
|
title: title,
|
|
88
97
|
subTitle: subTitle
|
|
89
|
-
})
|
|
90
|
-
// title={
|
|
98
|
+
}) // title={
|
|
91
99
|
// <div className={'ald-modal-title-container'}>
|
|
92
100
|
// {icon}
|
|
93
101
|
// <div className={'ald-modal-text-container'}>
|
|
@@ -112,23 +120,26 @@ var OriginModal = function OriginModal(props) {
|
|
|
112
120
|
})
|
|
113
121
|
}), children);
|
|
114
122
|
};
|
|
123
|
+
|
|
115
124
|
OriginModal.useModal = useModal;
|
|
116
125
|
var Modal = OriginModal;
|
|
126
|
+
|
|
117
127
|
Modal.info = function infoFn(props) {
|
|
118
128
|
var _props$okButtonProps2 = props.okButtonProps,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
okButtonProps = _props$okButtonProps2 === void 0 ? {} : _props$okButtonProps2,
|
|
130
|
+
_props$cancelButtonPr2 = props.cancelButtonProps,
|
|
131
|
+
cancelButtonProps = _props$cancelButtonPr2 === void 0 ? {} : _props$cancelButtonPr2,
|
|
132
|
+
okType = props.okType,
|
|
133
|
+
width = props.width,
|
|
134
|
+
title = props.title,
|
|
135
|
+
subTitle = props.subTitle,
|
|
136
|
+
_props$okText2 = props.okText,
|
|
137
|
+
okText = _props$okText2 === void 0 ? '确定' : _props$okText2,
|
|
138
|
+
_props$cancelText2 = props.cancelText,
|
|
139
|
+
cancelText = _props$cancelText2 === void 0 ? '取消' : _props$cancelText2,
|
|
140
|
+
className = props.className,
|
|
141
|
+
restProps = _objectWithoutProperties(props, _excluded3);
|
|
142
|
+
|
|
132
143
|
return AntdModal.info(_objectSpread({
|
|
133
144
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
134
145
|
cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
|
|
@@ -149,21 +160,23 @@ Modal.info = function infoFn(props) {
|
|
|
149
160
|
cancelText: cancelText
|
|
150
161
|
}, restProps));
|
|
151
162
|
};
|
|
163
|
+
|
|
152
164
|
Modal.success = function successFn(props) {
|
|
153
165
|
var _props$okButtonProps3 = props.okButtonProps,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
okButtonProps = _props$okButtonProps3 === void 0 ? {} : _props$okButtonProps3,
|
|
167
|
+
_props$cancelButtonPr3 = props.cancelButtonProps,
|
|
168
|
+
cancelButtonProps = _props$cancelButtonPr3 === void 0 ? {} : _props$cancelButtonPr3,
|
|
169
|
+
okType = props.okType,
|
|
170
|
+
width = props.width,
|
|
171
|
+
title = props.title,
|
|
172
|
+
subTitle = props.subTitle,
|
|
173
|
+
_props$okText3 = props.okText,
|
|
174
|
+
okText = _props$okText3 === void 0 ? '确定' : _props$okText3,
|
|
175
|
+
_props$cancelText3 = props.cancelText,
|
|
176
|
+
cancelText = _props$cancelText3 === void 0 ? '取消' : _props$cancelText3,
|
|
177
|
+
className = props.className,
|
|
178
|
+
restProps = _objectWithoutProperties(props, _excluded4);
|
|
179
|
+
|
|
167
180
|
return AntdModal.success(_objectSpread({
|
|
168
181
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
169
182
|
cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
|
|
@@ -184,21 +197,23 @@ Modal.success = function successFn(props) {
|
|
|
184
197
|
cancelText: cancelText
|
|
185
198
|
}, restProps));
|
|
186
199
|
};
|
|
200
|
+
|
|
187
201
|
Modal.error = function errorFn(props) {
|
|
188
202
|
var _props$okButtonProps4 = props.okButtonProps,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
okButtonProps = _props$okButtonProps4 === void 0 ? {} : _props$okButtonProps4,
|
|
204
|
+
_props$cancelButtonPr4 = props.cancelButtonProps,
|
|
205
|
+
cancelButtonProps = _props$cancelButtonPr4 === void 0 ? {} : _props$cancelButtonPr4,
|
|
206
|
+
okType = props.okType,
|
|
207
|
+
width = props.width,
|
|
208
|
+
title = props.title,
|
|
209
|
+
subTitle = props.subTitle,
|
|
210
|
+
_props$okText4 = props.okText,
|
|
211
|
+
okText = _props$okText4 === void 0 ? '确定' : _props$okText4,
|
|
212
|
+
_props$cancelText4 = props.cancelText,
|
|
213
|
+
cancelText = _props$cancelText4 === void 0 ? '取消' : _props$cancelText4,
|
|
214
|
+
className = props.className,
|
|
215
|
+
restProps = _objectWithoutProperties(props, _excluded5);
|
|
216
|
+
|
|
202
217
|
return AntdModal.error(_objectSpread({
|
|
203
218
|
okButtonProps: getButtonProps(okButtonProps, 'dangerous', okType),
|
|
204
219
|
cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
|
|
@@ -219,21 +234,23 @@ Modal.error = function errorFn(props) {
|
|
|
219
234
|
cancelText: cancelText
|
|
220
235
|
}, restProps));
|
|
221
236
|
};
|
|
237
|
+
|
|
222
238
|
Modal.warning = function modalWarn(props) {
|
|
223
239
|
var _props$okButtonProps5 = props.okButtonProps,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
240
|
+
okButtonProps = _props$okButtonProps5 === void 0 ? {} : _props$okButtonProps5,
|
|
241
|
+
_props$cancelButtonPr5 = props.cancelButtonProps,
|
|
242
|
+
cancelButtonProps = _props$cancelButtonPr5 === void 0 ? {} : _props$cancelButtonPr5,
|
|
243
|
+
okType = props.okType,
|
|
244
|
+
width = props.width,
|
|
245
|
+
title = props.title,
|
|
246
|
+
subTitle = props.subTitle,
|
|
247
|
+
_props$okText5 = props.okText,
|
|
248
|
+
okText = _props$okText5 === void 0 ? '确定' : _props$okText5,
|
|
249
|
+
_props$cancelText5 = props.cancelText,
|
|
250
|
+
cancelText = _props$cancelText5 === void 0 ? '取消' : _props$cancelText5,
|
|
251
|
+
className = props.className,
|
|
252
|
+
restProps = _objectWithoutProperties(props, _excluded6);
|
|
253
|
+
|
|
237
254
|
return AntdModal.warning(_objectSpread({
|
|
238
255
|
okButtonProps: getButtonProps(okButtonProps, 'dangerous', okType),
|
|
239
256
|
cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
|
|
@@ -255,21 +272,23 @@ Modal.warning = function modalWarn(props) {
|
|
|
255
272
|
cancelText: cancelText
|
|
256
273
|
}, restProps));
|
|
257
274
|
};
|
|
275
|
+
|
|
258
276
|
Modal.confirm = function confirmFn(props) {
|
|
259
277
|
var _props$okButtonProps6 = props.okButtonProps,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
278
|
+
okButtonProps = _props$okButtonProps6 === void 0 ? {} : _props$okButtonProps6,
|
|
279
|
+
_props$cancelButtonPr6 = props.cancelButtonProps,
|
|
280
|
+
cancelButtonProps = _props$cancelButtonPr6 === void 0 ? {} : _props$cancelButtonPr6,
|
|
281
|
+
okType = props.okType,
|
|
282
|
+
width = props.width,
|
|
283
|
+
title = props.title,
|
|
284
|
+
subTitle = props.subTitle,
|
|
285
|
+
className = props.className,
|
|
286
|
+
_props$okText6 = props.okText,
|
|
287
|
+
okText = _props$okText6 === void 0 ? '确定' : _props$okText6,
|
|
288
|
+
_props$cancelText6 = props.cancelText,
|
|
289
|
+
cancelText = _props$cancelText6 === void 0 ? '取消' : _props$cancelText6,
|
|
290
|
+
restProps = _objectWithoutProperties(props, _excluded7);
|
|
291
|
+
|
|
273
292
|
return AntdModal.confirm(_objectSpread({
|
|
274
293
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
275
294
|
cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
|
|
@@ -290,13 +309,16 @@ Modal.confirm = function confirmFn(props) {
|
|
|
290
309
|
cancelText: cancelText
|
|
291
310
|
}, restProps));
|
|
292
311
|
};
|
|
312
|
+
|
|
293
313
|
Modal.destroyAll = function destroyAllFn() {
|
|
294
314
|
while (destroyFns.length) {
|
|
295
315
|
var close = destroyFns.pop();
|
|
316
|
+
|
|
296
317
|
if (close) {
|
|
297
318
|
close();
|
|
298
319
|
}
|
|
299
320
|
}
|
|
300
321
|
};
|
|
322
|
+
|
|
301
323
|
Modal.config = modalGlobalConfig;
|
|
302
324
|
export default Modal;
|
package/dist/Modal/locale.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
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
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; }
|
|
2
|
+
|
|
3
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; }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
4
|
+
|
|
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
|
+
|
|
7
7
|
import defaultLocale from "../locale/default";
|
|
8
|
+
|
|
8
9
|
var runtimeLocale = _objectSpread({}, defaultLocale.Modal);
|
|
10
|
+
|
|
9
11
|
export function changeConfirmLocale(newLocale) {
|
|
10
12
|
if (newLocale) {
|
|
11
13
|
runtimeLocale = _objectSpread(_objectSpread({}, runtimeLocale), newLocale);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
function Header(props) {
|
|
3
4
|
var logoSrc = props.logoSrc;
|
|
4
5
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -13,4 +14,5 @@ function Header(props) {
|
|
|
13
14
|
className: "ald-nav-header-select"
|
|
14
15
|
}));
|
|
15
16
|
}
|
|
17
|
+
|
|
16
18
|
export default Header;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
2
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
3
5
|
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."); }
|
|
6
|
+
|
|
4
7
|
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); }
|
|
5
|
-
|
|
6
|
-
function
|
|
8
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
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; }
|
|
12
|
+
|
|
7
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
8
15
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
9
16
|
import MenuItem from "../MenuItem";
|
|
17
|
+
|
|
10
18
|
function Menu(props) {
|
|
11
19
|
var menuList = props.menuList,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
selectedKey = props.selectedKey,
|
|
21
|
+
_props$onMenuSelect = props.onMenuSelect,
|
|
22
|
+
onMenuSelectCallback = _props$onMenuSelect === void 0 ? function () {} : _props$onMenuSelect;
|
|
23
|
+
|
|
15
24
|
var _useState = useState(selectedKey),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
currentSelectKey = _useState2[0],
|
|
27
|
+
setCurrentSelectKey = _useState2[1];
|
|
28
|
+
|
|
19
29
|
var onMenuSelect = useCallback(function (menuInfo) {
|
|
20
30
|
setCurrentSelectKey(menuInfo.key);
|
|
21
31
|
onMenuSelectCallback(menuInfo);
|
|
@@ -39,4 +49,5 @@ function Menu(props) {
|
|
|
39
49
|
}));
|
|
40
50
|
}));
|
|
41
51
|
}
|
|
52
|
+
|
|
42
53
|
export default Menu;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
+
|
|
3
4
|
function MenuItem(data) {
|
|
4
5
|
var menuIcon = data.menuIcon,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
content = data.content,
|
|
7
|
+
menuItemKey = data.menuItemKey,
|
|
8
|
+
path = data.path,
|
|
9
|
+
selectedKey = data.selectedKey,
|
|
10
|
+
_data$onMenuSelect = data.onMenuSelect,
|
|
11
|
+
onMenuSelect = _data$onMenuSelect === void 0 ? function () {} : _data$onMenuSelect;
|
|
11
12
|
var onMenuItemClick = useCallback(function (menuInfo) {
|
|
12
13
|
if (menuInfo.key === selectedKey) {
|
|
13
14
|
return;
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
onMenuSelect(menuInfo);
|
|
16
18
|
}, [onMenuSelect, selectedKey]);
|
|
17
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -33,4 +35,5 @@ function MenuItem(data) {
|
|
|
33
35
|
className: "ald-nav-menu-item-content-text"
|
|
34
36
|
}, content) : content));
|
|
35
37
|
}
|
|
38
|
+
|
|
36
39
|
export default MenuItem;
|
package/dist/Navigator/index.js
CHANGED
|
@@ -2,13 +2,14 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import Menu from "./components/Menu";
|
|
4
4
|
import Header from "./components/Header";
|
|
5
|
+
|
|
5
6
|
function Navigator(props) {
|
|
6
7
|
var logoSrc = props.logoSrc,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
menuList = props.menuList,
|
|
9
|
+
selectedKey = props.selectedKey,
|
|
10
|
+
_props$footer = props.footer,
|
|
11
|
+
footer = _props$footer === void 0 ? null : _props$footer,
|
|
12
|
+
onMenuSelect = props.onMenuSelect;
|
|
12
13
|
var renderMenu = useCallback(function () {
|
|
13
14
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
14
15
|
menuList: menuList,
|
|
@@ -30,4 +31,5 @@ function Navigator(props) {
|
|
|
30
31
|
className: "ald-nav-footer-wrap"
|
|
31
32
|
}, footer)));
|
|
32
33
|
}
|
|
34
|
+
|
|
33
35
|
export default Navigator;
|
package/dist/Popconfirm/index.js
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
var _excluded = ["okButtonProps", "cancelButtonProps", "okType", "icon"];
|
|
2
|
+
|
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
3
5
|
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; }
|
|
6
|
+
|
|
4
7
|
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; }
|
|
8
|
+
|
|
5
9
|
import { AlertTriangleDuotone } from '@aloudata/icons-react';
|
|
6
10
|
import { Popconfirm } from 'antd';
|
|
7
11
|
import classNames from 'classnames';
|
|
8
12
|
import React from 'react';
|
|
9
13
|
import { btnPrefix, getButtonSizeClass, getButtonType, getDangerStatus, getShape } from "../Button";
|
|
10
14
|
import themeColor from "../style/themes/default/themeColor.module.less";
|
|
15
|
+
|
|
11
16
|
function MyPopconfirm(props) {
|
|
12
17
|
var _props$okButtonProps = props.okButtonProps,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
okButtonProps = _props$okButtonProps === void 0 ? {} : _props$okButtonProps,
|
|
19
|
+
_props$cancelButtonPr = props.cancelButtonProps,
|
|
20
|
+
cancelButtonProps = _props$cancelButtonPr === void 0 ? {} : _props$cancelButtonPr,
|
|
21
|
+
okType = props.okType,
|
|
22
|
+
_props$icon = props.icon,
|
|
23
|
+
icon = _props$icon === void 0 ? /*#__PURE__*/React.createElement(AlertTriangleDuotone, {
|
|
24
|
+
size: 16,
|
|
25
|
+
theme: "multi-color",
|
|
26
|
+
fill: [themeColor.SB40, themeColor.BG100]
|
|
27
|
+
}) : _props$icon,
|
|
28
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
29
|
+
|
|
24
30
|
function getButtonProps(buttonProps, defaultBtnType) {
|
|
25
31
|
var btnType = defaultBtnType === 'dangerous' ? okType || 'dangerous' : 'secondary';
|
|
26
32
|
var className = buttonProps.className,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
_buttonProps$type = buttonProps.type,
|
|
34
|
+
type = _buttonProps$type === void 0 ? btnType : _buttonProps$type,
|
|
35
|
+
loading = buttonProps.loading,
|
|
36
|
+
_buttonProps$size = buttonProps.size,
|
|
37
|
+
size = _buttonProps$size === void 0 ? 'small' : _buttonProps$size,
|
|
38
|
+
disabled = buttonProps.disabled,
|
|
39
|
+
_buttonProps$shape = buttonProps.shape,
|
|
40
|
+
shape = _buttonProps$shape === void 0 ? 'default' : _buttonProps$shape;
|
|
35
41
|
return {
|
|
36
42
|
disable: loading ? true : disabled,
|
|
37
43
|
type: getButtonType(type),
|
|
@@ -40,6 +46,7 @@ function MyPopconfirm(props) {
|
|
|
40
46
|
shape: getShape(shape)
|
|
41
47
|
};
|
|
42
48
|
}
|
|
49
|
+
|
|
43
50
|
return /*#__PURE__*/React.createElement(Popconfirm, _extends({}, restProps, {
|
|
44
51
|
icon: icon,
|
|
45
52
|
okButtonProps: getButtonProps(okButtonProps, 'dangerous'),
|
|
@@ -47,4 +54,5 @@ function MyPopconfirm(props) {
|
|
|
47
54
|
description: null
|
|
48
55
|
}));
|
|
49
56
|
}
|
|
57
|
+
|
|
50
58
|
export default MyPopconfirm;
|
package/dist/Popover/index.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
var _excluded = ["overlayClassName", "children"];
|
|
2
|
+
|
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
3
5
|
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; }
|
|
6
|
+
|
|
4
7
|
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; }
|
|
8
|
+
|
|
5
9
|
import React from 'react';
|
|
6
10
|
import { Popover as AntdPopover } from 'antd';
|
|
7
11
|
import classnames from 'classnames';
|
|
12
|
+
|
|
8
13
|
function Popover(props) {
|
|
9
14
|
var overlayClassName = props.overlayClassName,
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
children = props.children,
|
|
16
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
17
|
+
|
|
12
18
|
return /*#__PURE__*/React.createElement(AntdPopover, _extends({
|
|
13
19
|
overlayClassName: classnames('ald-popover', overlayClassName)
|
|
14
20
|
}, restProps), children);
|
|
15
21
|
}
|
|
22
|
+
|
|
16
23
|
export default Popover;
|