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