|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[53247],{
|
|
|
|
|
|
/***/ 49495:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/DownloadOutlined.js ***!
|
|
|
\***********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
// This icon file is generated automatically.
|
|
|
var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" };
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (DownloadOutlined);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 69753:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js ***!
|
|
|
\*********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _ant_design_icons_svg_es_asn_DownloadOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DownloadOutlined */ 49495);
|
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
var DownloadOutlined = function DownloadOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
|
|
|
ref: ref,
|
|
|
icon: _ant_design_icons_svg_es_asn_DownloadOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
|
}));
|
|
|
};
|
|
|
DownloadOutlined.displayName = 'DownloadOutlined';
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DownloadOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 48559:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./src/components/AsyncButton/index.tsx ***!
|
|
|
\**********************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "Z": function() { return /* binding */ AsyncButton; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/button/style */ 29913);
|
|
|
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/button */ 71577);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__ = __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_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__ = __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_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__ = __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_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __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_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["children"];
|
|
|
|
|
|
|
|
|
var AsyncButton = function AsyncButton(_ref) {
|
|
|
var children = _ref.children,
|
|
|
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5___default()(_ref, _excluded);
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState, 2),
|
|
|
btnLoading = _useState2[0],
|
|
|
setBtnLoading = _useState2[1];
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
|
|
|
loading: btnLoading,
|
|
|
onClick: /*#__PURE__*/function () {
|
|
|
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().mark(function _callee(e) {
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.prev = 0;
|
|
|
setBtnLoading(true);
|
|
|
_context.next = 4;
|
|
|
return props.onClick(e);
|
|
|
case 4:
|
|
|
setBtnLoading(false);
|
|
|
_context.next = 10;
|
|
|
break;
|
|
|
case 7:
|
|
|
_context.prev = 7;
|
|
|
_context.t0 = _context["catch"](0);
|
|
|
setBtnLoading(false);
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee, null, [[0, 7]]);
|
|
|
}));
|
|
|
return function (_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}(),
|
|
|
children: children
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 45983:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ Problemset_Card; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(83822);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
|
|
|
var es_radio = __webpack_require__(29924);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(12768);
|
|
|
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Cardmodules = ({"flexRow":"flexRow____Sm4b","flexColumn":"flexColumn___mQNZs","action":"action___QUVEn","setScore":"setScore___yZ0Yb","delete":"delete___e4taL","content":"content___jR4Y6","titleWrap":"titleWrap___zsXYY","titleNumber":"titleNumber___p60vi","score":"score___DbCHw","titleHtml":"titleHtml___FALbj","answerWrap":"answerWrap___uPjYq","answer":"answer___pfiPk","answerText":"answerText___K3TNr"});
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import Item from '@/pages/Forums/Index/components/Item';
|
|
|
|
|
|
var tagDotList = ['A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.', 'J.', 'K.', 'L.', 'M.', 'N.', 'O.', 'P.', 'Q.', 'R.', 'S.', 'T.', 'U.', 'V.', 'W.', 'X.', 'Y.', 'Z.'];
|
|
|
var Card = function Card(_ref) {
|
|
|
var index = _ref.index,
|
|
|
typeName = _ref.typeName,
|
|
|
type = _ref.type,
|
|
|
_ref$data = _ref.data,
|
|
|
data = _ref$data === void 0 ? {} : _ref$data,
|
|
|
inMouseId = _ref.inMouseId,
|
|
|
isshow = _ref.isshow,
|
|
|
_ref$onSetScore = _ref.onSetScore,
|
|
|
onSetScore = _ref$onSetScore === void 0 ? function () {} : _ref$onSetScore,
|
|
|
_ref$onDelete = _ref.onDelete,
|
|
|
onDelete = _ref$onDelete === void 0 ? function () {} : _ref$onDelete,
|
|
|
_ref$onMouseEnter = _ref.onMouseEnter,
|
|
|
_onMouseEnter = _ref$onMouseEnter === void 0 ? function () {} : _ref$onMouseEnter,
|
|
|
_ref$showAnswer = _ref.showAnswer,
|
|
|
showAnswer = _ref$showAnswer === void 0 ? false : _ref$showAnswer;
|
|
|
var _useState = (0,react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
isopen = _useState2[0],
|
|
|
setisopen = _useState2[1];
|
|
|
var renderSingleOrMultiple = function renderSingleOrMultiple() {
|
|
|
var _data$choices;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [data === null || data === void 0 ? void 0 : (_data$choices = data.choices) === null || _data$choices === void 0 ? void 0 : _data$choices.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
lineHeight: '24px',
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: tagDotList[index]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.answer, " ml5"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
})
|
|
|
})]
|
|
|
}, index);
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderJudgment = function renderJudgment() {
|
|
|
var _data$choices2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: data === null || data === void 0 ? void 0 : (_data$choices2 = data.choices) === null || _data$choices2 === void 0 ? void 0 : _data$choices2.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
disabled: true,
|
|
|
children: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
}, index);
|
|
|
})
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderProgram = function renderProgram() {
|
|
|
var _data$program_attr;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: data === null || data === void 0 ? void 0 : (_data$program_attr = data.program_attr) === null || _data$program_attr === void 0 ? void 0 : _data$program_attr.description
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderCompletion = function renderCompletion() {
|
|
|
var _data$standard_answer;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexColumn, " mt15"),
|
|
|
children: data === null || data === void 0 ? void 0 : (_data$standard_answer = data.standard_answer) === null || _data$standard_answer === void 0 ? void 0 : _data$standard_answer.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text.join("、"))
|
|
|
}, index);
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderSubjective = function renderSubjective() {
|
|
|
var _data$answer_texts;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt15",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: data === null || data === void 0 ? void 0 : (_data$answer_texts = data.answer_texts) === null || _data$answer_texts === void 0 ? void 0 : _data$answer_texts[0]
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderShixun = function renderShixun() {
|
|
|
var _data$shixun;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt10",
|
|
|
children: "\u5173\u5361"
|
|
|
}), data === null || data === void 0 ? void 0 : (_data$shixun = data.shixun) === null || _data$shixun === void 0 ? void 0 : _data$shixun.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 font14",
|
|
|
children: [index + 1, ". ", item === null || item === void 0 ? void 0 : item.challenge_name]
|
|
|
}, index);
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderCombination = function renderCombination() {
|
|
|
var _data$sub_questions;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
style: {
|
|
|
display: isopen && 'none'
|
|
|
},
|
|
|
children: data === null || data === void 0 ? void 0 : (_data$sub_questions = data.sub_questions) === null || _data$sub_questions === void 0 ? void 0 : _data$sub_questions.map(function (e, i) {
|
|
|
var _e$choices;
|
|
|
var str = "<span style=\"margin-right: 10px\">".concat(index + 1, ".").concat(i + 1, "</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class=\"c-grey-999\">\uFF08").concat(e.score, "\u5206\uFF09</span>");
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.titleWrap,
|
|
|
style: {
|
|
|
marginTop: 16
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Cardmodules.titleHtml,
|
|
|
value: str + e.name
|
|
|
})
|
|
|
}), e === null || e === void 0 ? void 0 : (_e$choices = e.choices) === null || _e$choices === void 0 ? void 0 : _e$choices.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
lineHeight: '24px',
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: tagDotList[index]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.answer, " ml5"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
})
|
|
|
})]
|
|
|
}, index);
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", e === null || e === void 0 ? void 0 : e.standard_answer_show]
|
|
|
})]
|
|
|
}, e === null || e === void 0 ? void 0 : e.id);
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderAnswer = function renderAnswer() {
|
|
|
var mapping = {
|
|
|
'SINGLE': renderSingleOrMultiple,
|
|
|
'MULTIPLE': renderSingleOrMultiple,
|
|
|
'JUDGMENT': renderJudgment,
|
|
|
'PROGRAM': renderProgram,
|
|
|
'COMPLETION': renderCompletion,
|
|
|
'SUBJECTIVE': renderSubjective,
|
|
|
'PRACTICAL': renderShixun,
|
|
|
'COMBINATION': renderCombination
|
|
|
};
|
|
|
return mapping[type] ? mapping[type]() : null;
|
|
|
};
|
|
|
var getDomString = function getDomString(data, i) {
|
|
|
var _data$sub_questions2;
|
|
|
var str = "<span style=\"margin-right: -10px\">".concat(i + 1, "\u3001</span><span class=\"c-grey-999\">\uFF08").concat((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\u5171".concat(data === null || data === void 0 ? void 0 : (_data$sub_questions2 = data.sub_questions) === null || _data$sub_questions2 === void 0 ? void 0 : _data$sub_questions2.length, "\u5C0F\u9898\uFF0C") : '').concat(data.score, "\u5206\uFF09</span> ");
|
|
|
return str;
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
onMouseEnter: function onMouseEnter() {
|
|
|
return _onMouseEnter(data.id);
|
|
|
},
|
|
|
children: [inMouseId === data.id && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.action,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.setScore,
|
|
|
onClick: function onClick() {
|
|
|
return onSetScore(data.id, typeName, data === null || data === void 0 ? void 0 : data.shixun, data.score, data);
|
|
|
},
|
|
|
children: "\u8BBE\u7F6E\u5F97\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules["delete"],
|
|
|
onClick: function onClick() {
|
|
|
return onDelete(data.id);
|
|
|
},
|
|
|
children: "\u5220\u9664"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.content,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.titleWrap,
|
|
|
style: {
|
|
|
justifyContent: 'space-between'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Cardmodules.titleHtml,
|
|
|
value: getDomString(data, index) + ((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\uFF08\u9898\u5E72\uFF09" : '') + (data.name || (data === null || data === void 0 ? void 0 : data.shixun_name))
|
|
|
}), (data === null || data === void 0 ? void 0 : data.item_type) === "combination" && !isshow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick(e) {
|
|
|
setisopen(!isopen);
|
|
|
},
|
|
|
style: {
|
|
|
textAlign: 'end',
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: isopen ? '展开' : '收起'
|
|
|
})]
|
|
|
}), renderAnswer()]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Problemset_Card = (Card);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 36845:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
|
|
|
\**********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"t": function() { return /* binding */ FixedButton; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var FixedButton = function FixedButton(_ref) {
|
|
|
var _ref$cancelText = _ref.cancelText,
|
|
|
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
|
|
|
_ref$okText = _ref.okText,
|
|
|
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
|
|
|
_ref$loading = _ref.loading,
|
|
|
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
|
_ref$hasOkBtn = _ref.hasOkBtn,
|
|
|
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
|
|
|
_ref$okButtonProps = _ref.okButtonProps,
|
|
|
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
|
|
|
_ref$onCancel = _ref.onCancel,
|
|
|
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
|
|
|
_ref$onOk = _ref.onOk,
|
|
|
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? '' : _ref$className;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: classnames_default()(FixedButtonmodules.buttonFixed, className),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: FixedButtonmodules.buttonWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
size: "large",
|
|
|
className: "".concat(FixedButtonmodules.button, " mr20"),
|
|
|
onClick: onCancel,
|
|
|
children: cancelText
|
|
|
}), hasOkBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
size: "large",
|
|
|
type: "primary",
|
|
|
className: "".concat(FixedButtonmodules.button, " mr20"),
|
|
|
loading: loading,
|
|
|
onClick: onOk
|
|
|
}, okButtonProps), {}, {
|
|
|
children: okText
|
|
|
}))]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 7570:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/See/index.tsx + 2 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 */ Paperlibrary_See; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(63102);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/index.js + 3 modules
|
|
|
var breadcrumb = __webpack_require__(58492);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js
|
|
|
var DownloadOutlined = __webpack_require__(69753);
|
|
|
// EXTERNAL MODULE: ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js + 27 modules
|
|
|
var react_beautiful_dnd_esm = __webpack_require__(66012);
|
|
|
// EXTERNAL MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules
|
|
|
var Card = __webpack_require__(45983);
|
|
|
// EXTERNAL MODULE: ./src/components/FixedButton/index.tsx + 1 modules
|
|
|
var FixedButton = __webpack_require__(36845);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/See/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Seemodules = ({"bg":"bg___vBzoO","wrap":"wrap___rrSkg","title":"title___itgaE","btnWrapper":"btnWrapper___F_tyj","titleForExport":"titleForExport___lhBnq","flexRow":"flexRow___cvXQo","flexColumn":"flexColumn___cTDFf","flexJustifyBetween":"flexJustifyBetween___vy_7r","relative":"relative____B_F8","questionNumber":"questionNumber___V4g28","score":"score___dNKpj","selectTopicButton":"selectTopicButton___NO9DO","line":"line___j553x","dragTip":"dragTip___AaESI","typeActive":"typeActive___dLHVW","mouseTypeActive":"mouseTypeActive___N_Yv8","typeName":"typeName___bdcw3","typeNumber":"typeNumber___B6Fic","typeAction":"typeAction___O3dpz","setScore":"setScore___GA5cK","delete":"delete___O2OvN","modal":"modal___0ENtb"});
|
|
|
// EXTERNAL MODULE: ./src/pages/Paperlibrary/components/SendToClassModal.tsx + 5 modules
|
|
|
var SendToClassModal = __webpack_require__(79086);
|
|
|
// EXTERNAL MODULE: ./node_modules/html2pdf.js/dist/html2pdf.js
|
|
|
var html2pdf = __webpack_require__(80599);
|
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
|
// EXTERNAL MODULE: ./node_modules/jszip/dist/jszip.min.js
|
|
|
var jszip_min = __webpack_require__(55733);
|
|
|
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/See/exportPDF.ts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var scrollView = function scrollView() {
|
|
|
document.body.scrollIntoView();
|
|
|
};
|
|
|
var removeSurplusCanvas = function removeSurplusCanvas() {
|
|
|
document.querySelectorAll('canvas').forEach(function (item) {
|
|
|
(!item.clientWidth || !item.clientHeight) && item.remove();
|
|
|
});
|
|
|
};
|
|
|
var exportPDF = /*#__PURE__*/function () {
|
|
|
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(DOMList, fileTitle) {
|
|
|
var opt, worker, _loop, i, zip;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
scrollView();
|
|
|
removeSurplusCanvas();
|
|
|
opt = {
|
|
|
margin: 1,
|
|
|
html2canvas: {
|
|
|
letterRendering: true,
|
|
|
useCORS: true,
|
|
|
allowTaint: false,
|
|
|
width: 1210
|
|
|
},
|
|
|
jsPDF: {
|
|
|
unit: 'in',
|
|
|
format: 'letter',
|
|
|
orientation: 'portrait'
|
|
|
}
|
|
|
};
|
|
|
worker = html2pdf_default()();
|
|
|
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop(i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return worker.set(opt).from(DOMList[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(i < DOMList.length - 1)) {
|
|
|
_context.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function (_x3) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _loop);
|
|
|
});
|
|
|
i = 0;
|
|
|
case 6:
|
|
|
if (!(i < DOMList.length)) {
|
|
|
_context3.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.delegateYield(_loop(i), "t0", 8);
|
|
|
case 8:
|
|
|
i++;
|
|
|
_context3.next = 6;
|
|
|
break;
|
|
|
case 11:
|
|
|
zip = new (jszip_min_default())();
|
|
|
zip.file("".concat(fileTitle, ".pdf"), worker.output("blob"), {
|
|
|
base64: false
|
|
|
});
|
|
|
zip.generateAsync({
|
|
|
type: "blob"
|
|
|
}).then(function (content) {
|
|
|
var link = document.createElement('a');
|
|
|
link.href = window.URL.createObjectURL(content);
|
|
|
link.download = "".concat(fileTitle, ".zip");
|
|
|
document.body.appendChild(link);
|
|
|
var event = new MouseEvent('click');
|
|
|
link.dispatchEvent(event);
|
|
|
document.body.removeChild(link);
|
|
|
});
|
|
|
case 14:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function exportPDF(_x, _x2) {
|
|
|
return _ref.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx
|
|
|
var AsyncButton = __webpack_require__(48559);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/See/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var See = function See(_ref) {
|
|
|
var _paperlibrary$paperDa, _paperlibrary$paperDa2, _paperlibrary$paperDa3, _paperlibrary$paperDa4, _paperlibrary$paperDa5, _paperlibrary$paperDa6, _paperlibrary$paperDa7, _paperlibrary$paperDa8;
|
|
|
var paperlibrary = _ref.paperlibrary,
|
|
|
user = _ref.user,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
var _useState = (0,react.useState)(),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
defaultActiveKey = _useState2[0],
|
|
|
setDefaultActiveKey = _useState2[1];
|
|
|
var id = (0,react.useRef)();
|
|
|
(0,react.useEffect)(function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: false
|
|
|
});
|
|
|
return function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: true
|
|
|
});
|
|
|
};
|
|
|
}, []);
|
|
|
(0,react.useEffect)(function () {
|
|
|
id.current = params === null || params === void 0 ? void 0 : params.id;
|
|
|
setDefaultActiveKey(searchParams.get("defaultActiveKey"));
|
|
|
getPaperData();
|
|
|
}, []);
|
|
|
var getPaperData = function getPaperData() {
|
|
|
dispatch({
|
|
|
type: 'paperlibrary/getPaperData',
|
|
|
payload: {
|
|
|
id: id.current
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var handleDragEnd = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(data, paperItem) {
|
|
|
var itemId, position, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(!data.destination || !data.source)) {
|
|
|
_context.next = 2;
|
|
|
break;
|
|
|
}
|
|
|
return _context.abrupt("return");
|
|
|
case 2:
|
|
|
itemId = paperItem.questions[data.source.index].id;
|
|
|
position = data.destination.index + 1;
|
|
|
_context.next = 6;
|
|
|
return dispatch({
|
|
|
type: 'paperlibrary/adjustPosition',
|
|
|
payload: {
|
|
|
id: id.current,
|
|
|
itemId: itemId,
|
|
|
position: position
|
|
|
}
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context.sent;
|
|
|
if (!(res.status === -1)) {
|
|
|
_context.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
return _context.abrupt("return");
|
|
|
case 9:
|
|
|
getPaperData();
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function handleDragEnd(_x, _x2) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleSendToClass = function handleSendToClass() {
|
|
|
dispatch({
|
|
|
type: 'paperlibrary/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'Paperlibrary-SendToClass',
|
|
|
params: {
|
|
|
id: id.current
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var paperDomRef = (0,react.useRef)();
|
|
|
var _useState3 = (0,react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
showAnswer = _useState4[0],
|
|
|
setShowAnswer = _useState4[1];
|
|
|
var handleExportPaper = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
setShowAnswer(false);
|
|
|
_context2.next = 3;
|
|
|
return exportPDF(paperDomRef.current.children, '导出试卷');
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function handleExportPaper() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleExportPaperWithAnswer = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
setShowAnswer(true);
|
|
|
_context3.next = 3;
|
|
|
return exportPDF(paperDomRef.current.children, '导出试卷');
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function handleExportPaperWithAnswer() {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: Seemodules.bg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
|
className: "mt30",
|
|
|
separator: ">",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: "\u8BD5\u5377\u5E93"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
href: "/paperlibrary?defaultActiveKey=".concat(defaultActiveKey),
|
|
|
children: defaultActiveKey === "1" ? "公开试卷库" : "我的试卷库"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: "\u8BD5\u5377\u67E5\u770B"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.title,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.btnWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(AsyncButton/* AsyncButton */.Z, {
|
|
|
type: "primary",
|
|
|
onClick: handleExportPaperWithAnswer,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}), "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(AsyncButton/* AsyncButton */.Z, {
|
|
|
type: "primary",
|
|
|
className: "ml10",
|
|
|
onClick: handleExportPaper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}), "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"]
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.wrap,
|
|
|
ref: paperDomRef,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "pt20 pb20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.titleForExport,
|
|
|
children: (_paperlibrary$paperDa = paperlibrary.paperData) === null || _paperlibrary$paperDa === void 0 ? void 0 : (_paperlibrary$paperDa2 = _paperlibrary$paperDa.exam) === null || _paperlibrary$paperDa2 === void 0 ? void 0 : _paperlibrary$paperDa2.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Seemodules.flexRow, " ").concat(Seemodules.flexJustifyBetween),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Seemodules.questionNumber,
|
|
|
children: ["\u9898\u6570\uFF1A", (_paperlibrary$paperDa3 = paperlibrary.paperData) === null || _paperlibrary$paperDa3 === void 0 ? void 0 : (_paperlibrary$paperDa4 = _paperlibrary$paperDa3.exam) === null || _paperlibrary$paperDa4 === void 0 ? void 0 : _paperlibrary$paperDa4.all_questions_count]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Seemodules.score,
|
|
|
children: ["\u603B\u5206\uFF1A", (_paperlibrary$paperDa5 = paperlibrary.paperData) === null || _paperlibrary$paperDa5 === void 0 ? void 0 : (_paperlibrary$paperDa6 = _paperlibrary$paperDa5.exam) === null || _paperlibrary$paperDa6 === void 0 ? void 0 : _paperlibrary$paperDa6.all_score]
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.line
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.dragTip,
|
|
|
children: "\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"
|
|
|
}), (_paperlibrary$paperDa7 = paperlibrary.paperData) === null || _paperlibrary$paperDa7 === void 0 ? void 0 : (_paperlibrary$paperDa8 = _paperlibrary$paperDa7.questionList) === null || _paperlibrary$paperDa8 === void 0 ? void 0 : _paperlibrary$paperDa8.map(function (paperItem, paperKey) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Seemodules.relative, " mt20 mb20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.typeActive,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Seemodules.typeName,
|
|
|
children: [paperItem.number, "\u3001", paperItem.name]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Seemodules.typeNumber,
|
|
|
children: ["\uFF08\u5171", paperItem.questions_count, "\u9898\uFF1B\u5171", paperItem.questions_score, "\u5206\uFF09"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* DragDropContext */.Z5, {
|
|
|
onDragEnd: function onDragEnd(result) {
|
|
|
return handleDragEnd(result, paperItem);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Droppable */.bK, {
|
|
|
droppableId: paperKey.toString(),
|
|
|
children: function children(provided, snapshot) {
|
|
|
var _paperItem$questions;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
|
className: "mt20",
|
|
|
ref: provided.innerRef
|
|
|
}, provided.droppableProps), {}, {
|
|
|
onScroll: function onScroll() {},
|
|
|
children: (_paperItem$questions = paperItem.questions) === null || _paperItem$questions === void 0 ? void 0 : _paperItem$questions.map(function (questionItem, qeustionKey) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Draggable */._l, {
|
|
|
draggableId: questionItem.id.toString(),
|
|
|
index: qeustionKey,
|
|
|
children: function children(provided) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
|
ref: provided.innerRef
|
|
|
}, provided.draggableProps), provided.dragHandleProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Card/* default */.Z, {
|
|
|
index: qeustionKey,
|
|
|
typeName: paperItem.name,
|
|
|
type: paperItem.type,
|
|
|
data: questionItem,
|
|
|
showAnswer: showAnswer,
|
|
|
isshow: false
|
|
|
})
|
|
|
}));
|
|
|
}
|
|
|
}, questionItem.id);
|
|
|
})
|
|
|
}));
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
}, paperKey);
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FixedButton/* FixedButton */.t, {
|
|
|
okText: "\u53D1\u9001\u8BFE\u5802",
|
|
|
onCancel: function onCancel() {
|
|
|
return _umi_production_exports.history.replace('/paperlibrary');
|
|
|
},
|
|
|
onOk: handleSendToClass
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(SendToClassModal/* default */.Z, {})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Paperlibrary_See = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
|
var paperlibrary = _ref5.paperlibrary,
|
|
|
user = _ref5.user,
|
|
|
loading = _ref5.loading,
|
|
|
globalSetting = _ref5.globalSetting;
|
|
|
return {
|
|
|
paperlibrary: paperlibrary,
|
|
|
user: user,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(See));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 73481:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/skeleton/index.js + 11 modules ***!
|
|
|
\*************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ skeleton; }
|
|
|
});
|
|
|
|
|
|
// 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/typeof.js
|
|
|
var esm_typeof = __webpack_require__(71002);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// 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/rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(98423);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Element.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Element = function Element(props) {
|
|
|
var _classNames, _classNames2;
|
|
|
var prefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
size = props.size,
|
|
|
shape = props.shape;
|
|
|
var sizeCls = classnames_default()((_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames));
|
|
|
var shapeCls = classnames_default()((_classNames2 = {}, (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-circle"), shape === 'circle'), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-square"), shape === 'square'), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-round"), shape === 'round'), _classNames2));
|
|
|
var sizeStyle = react.useMemo(function () {
|
|
|
return typeof size === 'number' ? {
|
|
|
width: size,
|
|
|
height: size,
|
|
|
lineHeight: "".concat(size, "px")
|
|
|
} : {};
|
|
|
}, [size]);
|
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
|
className: classnames_default()(prefixCls, sizeCls, shapeCls, className),
|
|
|
style: (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, sizeStyle), style)
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var skeleton_Element = (Element);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Avatar.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonAvatar = function SkeletonAvatar(props) {
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
active = props.active,
|
|
|
_props$shape = props.shape,
|
|
|
shape = _props$shape === void 0 ? 'circle' : _props$shape,
|
|
|
_props$size = props.size,
|
|
|
size = _props$size === void 0 ? 'default' : _props$size;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
|
var otherProps = (0,omit/* default */.Z)(props, ['prefixCls', 'className']);
|
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-active"), active), className);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls
|
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({
|
|
|
prefixCls: "".concat(prefixCls, "-avatar"),
|
|
|
shape: shape,
|
|
|
size: size
|
|
|
}, otherProps)));
|
|
|
};
|
|
|
/* harmony default export */ var Avatar = (SkeletonAvatar);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Button.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonButton = function SkeletonButton(props) {
|
|
|
var _classNames;
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
active = props.active,
|
|
|
_props$block = props.block,
|
|
|
block = _props$block === void 0 ? false : _props$block,
|
|
|
_props$size = props.size,
|
|
|
size = _props$size === void 0 ? 'default' : _props$size;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
|
var otherProps = (0,omit/* default */.Z)(props, ['prefixCls']);
|
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-block"), block), _classNames), className);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls
|
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({
|
|
|
prefixCls: "".concat(prefixCls, "-button"),
|
|
|
size: size
|
|
|
}, otherProps)));
|
|
|
};
|
|
|
/* harmony default export */ var Button = (SkeletonButton);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DotChartOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var DotChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "dot-chart", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_DotChartOutlined = (DotChartOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(93771);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/DotChartOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
var DotChartOutlined_DotChartOutlined = function DotChartOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
|
ref: ref,
|
|
|
icon: asn_DotChartOutlined
|
|
|
}));
|
|
|
};
|
|
|
DotChartOutlined_DotChartOutlined.displayName = 'DotChartOutlined';
|
|
|
/* harmony default export */ var icons_DotChartOutlined = (/*#__PURE__*/react.forwardRef(DotChartOutlined_DotChartOutlined));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Node.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonNode = function SkeletonNode(props) {
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
active = props.active,
|
|
|
children = props.children;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-active"), active), className);
|
|
|
var content = children !== null && children !== void 0 ? children : /*#__PURE__*/react.createElement(icons_DotChartOutlined, null);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
className: classnames_default()("".concat(prefixCls, "-image"), className),
|
|
|
style: style
|
|
|
}, content));
|
|
|
};
|
|
|
/* harmony default export */ var Node = (SkeletonNode);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Image.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z';
|
|
|
var SkeletonImage = function SkeletonImage(props) {
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
active = props.active;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-active"), active), className);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
className: classnames_default()("".concat(prefixCls, "-image"), className),
|
|
|
style: style
|
|
|
}, /*#__PURE__*/react.createElement("svg", {
|
|
|
viewBox: "0 0 1098 1024",
|
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
|
className: "".concat(prefixCls, "-image-svg")
|
|
|
}, /*#__PURE__*/react.createElement("path", {
|
|
|
d: path,
|
|
|
className: "".concat(prefixCls, "-image-path")
|
|
|
}))));
|
|
|
};
|
|
|
/* harmony default export */ var Image = (SkeletonImage);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Input.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonInput = function SkeletonInput(props) {
|
|
|
var _classNames;
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
active = props.active,
|
|
|
block = props.block,
|
|
|
_props$size = props.size,
|
|
|
size = _props$size === void 0 ? 'default' : _props$size;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
|
var otherProps = (0,omit/* default */.Z)(props, ['prefixCls']);
|
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-block"), block), _classNames), className);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls
|
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({
|
|
|
prefixCls: "".concat(prefixCls, "-input"),
|
|
|
size: size
|
|
|
}, otherProps)));
|
|
|
};
|
|
|
/* harmony default export */ var Input = (SkeletonInput);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
|
var toConsumableArray = __webpack_require__(74902);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Paragraph.js
|
|
|
|
|
|
|
|
|
|
|
|
var Paragraph = function Paragraph(props) {
|
|
|
var getWidth = function getWidth(index) {
|
|
|
var width = props.width,
|
|
|
_props$rows = props.rows,
|
|
|
rows = _props$rows === void 0 ? 2 : _props$rows;
|
|
|
if (Array.isArray(width)) {
|
|
|
return width[index];
|
|
|
}
|
|
|
// last paragraph
|
|
|
if (rows - 1 === index) {
|
|
|
return width;
|
|
|
}
|
|
|
return undefined;
|
|
|
};
|
|
|
var prefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
rows = props.rows;
|
|
|
var rowList = (0,toConsumableArray/* default */.Z)(Array(rows)).map(function (_, index) {
|
|
|
return (
|
|
|
/*#__PURE__*/
|
|
|
// eslint-disable-next-line react/no-array-index-key
|
|
|
react.createElement("li", {
|
|
|
key: index,
|
|
|
style: {
|
|
|
width: getWidth(index)
|
|
|
}
|
|
|
})
|
|
|
);
|
|
|
});
|
|
|
return /*#__PURE__*/react.createElement("ul", {
|
|
|
className: classnames_default()(prefixCls, className),
|
|
|
style: style
|
|
|
}, rowList);
|
|
|
};
|
|
|
/* harmony default export */ var skeleton_Paragraph = (Paragraph);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Title.js
|
|
|
|
|
|
/* eslint-disable jsx-a11y/heading-has-content */
|
|
|
|
|
|
|
|
|
var Title = function Title(_ref) {
|
|
|
var prefixCls = _ref.prefixCls,
|
|
|
className = _ref.className,
|
|
|
width = _ref.width,
|
|
|
style = _ref.style;
|
|
|
return /*#__PURE__*/react.createElement("h3", {
|
|
|
className: classnames_default()(prefixCls, className),
|
|
|
style: (0,esm_extends/* default */.Z)({
|
|
|
width: width
|
|
|
}, style)
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var skeleton_Title = (Title);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Skeleton.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getComponentProps(prop) {
|
|
|
if (prop && (0,esm_typeof/* default */.Z)(prop) === 'object') {
|
|
|
return prop;
|
|
|
}
|
|
|
return {};
|
|
|
}
|
|
|
function getAvatarBasicProps(hasTitle, hasParagraph) {
|
|
|
if (hasTitle && !hasParagraph) {
|
|
|
// Square avatar
|
|
|
return {
|
|
|
size: 'large',
|
|
|
shape: 'square'
|
|
|
};
|
|
|
}
|
|
|
return {
|
|
|
size: 'large',
|
|
|
shape: 'circle'
|
|
|
};
|
|
|
}
|
|
|
function getTitleBasicProps(hasAvatar, hasParagraph) {
|
|
|
if (!hasAvatar && hasParagraph) {
|
|
|
return {
|
|
|
width: '38%'
|
|
|
};
|
|
|
}
|
|
|
if (hasAvatar && hasParagraph) {
|
|
|
return {
|
|
|
width: '50%'
|
|
|
};
|
|
|
}
|
|
|
return {};
|
|
|
}
|
|
|
function getParagraphBasicProps(hasAvatar, hasTitle) {
|
|
|
var basicProps = {};
|
|
|
// Width
|
|
|
if (!hasAvatar || !hasTitle) {
|
|
|
basicProps.width = '61%';
|
|
|
}
|
|
|
// Rows
|
|
|
if (!hasAvatar && hasTitle) {
|
|
|
basicProps.rows = 3;
|
|
|
} else {
|
|
|
basicProps.rows = 2;
|
|
|
}
|
|
|
return basicProps;
|
|
|
}
|
|
|
var Skeleton = function Skeleton(props) {
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
loading = props.loading,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
children = props.children,
|
|
|
_props$avatar = props.avatar,
|
|
|
avatar = _props$avatar === void 0 ? false : _props$avatar,
|
|
|
_props$title = props.title,
|
|
|
title = _props$title === void 0 ? true : _props$title,
|
|
|
_props$paragraph = props.paragraph,
|
|
|
paragraph = _props$paragraph === void 0 ? true : _props$paragraph,
|
|
|
active = props.active,
|
|
|
round = props.round;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
|
direction = _React$useContext.direction;
|
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
|
if (loading || !('loading' in props)) {
|
|
|
var _classNames;
|
|
|
var hasAvatar = !!avatar;
|
|
|
var hasTitle = !!title;
|
|
|
var hasParagraph = !!paragraph;
|
|
|
// Avatar
|
|
|
var avatarNode;
|
|
|
if (hasAvatar) {
|
|
|
var avatarProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
|
prefixCls: "".concat(prefixCls, "-avatar")
|
|
|
}, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar));
|
|
|
// We direct use SkeletonElement as avatar in skeleton internal.
|
|
|
avatarNode = /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-header")
|
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({}, avatarProps)));
|
|
|
}
|
|
|
var contentNode;
|
|
|
if (hasTitle || hasParagraph) {
|
|
|
// Title
|
|
|
var $title;
|
|
|
if (hasTitle) {
|
|
|
var titleProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
|
prefixCls: "".concat(prefixCls, "-title")
|
|
|
}, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title));
|
|
|
$title = /*#__PURE__*/react.createElement(skeleton_Title, (0,esm_extends/* default */.Z)({}, titleProps));
|
|
|
}
|
|
|
// Paragraph
|
|
|
var paragraphNode;
|
|
|
if (hasParagraph) {
|
|
|
var paragraphProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
|
prefixCls: "".concat(prefixCls, "-paragraph")
|
|
|
}, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph));
|
|
|
paragraphNode = /*#__PURE__*/react.createElement(skeleton_Paragraph, (0,esm_extends/* default */.Z)({}, paragraphProps));
|
|
|
}
|
|
|
contentNode = /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-content")
|
|
|
}, $title, paragraphNode);
|
|
|
}
|
|
|
var cls = classnames_default()(prefixCls, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-with-avatar"), hasAvatar), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-round"), round), _classNames), className);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls,
|
|
|
style: style
|
|
|
}, avatarNode, contentNode);
|
|
|
}
|
|
|
return typeof children !== 'undefined' ? children : null;
|
|
|
};
|
|
|
Skeleton.Button = Button;
|
|
|
Skeleton.Avatar = Avatar;
|
|
|
Skeleton.Input = Input;
|
|
|
Skeleton.Image = Image;
|
|
|
Skeleton.Node = Node;
|
|
|
/* harmony default export */ var skeleton_Skeleton = (Skeleton);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/index.js
|
|
|
|
|
|
/* harmony default export */ var skeleton = (skeleton_Skeleton);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 61099:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/skeleton/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/skeleton/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |