|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[81799],{
|
|
|
|
|
|
/***/ 26491:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx ***!
|
|
|
\****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var antd_es_table_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/table/style */ 71854);
|
|
|
/* harmony import */ var antd_es_table__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd/es/table */ 67250);
|
|
|
/* harmony import */ var antd_es_breadcrumb_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/breadcrumb/style */ 63102);
|
|
|
/* harmony import */ var antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd/es/breadcrumb */ 58492);
|
|
|
/* harmony import */ var antd_es_tooltip_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/tooltip/style */ 38390);
|
|
|
/* harmony import */ var antd_es_tooltip__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd/es/tooltip */ 84908);
|
|
|
/* harmony import */ var antd_es_badge_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/badge/style */ 44008);
|
|
|
/* harmony import */ var antd_es_badge__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd/es/badge */ 63922);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js */ 70215);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! umi */ 89214);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["globalSetting", "loading", "dispatch", "user"];
|
|
|
//战队详情
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var competitionDetails = function competitionDetails(_ref) {
|
|
|
var globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
user = _ref.user,
|
|
|
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_7___default()(_ref, _excluded);
|
|
|
var _useParams = (0,umi__WEBPACK_IMPORTED_MODULE_9__.useParams)(),
|
|
|
identifier = _useParams.identifier,
|
|
|
Teamid = _useParams.Teamid;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6___default()(_useState, 2),
|
|
|
shixundata = _useState2[0],
|
|
|
setshixundata = _useState2[1];
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(),
|
|
|
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6___default()(_useState3, 2),
|
|
|
coursedata = _useState4[0],
|
|
|
setcoursedata = _useState4[1];
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(function () {
|
|
|
function init() {
|
|
|
getshixun();
|
|
|
getCourse();
|
|
|
}
|
|
|
if (identifier) {
|
|
|
init();
|
|
|
}
|
|
|
}, [identifier]);
|
|
|
function getshixun() {
|
|
|
return _getshixun.apply(this, arguments);
|
|
|
}
|
|
|
function _getshixun() {
|
|
|
_getshixun = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
|
var data, newarr, newobj;
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'competitions/getShixun',
|
|
|
payload: {
|
|
|
identifier: identifier,
|
|
|
teamid: Teamid
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
data = _context.sent;
|
|
|
if (data) {
|
|
|
newarr = data.shixuns;
|
|
|
newobj = {
|
|
|
creator: "合计:",
|
|
|
shixun_name: data.shixun_count,
|
|
|
myshixuns_count: data.total_myshixun_count,
|
|
|
forked_myshixun_count: data.total_forked_myshixun_count,
|
|
|
valid_count: data.total_valid_count,
|
|
|
score: data.total_shixun_score
|
|
|
};
|
|
|
newarr.push(newobj);
|
|
|
setshixundata(newarr);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return _getshixun.apply(this, arguments);
|
|
|
}
|
|
|
function getCourse() {
|
|
|
return _getCourse.apply(this, arguments);
|
|
|
}
|
|
|
function _getCourse() {
|
|
|
_getCourse = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2() {
|
|
|
var data, newarr, newobj;
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'competitions/getCourse',
|
|
|
payload: {
|
|
|
identifier: identifier,
|
|
|
teamid: Teamid
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
data = _context2.sent;
|
|
|
if (data) {
|
|
|
newarr = data.courses;
|
|
|
newobj = {
|
|
|
creator: "合计:",
|
|
|
course_name: data.total_course_count,
|
|
|
students_count: data.total_students_count,
|
|
|
shixun_homework_count: data.total_shixun_homework_count,
|
|
|
valid_count: data.total_valid_count,
|
|
|
score: data.total_course_score
|
|
|
};
|
|
|
newarr.push(newobj);
|
|
|
setcoursedata(newarr);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return _getCourse.apply(this, arguments);
|
|
|
}
|
|
|
console.log('shixundata', shixundata, 'coursedata', coursedata);
|
|
|
var shixuncolumns = [{
|
|
|
title: '创建者',
|
|
|
dataIndex: 'creator',
|
|
|
key: 'creator',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoutheji" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '名称',
|
|
|
dataIndex: 'shixun_name',
|
|
|
key: 'shixun_name',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: [text, record.forked === true ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_badge__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
|
count: "原创",
|
|
|
style: {
|
|
|
backgroundColor: '#459BE5'
|
|
|
}
|
|
|
}) : ""]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '学习人数',
|
|
|
dataIndex: 'myshixuns_count',
|
|
|
key: 'myshixuns_count',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '被fork发布的学习人数',
|
|
|
dataIndex: 'forked_myshixun_count',
|
|
|
key: 'forked_myshixun_count',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
|
|
|
placement: "bottom",
|
|
|
title: "fork该实训产生的新实训,学习总人数",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '有效作品数',
|
|
|
dataIndex: 'valid_count',
|
|
|
key: 'valid_count',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
|
|
|
placement: "bottom",
|
|
|
title: "至少完成了1个关卡",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '应用值',
|
|
|
dataIndex: 'score',
|
|
|
key: 'score',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var coursecolumns = [{
|
|
|
title: '创建者',
|
|
|
dataIndex: 'creator',
|
|
|
key: 'creator',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoutheji" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '名称',
|
|
|
dataIndex: 'course_name',
|
|
|
key: 'course_name',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '学生数量',
|
|
|
dataIndex: 'students_count',
|
|
|
key: 'students_count',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '发布的实训作业数量',
|
|
|
dataIndex: 'shixun_homework_count',
|
|
|
key: 'shixun_homework_count',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '有效作品数',
|
|
|
dataIndex: 'valid_count',
|
|
|
key: 'valid_count',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
|
|
|
placement: "bottom",
|
|
|
title: "至少完成了1个关卡",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '应用值',
|
|
|
dataIndex: 'score',
|
|
|
key: 'score',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", {
|
|
|
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : "",
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div", {
|
|
|
className: "edu-container minH500",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
|
|
|
className: "mt10",
|
|
|
separator: ">",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_13__/* ["default"].Item */ .Z.Item, {
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(umi__WEBPACK_IMPORTED_MODULE_9__.Link, {
|
|
|
to: "/competitions/index",
|
|
|
children: "\u5728\u7EBF\u7ADE\u8D5B"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_13__/* ["default"].Item */ .Z.Item, {
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(umi__WEBPACK_IMPORTED_MODULE_9__.Link, {
|
|
|
to: "/competitions/".concat(identifier, "/detail/enroll"),
|
|
|
children: "\u62A5\u540D"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_13__/* ["default"].Item */ .Z.Item, {
|
|
|
children: "\u6218\u961F\u8BE6\u60C5"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("p", {
|
|
|
children: "\u5B9E\u8DF5\u9879\u76EE"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_table__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
|
|
|
className: "teamsLayoutTable",
|
|
|
columns: shixuncolumns,
|
|
|
dataSource: shixundata,
|
|
|
bordered: true,
|
|
|
pagination: false
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("p", {
|
|
|
children: "\u6559\u5B66\u8BFE\u5802"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(antd_es_table__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
|
|
|
className: "teamsLayoutTable",
|
|
|
columns: coursecolumns,
|
|
|
dataSource: coursedata,
|
|
|
bordered: true,
|
|
|
pagination: false
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_9__.connect)(function (_ref2) {
|
|
|
var loading = _ref2.loading,
|
|
|
globalSetting = _ref2.globalSetting,
|
|
|
user = _ref2.user;
|
|
|
return {
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
user: user
|
|
|
};
|
|
|
})(competitionDetails));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 5467:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/_util/getDataOrAriaProps.js ***!
|
|
|
\**********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "Z": function() { return /* binding */ getDataOrAriaProps; }
|
|
|
/* harmony export */ });
|
|
|
function getDataOrAriaProps(props) {
|
|
|
return Object.keys(props).reduce(function (prev, key) {
|
|
|
if ((key.startsWith('data-') || key.startsWith('aria-') || key === 'role') && !key.startsWith('data-__')) {
|
|
|
prev[key] = props[key];
|
|
|
}
|
|
|
return prev;
|
|
|
}, {});
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 63922:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/badge/index.js + 4 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ badge; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
|
var esm_typeof = __webpack_require__(71002);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 11 modules
|
|
|
var es = __webpack_require__(62874);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js
|
|
|
var colors = __webpack_require__(98787);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/utils.js
|
|
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
function isPresetColor(color) {
|
|
|
return colors/* PresetColorTypes.includes */.Y.includes(color);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/Ribbon.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Ribbon = function Ribbon(_ref) {
|
|
|
var _classNames;
|
|
|
var className = _ref.className,
|
|
|
customizePrefixCls = _ref.prefixCls,
|
|
|
style = _ref.style,
|
|
|
color = _ref.color,
|
|
|
children = _ref.children,
|
|
|
text = _ref.text,
|
|
|
_ref$placement = _ref.placement,
|
|
|
placement = _ref$placement === void 0 ? 'end' : _ref$placement;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
|
direction = _React$useContext.direction;
|
|
|
var prefixCls = getPrefixCls('ribbon', customizePrefixCls);
|
|
|
var colorInPreset = isPresetColor(color);
|
|
|
var ribbonCls = classnames_default()(prefixCls, "".concat(prefixCls, "-placement-").concat(placement), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-color-").concat(color), colorInPreset), _classNames), className);
|
|
|
var colorStyle = {};
|
|
|
var cornerColorStyle = {};
|
|
|
if (color && !colorInPreset) {
|
|
|
colorStyle.background = color;
|
|
|
cornerColorStyle.color = color;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-wrapper")
|
|
|
}, children, /*#__PURE__*/react.createElement("div", {
|
|
|
className: ribbonCls,
|
|
|
style: (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, colorStyle), style)
|
|
|
}, /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-text")
|
|
|
}, text), /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-corner"),
|
|
|
style: cornerColorStyle
|
|
|
})));
|
|
|
};
|
|
|
/* harmony default export */ var badge_Ribbon = (Ribbon);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(97685);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/SingleNumber.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function UnitNumber(_ref) {
|
|
|
var prefixCls = _ref.prefixCls,
|
|
|
value = _ref.value,
|
|
|
current = _ref.current,
|
|
|
_ref$offset = _ref.offset,
|
|
|
offset = _ref$offset === void 0 ? 0 : _ref$offset;
|
|
|
var style;
|
|
|
if (offset) {
|
|
|
style = {
|
|
|
position: 'absolute',
|
|
|
top: "".concat(offset, "00%"),
|
|
|
left: 0
|
|
|
};
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
|
style: style,
|
|
|
className: classnames_default()("".concat(prefixCls, "-only-unit"), {
|
|
|
current: current
|
|
|
})
|
|
|
}, value);
|
|
|
}
|
|
|
function getOffset(start, end, unit) {
|
|
|
var index = start;
|
|
|
var offset = 0;
|
|
|
while ((index + 10) % 10 !== end) {
|
|
|
index += unit;
|
|
|
offset += unit;
|
|
|
}
|
|
|
return offset;
|
|
|
}
|
|
|
function SingleNumber(props) {
|
|
|
var prefixCls = props.prefixCls,
|
|
|
originCount = props.count,
|
|
|
originValue = props.value;
|
|
|
var value = Number(originValue);
|
|
|
var count = Math.abs(originCount);
|
|
|
var _React$useState = react.useState(value),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
|
prevValue = _React$useState2[0],
|
|
|
setPrevValue = _React$useState2[1];
|
|
|
var _React$useState3 = react.useState(count),
|
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
|
prevCount = _React$useState4[0],
|
|
|
setPrevCount = _React$useState4[1];
|
|
|
// ============================= Events =============================
|
|
|
var onTransitionEnd = function onTransitionEnd() {
|
|
|
setPrevValue(value);
|
|
|
setPrevCount(count);
|
|
|
};
|
|
|
// Fallback if transition event not support
|
|
|
react.useEffect(function () {
|
|
|
var timeout = setTimeout(function () {
|
|
|
onTransitionEnd();
|
|
|
}, 1000);
|
|
|
return function () {
|
|
|
clearTimeout(timeout);
|
|
|
};
|
|
|
}, [value]);
|
|
|
// ============================= Render =============================
|
|
|
// Render unit list
|
|
|
var unitNodes;
|
|
|
var offsetStyle;
|
|
|
if (prevValue === value || Number.isNaN(value) || Number.isNaN(prevValue)) {
|
|
|
// Nothing to change
|
|
|
unitNodes = [/*#__PURE__*/react.createElement(UnitNumber, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
key: value,
|
|
|
current: true
|
|
|
}))];
|
|
|
offsetStyle = {
|
|
|
transition: 'none'
|
|
|
};
|
|
|
} else {
|
|
|
unitNodes = [];
|
|
|
// Fill basic number units
|
|
|
var end = value + 10;
|
|
|
var unitNumberList = [];
|
|
|
for (var index = value; index <= end; index += 1) {
|
|
|
unitNumberList.push(index);
|
|
|
}
|
|
|
// Fill with number unit nodes
|
|
|
var prevIndex = unitNumberList.findIndex(function (n) {
|
|
|
return n % 10 === prevValue;
|
|
|
});
|
|
|
unitNodes = unitNumberList.map(function (n, index) {
|
|
|
var singleUnit = n % 10;
|
|
|
return /*#__PURE__*/react.createElement(UnitNumber, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
key: n,
|
|
|
value: singleUnit,
|
|
|
offset: index - prevIndex,
|
|
|
current: index === prevIndex
|
|
|
}));
|
|
|
});
|
|
|
// Calculate container offset value
|
|
|
var unit = prevCount < count ? 1 : -1;
|
|
|
offsetStyle = {
|
|
|
transform: "translateY(".concat(-getOffset(prevValue, value, unit), "00%)")
|
|
|
};
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-only"),
|
|
|
style: offsetStyle,
|
|
|
onTransitionEnd: onTransitionEnd
|
|
|
}, unitNodes);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/ScrollNumber.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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ScrollNumber = function ScrollNumber(_a) {
|
|
|
var customizePrefixCls = _a.prefixCls,
|
|
|
count = _a.count,
|
|
|
className = _a.className,
|
|
|
motionClassName = _a.motionClassName,
|
|
|
style = _a.style,
|
|
|
title = _a.title,
|
|
|
show = _a.show,
|
|
|
_a$component = _a.component,
|
|
|
component = _a$component === void 0 ? 'sup' : _a$component,
|
|
|
children = _a.children,
|
|
|
restProps = __rest(_a, ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"]);
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
|
|
|
// ============================ Render ============================
|
|
|
var newProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, restProps), {
|
|
|
'data-show': show,
|
|
|
style: style,
|
|
|
className: classnames_default()(prefixCls, className, motionClassName),
|
|
|
title: title
|
|
|
});
|
|
|
// Only integer need motion
|
|
|
var numberNodes = count;
|
|
|
if (count && Number(count) % 1 === 0) {
|
|
|
var numberList = String(count).split('');
|
|
|
numberNodes = numberList.map(function (num, i) {
|
|
|
return /*#__PURE__*/react.createElement(SingleNumber, {
|
|
|
prefixCls: prefixCls,
|
|
|
count: Number(count),
|
|
|
value: num,
|
|
|
// eslint-disable-next-line react/no-array-index-key
|
|
|
key: numberList.length - i
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
// allow specify the border
|
|
|
// mock border-color by box-shadow for compatible with old usage:
|
|
|
// <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
|
|
|
if (style && style.borderColor) {
|
|
|
newProps.style = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, style), {
|
|
|
boxShadow: "0 0 0 1px ".concat(style.borderColor, " inset")
|
|
|
});
|
|
|
}
|
|
|
if (children) {
|
|
|
return (0,reactNode/* cloneElement */.Tm)(children, function (oriProps) {
|
|
|
return {
|
|
|
className: classnames_default()("".concat(prefixCls, "-custom-component"), oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)
|
|
|
};
|
|
|
});
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(component, newProps, numberNodes);
|
|
|
};
|
|
|
/* harmony default export */ var badge_ScrollNumber = (ScrollNumber);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/index.js
|
|
|
|
|
|
|
|
|
|
|
|
var badge_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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Badge = function Badge(_a) {
|
|
|
var _classNames, _classNames2;
|
|
|
var customizePrefixCls = _a.prefixCls,
|
|
|
customizeScrollNumberPrefixCls = _a.scrollNumberPrefixCls,
|
|
|
children = _a.children,
|
|
|
status = _a.status,
|
|
|
text = _a.text,
|
|
|
color = _a.color,
|
|
|
_a$count = _a.count,
|
|
|
count = _a$count === void 0 ? null : _a$count,
|
|
|
_a$overflowCount = _a.overflowCount,
|
|
|
overflowCount = _a$overflowCount === void 0 ? 99 : _a$overflowCount,
|
|
|
_a$dot = _a.dot,
|
|
|
dot = _a$dot === void 0 ? false : _a$dot,
|
|
|
_a$size = _a.size,
|
|
|
size = _a$size === void 0 ? 'default' : _a$size,
|
|
|
title = _a.title,
|
|
|
offset = _a.offset,
|
|
|
style = _a.style,
|
|
|
className = _a.className,
|
|
|
_a$showZero = _a.showZero,
|
|
|
showZero = _a$showZero === void 0 ? false : _a$showZero,
|
|
|
restProps = badge_rest(_a, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"]);
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
|
direction = _React$useContext.direction;
|
|
|
var prefixCls = getPrefixCls('badge', customizePrefixCls);
|
|
|
// ================================ Misc ================================
|
|
|
var numberedDisplayCount = count > overflowCount ? "".concat(overflowCount, "+") : count;
|
|
|
var isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0;
|
|
|
var ignoreCount = count === null || isZero && !showZero;
|
|
|
var hasStatus = (status !== null && status !== undefined || color !== null && color !== undefined) && ignoreCount;
|
|
|
var showAsDot = dot && !isZero;
|
|
|
var mergedCount = showAsDot ? '' : numberedDisplayCount;
|
|
|
var isHidden = (0,react.useMemo)(function () {
|
|
|
var isEmpty = mergedCount === null || mergedCount === undefined || mergedCount === '';
|
|
|
return (isEmpty || isZero && !showZero) && !showAsDot;
|
|
|
}, [mergedCount, isZero, showZero, showAsDot]);
|
|
|
// Count should be cache in case hidden change it
|
|
|
var countRef = (0,react.useRef)(count);
|
|
|
if (!isHidden) {
|
|
|
countRef.current = count;
|
|
|
}
|
|
|
var livingCount = countRef.current;
|
|
|
// We need cache count since remove motion should not change count display
|
|
|
var displayCountRef = (0,react.useRef)(mergedCount);
|
|
|
if (!isHidden) {
|
|
|
displayCountRef.current = mergedCount;
|
|
|
}
|
|
|
var displayCount = displayCountRef.current;
|
|
|
// We will cache the dot status to avoid shaking on leaved motion
|
|
|
var isDotRef = (0,react.useRef)(showAsDot);
|
|
|
if (!isHidden) {
|
|
|
isDotRef.current = showAsDot;
|
|
|
}
|
|
|
// =============================== Styles ===============================
|
|
|
var mergedStyle = (0,react.useMemo)(function () {
|
|
|
if (!offset) {
|
|
|
return (0,esm_extends/* default */.Z)({}, style);
|
|
|
}
|
|
|
var offsetStyle = {
|
|
|
marginTop: offset[1]
|
|
|
};
|
|
|
if (direction === 'rtl') {
|
|
|
offsetStyle.left = parseInt(offset[0], 10);
|
|
|
} else {
|
|
|
offsetStyle.right = -parseInt(offset[0], 10);
|
|
|
}
|
|
|
return (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, offsetStyle), style);
|
|
|
}, [direction, offset, style]);
|
|
|
// =============================== Render ===============================
|
|
|
// >>> Title
|
|
|
var titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined;
|
|
|
// >>> Status Text
|
|
|
var statusTextNode = isHidden || !text ? null : /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-status-text")
|
|
|
}, text);
|
|
|
// >>> Display Component
|
|
|
var displayNode = !livingCount || (0,esm_typeof/* default */.Z)(livingCount) !== 'object' ? undefined : (0,reactNode/* cloneElement */.Tm)(livingCount, function (oriProps) {
|
|
|
return {
|
|
|
style: (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, mergedStyle), oriProps.style)
|
|
|
};
|
|
|
});
|
|
|
// Shared styles
|
|
|
var statusCls = classnames_default()((_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-status-dot"), hasStatus), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-status-").concat(status), !!status), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames));
|
|
|
var statusStyle = {};
|
|
|
if (color && !isPresetColor(color)) {
|
|
|
statusStyle.background = color;
|
|
|
}
|
|
|
var badgeClassName = classnames_default()(prefixCls, (_classNames2 = {}, (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-status"), hasStatus), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-not-a-wrapper"), !children), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames2), className);
|
|
|
// <Badge status="success" />
|
|
|
if (!children && hasStatus) {
|
|
|
var statusTextColor = mergedStyle.color;
|
|
|
return /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({}, restProps, {
|
|
|
className: badgeClassName,
|
|
|
style: mergedStyle
|
|
|
}), /*#__PURE__*/react.createElement("span", {
|
|
|
className: statusCls,
|
|
|
style: statusStyle
|
|
|
}), text && /*#__PURE__*/react.createElement("span", {
|
|
|
style: {
|
|
|
color: statusTextColor
|
|
|
},
|
|
|
className: "".concat(prefixCls, "-status-text")
|
|
|
}, text));
|
|
|
}
|
|
|
// <Badge status="success" count={<Icon type="xxx" />}></Badge>
|
|
|
return /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({}, restProps, {
|
|
|
className: badgeClassName
|
|
|
}), children, /*#__PURE__*/react.createElement(es["default"], {
|
|
|
visible: !isHidden,
|
|
|
motionName: "".concat(prefixCls, "-zoom"),
|
|
|
motionAppear: false,
|
|
|
motionDeadline: 1000
|
|
|
}, function (_ref) {
|
|
|
var _classNames3;
|
|
|
var motionClassName = _ref.className;
|
|
|
var scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);
|
|
|
var isDot = isDotRef.current;
|
|
|
var scrollNumberCls = classnames_default()((_classNames3 = {}, (0,defineProperty/* default */.Z)(_classNames3, "".concat(prefixCls, "-dot"), isDot), (0,defineProperty/* default */.Z)(_classNames3, "".concat(prefixCls, "-count"), !isDot), (0,defineProperty/* default */.Z)(_classNames3, "".concat(prefixCls, "-count-sm"), size === 'small'), (0,defineProperty/* default */.Z)(_classNames3, "".concat(prefixCls, "-multiple-words"), !isDot && displayCount && displayCount.toString().length > 1), (0,defineProperty/* default */.Z)(_classNames3, "".concat(prefixCls, "-status-").concat(status), !!status), (0,defineProperty/* default */.Z)(_classNames3, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames3));
|
|
|
var scrollNumberStyle = (0,esm_extends/* default */.Z)({}, mergedStyle);
|
|
|
if (color && !isPresetColor(color)) {
|
|
|
scrollNumberStyle = scrollNumberStyle || {};
|
|
|
scrollNumberStyle.background = color;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(badge_ScrollNumber, {
|
|
|
prefixCls: scrollNumberPrefixCls,
|
|
|
show: !isHidden,
|
|
|
motionClassName: motionClassName,
|
|
|
className: scrollNumberCls,
|
|
|
count: displayCount,
|
|
|
title: titleNode,
|
|
|
style: scrollNumberStyle,
|
|
|
key: "scrollNumber"
|
|
|
}, displayNode);
|
|
|
}), statusTextNode);
|
|
|
};
|
|
|
Badge.Ribbon = badge_Ribbon;
|
|
|
/* harmony default export */ var badge = (Badge);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 44008:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/badge/style/index.js + 1 modules ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
|
var style_default = __webpack_require__(43146);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/badge/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 58492:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/breadcrumb/index.js + 3 modules ***!
|
|
|
\**************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ breadcrumb; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
|
var toConsumableArray = __webpack_require__(74902);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
|
|
|
var toArray = __webpack_require__(50344);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 5 modules
|
|
|
var menu = __webpack_require__(66516);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/DownOutlined.js
|
|
|
var DownOutlined = __webpack_require__(13622);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/dropdown.js + 1 modules
|
|
|
var dropdown = __webpack_require__(18562);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbItem.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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var BreadcrumbItem = function BreadcrumbItem(props) {
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
_props$separator = props.separator,
|
|
|
separator = _props$separator === void 0 ? '/' : _props$separator,
|
|
|
children = props.children,
|
|
|
menu = props.menu,
|
|
|
overlay = props.overlay,
|
|
|
dropdownProps = props.dropdownProps,
|
|
|
restProps = __rest(props, ["prefixCls", "separator", "children", "menu", "overlay", "dropdownProps"]);
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
// Warning for deprecated usage
|
|
|
if (false) {}
|
|
|
/** If overlay is have Wrap a Dropdown */
|
|
|
var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) {
|
|
|
if (menu || overlay) {
|
|
|
return /*#__PURE__*/react.createElement(dropdown/* default */.Z, (0,esm_extends/* default */.Z)({
|
|
|
menu: menu,
|
|
|
overlay: overlay,
|
|
|
placement: "bottom"
|
|
|
}, dropdownProps), /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-overlay-link")
|
|
|
}, breadcrumbItem, /*#__PURE__*/react.createElement(DownOutlined/* default */.Z, null)));
|
|
|
}
|
|
|
return breadcrumbItem;
|
|
|
};
|
|
|
var link;
|
|
|
if ('href' in restProps) {
|
|
|
link = /*#__PURE__*/react.createElement("a", (0,esm_extends/* default */.Z)({
|
|
|
className: "".concat(prefixCls, "-link")
|
|
|
}, restProps), children);
|
|
|
} else {
|
|
|
link = /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({
|
|
|
className: "".concat(prefixCls, "-link")
|
|
|
}, restProps), children);
|
|
|
}
|
|
|
// wrap to dropDown
|
|
|
link = renderBreadcrumbNode(link);
|
|
|
if (children !== undefined && children !== null) {
|
|
|
return /*#__PURE__*/react.createElement("li", null, link, separator && /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-separator")
|
|
|
}, separator));
|
|
|
}
|
|
|
return null;
|
|
|
};
|
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
|
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbSeparator.js
|
|
|
|
|
|
|
|
|
var BreadcrumbSeparator = function BreadcrumbSeparator(_ref) {
|
|
|
var children = _ref.children;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('breadcrumb');
|
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-separator")
|
|
|
}, children || '/');
|
|
|
};
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/Breadcrumb.js
|
|
|
|
|
|
|
|
|
|
|
|
var Breadcrumb_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 getBreadcrumbName(route, params) {
|
|
|
if (!route.breadcrumbName) {
|
|
|
return null;
|
|
|
}
|
|
|
var paramsKeys = Object.keys(params).join('|');
|
|
|
var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) {
|
|
|
return params[key] || replacement;
|
|
|
});
|
|
|
return name;
|
|
|
}
|
|
|
function defaultItemRender(route, params, routes, paths) {
|
|
|
var isLastItem = routes.indexOf(route) === routes.length - 1;
|
|
|
var name = getBreadcrumbName(route, params);
|
|
|
return isLastItem ? /*#__PURE__*/react.createElement("span", null, name) : /*#__PURE__*/react.createElement("a", {
|
|
|
href: "#/".concat(paths.join('/'))
|
|
|
}, name);
|
|
|
}
|
|
|
var getPath = function getPath(path, params) {
|
|
|
path = (path || '').replace(/^\//, '');
|
|
|
Object.keys(params).forEach(function (key) {
|
|
|
path = path.replace(":".concat(key), params[key]);
|
|
|
});
|
|
|
return path;
|
|
|
};
|
|
|
var addChildPath = function addChildPath(paths, childPath, params) {
|
|
|
var originalPaths = (0,toConsumableArray/* default */.Z)(paths);
|
|
|
var path = getPath(childPath || '', params);
|
|
|
if (path) {
|
|
|
originalPaths.push(path);
|
|
|
}
|
|
|
return originalPaths;
|
|
|
};
|
|
|
var Breadcrumb = function Breadcrumb(_a) {
|
|
|
var customizePrefixCls = _a.prefixCls,
|
|
|
_a$separator = _a.separator,
|
|
|
separator = _a$separator === void 0 ? '/' : _a$separator,
|
|
|
style = _a.style,
|
|
|
className = _a.className,
|
|
|
routes = _a.routes,
|
|
|
children = _a.children,
|
|
|
_a$itemRender = _a.itemRender,
|
|
|
itemRender = _a$itemRender === void 0 ? defaultItemRender : _a$itemRender,
|
|
|
_a$params = _a.params,
|
|
|
params = _a$params === void 0 ? {} : _a$params,
|
|
|
restProps = Breadcrumb_rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children", "itemRender", "params"]);
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
|
direction = _React$useContext.direction;
|
|
|
var crumbs;
|
|
|
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
if (routes && routes.length > 0) {
|
|
|
// generated by route
|
|
|
var paths = [];
|
|
|
crumbs = routes.map(function (route) {
|
|
|
var path = getPath(route.path, params);
|
|
|
if (path) {
|
|
|
paths.push(path);
|
|
|
}
|
|
|
// generated overlay by route.children
|
|
|
var overlay;
|
|
|
if (route.children && route.children.length) {
|
|
|
overlay = /*#__PURE__*/react.createElement(menu/* default */.Z, {
|
|
|
items: route.children.map(function (child) {
|
|
|
return {
|
|
|
key: child.path || child.breadcrumbName,
|
|
|
label: itemRender(child, params, routes, addChildPath(paths, child.path, params))
|
|
|
};
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
var itemProps = {
|
|
|
separator: separator
|
|
|
};
|
|
|
if (overlay) {
|
|
|
itemProps.overlay = overlay;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(breadcrumb_BreadcrumbItem, (0,esm_extends/* default */.Z)({}, itemProps, {
|
|
|
key: path || route.breadcrumbName
|
|
|
}), itemRender(route, params, routes, paths));
|
|
|
});
|
|
|
} else if (children) {
|
|
|
crumbs = (0,toArray/* default */.Z)(children).map(function (element, index) {
|
|
|
if (!element) {
|
|
|
return element;
|
|
|
}
|
|
|
false ? 0 : void 0;
|
|
|
return (0,reactNode/* cloneElement */.Tm)(element, {
|
|
|
separator: separator,
|
|
|
key: index
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
var breadcrumbClassName = classnames_default()(prefixCls, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className);
|
|
|
return /*#__PURE__*/react.createElement("nav", (0,esm_extends/* default */.Z)({
|
|
|
className: breadcrumbClassName,
|
|
|
style: style
|
|
|
}, restProps), /*#__PURE__*/react.createElement("ol", null, crumbs));
|
|
|
};
|
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/index.js
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 63102:
|
|
|
/*!********************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/breadcrumb/style/index.js + 1 modules ***!
|
|
|
\********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
|
var style_default = __webpack_require__(43146);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(68018);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/style/index.js + 1 modules
|
|
|
var menu_style = __webpack_require__(83736);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/style/index.js
|
|
|
|
|
|
|
|
|
// style dependencies
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 29924:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/radio/index.js + 4 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"ZP": function() { return /* binding */ es_radio; }
|
|
|
});
|
|
|
|
|
|
// UNUSED EXPORTS: Button, Group
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(97685);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
|
|
|
var useMergedState = __webpack_require__(21770);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
|
|
|
var SizeContext = __webpack_require__(97647);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/getDataOrAriaProps.js
|
|
|
var getDataOrAriaProps = __webpack_require__(5467);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/context.js
|
|
|
|
|
|
var RadioGroupContext = /*#__PURE__*/react.createContext(null);
|
|
|
var RadioGroupContextProvider = RadioGroupContext.Provider;
|
|
|
/* harmony default export */ var radio_context = (RadioGroupContext);
|
|
|
var RadioOptionTypeContext = /*#__PURE__*/react.createContext(null);
|
|
|
var RadioOptionTypeContextProvider = RadioOptionTypeContext.Provider;
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js
|
|
|
var es = __webpack_require__(50132);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
|
|
|
var es_ref = __webpack_require__(42550);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js
|
|
|
var DisabledContext = __webpack_require__(98866);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
|
|
|
var form_context = __webpack_require__(65223);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/radio.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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var InternalRadio = function InternalRadio(props, ref) {
|
|
|
var _classNames;
|
|
|
var groupContext = react.useContext(radio_context);
|
|
|
var radioOptionTypeContext = react.useContext(RadioOptionTypeContext);
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
|
direction = _React$useContext.direction;
|
|
|
var innerRef = react.useRef();
|
|
|
var mergedRef = (0,es_ref/* composeRef */.sQ)(ref, innerRef);
|
|
|
var _useContext = (0,react.useContext)(form_context/* FormItemInputContext */.aM),
|
|
|
isFormItemInput = _useContext.isFormItemInput;
|
|
|
false ? 0 : void 0;
|
|
|
var onChange = function onChange(e) {
|
|
|
var _a, _b;
|
|
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
|
(_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e);
|
|
|
};
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
children = props.children,
|
|
|
style = props.style,
|
|
|
customDisabled = props.disabled,
|
|
|
restProps = __rest(props, ["prefixCls", "className", "children", "style", "disabled"]);
|
|
|
var radioPrefixCls = getPrefixCls('radio', customizePrefixCls);
|
|
|
var prefixCls = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === 'button' ? "".concat(radioPrefixCls, "-button") : radioPrefixCls;
|
|
|
var radioProps = (0,esm_extends/* default */.Z)({}, restProps);
|
|
|
// ===================== Disabled =====================
|
|
|
var disabled = react.useContext(DisabledContext/* default */.Z);
|
|
|
radioProps.disabled = customDisabled || disabled;
|
|
|
if (groupContext) {
|
|
|
radioProps.name = groupContext.name;
|
|
|
radioProps.onChange = onChange;
|
|
|
radioProps.checked = props.value === groupContext.value;
|
|
|
radioProps.disabled = radioProps.disabled || groupContext.disabled;
|
|
|
}
|
|
|
var wrapperClassString = classnames_default()("".concat(prefixCls, "-wrapper"), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-checked"), radioProps.checked), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-disabled"), radioProps.disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-wrapper-in-form-item"), isFormItemInput), _classNames), className);
|
|
|
return (
|
|
|
/*#__PURE__*/
|
|
|
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
|
react.createElement("label", {
|
|
|
className: wrapperClassString,
|
|
|
style: style,
|
|
|
onMouseEnter: props.onMouseEnter,
|
|
|
onMouseLeave: props.onMouseLeave
|
|
|
}, /*#__PURE__*/react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({}, radioProps, {
|
|
|
type: "radio",
|
|
|
prefixCls: prefixCls,
|
|
|
ref: mergedRef
|
|
|
})), children !== undefined ? /*#__PURE__*/react.createElement("span", null, children) : null)
|
|
|
);
|
|
|
};
|
|
|
var Radio = /*#__PURE__*/react.forwardRef(InternalRadio);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var radio_radio = (Radio);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/group.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RadioGroup = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
var _classNames;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
|
direction = _React$useContext.direction;
|
|
|
var size = react.useContext(SizeContext/* default */.Z);
|
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(props.defaultValue, {
|
|
|
value: props.value
|
|
|
}),
|
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
|
value = _useMergedState2[0],
|
|
|
setValue = _useMergedState2[1];
|
|
|
var onRadioChange = function onRadioChange(ev) {
|
|
|
var lastValue = value;
|
|
|
var val = ev.target.value;
|
|
|
if (!('value' in props)) {
|
|
|
setValue(val);
|
|
|
}
|
|
|
var onChange = props.onChange;
|
|
|
if (onChange && val !== lastValue) {
|
|
|
onChange(ev);
|
|
|
}
|
|
|
};
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
_props$className = props.className,
|
|
|
className = _props$className === void 0 ? '' : _props$className,
|
|
|
options = props.options,
|
|
|
_props$buttonStyle = props.buttonStyle,
|
|
|
buttonStyle = _props$buttonStyle === void 0 ? 'outline' : _props$buttonStyle,
|
|
|
disabled = props.disabled,
|
|
|
children = props.children,
|
|
|
customizeSize = props.size,
|
|
|
style = props.style,
|
|
|
id = props.id,
|
|
|
onMouseEnter = props.onMouseEnter,
|
|
|
onMouseLeave = props.onMouseLeave,
|
|
|
onFocus = props.onFocus,
|
|
|
onBlur = props.onBlur;
|
|
|
var prefixCls = getPrefixCls('radio', customizePrefixCls);
|
|
|
var groupPrefixCls = "".concat(prefixCls, "-group");
|
|
|
var childrenToRender = children;
|
|
|
// 如果存在 options, 优先使用
|
|
|
if (options && options.length > 0) {
|
|
|
childrenToRender = options.map(function (option) {
|
|
|
if (typeof option === 'string' || typeof option === 'number') {
|
|
|
// 此处类型自动推导为 string
|
|
|
return /*#__PURE__*/react.createElement(radio_radio, {
|
|
|
key: option.toString(),
|
|
|
prefixCls: prefixCls,
|
|
|
disabled: disabled,
|
|
|
value: option,
|
|
|
checked: value === option
|
|
|
}, option);
|
|
|
}
|
|
|
// 此处类型自动推导为 { label: string value: string }
|
|
|
return /*#__PURE__*/react.createElement(radio_radio, {
|
|
|
key: "radio-group-value-options-".concat(option.value),
|
|
|
prefixCls: prefixCls,
|
|
|
disabled: option.disabled || disabled,
|
|
|
value: option.value,
|
|
|
checked: value === option.value,
|
|
|
style: option.style
|
|
|
}, option.label);
|
|
|
});
|
|
|
}
|
|
|
var mergedSize = customizeSize || size;
|
|
|
var classString = classnames_default()(groupPrefixCls, "".concat(groupPrefixCls, "-").concat(buttonStyle), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(groupPrefixCls, "-").concat(mergedSize), mergedSize), (0,defineProperty/* default */.Z)(_classNames, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
|
|
|
return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({}, (0,getDataOrAriaProps/* default */.Z)(props), {
|
|
|
className: classString,
|
|
|
style: style,
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
onMouseLeave: onMouseLeave,
|
|
|
onFocus: onFocus,
|
|
|
onBlur: onBlur,
|
|
|
id: id,
|
|
|
ref: ref
|
|
|
}), /*#__PURE__*/react.createElement(RadioGroupContextProvider, {
|
|
|
value: {
|
|
|
onChange: onRadioChange,
|
|
|
value: value,
|
|
|
disabled: props.disabled,
|
|
|
name: props.name,
|
|
|
optionType: props.optionType
|
|
|
}
|
|
|
}, childrenToRender));
|
|
|
});
|
|
|
/* harmony default export */ var group = (/*#__PURE__*/react.memo(RadioGroup));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/radioButton.js
|
|
|
|
|
|
var radioButton_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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RadioButton = function RadioButton(props, ref) {
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
radioProps = radioButton_rest(props, ["prefixCls"]);
|
|
|
var prefixCls = getPrefixCls('radio', customizePrefixCls);
|
|
|
return /*#__PURE__*/react.createElement(RadioOptionTypeContextProvider, {
|
|
|
value: "button"
|
|
|
}, /*#__PURE__*/react.createElement(radio_radio, (0,esm_extends/* default */.Z)({
|
|
|
prefixCls: prefixCls
|
|
|
}, radioProps, {
|
|
|
type: "radio",
|
|
|
ref: ref
|
|
|
})));
|
|
|
};
|
|
|
/* harmony default export */ var radioButton = (/*#__PURE__*/react.forwardRef(RadioButton));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var radio_Radio = radio_radio;
|
|
|
radio_Radio.Button = radioButton;
|
|
|
radio_Radio.Group = group;
|
|
|
radio_Radio.__ANT_RADIO = true;
|
|
|
/* harmony default export */ var es_radio = (radio_Radio);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 83822:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/radio/style/index.js + 1 modules ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
|
var style_default = __webpack_require__(43146);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/style/index.js
|
|
|
|
|
|
|
|
|
// deps-lint-skip: form
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |