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.
NewEduCoderBuild/p__Shixuns__Detail__AuditSi...

684 lines
28 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[45096],{
/***/ 52063:
/*!******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules ***!
\******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_LeftOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(26508);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/LeftOutlined.js
// This icon file is generated automatically.
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
/* harmony default export */ var asn_LeftOutlined = (LeftOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(91851);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var LeftOutlined_LeftOutlined = function LeftOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_LeftOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_LeftOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(LeftOutlined_LeftOutlined));
/***/ }),
/***/ 22311:
/*!*******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/RightOutlined.js + 1 modules ***!
\*******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_RightOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(26508);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/RightOutlined.js
// This icon file is generated automatically.
var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
/* harmony default export */ var asn_RightOutlined = (RightOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(91851);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/RightOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RightOutlined_RightOutlined = function RightOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_RightOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_RightOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(RightOutlined_RightOutlined));
/***/ }),
/***/ 46820:
/*!********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules ***!
\********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_SearchOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(26508);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/SearchOutlined.js
// This icon file is generated automatically.
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
/* harmony default export */ var asn_SearchOutlined = (SearchOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(91851);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SearchOutlined_SearchOutlined = function SearchOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_SearchOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_SearchOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SearchOutlined_SearchOutlined));
/***/ }),
/***/ 79045:
/*!***********************************************************************!*\
!*** ./src/pages/Shixuns/Detail/AuditSituation/index.tsx + 1 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Detail_AuditSituation; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(10574);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(39343);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(51649);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/modal/index.js + 9 modules
var modal = __webpack_require__(13209);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(85436);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/message/index.js + 4 modules
var message = __webpack_require__(46570);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/tag/index.js + 3 modules
var tag = __webpack_require__(25376);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/list/index.js + 3 modules
var list = __webpack_require__(32398);
// EXTERNAL MODULE: ./src/pages/Shixuns/Detail/components/Right/index.tsx + 4 modules
var Right = __webpack_require__(79250);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Detail/AuditSituation/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AuditSituationmodules = ({"bg":"bg___FZEnM","wrap":"wrap___sp4To","modal":"modal___xf7ct","content":"content___C1iib","colorGreen":"colorGreen___pKpyS","nameWrap":"nameWrap___MiyTi"});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Shixuns/Detail/AuditSituation/index.tsx
var AuditSituation = function AuditSituation(_ref) {
var _shixunsDetail$detail, _shixunsDetail$detail2;
var shixunsDetail = _ref.shixunsDetail,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch;
var params = (0,_umi_production_exports.useParams)();
var shixunId = (0,_react_17_0_2_react.useRef)();
var radioValue = (0,_react_17_0_2_react.useRef)(1);
(0,_react_17_0_2_react.useEffect)(function () {
shixunId.current = params.id;
dispatch({
type: 'shixunsDetail/getAuditSituationData',
payload: {
id: shixunId.current
}
});
}, []);
var handleUpdate = function handleUpdate(id) {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "审核情况更改",
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AuditSituationmodules.modal,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
defaultValue: 1,
onChange: function onChange(e) {
return radioValue.current = e.target.value;
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: 1,
children: "\u5DF2\u5B8C\u6210"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: 0,
children: "\u672A\u5B8C\u6210"
})]
})
}),
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return dispatch({
type: 'shixunsDetail/updateAuditSituation',
payload: {
id: shixunId.current,
status: radioValue.current,
review_type: id
}
});
case 2:
res = _context.sent;
if (res.status === 0) {
message/* default */.ZP.info(res.message);
dispatch({
type: 'shixunsDetail/getAuditSituationData',
payload: {
id: shixunId.current
}
});
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
};
var renderStatus = function renderStatus(item) {
if (item.status === 0) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tag/* default */.Z, {
color: "#bcbcbc",
children: "\u672A\u5B8C\u6210"
});
}
if (item.status === 1) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tag/* default */.Z, {
color: "#FF6800",
children: "\u5DF2\u5B8C\u6210"
});
}
return '';
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: AuditSituationmodules.bg,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AuditSituationmodules.wrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AuditSituationmodules.content,
children: (((_shixunsDetail$detail = shixunsDetail.detail) === null || _shixunsDetail$detail === void 0 ? void 0 : _shixunsDetail$detail.identity) <= 2 || !((_shixunsDetail$detail2 = shixunsDetail.detail) !== null && _shixunsDetail$detail2 !== void 0 && _shixunsDetail$detail2.identity)) && /*#__PURE__*/(0,jsx_runtime.jsx)(list/* default */.Z, {
dataSource: (shixunsDetail === null || shixunsDetail === void 0 ? void 0 : shixunsDetail.auditSituationData) || [],
bordered: true,
renderItem: function renderItem(item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(list/* default */.Z.Item, {
actions: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
onClick: function onClick() {
return handleUpdate(item.id);
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-bianjidaibeijing font22 ".concat(AuditSituationmodules.colorGreen)
})
})],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(list/* default */.Z.Item.Meta, {
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "font16 ".concat(AuditSituationmodules.nameWrap),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "pt2 pr10",
children: item.name
}), renderStatus(item)]
}),
description: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "font14",
children: [item.time && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u5BA1\u6838\u65F6\u95F4: ", item.time]
}), item.username && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "ml30",
children: ["\u5BA1\u6838\u4EBA: ", item.username]
})]
})
})
}, item.id);
}
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Right/* default */.Z, {})]
});
};
/* harmony default export */ var Detail_AuditSituation = ((0,_umi_production_exports.connect)(function (_ref2) {
var shixunsDetail = _ref2.shixunsDetail,
loading = _ref2.loading,
globalSetting = _ref2.globalSetting,
user = _ref2.user;
return {
shixunsDetail: shixunsDetail,
globalSetting: globalSetting,
user: user,
loading: loading.models.index
};
})(AuditSituation));
/***/ }),
/***/ 85444:
/*!*****************************************************************!*\
!*** ./node_modules/_antd@5.7.1@antd/es/_util/extendsObject.js ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
function extendsObject() {
const result = Object.assign({}, arguments.length <= 0 ? undefined : arguments[0]);
for (let i = 1; i < arguments.length; i++) {
const obj = i < 0 || arguments.length <= i ? undefined : arguments[i];
if (obj) {
Object.keys(obj).forEach(key => {
const val = obj[key];
if (val !== undefined) {
result[key] = val;
}
});
}
}
return result;
}
/* harmony default export */ __webpack_exports__.Z = (extendsObject);
/***/ }),
/***/ 25376:
/*!*******************************************************************!*\
!*** ./node_modules/_antd@5.7.1@antd/es/tag/index.js + 3 modules ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ tag; }
});
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(99174);
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
var _classnames_2_3_2_classnames = __webpack_require__(12124);
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
// 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.7.1@antd/es/_util/colors.js
var colors = __webpack_require__(44887);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/_util/hooks/useClosable.js
var useClosable = __webpack_require__(95134);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/_util/wave/index.js + 4 modules
var wave = __webpack_require__(76804);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/config-provider/context.js
var context = __webpack_require__(16182);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/_util/capitalize.js
function capitalize(str) {
if (typeof str !== 'string') {
return str;
}
const ret = str.charAt(0).toUpperCase() + str.slice(1);
return ret;
}
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/style/index.js
var style = __webpack_require__(39970);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/genPresetColor.js
var genPresetColor = __webpack_require__(65283);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(70770);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(3562);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/tag/style/index.js
const genTagStatusStyle = (token, status, cssVariableType) => {
const capitalizedCssVariableType = capitalize(cssVariableType);
return {
[`${token.componentCls}-${status}`]: {
color: token[`color${cssVariableType}`],
background: token[`color${capitalizedCssVariableType}Bg`],
borderColor: token[`color${capitalizedCssVariableType}Border`],
[`&${token.componentCls}-borderless`]: {
borderColor: 'transparent'
}
}
};
};
const genPresetStyle = token => (0,genPresetColor/* default */.Z)(token, (colorKey, _ref) => {
let {
textColor,
lightBorderColor,
lightColor,
darkColor
} = _ref;
return {
[`${token.componentCls}-${colorKey}`]: {
color: textColor,
background: lightColor,
borderColor: lightBorderColor,
// Inverse color
'&-inverse': {
color: token.colorTextLightSolid,
background: darkColor,
borderColor: darkColor
},
[`&${token.componentCls}-borderless`]: {
borderColor: 'transparent'
}
}
};
});
const genBaseStyle = token => {
const {
paddingXXS,
lineWidth,
tagPaddingHorizontal,
componentCls
} = token;
const paddingInline = tagPaddingHorizontal - lineWidth;
const iconMarginInline = paddingXXS - lineWidth;
return {
// Result
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
display: 'inline-block',
height: 'auto',
marginInlineEnd: token.marginXS,
paddingInline,
fontSize: token.tagFontSize,
lineHeight: token.tagLineHeight,
whiteSpace: 'nowrap',
background: token.defaultBg,
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadiusSM,
opacity: 1,
transition: `all ${token.motionDurationMid}`,
textAlign: 'start',
position: 'relative',
// RTL
[`&${componentCls}-rtl`]: {
direction: 'rtl'
},
'&, a, a:hover': {
color: token.defaultColor
},
[`${componentCls}-close-icon`]: {
marginInlineStart: iconMarginInline,
color: token.colorTextDescription,
fontSize: token.tagIconSize,
cursor: 'pointer',
transition: `all ${token.motionDurationMid}`,
'&:hover': {
color: token.colorTextHeading
}
},
[`&${componentCls}-has-color`]: {
borderColor: 'transparent',
[`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {
color: token.colorTextLightSolid
}
},
[`&-checkable`]: {
backgroundColor: 'transparent',
borderColor: 'transparent',
cursor: 'pointer',
[`&:not(${componentCls}-checkable-checked):hover`]: {
color: token.colorPrimary,
backgroundColor: token.colorFillSecondary
},
'&:active, &-checked': {
color: token.colorTextLightSolid
},
'&-checked': {
backgroundColor: token.colorPrimary,
'&:hover': {
backgroundColor: token.colorPrimaryHover
}
},
'&:active': {
backgroundColor: token.colorPrimaryActive
}
},
[`&-hidden`]: {
display: 'none'
},
// To ensure that a space will be placed between character and `Icon`.
[`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {
marginInlineStart: paddingInline
}
}),
[`${componentCls}-borderless`]: {
borderColor: 'transparent',
background: token.tagBorderlessBg
}
};
};
// ============================== Export ==============================
/* harmony default export */ var tag_style = ((0,genComponentStyleHook/* default */.Z)('Tag', token => {
const {
lineWidth,
fontSizeIcon
} = token;
const tagFontSize = token.fontSizeSM;
const tagLineHeight = `${token.lineHeightSM * tagFontSize}px`;
const tagToken = (0,statistic/* merge */.TS)(token, {
tagFontSize,
tagLineHeight,
tagIconSize: fontSizeIcon - 2 * lineWidth,
tagPaddingHorizontal: 8,
tagBorderlessBg: token.colorFillTertiary
});
return [genBaseStyle(tagToken), genPresetStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];
}, token => ({
defaultBg: token.colorFillQuaternary,
defaultColor: token.colorText
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/tag/CheckableTag.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;
};
const CheckableTag = props => {
const {
prefixCls: customizePrefixCls,
className,
checked,
onChange,
onClick
} = props,
restProps = __rest(props, ["prefixCls", "className", "checked", "onChange", "onClick"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const handleClick = e => {
onChange === null || onChange === void 0 ? void 0 : onChange(!checked);
onClick === null || onClick === void 0 ? void 0 : onClick(e);
};
const prefixCls = getPrefixCls('tag', customizePrefixCls);
// Style
const [wrapSSR, hashId] = tag_style(prefixCls);
const cls = _classnames_2_3_2_classnames_default()(prefixCls, `${prefixCls}-checkable`, {
[`${prefixCls}-checkable-checked`]: checked
}, className, hashId);
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, restProps, {
className: cls,
onClick: handleClick
})));
};
/* harmony default export */ var tag_CheckableTag = (CheckableTag);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/tag/index.js
'use client';
var tag_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 InternalTag = (tagProps, ref) => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
children,
icon,
color,
onClose,
closeIcon,
closable,
bordered = true
} = tagProps,
props = tag_rest(tagProps, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "closeIcon", "closable", "bordered"]);
const {
getPrefixCls,
direction,
tag
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const [visible, setVisible] = _react_17_0_2_react.useState(true);
// Warning for deprecated usage
if (false) {}
_react_17_0_2_react.useEffect(() => {
if ('visible' in props) {
setVisible(props.visible);
}
}, [props.visible]);
const isInternalColor = (0,colors/* isPresetColor */.o2)(color) || (0,colors/* isPresetStatusColor */.yT)(color);
const tagStyle = Object.assign(Object.assign({
backgroundColor: color && !isInternalColor ? color : undefined
}, tag === null || tag === void 0 ? void 0 : tag.style), style);
const prefixCls = getPrefixCls('tag', customizePrefixCls);
// Style
const [wrapSSR, hashId] = tag_style(prefixCls);
const tagClassName = _classnames_2_3_2_classnames_default()(prefixCls, tag === null || tag === void 0 ? void 0 : tag.className, {
[`${prefixCls}-${color}`]: isInternalColor,
[`${prefixCls}-has-color`]: color && !isInternalColor,
[`${prefixCls}-hidden`]: !visible,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-borderless`]: !bordered
}, className, rootClassName, hashId);
const handleCloseClick = e => {
e.stopPropagation();
onClose === null || onClose === void 0 ? void 0 : onClose(e);
if (e.defaultPrevented) {
return;
}
setVisible(false);
};
const [, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, iconNode => iconNode === null ? /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, {
className: `${prefixCls}-close-icon`,
onClick: handleCloseClick
}) : /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-close-icon`,
onClick: handleCloseClick
}, iconNode), null, false);
const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';
const iconNode = icon || null;
const kids = iconNode ? /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, iconNode, children && /*#__PURE__*/_react_17_0_2_react.createElement("span", null, children)) : children;
const tagNode = /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, props, {
ref: ref,
className: tagClassName,
style: tagStyle
}), kids, mergedCloseIcon);
return wrapSSR(isNeedWave ? /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, null, tagNode) : tagNode);
};
const Tag = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalTag);
if (false) {}
Tag.CheckableTag = tag_CheckableTag;
/* harmony default export */ var tag = (Tag);
/***/ })
}]);