You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1174 lines
41 KiB
1174 lines
41 KiB
(self["webpackChunk"] = self["webpackChunk"] || []).push([[72032],{
|
|
|
|
/***/ 18889:
|
|
/*!********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/card/index.js + 4 modules ***!
|
|
\********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ card; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/omit.js
|
|
var omit = __webpack_require__(2738);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
var useSize = __webpack_require__(19716);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(61621);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
var es_tabs = __webpack_require__(99313);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/card/Grid.js
|
|
"use client";
|
|
|
|
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;
|
|
};
|
|
|
|
|
|
|
|
const Grid = _a => {
|
|
var {
|
|
prefixCls,
|
|
className,
|
|
hoverable = true
|
|
} = _a,
|
|
props = __rest(_a, ["prefixCls", "className", "hoverable"]);
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefix = getPrefixCls('card', prefixCls);
|
|
const classString = _classnames_2_5_1_classnames_default()(`${prefix}-grid`, className, {
|
|
[`${prefix}-grid-hoverable`]: hoverable
|
|
});
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, props, {
|
|
className: classString
|
|
}));
|
|
};
|
|
/* harmony default export */ var card_Grid = (Grid);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/card/style/index.js
|
|
|
|
|
|
// ============================== Styles ==============================
|
|
// ============================== Head ==============================
|
|
const genCardHeadStyle = token => {
|
|
const {
|
|
antCls,
|
|
componentCls,
|
|
headerHeight,
|
|
cardPaddingBase,
|
|
tabsMarginBottom
|
|
} = token;
|
|
return Object.assign(Object.assign({
|
|
display: 'flex',
|
|
justifyContent: 'center',
|
|
flexDirection: 'column',
|
|
minHeight: headerHeight,
|
|
marginBottom: -1,
|
|
padding: `0 ${cardPaddingBase}px`,
|
|
color: token.colorTextHeading,
|
|
fontWeight: token.fontWeightStrong,
|
|
fontSize: token.headerFontSize,
|
|
background: token.headerBg,
|
|
borderBottom: `${token.lineWidth}px ${token.lineType} ${token.colorBorderSecondary}`,
|
|
borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`
|
|
}, (0,style/* clearFix */.dF)()), {
|
|
'&-wrapper': {
|
|
width: '100%',
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
'&-title': Object.assign(Object.assign({
|
|
display: 'inline-block',
|
|
flex: 1
|
|
}, style/* textEllipsis */.vS), {
|
|
[`
|
|
> ${componentCls}-typography,
|
|
> ${componentCls}-typography-edit-content
|
|
`]: {
|
|
insetInlineStart: 0,
|
|
marginTop: 0,
|
|
marginBottom: 0
|
|
}
|
|
}),
|
|
[`${antCls}-tabs-top`]: {
|
|
clear: 'both',
|
|
marginBottom: tabsMarginBottom,
|
|
color: token.colorText,
|
|
fontWeight: 'normal',
|
|
fontSize: token.fontSize,
|
|
'&-bar': {
|
|
borderBottom: `${token.lineWidth}px ${token.lineType} ${token.colorBorderSecondary}`
|
|
}
|
|
}
|
|
});
|
|
};
|
|
// ============================== Grid ==============================
|
|
const genCardGridStyle = token => {
|
|
const {
|
|
cardPaddingBase,
|
|
colorBorderSecondary,
|
|
cardShadow,
|
|
lineWidth
|
|
} = token;
|
|
return {
|
|
width: '33.33%',
|
|
padding: cardPaddingBase,
|
|
border: 0,
|
|
borderRadius: 0,
|
|
boxShadow: `
|
|
${lineWidth}px 0 0 0 ${colorBorderSecondary},
|
|
0 ${lineWidth}px 0 0 ${colorBorderSecondary},
|
|
${lineWidth}px ${lineWidth}px 0 0 ${colorBorderSecondary},
|
|
${lineWidth}px 0 0 0 ${colorBorderSecondary} inset,
|
|
0 ${lineWidth}px 0 0 ${colorBorderSecondary} inset;
|
|
`,
|
|
transition: `all ${token.motionDurationMid}`,
|
|
'&-hoverable:hover': {
|
|
position: 'relative',
|
|
zIndex: 1,
|
|
boxShadow: cardShadow
|
|
}
|
|
};
|
|
};
|
|
// ============================== Actions ==============================
|
|
const genCardActionsStyle = token => {
|
|
const {
|
|
componentCls,
|
|
iconCls,
|
|
actionsLiMargin,
|
|
cardActionsIconSize,
|
|
colorBorderSecondary,
|
|
actionsBg
|
|
} = token;
|
|
return Object.assign(Object.assign({
|
|
margin: 0,
|
|
padding: 0,
|
|
listStyle: 'none',
|
|
background: actionsBg,
|
|
borderTop: `${token.lineWidth}px ${token.lineType} ${colorBorderSecondary}`,
|
|
display: 'flex',
|
|
borderRadius: `0 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px `
|
|
}, (0,style/* clearFix */.dF)()), {
|
|
'& > li': {
|
|
margin: actionsLiMargin,
|
|
color: token.colorTextDescription,
|
|
textAlign: 'center',
|
|
'> span': {
|
|
position: 'relative',
|
|
display: 'block',
|
|
minWidth: token.cardActionsIconSize * 2,
|
|
fontSize: token.fontSize,
|
|
lineHeight: token.lineHeight,
|
|
cursor: 'pointer',
|
|
'&:hover': {
|
|
color: token.colorPrimary,
|
|
transition: `color ${token.motionDurationMid}`
|
|
},
|
|
[`a:not(${componentCls}-btn), > ${iconCls}`]: {
|
|
display: 'inline-block',
|
|
width: '100%',
|
|
color: token.colorTextDescription,
|
|
lineHeight: `${token.fontSize * token.lineHeight}px`,
|
|
transition: `color ${token.motionDurationMid}`,
|
|
'&:hover': {
|
|
color: token.colorPrimary
|
|
}
|
|
},
|
|
[`> ${iconCls}`]: {
|
|
fontSize: cardActionsIconSize,
|
|
lineHeight: `${cardActionsIconSize * token.lineHeight}px`
|
|
}
|
|
},
|
|
'&:not(:last-child)': {
|
|
borderInlineEnd: `${token.lineWidth}px ${token.lineType} ${colorBorderSecondary}`
|
|
}
|
|
}
|
|
});
|
|
};
|
|
// ============================== Meta ==============================
|
|
const genCardMetaStyle = token => Object.assign(Object.assign({
|
|
margin: `-${token.marginXXS}px 0`,
|
|
display: 'flex'
|
|
}, (0,style/* clearFix */.dF)()), {
|
|
'&-avatar': {
|
|
paddingInlineEnd: token.padding
|
|
},
|
|
'&-detail': {
|
|
overflow: 'hidden',
|
|
flex: 1,
|
|
'> div:not(:last-child)': {
|
|
marginBottom: token.marginXS
|
|
}
|
|
},
|
|
'&-title': Object.assign({
|
|
color: token.colorTextHeading,
|
|
fontWeight: token.fontWeightStrong,
|
|
fontSize: token.fontSizeLG
|
|
}, style/* textEllipsis */.vS),
|
|
'&-description': {
|
|
color: token.colorTextDescription
|
|
}
|
|
});
|
|
// ============================== Inner ==============================
|
|
const genCardTypeInnerStyle = token => {
|
|
const {
|
|
componentCls,
|
|
cardPaddingBase,
|
|
colorFillAlter
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-head`]: {
|
|
padding: `0 ${cardPaddingBase}px`,
|
|
background: colorFillAlter,
|
|
'&-title': {
|
|
fontSize: token.fontSize
|
|
}
|
|
},
|
|
[`${componentCls}-body`]: {
|
|
padding: `${token.padding}px ${cardPaddingBase}px`
|
|
}
|
|
};
|
|
};
|
|
// ============================== Loading ==============================
|
|
const genCardLoadingStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
overflow: 'hidden',
|
|
[`${componentCls}-body`]: {
|
|
userSelect: 'none'
|
|
}
|
|
};
|
|
};
|
|
// ============================== Basic ==============================
|
|
const genCardStyle = token => {
|
|
const {
|
|
antCls,
|
|
componentCls,
|
|
cardShadow,
|
|
cardHeadPadding,
|
|
colorBorderSecondary,
|
|
boxShadowTertiary,
|
|
cardPaddingBase,
|
|
extraColor
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
position: 'relative',
|
|
background: token.colorBgContainer,
|
|
borderRadius: token.borderRadiusLG,
|
|
[`&:not(${componentCls}-bordered)`]: {
|
|
boxShadow: boxShadowTertiary
|
|
},
|
|
[`${componentCls}-head`]: genCardHeadStyle(token),
|
|
[`${componentCls}-extra`]: {
|
|
// https://stackoverflow.com/a/22429853/3040605
|
|
marginInlineStart: 'auto',
|
|
color: extraColor,
|
|
fontWeight: 'normal',
|
|
fontSize: token.fontSize
|
|
},
|
|
[`${componentCls}-body`]: Object.assign({
|
|
padding: cardPaddingBase,
|
|
borderRadius: ` 0 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px`
|
|
}, (0,style/* clearFix */.dF)()),
|
|
[`${componentCls}-grid`]: genCardGridStyle(token),
|
|
[`${componentCls}-cover`]: {
|
|
'> *': {
|
|
display: 'block',
|
|
width: '100%'
|
|
},
|
|
[`img, img + ${antCls}-image-mask`]: {
|
|
borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`
|
|
}
|
|
},
|
|
[`${componentCls}-actions`]: genCardActionsStyle(token),
|
|
[`${componentCls}-meta`]: genCardMetaStyle(token)
|
|
}),
|
|
[`${componentCls}-bordered`]: {
|
|
border: `${token.lineWidth}px ${token.lineType} ${colorBorderSecondary}`,
|
|
[`${componentCls}-cover`]: {
|
|
marginTop: -1,
|
|
marginInlineStart: -1,
|
|
marginInlineEnd: -1
|
|
}
|
|
},
|
|
[`${componentCls}-hoverable`]: {
|
|
cursor: 'pointer',
|
|
transition: `box-shadow ${token.motionDurationMid}, border-color ${token.motionDurationMid}`,
|
|
'&:hover': {
|
|
borderColor: 'transparent',
|
|
boxShadow: cardShadow
|
|
}
|
|
},
|
|
[`${componentCls}-contain-grid`]: {
|
|
[`${componentCls}-body`]: {
|
|
display: 'flex',
|
|
flexWrap: 'wrap'
|
|
},
|
|
[`&:not(${componentCls}-loading) ${componentCls}-body`]: {
|
|
marginBlockStart: -token.lineWidth,
|
|
marginInlineStart: -token.lineWidth,
|
|
padding: 0
|
|
}
|
|
},
|
|
[`${componentCls}-contain-tabs`]: {
|
|
[`> ${componentCls}-head`]: {
|
|
[`${componentCls}-head-title, ${componentCls}-extra`]: {
|
|
paddingTop: cardHeadPadding
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-type-inner`]: genCardTypeInnerStyle(token),
|
|
[`${componentCls}-loading`]: genCardLoadingStyle(token),
|
|
[`${componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
};
|
|
};
|
|
// ============================== Size ==============================
|
|
const genCardSizeStyle = token => {
|
|
const {
|
|
componentCls,
|
|
cardPaddingSM,
|
|
headerHeightSM,
|
|
headerFontSizeSM
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-small`]: {
|
|
[`> ${componentCls}-head`]: {
|
|
minHeight: headerHeightSM,
|
|
padding: `0 ${cardPaddingSM}px`,
|
|
fontSize: headerFontSizeSM,
|
|
[`> ${componentCls}-head-wrapper`]: {
|
|
[`> ${componentCls}-extra`]: {
|
|
fontSize: token.fontSize
|
|
}
|
|
}
|
|
},
|
|
[`> ${componentCls}-body`]: {
|
|
padding: cardPaddingSM
|
|
}
|
|
},
|
|
[`${componentCls}-small${componentCls}-contain-tabs`]: {
|
|
[`> ${componentCls}-head`]: {
|
|
[`${componentCls}-head-title, ${componentCls}-extra`]: {
|
|
minHeight: headerHeightSM,
|
|
paddingTop: 0,
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var card_style = ((0,genComponentStyleHook/* default */.Z)('Card', token => {
|
|
const cardToken = (0,statistic/* merge */.TS)(token, {
|
|
cardShadow: token.boxShadowCard,
|
|
cardHeadPadding: token.padding,
|
|
cardPaddingBase: token.paddingLG,
|
|
cardActionsIconSize: token.fontSize,
|
|
cardPaddingSM: 12 // Fixed padding.
|
|
});
|
|
|
|
return [
|
|
// Style
|
|
genCardStyle(cardToken),
|
|
// Size
|
|
genCardSizeStyle(cardToken)];
|
|
}, token => ({
|
|
headerBg: 'transparent',
|
|
headerFontSize: token.fontSizeLG,
|
|
headerFontSizeSM: token.fontSize,
|
|
headerHeight: token.fontSizeLG * token.lineHeightLG + token.padding * 2,
|
|
headerHeightSM: token.fontSize * token.lineHeight + token.paddingXS * 2,
|
|
actionsBg: token.colorBgContainer,
|
|
actionsLiMargin: `${token.paddingSM}px 0`,
|
|
tabsMarginBottom: -token.padding - token.lineWidth,
|
|
extraColor: token.colorText
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/card/Card.js
|
|
"use client";
|
|
|
|
var Card_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;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getAction(actions) {
|
|
return actions.map((action, index) =>
|
|
/*#__PURE__*/
|
|
// eslint-disable-next-line react/no-array-index-key
|
|
_react_17_0_2_react.createElement("li", {
|
|
style: {
|
|
width: `${100 / actions.length}%`
|
|
},
|
|
key: `action-${index}`
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("span", null, action)));
|
|
}
|
|
const Card = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
className,
|
|
rootClassName,
|
|
style,
|
|
extra,
|
|
headStyle = {},
|
|
bodyStyle = {},
|
|
title,
|
|
loading,
|
|
bordered = true,
|
|
size: customizeSize,
|
|
type,
|
|
cover,
|
|
actions,
|
|
tabList,
|
|
children,
|
|
activeTabKey,
|
|
defaultActiveTabKey,
|
|
tabBarExtraContent,
|
|
hoverable,
|
|
tabProps = {}
|
|
} = props,
|
|
others = Card_rest(props, ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps"]);
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
card
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const onTabChange = key => {
|
|
var _a;
|
|
(_a = props.onTabChange) === null || _a === void 0 ? void 0 : _a.call(props, key);
|
|
};
|
|
const isContainGrid = _react_17_0_2_react.useMemo(() => {
|
|
let containGrid = false;
|
|
_react_17_0_2_react.Children.forEach(children, element => {
|
|
if (element && element.type && element.type === card_Grid) {
|
|
containGrid = true;
|
|
}
|
|
});
|
|
return containGrid;
|
|
}, [children]);
|
|
const prefixCls = getPrefixCls('card', customizePrefixCls);
|
|
const [wrapSSR, hashId] = card_style(prefixCls);
|
|
const loadingBlock = /*#__PURE__*/_react_17_0_2_react.createElement(skeleton/* default */.Z, {
|
|
loading: true,
|
|
active: true,
|
|
paragraph: {
|
|
rows: 4
|
|
},
|
|
title: false
|
|
}, children);
|
|
const hasActiveTabKey = activeTabKey !== undefined;
|
|
const extraProps = Object.assign(Object.assign({}, tabProps), {
|
|
[hasActiveTabKey ? 'activeKey' : 'defaultActiveKey']: hasActiveTabKey ? activeTabKey : defaultActiveTabKey,
|
|
tabBarExtraContent
|
|
});
|
|
let head;
|
|
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
|
|
const tabSize = !mergedSize || mergedSize === 'default' ? 'large' : mergedSize;
|
|
const tabs = tabList ? /*#__PURE__*/_react_17_0_2_react.createElement(es_tabs/* default */.Z, Object.assign({
|
|
size: tabSize
|
|
}, extraProps, {
|
|
className: `${prefixCls}-head-tabs`,
|
|
onChange: onTabChange,
|
|
items: tabList.map(_a => {
|
|
var {
|
|
tab
|
|
} = _a,
|
|
item = Card_rest(_a, ["tab"]);
|
|
return Object.assign({
|
|
label: tab
|
|
}, item);
|
|
})
|
|
})) : null;
|
|
if (title || extra || tabs) {
|
|
head = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-head`,
|
|
style: headStyle
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-head-wrapper`
|
|
}, title && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-head-title`
|
|
}, title), extra && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-extra`
|
|
}, extra)), tabs);
|
|
}
|
|
const coverDom = cover ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-cover`
|
|
}, cover) : null;
|
|
const body = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-body`,
|
|
style: bodyStyle
|
|
}, loading ? loadingBlock : children);
|
|
const actionDom = actions && actions.length ? /*#__PURE__*/_react_17_0_2_react.createElement("ul", {
|
|
className: `${prefixCls}-actions`
|
|
}, getAction(actions)) : null;
|
|
const divProps = (0,omit/* default */.Z)(others, ['onTabChange']);
|
|
const classString = _classnames_2_5_1_classnames_default()(prefixCls, card === null || card === void 0 ? void 0 : card.className, {
|
|
[`${prefixCls}-loading`]: loading,
|
|
[`${prefixCls}-bordered`]: bordered,
|
|
[`${prefixCls}-hoverable`]: hoverable,
|
|
[`${prefixCls}-contain-grid`]: isContainGrid,
|
|
[`${prefixCls}-contain-tabs`]: tabList && tabList.length,
|
|
[`${prefixCls}-${mergedSize}`]: mergedSize,
|
|
[`${prefixCls}-type-${type}`]: !!type,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, card === null || card === void 0 ? void 0 : card.style), style);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
ref: ref
|
|
}, divProps, {
|
|
className: classString,
|
|
style: mergedStyle
|
|
}), head, coverDom, body, actionDom));
|
|
});
|
|
/* harmony default export */ var card_Card = (Card);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/card/Meta.js
|
|
"use client";
|
|
|
|
var Meta_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;
|
|
};
|
|
|
|
|
|
|
|
const Meta = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
className,
|
|
avatar,
|
|
title,
|
|
description
|
|
} = props,
|
|
others = Meta_rest(props, ["prefixCls", "className", "avatar", "title", "description"]);
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('card', customizePrefixCls);
|
|
const classString = _classnames_2_5_1_classnames_default()(`${prefixCls}-meta`, className);
|
|
const avatarDom = avatar ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-meta-avatar`
|
|
}, avatar) : null;
|
|
const titleDom = title ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-meta-title`
|
|
}, title) : null;
|
|
const descriptionDom = description ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-meta-description`
|
|
}, description) : null;
|
|
const MetaDetail = titleDom || descriptionDom ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-meta-detail`
|
|
}, titleDom, descriptionDom) : null;
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, others, {
|
|
className: classString
|
|
}), avatarDom, MetaDetail);
|
|
};
|
|
/* harmony default export */ var card_Meta = (Meta);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/card/index.js
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
const es_card_Card = card_Card;
|
|
es_card_Card.Grid = card_Grid;
|
|
es_card_Card.Meta = card_Meta;
|
|
if (false) {}
|
|
/* harmony default export */ var card = (es_card_Card);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25769:
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/_copy-to-clipboard@3.3.3@copy-to-clipboard/index.js ***!
|
|
\**************************************************************************/
|
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var deselectCurrent = __webpack_require__(/*! toggle-selection */ 98040);
|
|
|
|
var clipboardToIE11Formatting = {
|
|
"text/plain": "Text",
|
|
"text/html": "Url",
|
|
"default": "Text"
|
|
}
|
|
|
|
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
|
|
function format(message) {
|
|
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
}
|
|
|
|
function copy(text, options) {
|
|
var debug,
|
|
message,
|
|
reselectPrevious,
|
|
range,
|
|
selection,
|
|
mark,
|
|
success = false;
|
|
if (!options) {
|
|
options = {};
|
|
}
|
|
debug = options.debug || false;
|
|
try {
|
|
reselectPrevious = deselectCurrent();
|
|
|
|
range = document.createRange();
|
|
selection = document.getSelection();
|
|
|
|
mark = document.createElement("span");
|
|
mark.textContent = text;
|
|
// avoid screen readers from reading out loud the text
|
|
mark.ariaHidden = "true"
|
|
// reset user styles for span element
|
|
mark.style.all = "unset";
|
|
// prevents scrolling to the end of the page
|
|
mark.style.position = "fixed";
|
|
mark.style.top = 0;
|
|
mark.style.clip = "rect(0, 0, 0, 0)";
|
|
// used to preserve spaces and line breaks
|
|
mark.style.whiteSpace = "pre";
|
|
// do not inherit user-select (it may be `none`)
|
|
mark.style.webkitUserSelect = "text";
|
|
mark.style.MozUserSelect = "text";
|
|
mark.style.msUserSelect = "text";
|
|
mark.style.userSelect = "text";
|
|
mark.addEventListener("copy", function(e) {
|
|
e.stopPropagation();
|
|
if (options.format) {
|
|
e.preventDefault();
|
|
if (typeof e.clipboardData === "undefined") { // IE 11
|
|
debug && console.warn("unable to use e.clipboardData");
|
|
debug && console.warn("trying IE specific stuff");
|
|
window.clipboardData.clearData();
|
|
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
|
|
window.clipboardData.setData(format, text);
|
|
} else { // all other browsers
|
|
e.clipboardData.clearData();
|
|
e.clipboardData.setData(options.format, text);
|
|
}
|
|
}
|
|
if (options.onCopy) {
|
|
e.preventDefault();
|
|
options.onCopy(e.clipboardData);
|
|
}
|
|
});
|
|
|
|
document.body.appendChild(mark);
|
|
|
|
range.selectNodeContents(mark);
|
|
selection.addRange(range);
|
|
|
|
var successful = document.execCommand("copy");
|
|
if (!successful) {
|
|
throw new Error("copy command was unsuccessful");
|
|
}
|
|
success = true;
|
|
} catch (err) {
|
|
debug && console.error("unable to copy using execCommand: ", err);
|
|
debug && console.warn("trying IE specific stuff");
|
|
try {
|
|
window.clipboardData.setData(options.format || "text", text);
|
|
options.onCopy && options.onCopy(window.clipboardData);
|
|
success = true;
|
|
} catch (err) {
|
|
debug && console.error("unable to copy using clipboardData: ", err);
|
|
debug && console.error("falling back to prompt");
|
|
message = format("message" in options ? options.message : defaultMessage);
|
|
window.prompt(message, text);
|
|
}
|
|
} finally {
|
|
if (selection) {
|
|
if (typeof selection.removeRange == "function") {
|
|
selection.removeRange(range);
|
|
} else {
|
|
selection.removeAllRanges();
|
|
}
|
|
}
|
|
|
|
if (mark) {
|
|
document.body.removeChild(mark);
|
|
}
|
|
reselectPrevious();
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
module.exports = copy;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 24334:
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/_js-base64@2.6.4@js-base64/base64.js ***!
|
|
\***********************************************************/
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
* base64.js
|
|
*
|
|
* Licensed under the BSD 3-Clause License.
|
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
*
|
|
* References:
|
|
* http://en.wikipedia.org/wiki/Base64
|
|
*/
|
|
;(function (global, factory) {
|
|
true
|
|
? module.exports = factory(global)
|
|
: 0
|
|
}((
|
|
typeof self !== 'undefined' ? self
|
|
: typeof window !== 'undefined' ? window
|
|
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
|
|
: this
|
|
), function(global) {
|
|
'use strict';
|
|
// existing version for noConflict()
|
|
global = global || {};
|
|
var _Base64 = global.Base64;
|
|
var version = "2.6.4";
|
|
// constants
|
|
var b64chars
|
|
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
var b64tab = function(bin) {
|
|
var t = {};
|
|
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
|
|
return t;
|
|
}(b64chars);
|
|
var fromCharCode = String.fromCharCode;
|
|
// encoder stuff
|
|
var cb_utob = function(c) {
|
|
if (c.length < 2) {
|
|
var cc = c.charCodeAt(0);
|
|
return cc < 0x80 ? c
|
|
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
|
|
+ fromCharCode(0x80 | (cc & 0x3f)))
|
|
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
} else {
|
|
var cc = 0x10000
|
|
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
+ (c.charCodeAt(1) - 0xDC00);
|
|
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
|
|
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
}
|
|
};
|
|
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
var utob = function(u) {
|
|
return u.replace(re_utob, cb_utob);
|
|
};
|
|
var cb_encode = function(ccc) {
|
|
var padlen = [0, 2, 1][ccc.length % 3],
|
|
ord = ccc.charCodeAt(0) << 16
|
|
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
|
|
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
|
|
chars = [
|
|
b64chars.charAt( ord >>> 18),
|
|
b64chars.charAt((ord >>> 12) & 63),
|
|
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
|
|
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
|
|
];
|
|
return chars.join('');
|
|
};
|
|
var btoa = global.btoa && typeof global.btoa == 'function'
|
|
? function(b){ return global.btoa(b) } : function(b) {
|
|
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
|
|
'The string contains invalid characters.'
|
|
);
|
|
return b.replace(/[\s\S]{1,3}/g, cb_encode);
|
|
};
|
|
var _encode = function(u) {
|
|
return btoa(utob(String(u)));
|
|
};
|
|
var mkUriSafe = function (b64) {
|
|
return b64.replace(/[+\/]/g, function(m0) {
|
|
return m0 == '+' ? '-' : '_';
|
|
}).replace(/=/g, '');
|
|
};
|
|
var encode = function(u, urisafe) {
|
|
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
|
|
};
|
|
var encodeURI = function(u) { return encode(u, true) };
|
|
var fromUint8Array;
|
|
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
|
|
// return btoa(fromCharCode.apply(null, a));
|
|
var b64 = '';
|
|
for (var i = 0, l = a.length; i < l; i += 3) {
|
|
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
|
|
var ord = a0 << 16 | a1 << 8 | a2;
|
|
b64 += b64chars.charAt( ord >>> 18)
|
|
+ b64chars.charAt((ord >>> 12) & 63)
|
|
+ ( typeof a1 != 'undefined'
|
|
? b64chars.charAt((ord >>> 6) & 63) : '=')
|
|
+ ( typeof a2 != 'undefined'
|
|
? b64chars.charAt( ord & 63) : '=');
|
|
}
|
|
return urisafe ? mkUriSafe(b64) : b64;
|
|
};
|
|
// decoder stuff
|
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
var cb_btou = function(cccc) {
|
|
switch(cccc.length) {
|
|
case 4:
|
|
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
| (0x3f & cccc.charCodeAt(3)),
|
|
offset = cp - 0x10000;
|
|
return (fromCharCode((offset >>> 10) + 0xD800)
|
|
+ fromCharCode((offset & 0x3FF) + 0xDC00));
|
|
case 3:
|
|
return fromCharCode(
|
|
((0x0f & cccc.charCodeAt(0)) << 12)
|
|
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
| (0x3f & cccc.charCodeAt(2))
|
|
);
|
|
default:
|
|
return fromCharCode(
|
|
((0x1f & cccc.charCodeAt(0)) << 6)
|
|
| (0x3f & cccc.charCodeAt(1))
|
|
);
|
|
}
|
|
};
|
|
var btou = function(b) {
|
|
return b.replace(re_btou, cb_btou);
|
|
};
|
|
var cb_decode = function(cccc) {
|
|
var len = cccc.length,
|
|
padlen = len % 4,
|
|
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
|
|
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
|
|
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
|
|
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
|
|
chars = [
|
|
fromCharCode( n >>> 16),
|
|
fromCharCode((n >>> 8) & 0xff),
|
|
fromCharCode( n & 0xff)
|
|
];
|
|
chars.length -= [0, 0, 2, 1][padlen];
|
|
return chars.join('');
|
|
};
|
|
var _atob = global.atob && typeof global.atob == 'function'
|
|
? function(a){ return global.atob(a) } : function(a){
|
|
return a.replace(/\S{1,4}/g, cb_decode);
|
|
};
|
|
var atob = function(a) {
|
|
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
|
|
};
|
|
var _decode = function(a) { return btou(_atob(a)) };
|
|
var _fromURI = function(a) {
|
|
return String(a).replace(/[-_]/g, function(m0) {
|
|
return m0 == '-' ? '+' : '/'
|
|
}).replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
};
|
|
var decode = function(a){
|
|
return _decode(_fromURI(a));
|
|
};
|
|
var toUint8Array;
|
|
if (global.Uint8Array) toUint8Array = function(a) {
|
|
return Uint8Array.from(atob(_fromURI(a)), function(c) {
|
|
return c.charCodeAt(0);
|
|
});
|
|
};
|
|
var noConflict = function() {
|
|
var Base64 = global.Base64;
|
|
global.Base64 = _Base64;
|
|
return Base64;
|
|
};
|
|
// export Base64
|
|
global.Base64 = {
|
|
VERSION: version,
|
|
atob: atob,
|
|
btoa: btoa,
|
|
fromBase64: decode,
|
|
toBase64: encode,
|
|
utob: utob,
|
|
encode: encode,
|
|
encodeURI: encodeURI,
|
|
btou: btou,
|
|
decode: decode,
|
|
noConflict: noConflict,
|
|
fromUint8Array: fromUint8Array,
|
|
toUint8Array: toUint8Array
|
|
};
|
|
// if ES5 is available, make Base64.extendString() available
|
|
if (typeof Object.defineProperty === 'function') {
|
|
var noEnum = function(v){
|
|
return {value:v,enumerable:false,writable:true,configurable:true};
|
|
};
|
|
global.Base64.extendString = function () {
|
|
Object.defineProperty(
|
|
String.prototype, 'fromBase64', noEnum(function () {
|
|
return decode(this)
|
|
}));
|
|
Object.defineProperty(
|
|
String.prototype, 'toBase64', noEnum(function (urisafe) {
|
|
return encode(this, urisafe)
|
|
}));
|
|
Object.defineProperty(
|
|
String.prototype, 'toBase64URI', noEnum(function () {
|
|
return encode(this, true)
|
|
}));
|
|
};
|
|
}
|
|
//
|
|
// export Base64 to the namespace
|
|
//
|
|
if (global['Meteor']) { // Meteor.js
|
|
Base64 = global.Base64;
|
|
}
|
|
// module.exports and AMD are mutually exclusive.
|
|
// module.exports has precedence.
|
|
if ( true && module.exports) {
|
|
module.exports.Base64 = global.Base64;
|
|
}
|
|
else if (true) {
|
|
// AMD. Register as an anonymous module.
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
}
|
|
// that's it!
|
|
return {Base64: global.Base64}
|
|
}));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83145:
|
|
/*!**********************************************************************************************!*\
|
|
!*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/Component.js ***!
|
|
\**********************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({
|
|
value: true
|
|
}));
|
|
exports.CopyToClipboard = void 0;
|
|
|
|
var _react = _interopRequireDefault(__webpack_require__(/*! react */ 59301));
|
|
|
|
var _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ 25769));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
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; }
|
|
|
|
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; }
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
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; }
|
|
|
|
var CopyToClipboard =
|
|
/*#__PURE__*/
|
|
function (_React$PureComponent) {
|
|
_inherits(CopyToClipboard, _React$PureComponent);
|
|
|
|
function CopyToClipboard() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
_classCallCheck(this, CopyToClipboard);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
|
|
var _this$props = _this.props,
|
|
text = _this$props.text,
|
|
onCopy = _this$props.onCopy,
|
|
children = _this$props.children,
|
|
options = _this$props.options;
|
|
|
|
var elem = _react["default"].Children.only(children);
|
|
|
|
var result = (0, _copyToClipboard["default"])(text, options);
|
|
|
|
if (onCopy) {
|
|
onCopy(text, result);
|
|
} // Bypass onClick if it was present
|
|
|
|
|
|
if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
|
elem.props.onClick(event);
|
|
}
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
_createClass(CopyToClipboard, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props2 = this.props,
|
|
_text = _this$props2.text,
|
|
_onCopy = _this$props2.onCopy,
|
|
_options = _this$props2.options,
|
|
children = _this$props2.children,
|
|
props = _objectWithoutProperties(_this$props2, ["text", "onCopy", "options", "children"]);
|
|
|
|
var elem = _react["default"].Children.only(children);
|
|
|
|
return _react["default"].cloneElement(elem, _objectSpread({}, props, {
|
|
onClick: this.onClick
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return CopyToClipboard;
|
|
}(_react["default"].PureComponent);
|
|
|
|
exports.CopyToClipboard = CopyToClipboard;
|
|
|
|
_defineProperty(CopyToClipboard, "defaultProps", {
|
|
onCopy: undefined,
|
|
options: undefined
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 56102:
|
|
/*!******************************************************************************************!*\
|
|
!*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js ***!
|
|
\******************************************************************************************/
|
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _require = __webpack_require__(/*! ./Component */ 83145),
|
|
CopyToClipboard = _require.CopyToClipboard;
|
|
|
|
CopyToClipboard.CopyToClipboard = CopyToClipboard;
|
|
module.exports = CopyToClipboard;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 98040:
|
|
/*!************************************************************************!*\
|
|
!*** ./node_modules/_toggle-selection@1.0.6@toggle-selection/index.js ***!
|
|
\************************************************************************/
|
|
/***/ (function(module) {
|
|
|
|
|
|
module.exports = function () {
|
|
var selection = document.getSelection();
|
|
if (!selection.rangeCount) {
|
|
return function () {};
|
|
}
|
|
var active = document.activeElement;
|
|
|
|
var ranges = [];
|
|
for (var i = 0; i < selection.rangeCount; i++) {
|
|
ranges.push(selection.getRangeAt(i));
|
|
}
|
|
|
|
switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML
|
|
case 'INPUT':
|
|
case 'TEXTAREA':
|
|
active.blur();
|
|
break;
|
|
|
|
default:
|
|
active = null;
|
|
break;
|
|
}
|
|
|
|
selection.removeAllRanges();
|
|
return function () {
|
|
selection.type === 'Caret' &&
|
|
selection.removeAllRanges();
|
|
|
|
if (!selection.rangeCount) {
|
|
ranges.forEach(function(range) {
|
|
selection.addRange(range);
|
|
});
|
|
}
|
|
|
|
active &&
|
|
active.focus();
|
|
};
|
|
};
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |