|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[9888,35479],{
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[91983,35479],{
|
|
|
|
|
|
|
|
|
|
/***/ 88484:
|
|
|
|
|
/*!*******************************************************************************!*\
|
|
|
|
|
@ -64,6 +64,486 @@ const getRenderPropValue = propValue => {
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 38925:
|
|
|
|
|
/*!*********************************************************!*\
|
|
|
|
|
!*** ./node_modules/antd/es/alert/index.js + 3 modules ***!
|
|
|
|
|
\*********************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
"Z": function() { return /* binding */ es_alert; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
|
|
|
|
|
var CheckCircleFilled = __webpack_require__(89739);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
|
|
|
|
|
var CloseCircleFilled = __webpack_require__(4340);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
|
|
|
|
|
var CloseOutlined = __webpack_require__(97937);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
|
|
|
|
|
var ExclamationCircleFilled = __webpack_require__(21640);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js + 1 modules
|
|
|
|
|
var InfoCircleFilled = __webpack_require__(78860);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-motion/es/index.js + 18 modules
|
|
|
|
|
var es = __webpack_require__(38379);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/pickAttrs.js
|
|
|
|
|
var pickAttrs = __webpack_require__(1337);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
|
|
var react = __webpack_require__(67294);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
|
|
var context = __webpack_require__(53124);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
|
|
|
var style = __webpack_require__(14747);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/alert/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({
|
|
|
|
|
backgroundColor: bgColor,
|
|
|
|
|
border: `${token.lineWidth}px ${token.lineType} ${borderColor}`,
|
|
|
|
|
[`${alertCls}-icon`]: {
|
|
|
|
|
color: iconColor
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const genBaseStyle = token => {
|
|
|
|
|
const {
|
|
|
|
|
componentCls,
|
|
|
|
|
motionDurationSlow: duration,
|
|
|
|
|
marginXS,
|
|
|
|
|
marginSM,
|
|
|
|
|
fontSize,
|
|
|
|
|
fontSizeLG,
|
|
|
|
|
lineHeight,
|
|
|
|
|
borderRadiusLG: borderRadius,
|
|
|
|
|
motionEaseInOutCirc,
|
|
|
|
|
alertIconSizeLG,
|
|
|
|
|
colorText,
|
|
|
|
|
paddingContentVerticalSM,
|
|
|
|
|
alertPaddingHorizontal,
|
|
|
|
|
paddingMD,
|
|
|
|
|
paddingContentHorizontalLG,
|
|
|
|
|
colorTextHeading
|
|
|
|
|
} = token;
|
|
|
|
|
return {
|
|
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
|
|
position: 'relative',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
padding: `${paddingContentVerticalSM}px ${alertPaddingHorizontal}px`,
|
|
|
|
|
wordWrap: 'break-word',
|
|
|
|
|
borderRadius,
|
|
|
|
|
[`&${componentCls}-rtl`]: {
|
|
|
|
|
direction: 'rtl'
|
|
|
|
|
},
|
|
|
|
|
[`${componentCls}-content`]: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
minWidth: 0
|
|
|
|
|
},
|
|
|
|
|
[`${componentCls}-icon`]: {
|
|
|
|
|
marginInlineEnd: marginXS,
|
|
|
|
|
lineHeight: 0
|
|
|
|
|
},
|
|
|
|
|
[`&-description`]: {
|
|
|
|
|
display: 'none',
|
|
|
|
|
fontSize,
|
|
|
|
|
lineHeight
|
|
|
|
|
},
|
|
|
|
|
'&-message': {
|
|
|
|
|
color: colorText
|
|
|
|
|
},
|
|
|
|
|
[`&${componentCls}-motion-leave`]: {
|
|
|
|
|
overflow: 'hidden',
|
|
|
|
|
opacity: 1,
|
|
|
|
|
transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
|
|
|
|
|
padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
|
|
|
|
|
margin-bottom ${duration} ${motionEaseInOutCirc}`
|
|
|
|
|
},
|
|
|
|
|
[`&${componentCls}-motion-leave-active`]: {
|
|
|
|
|
maxHeight: 0,
|
|
|
|
|
marginBottom: '0 !important',
|
|
|
|
|
paddingTop: 0,
|
|
|
|
|
paddingBottom: 0,
|
|
|
|
|
opacity: 0
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
[`${componentCls}-with-description`]: {
|
|
|
|
|
alignItems: 'flex-start',
|
|
|
|
|
paddingInline: paddingContentHorizontalLG,
|
|
|
|
|
paddingBlock: paddingMD,
|
|
|
|
|
[`${componentCls}-icon`]: {
|
|
|
|
|
marginInlineEnd: marginSM,
|
|
|
|
|
fontSize: alertIconSizeLG,
|
|
|
|
|
lineHeight: 0
|
|
|
|
|
},
|
|
|
|
|
[`${componentCls}-message`]: {
|
|
|
|
|
display: 'block',
|
|
|
|
|
marginBottom: marginXS,
|
|
|
|
|
color: colorTextHeading,
|
|
|
|
|
fontSize: fontSizeLG
|
|
|
|
|
},
|
|
|
|
|
[`${componentCls}-description`]: {
|
|
|
|
|
display: 'block'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
[`${componentCls}-banner`]: {
|
|
|
|
|
marginBottom: 0,
|
|
|
|
|
border: '0 !important',
|
|
|
|
|
borderRadius: 0
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
const genTypeStyle = token => {
|
|
|
|
|
const {
|
|
|
|
|
componentCls,
|
|
|
|
|
colorSuccess,
|
|
|
|
|
colorSuccessBorder,
|
|
|
|
|
colorSuccessBg,
|
|
|
|
|
colorWarning,
|
|
|
|
|
colorWarningBorder,
|
|
|
|
|
colorWarningBg,
|
|
|
|
|
colorError,
|
|
|
|
|
colorErrorBorder,
|
|
|
|
|
colorErrorBg,
|
|
|
|
|
colorInfo,
|
|
|
|
|
colorInfoBorder,
|
|
|
|
|
colorInfoBg
|
|
|
|
|
} = token;
|
|
|
|
|
return {
|
|
|
|
|
[componentCls]: {
|
|
|
|
|
'&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),
|
|
|
|
|
'&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),
|
|
|
|
|
'&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),
|
|
|
|
|
'&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {
|
|
|
|
|
[`${componentCls}-description > pre`]: {
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
const genActionStyle = token => {
|
|
|
|
|
const {
|
|
|
|
|
componentCls,
|
|
|
|
|
iconCls,
|
|
|
|
|
motionDurationMid,
|
|
|
|
|
marginXS,
|
|
|
|
|
fontSizeIcon,
|
|
|
|
|
colorIcon,
|
|
|
|
|
colorIconHover
|
|
|
|
|
} = token;
|
|
|
|
|
return {
|
|
|
|
|
[componentCls]: {
|
|
|
|
|
[`&-action`]: {
|
|
|
|
|
marginInlineStart: marginXS
|
|
|
|
|
},
|
|
|
|
|
[`${componentCls}-close-icon`]: {
|
|
|
|
|
marginInlineStart: marginXS,
|
|
|
|
|
padding: 0,
|
|
|
|
|
overflow: 'hidden',
|
|
|
|
|
fontSize: fontSizeIcon,
|
|
|
|
|
lineHeight: `${fontSizeIcon}px`,
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
border: 'none',
|
|
|
|
|
outline: 'none',
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
[`${iconCls}-close`]: {
|
|
|
|
|
color: colorIcon,
|
|
|
|
|
transition: `color ${motionDurationMid}`,
|
|
|
|
|
'&:hover': {
|
|
|
|
|
color: colorIconHover
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'&-close-text': {
|
|
|
|
|
color: colorIcon,
|
|
|
|
|
transition: `color ${motionDurationMid}`,
|
|
|
|
|
'&:hover': {
|
|
|
|
|
color: colorIconHover
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
const genAlertStyle = token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)];
|
|
|
|
|
/* harmony default export */ var alert_style = ((0,genComponentStyleHook/* default */.Z)('Alert', token => {
|
|
|
|
|
const {
|
|
|
|
|
fontSizeHeading3
|
|
|
|
|
} = token;
|
|
|
|
|
const alertToken = (0,statistic/* merge */.TS)(token, {
|
|
|
|
|
alertIconSizeLG: fontSizeHeading3,
|
|
|
|
|
alertPaddingHorizontal: 12 // Fixed value here.
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return [genAlertStyle(alertToken)];
|
|
|
|
|
}));
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/alert/Alert.js
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CSSINJS
|
|
|
|
|
|
|
|
|
|
const iconMapFilled = {
|
|
|
|
|
success: CheckCircleFilled/* default */.Z,
|
|
|
|
|
info: InfoCircleFilled/* default */.Z,
|
|
|
|
|
error: CloseCircleFilled/* default */.Z,
|
|
|
|
|
warning: ExclamationCircleFilled/* default */.Z
|
|
|
|
|
};
|
|
|
|
|
const IconNode = props => {
|
|
|
|
|
const {
|
|
|
|
|
icon,
|
|
|
|
|
prefixCls,
|
|
|
|
|
type
|
|
|
|
|
} = props;
|
|
|
|
|
const iconType = iconMapFilled[type] || null;
|
|
|
|
|
if (icon) {
|
|
|
|
|
return (0,reactNode/* replaceElement */.wm)(icon, /*#__PURE__*/react.createElement("span", {
|
|
|
|
|
className: `${prefixCls}-icon`
|
|
|
|
|
}, icon), () => ({
|
|
|
|
|
className: classnames_default()(`${prefixCls}-icon`, {
|
|
|
|
|
[icon.props.className]: icon.props.className
|
|
|
|
|
})
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
return /*#__PURE__*/react.createElement(iconType, {
|
|
|
|
|
className: `${prefixCls}-icon`
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const CloseIcon = props => {
|
|
|
|
|
const {
|
|
|
|
|
isClosable,
|
|
|
|
|
prefixCls,
|
|
|
|
|
closeIcon,
|
|
|
|
|
handleClose
|
|
|
|
|
} = props;
|
|
|
|
|
const mergedCloseIcon = closeIcon === true || closeIcon === undefined ? /*#__PURE__*/react.createElement(CloseOutlined/* default */.Z, null) : closeIcon;
|
|
|
|
|
return isClosable ? /*#__PURE__*/react.createElement("button", {
|
|
|
|
|
type: "button",
|
|
|
|
|
onClick: handleClose,
|
|
|
|
|
className: `${prefixCls}-close-icon`,
|
|
|
|
|
tabIndex: 0
|
|
|
|
|
}, mergedCloseIcon) : null;
|
|
|
|
|
};
|
|
|
|
|
const Alert = props => {
|
|
|
|
|
const {
|
|
|
|
|
description,
|
|
|
|
|
prefixCls: customizePrefixCls,
|
|
|
|
|
message,
|
|
|
|
|
banner,
|
|
|
|
|
className,
|
|
|
|
|
rootClassName,
|
|
|
|
|
style,
|
|
|
|
|
onMouseEnter,
|
|
|
|
|
onMouseLeave,
|
|
|
|
|
onClick,
|
|
|
|
|
afterClose,
|
|
|
|
|
showIcon,
|
|
|
|
|
closable,
|
|
|
|
|
closeText,
|
|
|
|
|
closeIcon,
|
|
|
|
|
action
|
|
|
|
|
} = props,
|
|
|
|
|
otherProps = __rest(props, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action"]);
|
|
|
|
|
const [closed, setClosed] = react.useState(false);
|
|
|
|
|
if (false) {}
|
|
|
|
|
const ref = react.useRef(null);
|
|
|
|
|
const {
|
|
|
|
|
getPrefixCls,
|
|
|
|
|
direction,
|
|
|
|
|
alert
|
|
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
|
|
const prefixCls = getPrefixCls('alert', customizePrefixCls);
|
|
|
|
|
const [wrapSSR, hashId] = alert_style(prefixCls);
|
|
|
|
|
const handleClose = e => {
|
|
|
|
|
var _a;
|
|
|
|
|
setClosed(true);
|
|
|
|
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
|
|
|
};
|
|
|
|
|
const type = react.useMemo(() => {
|
|
|
|
|
if (props.type !== undefined) {
|
|
|
|
|
return props.type;
|
|
|
|
|
}
|
|
|
|
|
// banner mode defaults to 'warning'
|
|
|
|
|
return banner ? 'warning' : 'info';
|
|
|
|
|
}, [props.type, banner]);
|
|
|
|
|
// closeable when closeText or closeIcon is assigned
|
|
|
|
|
const isClosable = react.useMemo(() => {
|
|
|
|
|
if (closeText) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (typeof closable === 'boolean') {
|
|
|
|
|
return closable;
|
|
|
|
|
}
|
|
|
|
|
// should be true when closeIcon is 0 or ''
|
|
|
|
|
return closeIcon !== false && closeIcon !== null && closeIcon !== undefined;
|
|
|
|
|
}, [closeText, closeIcon, closable]);
|
|
|
|
|
// banner mode defaults to Icon
|
|
|
|
|
const isShowIcon = banner && showIcon === undefined ? true : showIcon;
|
|
|
|
|
const alertCls = classnames_default()(prefixCls, `${prefixCls}-${type}`, {
|
|
|
|
|
[`${prefixCls}-with-description`]: !!description,
|
|
|
|
|
[`${prefixCls}-no-icon`]: !isShowIcon,
|
|
|
|
|
[`${prefixCls}-banner`]: !!banner,
|
|
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
|
|
}, alert === null || alert === void 0 ? void 0 : alert.className, className, rootClassName, hashId);
|
|
|
|
|
const restProps = (0,pickAttrs/* default */.Z)(otherProps, {
|
|
|
|
|
aria: true,
|
|
|
|
|
data: true
|
|
|
|
|
});
|
|
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement(es["default"], {
|
|
|
|
|
visible: !closed,
|
|
|
|
|
motionName: `${prefixCls}-motion`,
|
|
|
|
|
motionAppear: false,
|
|
|
|
|
motionEnter: false,
|
|
|
|
|
onLeaveStart: node => ({
|
|
|
|
|
maxHeight: node.offsetHeight
|
|
|
|
|
}),
|
|
|
|
|
onLeaveEnd: afterClose
|
|
|
|
|
}, _ref => {
|
|
|
|
|
let {
|
|
|
|
|
className: motionClassName,
|
|
|
|
|
style: motionStyle
|
|
|
|
|
} = _ref;
|
|
|
|
|
return /*#__PURE__*/react.createElement("div", Object.assign({
|
|
|
|
|
ref: ref,
|
|
|
|
|
"data-show": !closed,
|
|
|
|
|
className: classnames_default()(alertCls, motionClassName),
|
|
|
|
|
style: Object.assign(Object.assign(Object.assign({}, alert === null || alert === void 0 ? void 0 : alert.style), style), motionStyle),
|
|
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
|
|
onMouseLeave: onMouseLeave,
|
|
|
|
|
onClick: onClick,
|
|
|
|
|
role: "alert"
|
|
|
|
|
}, restProps), isShowIcon ? /*#__PURE__*/react.createElement(IconNode, {
|
|
|
|
|
description: description,
|
|
|
|
|
icon: props.icon,
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
type: type
|
|
|
|
|
}) : null, /*#__PURE__*/react.createElement("div", {
|
|
|
|
|
className: `${prefixCls}-content`
|
|
|
|
|
}, message ? /*#__PURE__*/react.createElement("div", {
|
|
|
|
|
className: `${prefixCls}-message`
|
|
|
|
|
}, message) : null, description ? /*#__PURE__*/react.createElement("div", {
|
|
|
|
|
className: `${prefixCls}-description`
|
|
|
|
|
}, description) : null), action ? /*#__PURE__*/react.createElement("div", {
|
|
|
|
|
className: `${prefixCls}-action`
|
|
|
|
|
}, action) : null, /*#__PURE__*/react.createElement(CloseIcon, {
|
|
|
|
|
isClosable: isClosable,
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
closeIcon: closeText || closeIcon,
|
|
|
|
|
handleClose: handleClose
|
|
|
|
|
}));
|
|
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
if (false) {}
|
|
|
|
|
/* harmony default export */ var alert_Alert = (Alert);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
|
|
|
var classCallCheck = __webpack_require__(15671);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
|
|
|
var createClass = __webpack_require__(43144);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
|
|
|
var inherits = __webpack_require__(60136);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
|
|
|
var createSuper = __webpack_require__(51630);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/alert/ErrorBoundary.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
|
|
(0,inherits/* default */.Z)(ErrorBoundary, _React$Component);
|
|
|
|
|
var _super = (0,createSuper/* default */.Z)(ErrorBoundary);
|
|
|
|
|
function ErrorBoundary() {
|
|
|
|
|
var _this;
|
|
|
|
|
(0,classCallCheck/* default */.Z)(this, ErrorBoundary);
|
|
|
|
|
_this = _super.apply(this, arguments);
|
|
|
|
|
_this.state = {
|
|
|
|
|
error: undefined,
|
|
|
|
|
info: {
|
|
|
|
|
componentStack: ''
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
(0,createClass/* default */.Z)(ErrorBoundary, [{
|
|
|
|
|
key: "componentDidCatch",
|
|
|
|
|
value: function componentDidCatch(error, info) {
|
|
|
|
|
this.setState({
|
|
|
|
|
error,
|
|
|
|
|
info
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
const {
|
|
|
|
|
message,
|
|
|
|
|
description,
|
|
|
|
|
children
|
|
|
|
|
} = this.props;
|
|
|
|
|
const {
|
|
|
|
|
error,
|
|
|
|
|
info
|
|
|
|
|
} = this.state;
|
|
|
|
|
const componentStack = info && info.componentStack ? info.componentStack : null;
|
|
|
|
|
const errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;
|
|
|
|
|
const errorDescription = typeof description === 'undefined' ? componentStack : description;
|
|
|
|
|
if (error) {
|
|
|
|
|
return /*#__PURE__*/react.createElement(alert_Alert, {
|
|
|
|
|
type: "error",
|
|
|
|
|
message: errorMessage,
|
|
|
|
|
description: /*#__PURE__*/react.createElement("pre", {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: '0.9em',
|
|
|
|
|
overflowX: 'auto'
|
|
|
|
|
}
|
|
|
|
|
}, errorDescription)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return children;
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
return ErrorBoundary;
|
|
|
|
|
}(react.Component);
|
|
|
|
|
/* harmony default export */ var alert_ErrorBoundary = (ErrorBoundary);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/alert/index.js
|
|
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const es_alert_Alert = alert_Alert;
|
|
|
|
|
es_alert_Alert.ErrorBoundary = alert_ErrorBoundary;
|
|
|
|
|
/* harmony default export */ var es_alert = (es_alert_Alert);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 96074:
|
|
|
|
|
/*!***********************************************************!*\
|
|
|
|
|
!*** ./node_modules/antd/es/divider/index.js + 1 modules ***!
|