You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2227 lines
100 KiB
2227 lines
100 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[79921],{
|
|
|
|
/***/ 26554:
|
|
/*!*******************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/LeftOutlined.js ***!
|
|
\*******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// This icon file is generated automatically.
|
|
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
|
|
/* harmony default export */ __webpack_exports__["Z"] = (LeftOutlined);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 50756:
|
|
/*!********************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/RightOutlined.js ***!
|
|
\********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// This icon file is generated automatically.
|
|
var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
|
|
/* harmony default export */ __webpack_exports__["Z"] = (RightOutlined);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 82982:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/button/style */ 29913);
|
|
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/button */ 71577);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
var _ref$buttonProps = _ref.buttonProps,
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
_ref$styles = _ref.styles,
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
customText = _ref.customText,
|
|
ButtonText = _ref.ButtonText,
|
|
ButtonClick = _ref.ButtonClick,
|
|
Buttonclass = _ref.Buttonclass,
|
|
ButtonTwo = _ref.ButtonTwo;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("section", {
|
|
className: "tc animated fadeIn",
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
color: '#999',
|
|
margin: '200px auto'
|
|
}), styles),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
|
src: _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_3__
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
|
|
className: "mt20 font14",
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
className: Buttonclass,
|
|
onClick: ButtonClick
|
|
}, buttonProps), {}, {
|
|
children: ButtonText
|
|
})), ButtonTwo && ButtonTwo]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__["Z"] = (noData);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 19721:
|
|
/*!*************************************************************!*\
|
|
!*** ./src/pages/Classrooms/ExamList/index.tsx + 5 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 */ ExamList; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/style/index.js + 1 modules
|
|
var style = __webpack_require__(61099);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 11 modules
|
|
var skeleton = __webpack_require__(73481);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/style/index.js + 1 modules
|
|
var pagination_style = __webpack_require__(14182);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(260);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
var row_style = __webpack_require__(13062);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
var row = __webpack_require__(71230);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
var col_style = __webpack_require__(89032);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
var col = __webpack_require__(15746);
|
|
// 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/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(70215);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/style/index.js + 1 modules
|
|
var select_style = __webpack_require__(95985);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js
|
|
var es_select = __webpack_require__(34041);
|
|
// 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: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(82982);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/ExamList/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ExamListmodules = ({"flex_box_center":"flex_box_center___k6E7Z","flex_space_between":"flex_space_between___oW8nd","flex_box_vertical_center":"flex_box_vertical_center___hKiel","flex_box_center_end":"flex_box_center_end___bWBYz","flex_box_column":"flex_box_column___PI5IU","bg":"bg___pNQux","containerTitle":"containerTitle___yNJpi","containerDesc":"containerDesc___i_svy","menus":"menus___o7OFa","listItem":"listItem___z1ETv","info":"info___Ki3Js","title":"title___pwlJ7","titleLeft":"titleLeft___zGhmc","titleRight":"titleRight___e7Ghq","acitons":"acitons___teF7U","move":"move___SbOmH","hideHeadCheckbox":"hideHeadCheckbox___sAsoB","moveCategory":"moveCategory___QzsCK","tabSearch":"tabSearch____pHQT","warpModal":"warpModal___oxvp3","modalColumn":"modalColumn___RMpgc","modalRow":"modalRow___vjqMa","sup":"sup___nGUBA"});
|
|
// 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/antd/es/checkbox/style/index.js + 1 modules
|
|
var checkbox_style = __webpack_require__(82000);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
|
|
var es_checkbox = __webpack_require__(32808);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
|
|
var tooltip_style = __webpack_require__(38390);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(84908);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js + 1 modules
|
|
var modal_style = __webpack_require__(35611);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
var modal = __webpack_require__(85402);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(29427);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(84519);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/ExamList/components/List/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Listmodules = ({"flex_box_center":"flex_box_center___ait_r","flex_space_between":"flex_space_between___rFCZt","flex_box_vertical_center":"flex_box_vertical_center___Se_r1","flex_box_center_end":"flex_box_center_end___zrmDd","flex_box_column":"flex_box_column___p4QYF","bg":"bg___K7jhB","containerTitle":"containerTitle___jYThs","containerDesc":"containerDesc___n3gfb","tablestyle":"tablestyle___OUTg8","listItem":"listItem___ye5vB","info":"info___Z1Jmz","title":"title___Pq4sD","titleLeft":"titleLeft___nUs7_","titleRight":"titleRight___nhuLW","acitons":"acitons___mwr_3","moveCategory":"moveCategory___ADEes","name":"name___hjh5r","categoryName":"categoryName___HTKzg","schedule":"schedule___Dli0r","fnSign":"fnSign___RB8GU","spanSize":"spanSize___yDHwD","classromediv":"classromediv___a26Uj","glow":"glow___IPF2B","popover":"popover___W5sXq","dot":"dot___MB2Pk"});
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/ExamList/components/List/img/ping1.svg
|
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = function __defNormalProp(obj, key, value) {
|
|
return key in obj ? __defProp(obj, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true,
|
|
value: value
|
|
}) : obj[key] = value;
|
|
};
|
|
var __spreadValues = function __spreadValues(a, b) {
|
|
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols) {
|
|
var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)),
|
|
_step;
|
|
try {
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
var prop = _step.value;
|
|
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
}
|
|
} catch (err) {
|
|
_iterator.e(err);
|
|
} finally {
|
|
_iterator.f();
|
|
}
|
|
}
|
|
return a;
|
|
};
|
|
|
|
var SvgPing1 = function SvgPing1(props) {
|
|
return /* @__PURE__ */React.createElement("svg", __spreadValues({
|
|
width: 22,
|
|
height: 22,
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4 5\u5907\u4EFD 2"), /* @__PURE__ */React.createElement("g", {
|
|
fill: "none",
|
|
fillRule: "evenodd"
|
|
}, /* @__PURE__ */React.createElement("path", {
|
|
d: "M0 0h22v22H0z"
|
|
}), /* @__PURE__ */React.createElement("g", {
|
|
fill: "#979797",
|
|
fillRule: "nonzero"
|
|
}, /* @__PURE__ */React.createElement("path", {
|
|
d: "M10.422 5.818h.8v10.4h-.8z"
|
|
}), /* @__PURE__ */React.createElement("path", {
|
|
d: "M10.743 17.018a.49.49 0 0 1-.38-.197c-.38-.541-1.21-.91-1.993-.91H3.697a.485.485 0 0 1-.475-.493V4.883c0-.173.071-.32.166-.443.214-.222.522-.222.736-.222h4.104c1.139 0 2.301.64 2.823 1.576.143.221.071.541-.166.664a.438.438 0 0 1-.64-.172C9.889 5.67 9.01 5.178 8.228 5.178H4.171v9.723h4.2c1.067 0 2.182.517 2.751 1.28a.493.493 0 0 1-.095.69c-.094.098-.19.147-.284.147Z"
|
|
}), /* @__PURE__ */React.createElement("path", {
|
|
d: "M11.006 17.018a.469.469 0 0 1-.294-.098.483.483 0 0 1-.098-.69c.588-.763 1.714-1.28 2.84-1.28h3.99V5.203h-3.868c-.857 0-1.885.492-2.252 1.107-.147.222-.44.32-.66.173-.22-.148-.319-.443-.172-.665.612-1.034 2.056-1.6 3.084-1.6h4.234c.098 0 .294 0 .44.148.172.172.172.37.172.468v10.584c0 .271-.22.492-.49.492H13.43c-.808 0-1.64.37-2.056.911a.43.43 0 0 1-.367.197Z"
|
|
}))));
|
|
};
|
|
|
|
/* harmony default export */ var ping1 = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDIydjIySDB6Ii8+PGcgZmlsbD0iIzk3OTc5NyIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTAuNDIyIDUuODE4aC44djEwLjRoLS44eiIvPjxwYXRoIGQ9Ik0xMC43NDMgMTcuMDE4YS40OS40OSAwIDAgMS0uMzgtLjE5N2MtLjM4LS41NDEtMS4yMS0uOTEtMS45OTMtLjkxSDMuNjk3YS40ODUuNDg1IDAgMCAxLS40NzUtLjQ5M1Y0Ljg4M2MwLS4xNzMuMDcxLS4zMi4xNjYtLjQ0My4yMTQtLjIyMi41MjItLjIyMi43MzYtLjIyMmg0LjEwNGMxLjEzOSAwIDIuMzAxLjY0IDIuODIzIDEuNTc2LjE0My4yMjEuMDcxLjU0MS0uMTY2LjY2NGEuNDM4LjQzOCAwIDAgMS0uNjQtLjE3MkM5Ljg4OSA1LjY3IDkuMDEgNS4xNzggOC4yMjggNS4xNzhINC4xNzF2OS43MjNoNC4yYzEuMDY3IDAgMi4xODIuNTE3IDIuNzUxIDEuMjhhLjQ5My40OTMgMCAwIDEtLjA5NS42OWMtLjA5NC4wOTgtLjE5LjE0Ny0uMjg0LjE0N1oiLz48cGF0aCBkPSJNMTEuMDA2IDE3LjAxOGEuNDY5LjQ2OSAwIDAgMS0uMjk0LS4wOTguNDgzLjQ4MyAwIDAgMS0uMDk4LS42OWMuNTg4LS43NjMgMS43MTQtMS4yOCAyLjg0LTEuMjhoMy45OVY1LjIwM2gtMy44NjhjLS44NTcgMC0xLjg4NS40OTItMi4yNTIgMS4xMDctLjE0Ny4yMjItLjQ0LjMyLS42Ni4xNzMtLjIyLS4xNDgtLjMxOS0uNDQzLS4xNzItLjY2NS42MTItMS4wMzQgMi4wNTYtMS42IDMuMDg0LTEuNmg0LjIzNGMuMDk4IDAgLjI5NCAwIC40NC4xNDguMTcyLjE3Mi4xNzIuMzcuMTcyLjQ2OHYxMC41ODRjMCAuMjcxLS4yMi40OTItLjQ5LjQ5MkgxMy40M2MtLjgwOCAwLTEuNjQuMzctMi4wNTYuOTExYS40My40MyAwIDAgMS0uMzY3LjE5N1oiLz48L2c+PC9nPjwvc3ZnPg==");
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/ExamList/components/List/img/ping2.svg
|
|
function ping2_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = ping2_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
function ping2_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ping2_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ping2_arrayLikeToArray(o, minLen); }
|
|
function ping2_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
var ping2_defProp = Object.defineProperty;
|
|
var ping2_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var ping2_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var ping2_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var ping2_defNormalProp = function __defNormalProp(obj, key, value) {
|
|
return key in obj ? ping2_defProp(obj, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true,
|
|
value: value
|
|
}) : obj[key] = value;
|
|
};
|
|
var ping2_spreadValues = function __spreadValues(a, b) {
|
|
for (var prop in b || (b = {})) if (ping2_hasOwnProp.call(b, prop)) ping2_defNormalProp(a, prop, b[prop]);
|
|
if (ping2_getOwnPropSymbols) {
|
|
var _iterator = ping2_createForOfIteratorHelper(ping2_getOwnPropSymbols(b)),
|
|
_step;
|
|
try {
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
var prop = _step.value;
|
|
if (ping2_propIsEnum.call(b, prop)) ping2_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
} catch (err) {
|
|
_iterator.e(err);
|
|
} finally {
|
|
_iterator.f();
|
|
}
|
|
}
|
|
return a;
|
|
};
|
|
|
|
var SvgPing2 = function SvgPing2(props) {
|
|
return /* @__PURE__ */React.createElement("svg", ping2_spreadValues({
|
|
width: 22,
|
|
height: 22,
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4 5\u5907\u4EFD"), /* @__PURE__ */React.createElement("g", {
|
|
fill: "none",
|
|
fillRule: "evenodd"
|
|
}, /* @__PURE__ */React.createElement("path", {
|
|
d: "M0 0h22v22H0z"
|
|
}), /* @__PURE__ */React.createElement("g", {
|
|
fillRule: "nonzero"
|
|
}, /* @__PURE__ */React.createElement("path", {
|
|
fill: "#229BFF",
|
|
d: "M10.422 5.818h.8v10.4h-.8z"
|
|
}), /* @__PURE__ */React.createElement("path", {
|
|
d: "M10.743 17.018a.49.49 0 0 1-.38-.197c-.38-.541-1.21-.91-1.993-.91H3.697a.485.485 0 0 1-.475-.493V4.883c0-.173.071-.32.166-.443.214-.222.522-.222.736-.222h4.104c1.139 0 2.301.64 2.823 1.576.143.221.071.541-.166.664a.438.438 0 0 1-.64-.172C9.889 5.67 9.01 5.178 8.228 5.178H4.171v9.723h4.2c1.067 0 2.182.517 2.751 1.28a.493.493 0 0 1-.095.69c-.094.098-.19.147-.284.147Z",
|
|
fill: "#0152d9"
|
|
}), /* @__PURE__ */React.createElement("path", {
|
|
d: "M11.006 17.018a.469.469 0 0 1-.294-.098.483.483 0 0 1-.098-.69c.588-.763 1.714-1.28 2.84-1.28h3.99V5.203h-3.868c-.857 0-1.885.492-2.252 1.107-.147.222-.44.32-.66.173-.22-.148-.319-.443-.172-.665.612-1.034 2.056-1.6 3.084-1.6h4.234c.098 0 .294 0 .44.148.172.172.172.37.172.468v10.584c0 .271-.22.492-.49.492H13.43c-.808 0-1.64.37-2.056.911a.43.43 0 0 1-.367.197Z",
|
|
fill: "#0152d9"
|
|
}))));
|
|
};
|
|
|
|
/* harmony default export */ var ping2 = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDIydjIySDB6Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBmaWxsPSIjMjI5QkZGIiBkPSJNMTAuNDIyIDUuODE4aC44djEwLjRoLS44eiIvPjxwYXRoIGQ9Ik0xMC43NDMgMTcuMDE4YS40OS40OSAwIDAgMS0uMzgtLjE5N2MtLjM4LS41NDEtMS4yMS0uOTEtMS45OTMtLjkxSDMuNjk3YS40ODUuNDg1IDAgMCAxLS40NzUtLjQ5M1Y0Ljg4M2MwLS4xNzMuMDcxLS4zMi4xNjYtLjQ0My4yMTQtLjIyMi41MjItLjIyMi43MzYtLjIyMmg0LjEwNGMxLjEzOSAwIDIuMzAxLjY0IDIuODIzIDEuNTc2LjE0My4yMjEuMDcxLjU0MS0uMTY2LjY2NGEuNDM4LjQzOCAwIDAgMS0uNjQtLjE3MkM5Ljg4OSA1LjY3IDkuMDEgNS4xNzggOC4yMjggNS4xNzhINC4xNzF2OS43MjNoNC4yYzEuMDY3IDAgMi4xODIuNTE3IDIuNzUxIDEuMjhhLjQ5My40OTMgMCAwIDEtLjA5NS42OWMtLjA5NC4wOTgtLjE5LjE0Ny0uMjg0LjE0N1oiIGZpbGw9IiMwMTUyZDkiLz48cGF0aCBkPSJNMTEuMDA2IDE3LjAxOGEuNDY5LjQ2OSAwIDAgMS0uMjk0LS4wOTguNDgzLjQ4MyAwIDAgMS0uMDk4LS42OWMuNTg4LS43NjMgMS43MTQtMS4yOCAyLjg0LTEuMjhoMy45OVY1LjIwM2gtMy44NjhjLS44NTcgMC0xLjg4NS40OTItMi4yNTIgMS4xMDctLjE0Ny4yMjItLjQ0LjMyLS42Ni4xNzMtLjIyLS4xNDgtLjMxOS0uNDQzLS4xNzItLjY2NS42MTItMS4wMzQgMi4wNTYtMS42IDMuMDg0LTEuNmg0LjIzNGMuMDk4IDAgLjI5NCAwIC40NC4xNDguMTcyLjE3Mi4xNzIuMzcuMTcyLjQ2OHYxMC41ODRjMCAuMjcxLS4yMi40OTItLjQ5LjQ5MkgxMy40M2MtLjgwOCAwLTEuNjQuMzctMi4wNTYuOTExYS40My40MyAwIDAgMS0uMzY3LjE5N1oiIGZpbGw9IiMwMTUyZDkiLz48L2c+PC9nPjwvc3ZnPg==");
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(7);
|
|
// EXTERNAL MODULE: ./node_modules/moment/moment.js
|
|
var moment = __webpack_require__(30381);
|
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/ExamList/components/List/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var List = function List(_ref) {
|
|
var _v$exercise_tips, _v$exercise_tips2, _v$exercise_tips3, _v$exercise_tips4, _v$exercise_tips5, _v$exercise_tips6;
|
|
var v = _ref.v,
|
|
k = _ref.k,
|
|
match = _ref.match,
|
|
selectArrs = _ref.selectArrs,
|
|
setSelectArrs = _ref.setSelectArrs,
|
|
dispatch = _ref.dispatch,
|
|
params = _ref.params;
|
|
var _useState = (0,react.useState)([]),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
lists = _useState2[0],
|
|
setlists = _useState2[1];
|
|
var _useState3 = (0,react.useState)(false),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
isshow = _useState4[0],
|
|
setisshow = _useState4[1];
|
|
var format = 'YYYY-MM-DD';
|
|
var endTime = moment_default()('2020-11-15', format);
|
|
function getlist() {
|
|
return _getlist.apply(this, arguments);
|
|
}
|
|
function _getlist() {
|
|
_getlist = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
console.log(params, 222);
|
|
_context.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/exercises/group_use_list.json"), {
|
|
method: 'get',
|
|
params: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
id: v.id
|
|
})
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
setlists((res === null || res === void 0 ? void 0 : res.groups) || []);
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _getlist.apply(this, arguments);
|
|
}
|
|
var modalText = function modalText() {
|
|
return modal/* default.info */.Z.info({
|
|
title: '题库改版告知',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: "EduCoder\u5DF2\u5347\u7EA7\u9898\u5E93\u529F\u80FD\uFF0C\u6240\u6709\u8BD5\u9898\u5747\u9700\u5339\u914D\u77E5\u8BC6\u70B9\u3002 \u5F53\u524D\u8BD5\u5377\u6240\u6D89\u53CA\u8BD5\u9898\u5747\u672A\u5339\u914D\u77E5\u8BC6\u70B9\uFF0C\u65E0\u6CD5\u968F\u673A\u62BD\u53D6\uFF0C\u5DF2\u4E0D\u80FD\u6709\u6548\u4F7F\u7528\u3002\u8BF7\u5728\u8BD5\u5377\u5E93\u91CD\u65B0\u7EC4\u5377\u540E\u4F7F\u7528\u3002 \u7531\u6B64\u5E26\u6765\u7684\u4E0D\u4FBF\uFF0C\u656C\u8BF7\u8C05\u89E3\uFF01"
|
|
})
|
|
});
|
|
};
|
|
var enterExam = function enterExam(v) {
|
|
var _userInfo;
|
|
(0,util/* startExercise */.nr)({
|
|
inner_ip: v.inner_ip,
|
|
public_ip: v.public_ip,
|
|
open_camera: v.open_camera,
|
|
ip_limit: v.ip_limit,
|
|
ip_bind: v.ip_bind,
|
|
exercise_tips: v.exercise_tips,
|
|
exerciseId: v.id,
|
|
screen_open: v.screen_open,
|
|
screen_num: v.screen_num,
|
|
coursesId: v.course_id,
|
|
login: (_userInfo = (0,authority/* userInfo */.eY)()) === null || _userInfo === void 0 ? void 0 : _userInfo.login,
|
|
history: _umi_production_exports.history
|
|
});
|
|
};
|
|
var columns = [{
|
|
title: '班级',
|
|
dataIndex: 'name',
|
|
key: 'name'
|
|
}, {
|
|
title: '考试状态',
|
|
dataIndex: 'exercise_status',
|
|
key: 'exercise_status',
|
|
width: 100,
|
|
filters: [{
|
|
text: '未开始',
|
|
value: 1
|
|
}, {
|
|
text: '考试中',
|
|
value: 2
|
|
}, {
|
|
text: '已结束',
|
|
value: 3
|
|
}],
|
|
onFilter: function onFilter(value, record) {
|
|
return record.exercise_status === value;
|
|
},
|
|
render: function render(k, r) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [k === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: Listmodules.dot,
|
|
style: {
|
|
background: '#C3C3C3'
|
|
}
|
|
}), "\u672A\u5F00\u59CB"]
|
|
}), k === 2 && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: Listmodules.dot,
|
|
style: {
|
|
background: '#4EACFF'
|
|
}
|
|
}), "\u8003\u8BD5\u4E2D"]
|
|
}), k === 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: Listmodules.dot,
|
|
style: {
|
|
background: '#FC2D6B'
|
|
}
|
|
}), "\u5DF2\u7ED3\u675F"]
|
|
})]
|
|
});
|
|
}
|
|
}, {
|
|
title: '开始时间',
|
|
dataIndex: 'publish_time',
|
|
key: 'publish_time',
|
|
sorter: true,
|
|
width: 170,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.order_by === "publish_time" ? params.sort_direction === "desc" ? "descend" : "ascend" : null
|
|
}, {
|
|
title: '结束时间',
|
|
dataIndex: 'end_time',
|
|
key: 'end_time',
|
|
sorter: true,
|
|
width: 170,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.order_by === "end_time" ? params.sort_direction === "desc" ? "descend" : "ascend" : null
|
|
}, {
|
|
title: '提交人数',
|
|
dataIndex: 'exercise_answer',
|
|
key: 'exercise_answer',
|
|
align: 'center',
|
|
width: 80,
|
|
render: function render(k, r) {
|
|
return r.exercise_status === 1 ? '-' : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [k, "/", r.exercise_users]
|
|
});
|
|
}
|
|
}, {
|
|
title: '待评阅试卷',
|
|
dataIndex: 'unreview_count',
|
|
key: 'unreview_count',
|
|
align: 'center',
|
|
width: 90,
|
|
render: function render(k, r) {
|
|
return r.exercise_status === 1 ? '-' : /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/exercise/").concat(v === null || v === void 0 ? void 0 : v.id, "/detail?random=false&exercise_group_id=").concat(r.course_group_id),
|
|
children: k
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
dataIndex: 'action',
|
|
align: 'center',
|
|
key: 'action',
|
|
width: 60,
|
|
render: function render(k, r) {
|
|
return r.exercise_status === 1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
style: {
|
|
cursor: 'not-allowed'
|
|
},
|
|
src: ping1
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: "\u8BC4\u9605",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/exercise/").concat(v === null || v === void 0 ? void 0 : v.id, "/detail?random=false&exercise_group_id=").concat(r.course_group_id),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: ping2
|
|
})
|
|
})
|
|
});
|
|
}
|
|
}];
|
|
var renderTips = function renderTips(v) {
|
|
if (v !== null && v !== void 0 && v.includes('未开始')) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
backgroundColor: '#B8B8B8'
|
|
},
|
|
className: "tag-style mr10",
|
|
children: "\u672A\u5F00\u59CB"
|
|
});
|
|
}
|
|
if (v !== null && v !== void 0 && v.includes('考试中')) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
backgroundColor: '#007AFF'
|
|
},
|
|
className: "tag-style mr10",
|
|
children: "\u8003\u8BD5\u4E2D"
|
|
});
|
|
}
|
|
if (v !== null && v !== void 0 && v.includes('已结束')) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
backgroundColor: '#FC2D6B'
|
|
},
|
|
className: "tag-style mr10",
|
|
children: "\u5DF2\u7ED3\u675F"
|
|
});
|
|
}
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Listmodules.listItem,
|
|
onClick: function onClick() {
|
|
enterExam(v);
|
|
},
|
|
children: [(0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
checked: selectArrs.includes(v.id),
|
|
value: v.id,
|
|
onClick: function onClick(e) {
|
|
e.stopPropagation();
|
|
},
|
|
onChange: function onChange(e) {
|
|
var key = selectArrs.indexOf(v.id);
|
|
if (selectArrs.indexOf(v.id) > -1) {
|
|
setSelectArrs(selectArrs.filter(function (val) {
|
|
return val !== v.id;
|
|
}));
|
|
} else {
|
|
setSelectArrs(selectArrs.concat(v.id));
|
|
}
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Listmodules.info,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Listmodules.title,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Listmodules.titleLeft,
|
|
style: {
|
|
marginRight: '15px'
|
|
},
|
|
children: [renderTips(v === null || v === void 0 ? void 0 : v.exercise_tips), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: v.exercise_name,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(Listmodules.name),
|
|
style: {
|
|
maxWidth: v !== null && v !== void 0 && (_v$exercise_tips = v.exercise_tips) !== null && _v$exercise_tips !== void 0 && _v$exercise_tips.includes('已开启防作弊') ? 400 : 498
|
|
},
|
|
children: v.exercise_name
|
|
})
|
|
}), !v.is_public && (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: "\u79C1\u6709\u5C5E\u6027\uFF0C\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u80FD\u8BBF\u95EE",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-suo1 ml10 mr10 c-light-black font12"
|
|
})
|
|
}), (v === null || v === void 0 ? void 0 : (_v$exercise_tips2 = v.exercise_tips) === null || _v$exercise_tips2 === void 0 ? void 0 : _v$exercise_tips2.includes('已开启防作弊')) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
flexShrink: 0
|
|
},
|
|
className: "tag-style-fzb iconfont icon-fangzuobi ml10",
|
|
children: "\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A"
|
|
}), (v === null || v === void 0 ? void 0 : (_v$exercise_tips3 = v.exercise_tips) === null || _v$exercise_tips3 === void 0 ? void 0 : _v$exercise_tips3.includes('已结束')) && (v === null || v === void 0 ? void 0 : (_v$exercise_tips4 = v.exercise_tips) === null || _v$exercise_tips4 === void 0 ? void 0 : _v$exercise_tips4.includes('未提交')) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
flexShrink: 0,
|
|
backgroundColor: '#B8B8B8'
|
|
},
|
|
className: "tag-style ml10",
|
|
children: "\u672A\u63D0\u4EA4"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Listmodules.titleRight,
|
|
onClick: function onClick(e) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
},
|
|
children: [(0,authority/* isAdmin */.GJ)() && v.assistant_auth && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick(e) {
|
|
e.stopPropagation();
|
|
var startTime = moment_default()(v.created_at, format);
|
|
var diff3 = moment_default()(endTime).diff(moment_default()(startTime), 'days');
|
|
if (diff3 > 0 && v !== null && v !== void 0 && v.is_random) {
|
|
modalText();
|
|
} else if (v !== null && v !== void 0 && v.is_random) {
|
|
_umi_production_exports.history.push("/classrooms/".concat(v.course_id, "/exercise/").concat(v.id, "/random/preview?random=").concat(v.is_random));
|
|
} else {
|
|
_umi_production_exports.history.push("/classrooms/".concat(v.course_id, "/exercise/").concat(v.id, "/detail?random=").concat(v.is_random, "&tabs=2"));
|
|
}
|
|
},
|
|
children: "\u9884\u89C8"
|
|
}), (0,authority/* isAdminOrStudent */.RV)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.push("/classrooms/".concat(v.course_id, "/exercise/").concat(v.id, "/detail?random=").concat(v.is_random));
|
|
},
|
|
children: "\u8BE6\u60C5"
|
|
}),
|
|
/*#__PURE__*/
|
|
// isStudent() &&
|
|
(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [v.current_status === 0 && v.exercise_status > 1 && !((_v$exercise_tips5 = v.exercise_tips) !== null && _v$exercise_tips5 !== void 0 && _v$exercise_tips5.includes('已结束')) && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
onClick: function onClick(e) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
enterExam(v);
|
|
},
|
|
href: "",
|
|
children: "\u7EE7\u7EED\u8003\u8BD5"
|
|
}), v.current_status === 1 && v.exercise_status > 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "mr20",
|
|
style: {
|
|
color: "#0152d9",
|
|
marginRight: '5px'
|
|
},
|
|
onClick: function onClick(e) {
|
|
var _userInfo2;
|
|
window.location.href = "/classrooms/".concat(v.course_id, "/exercise/").concat(v.id, "/users/").concat((_userInfo2 = (0,authority/* userInfo */.eY)()) === null || _userInfo2 === void 0 ? void 0 : _userInfo2.login, "?check=true");
|
|
},
|
|
children: "\u67E5\u770B\u8BD5\u5377"
|
|
}), v.current_status === 2 && v.exercise_status > 1 && !((_v$exercise_tips6 = v.exercise_tips) !== null && _v$exercise_tips6 !== void 0 && _v$exercise_tips6.includes('已结束')) && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
onClick: function onClick(e) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
enterExam(v);
|
|
},
|
|
href: "",
|
|
children: "\u5F00\u59CB\u8003\u8BD5"
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "c-grey-999 mr20",
|
|
children: ["\u521B\u5EFA\u8005\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: v.username
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "c-grey-999 mr20",
|
|
children: ["\u6240\u5C5E\u8BFE\u5802\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: v.course_name
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "ml30 c-grey-999 mr20",
|
|
children: ["\u8003\u8BD5\u65F6\u957F\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: v.time === null || v.time === -1 ? '不限时' : "".concat(v.time, "\u5206\u949F")
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "ml15 c-grey-999",
|
|
children: ["\u8003\u8BD5\u65F6\u95F4\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: moment_default()(v === null || v === void 0 ? void 0 : v.published_time).format("YYYY-MM-DD HH:mm")
|
|
}), " \u81F3 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: moment_default()(v === null || v === void 0 ? void 0 : v.end_time).format("YYYY-MM-DD HH:mm")
|
|
})]
|
|
})]
|
|
})]
|
|
})]
|
|
}, k);
|
|
};
|
|
/* harmony default export */ var components_List = (List);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/ExamList/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["classroomList", "globalSetting", "exercise", "loading", "dispatch", "match"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Option = es_select/* default.Option */.Z.Option;
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _exercise$userExercis, _exercise$userExercis2, _exercise$userExercis3, _exercise$userExercis4, _exercise$userExercis5;
|
|
var classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
exercise = _ref.exercise,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
match = _ref.match,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var _useState = (0,react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var detailExerciseList = classroomList.detailExerciseList,
|
|
detailTopBanner = classroomList.detailTopBanner,
|
|
detailLeftMenus = classroomList.detailLeftMenus;
|
|
var _useState3 = (0,react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
selectArrs = _useState4[0],
|
|
setSelectArrs = _useState4[1];
|
|
var _useState5 = (0,react.useState)(false),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
moveVisible = _useState6[0],
|
|
setMoveVisible = _useState6[1];
|
|
var _useState7 = (0,react.useState)({
|
|
page: 1,
|
|
course_id: ""
|
|
}),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
querys = _useState8[0],
|
|
setQuerys = _useState8[1];
|
|
params['id'] = params['coursesId'];
|
|
(0,react.useEffect)(function () {
|
|
getData();
|
|
dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: false
|
|
});
|
|
dispatch({
|
|
type: 'globalSetting/onlyShowBackTopToggle',
|
|
payload: true
|
|
});
|
|
}, [querys]);
|
|
(0,react.useEffect)(function () {
|
|
setSelectArrs([]);
|
|
}, [detailExerciseList]);
|
|
var getData = function getData() {
|
|
document.body.scrollIntoView();
|
|
dispatch({
|
|
type: 'exercise/getUserExercise',
|
|
payload: querys
|
|
});
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: "minH500 minW1200",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "".concat(ExamListmodules.acitons, " w100"),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: "w100",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "font20 blod",
|
|
children: "\u8003\u8BD5\u5217\u8868"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u6309\u8BFE\u5802\u540D\u79F0\u641C\u7D22\u8BD5\u5377\u8003\u8BD5\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select/* default */.Z, {
|
|
className: "ml20",
|
|
size: "large",
|
|
style: {
|
|
width: 300
|
|
},
|
|
placeholder: "\u5168\u90E8",
|
|
onChange: function onChange(value) {
|
|
querys.course_id = value;
|
|
querys.page = 1;
|
|
setQuerys(objectSpread2_default()({}, querys));
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
value: "",
|
|
children: "\u5168\u90E8"
|
|
}), exercise === null || exercise === void 0 ? void 0 : (_exercise$userExercis = exercise.userExerciseList) === null || _exercise$userExercis === void 0 ? void 0 : (_exercise$userExercis2 = _exercise$userExercis.courses) === null || _exercise$userExercis2 === void 0 ? void 0 : _exercise$userExercis2.map(function (item, key) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
value: item.id,
|
|
children: item.name
|
|
});
|
|
})]
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
}), (exercise === null || exercise === void 0 ? void 0 : (_exercise$userExercis3 = exercise.userExerciseList) === null || _exercise$userExercis3 === void 0 ? void 0 : _exercise$userExercis3.exercises_count) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
loading: loading['exercise/getUserExercise'],
|
|
active: true,
|
|
avatar: {
|
|
size: 40
|
|
},
|
|
paragraph: {
|
|
rows: 5
|
|
},
|
|
className: "mt30",
|
|
children: [(exercise === null || exercise === void 0 ? void 0 : (_exercise$userExercis4 = exercise.userExerciseList) === null || _exercise$userExercis4 === void 0 ? void 0 : _exercise$userExercis4.exercises) && (exercise === null || exercise === void 0 ? void 0 : (_exercise$userExercis5 = exercise.userExerciseList) === null || _exercise$userExercis5 === void 0 ? void 0 : _exercise$userExercis5.exercises.map(function (v, k) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(components_List, {
|
|
v: v,
|
|
k: k,
|
|
match: match,
|
|
selectArrs: selectArrs,
|
|
setSelectArrs: setSelectArrs,
|
|
dispatch: dispatch,
|
|
params: params
|
|
});
|
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt30",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showTotal: function showTotal(total) {
|
|
var _exercise$userExercis6;
|
|
return "\u5171 ".concat(exercise === null || exercise === void 0 ? void 0 : (_exercise$userExercis6 = exercise.userExerciseList) === null || _exercise$userExercis6 === void 0 ? void 0 : _exercise$userExercis6.exercises_count, " \u6761");
|
|
},
|
|
hideOnSinglePage: true,
|
|
showSizeChanger: false,
|
|
onChange: function onChange(page) {
|
|
querys.page = page;
|
|
setQuerys(objectSpread2_default()({}, querys));
|
|
},
|
|
defaultPageSize: 20,
|
|
defaultCurrent: querys.page,
|
|
current: querys.page || 1,
|
|
total: exercise === null || exercise === void 0 ? void 0 : exercise.userExerciseList.exercises_count
|
|
})
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var ExamList = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var classroomList = _ref2.classroomList,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting,
|
|
exercise = _ref2.exercise;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects,
|
|
exercise: exercise
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 98787:
|
|
/*!**********************************************!*\
|
|
!*** ./node_modules/antd/es/_util/colors.js ***!
|
|
\**********************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "E": function() { return /* binding */ PresetStatusColorTypes; },
|
|
/* harmony export */ "Y": function() { return /* binding */ PresetColorTypes; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ 93355);
|
|
|
|
var PresetStatusColorTypes = (0,_type__WEBPACK_IMPORTED_MODULE_0__/* .tuple */ .b)('success', 'processing', 'error', 'default', 'warning');
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
var PresetColorTypes = (0,_type__WEBPACK_IMPORTED_MODULE_0__/* .tuple */ .b)('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime');
|
|
|
|
/***/ }),
|
|
|
|
/***/ 80636:
|
|
/*!**************************************************!*\
|
|
!*** ./node_modules/antd/es/_util/placements.js ***!
|
|
\**************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "Z": function() { return /* binding */ getPlacements; }
|
|
/* harmony export */ });
|
|
/* unused harmony export getOverflowOptions */
|
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
|
|
/* harmony import */ var rc_tooltip_es_placements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-tooltip/es/placements */ 43159);
|
|
|
|
|
|
var autoAdjustOverflowEnabled = {
|
|
adjustX: 1,
|
|
adjustY: 1
|
|
};
|
|
var autoAdjustOverflowDisabled = {
|
|
adjustX: 0,
|
|
adjustY: 0
|
|
};
|
|
var targetOffset = [0, 0];
|
|
function getOverflowOptions(autoAdjustOverflow) {
|
|
if (typeof autoAdjustOverflow === 'boolean') {
|
|
return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;
|
|
}
|
|
return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({}, autoAdjustOverflowDisabled), autoAdjustOverflow);
|
|
}
|
|
function getPlacements(config) {
|
|
var _config$arrowWidth = config.arrowWidth,
|
|
arrowWidth = _config$arrowWidth === void 0 ? 4 : _config$arrowWidth,
|
|
_config$horizontalArr = config.horizontalArrowShift,
|
|
horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,
|
|
_config$verticalArrow = config.verticalArrowShift,
|
|
verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,
|
|
autoAdjustOverflow = config.autoAdjustOverflow,
|
|
arrowPointAtCenter = config.arrowPointAtCenter;
|
|
var placementMap = {
|
|
left: {
|
|
points: ['cr', 'cl'],
|
|
offset: [-4, 0]
|
|
},
|
|
right: {
|
|
points: ['cl', 'cr'],
|
|
offset: [4, 0]
|
|
},
|
|
top: {
|
|
points: ['bc', 'tc'],
|
|
offset: [0, -4]
|
|
},
|
|
bottom: {
|
|
points: ['tc', 'bc'],
|
|
offset: [0, 4]
|
|
},
|
|
topLeft: {
|
|
points: ['bl', 'tc'],
|
|
offset: [-(horizontalArrowShift + arrowWidth), -4]
|
|
},
|
|
leftTop: {
|
|
points: ['tr', 'cl'],
|
|
offset: [-4, -(verticalArrowShift + arrowWidth)]
|
|
},
|
|
topRight: {
|
|
points: ['br', 'tc'],
|
|
offset: [horizontalArrowShift + arrowWidth, -4]
|
|
},
|
|
rightTop: {
|
|
points: ['tl', 'cr'],
|
|
offset: [4, -(verticalArrowShift + arrowWidth)]
|
|
},
|
|
bottomRight: {
|
|
points: ['tr', 'bc'],
|
|
offset: [horizontalArrowShift + arrowWidth, 4]
|
|
},
|
|
rightBottom: {
|
|
points: ['bl', 'cr'],
|
|
offset: [4, verticalArrowShift + arrowWidth]
|
|
},
|
|
bottomLeft: {
|
|
points: ['tl', 'bc'],
|
|
offset: [-(horizontalArrowShift + arrowWidth), 4]
|
|
},
|
|
leftBottom: {
|
|
points: ['br', 'cl'],
|
|
offset: [-4, verticalArrowShift + arrowWidth]
|
|
}
|
|
};
|
|
Object.keys(placementMap).forEach(function (key) {
|
|
placementMap[key] = arrowPointAtCenter ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({}, placementMap[key]), {
|
|
overflow: getOverflowOptions(autoAdjustOverflow),
|
|
targetOffset: targetOffset
|
|
}) : (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({}, rc_tooltip_es_placements__WEBPACK_IMPORTED_MODULE_0__/* .placements */ .C[key]), {
|
|
overflow: getOverflowOptions(autoAdjustOverflow)
|
|
});
|
|
placementMap[key].ignoreShake = true;
|
|
});
|
|
return placementMap;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9708:
|
|
/*!***************************************************!*\
|
|
!*** ./node_modules/antd/es/_util/statusUtils.js ***!
|
|
\***************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "F": function() { return /* binding */ getMergedStatus; },
|
|
/* harmony export */ "Z": function() { return /* binding */ getStatusClassNames; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./type */ 93355);
|
|
|
|
|
|
|
|
var InputStatuses = (0,_type__WEBPACK_IMPORTED_MODULE_1__/* .tuple */ .b)('warning', 'error', '');
|
|
function getStatusClassNames(prefixCls, status, hasFeedback) {
|
|
var _classNames;
|
|
return classnames__WEBPACK_IMPORTED_MODULE_0___default()((_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-status-success"), status === 'success'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-status-warning"), status === 'warning'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-status-error"), status === 'error'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-status-validating"), status === 'validating'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-has-feedback"), hasFeedback), _classNames));
|
|
}
|
|
var getMergedStatus = function getMergedStatus(contextStatus, customStatus) {
|
|
return customStatus || contextStatus;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 84908:
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/antd/es/tooltip/index.js + 3 modules ***!
|
|
\***********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ tooltip; }
|
|
});
|
|
|
|
// 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/@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/@babel/runtime/helpers/esm/typeof.js
|
|
var esm_typeof = __webpack_require__(71002);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(45987);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 15 modules
|
|
var es = __webpack_require__(81263);
|
|
// EXTERNAL MODULE: ./node_modules/rc-tooltip/es/placements.js
|
|
var placements = __webpack_require__(43159);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-tooltip/es/Popup.js
|
|
|
|
|
|
function Popup(props) {
|
|
var showArrow = props.showArrow,
|
|
arrowContent = props.arrowContent,
|
|
children = props.children,
|
|
prefixCls = props.prefixCls,
|
|
id = props.id,
|
|
overlayInnerStyle = props.overlayInnerStyle,
|
|
className = props.className,
|
|
style = props.style;
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: classnames_default()("".concat(prefixCls, "-content"), className),
|
|
style: style
|
|
}, showArrow !== false && /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-arrow"),
|
|
key: "arrow"
|
|
}, arrowContent), /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-inner"),
|
|
id: id,
|
|
role: "tooltip",
|
|
style: overlayInnerStyle
|
|
}, typeof children === 'function' ? children() : children));
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/rc-tooltip/es/Tooltip.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Tooltip = function Tooltip(props, ref) {
|
|
var overlayClassName = props.overlayClassName,
|
|
_props$trigger = props.trigger,
|
|
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
|
|
_props$mouseEnterDela = props.mouseEnterDelay,
|
|
mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,
|
|
_props$mouseLeaveDela = props.mouseLeaveDelay,
|
|
mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
|
|
overlayStyle = props.overlayStyle,
|
|
_props$prefixCls = props.prefixCls,
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,
|
|
children = props.children,
|
|
onVisibleChange = props.onVisibleChange,
|
|
afterVisibleChange = props.afterVisibleChange,
|
|
transitionName = props.transitionName,
|
|
animation = props.animation,
|
|
motion = props.motion,
|
|
_props$placement = props.placement,
|
|
placement = _props$placement === void 0 ? 'right' : _props$placement,
|
|
_props$align = props.align,
|
|
align = _props$align === void 0 ? {} : _props$align,
|
|
_props$destroyTooltip = props.destroyTooltipOnHide,
|
|
destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,
|
|
defaultVisible = props.defaultVisible,
|
|
getTooltipContainer = props.getTooltipContainer,
|
|
overlayInnerStyle = props.overlayInnerStyle,
|
|
arrowContent = props.arrowContent,
|
|
overlay = props.overlay,
|
|
id = props.id,
|
|
showArrow = props.showArrow,
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow"]);
|
|
|
|
var domRef = (0,react.useRef)(null);
|
|
(0,react.useImperativeHandle)(ref, function () {
|
|
return domRef.current;
|
|
});
|
|
|
|
var extraProps = (0,objectSpread2/* default */.Z)({}, restProps);
|
|
|
|
if ('visible' in props) {
|
|
extraProps.popupVisible = props.visible;
|
|
}
|
|
|
|
var getPopupElement = function getPopupElement() {
|
|
return /*#__PURE__*/react.createElement(Popup, {
|
|
showArrow: showArrow,
|
|
arrowContent: arrowContent,
|
|
key: "content",
|
|
prefixCls: prefixCls,
|
|
id: id,
|
|
overlayInnerStyle: overlayInnerStyle
|
|
}, overlay);
|
|
};
|
|
|
|
var destroyTooltip = false;
|
|
var autoDestroy = false;
|
|
|
|
if (typeof destroyTooltipOnHide === 'boolean') {
|
|
destroyTooltip = destroyTooltipOnHide;
|
|
} else if (destroyTooltipOnHide && (0,esm_typeof/* default */.Z)(destroyTooltipOnHide) === 'object') {
|
|
var keepParent = destroyTooltipOnHide.keepParent;
|
|
destroyTooltip = keepParent === true;
|
|
autoDestroy = keepParent === false;
|
|
}
|
|
|
|
return /*#__PURE__*/react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({
|
|
popupClassName: overlayClassName,
|
|
prefixCls: prefixCls,
|
|
popup: getPopupElement,
|
|
action: trigger,
|
|
builtinPlacements: placements/* placements */.C,
|
|
popupPlacement: placement,
|
|
ref: domRef,
|
|
popupAlign: align,
|
|
getPopupContainer: getTooltipContainer,
|
|
onPopupVisibleChange: onVisibleChange,
|
|
afterPopupVisibleChange: afterVisibleChange,
|
|
popupTransitionName: transitionName,
|
|
popupAnimation: animation,
|
|
popupMotion: motion,
|
|
defaultPopupVisible: defaultVisible,
|
|
destroyPopupOnHide: destroyTooltip,
|
|
autoDestroy: autoDestroy,
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
popupStyle: overlayStyle,
|
|
mouseEnterDelay: mouseEnterDelay
|
|
}, extraProps), children);
|
|
};
|
|
|
|
/* harmony default export */ var es_Tooltip = (/*#__PURE__*/(0,react.forwardRef)(Tooltip));
|
|
;// CONCATENATED MODULE: ./node_modules/rc-tooltip/es/index.js
|
|
|
|
|
|
|
|
/* harmony default export */ var rc_tooltip_es = (es_Tooltip);
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
|
|
var useMergedState = __webpack_require__(21770);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
var context = __webpack_require__(53124);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/colors.js
|
|
var colors = __webpack_require__(98787);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js
|
|
var motion = __webpack_require__(33603);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/placements.js
|
|
var _util_placements = __webpack_require__(80636);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
var reactNode = __webpack_require__(96159);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/tooltip/index.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 splitObject = function splitObject(obj, keys) {
|
|
var picked = {};
|
|
var omitted = (0,esm_extends/* default */.Z)({}, obj);
|
|
keys.forEach(function (key) {
|
|
if (obj && key in obj) {
|
|
picked[key] = obj[key];
|
|
delete omitted[key];
|
|
}
|
|
});
|
|
return {
|
|
picked: picked,
|
|
omitted: omitted
|
|
};
|
|
};
|
|
var PresetColorRegex = new RegExp("^(".concat(colors/* PresetColorTypes.join */.Y.join('|'), ")(-inverse)?$"));
|
|
// Fix Tooltip won't hide at disabled button
|
|
// mouse events don't trigger at disabled button in Chrome
|
|
// https://github.com/react-component/tooltip/issues/18
|
|
function getDisabledCompatibleChildren(element, prefixCls) {
|
|
var elementType = element.type;
|
|
if ((elementType.__ANT_BUTTON === true || element.type === 'button') && element.props.disabled || elementType.__ANT_SWITCH === true && (element.props.disabled || element.props.loading) || elementType.__ANT_RADIO === true && element.props.disabled) {
|
|
// Pick some layout related style properties up to span
|
|
// Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254
|
|
var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
|
|
picked = _splitObject.picked,
|
|
omitted = _splitObject.omitted;
|
|
var spanStyle = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
display: 'inline-block'
|
|
}, picked), {
|
|
cursor: 'not-allowed',
|
|
width: element.props.block ? '100%' : undefined
|
|
});
|
|
var buttonStyle = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, omitted), {
|
|
pointerEvents: 'none'
|
|
});
|
|
var child = (0,reactNode/* cloneElement */.Tm)(element, {
|
|
style: buttonStyle,
|
|
className: null
|
|
});
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
style: spanStyle,
|
|
className: classnames_default()(element.props.className, "".concat(prefixCls, "-disabled-compatible-wrapper"))
|
|
}, child);
|
|
}
|
|
return element;
|
|
}
|
|
var tooltip_Tooltip = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
var _classNames2;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
direction = _React$useContext.direction;
|
|
// Warning for deprecated usage
|
|
if (false) {}
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(false, {
|
|
value: props.open !== undefined ? props.open : props.visible,
|
|
defaultValue: props.defaultOpen !== undefined ? props.defaultOpen : props.defaultVisible
|
|
}),
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
open = _useMergedState2[0],
|
|
setOpen = _useMergedState2[1];
|
|
var isNoTitle = function isNoTitle() {
|
|
var title = props.title,
|
|
overlay = props.overlay;
|
|
return !title && !overlay && title !== 0; // overlay for old version compatibility
|
|
};
|
|
|
|
var onOpenChange = function onOpenChange(vis) {
|
|
var _a, _b;
|
|
setOpen(isNoTitle() ? false : vis);
|
|
if (!isNoTitle()) {
|
|
(_a = props.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(props, vis);
|
|
(_b = props.onVisibleChange) === null || _b === void 0 ? void 0 : _b.call(props, vis);
|
|
}
|
|
};
|
|
var getTooltipPlacements = function getTooltipPlacements() {
|
|
var builtinPlacements = props.builtinPlacements,
|
|
_props$arrowPointAtCe = props.arrowPointAtCenter,
|
|
arrowPointAtCenter = _props$arrowPointAtCe === void 0 ? false : _props$arrowPointAtCe,
|
|
_props$autoAdjustOver = props.autoAdjustOverflow,
|
|
autoAdjustOverflow = _props$autoAdjustOver === void 0 ? true : _props$autoAdjustOver;
|
|
return builtinPlacements || (0,_util_placements/* default */.Z)({
|
|
arrowPointAtCenter: arrowPointAtCenter,
|
|
autoAdjustOverflow: autoAdjustOverflow
|
|
});
|
|
};
|
|
// 动态设置动画点
|
|
var onPopupAlign = function onPopupAlign(domNode, align) {
|
|
var placements = getTooltipPlacements();
|
|
// 当前返回的位置
|
|
var placement = Object.keys(placements).find(function (key) {
|
|
var _a, _b;
|
|
return placements[key].points[0] === ((_a = align.points) === null || _a === void 0 ? void 0 : _a[0]) && placements[key].points[1] === ((_b = align.points) === null || _b === void 0 ? void 0 : _b[1]);
|
|
});
|
|
if (!placement) {
|
|
return;
|
|
}
|
|
// 根据当前坐标设置动画点
|
|
var rect = domNode.getBoundingClientRect();
|
|
var transformOrigin = {
|
|
top: '50%',
|
|
left: '50%'
|
|
};
|
|
if (/top|Bottom/.test(placement)) {
|
|
transformOrigin.top = "".concat(rect.height - align.offset[1], "px");
|
|
} else if (/Top|bottom/.test(placement)) {
|
|
transformOrigin.top = "".concat(-align.offset[1], "px");
|
|
}
|
|
if (/left|Right/.test(placement)) {
|
|
transformOrigin.left = "".concat(rect.width - align.offset[0], "px");
|
|
} else if (/right|Left/.test(placement)) {
|
|
transformOrigin.left = "".concat(-align.offset[0], "px");
|
|
}
|
|
domNode.style.transformOrigin = "".concat(transformOrigin.left, " ").concat(transformOrigin.top);
|
|
};
|
|
var getOverlay = function getOverlay() {
|
|
var title = props.title,
|
|
overlay = props.overlay;
|
|
if (title === 0) {
|
|
return title;
|
|
}
|
|
return overlay || title || '';
|
|
};
|
|
var getPopupContainer = props.getPopupContainer,
|
|
_props$placement = props.placement,
|
|
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
_props$mouseEnterDela = props.mouseEnterDelay,
|
|
mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0.1 : _props$mouseEnterDela,
|
|
_props$mouseLeaveDela = props.mouseLeaveDelay,
|
|
mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
|
|
otherProps = __rest(props, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay"]);
|
|
var customizePrefixCls = props.prefixCls,
|
|
openClassName = props.openClassName,
|
|
getTooltipContainer = props.getTooltipContainer,
|
|
overlayClassName = props.overlayClassName,
|
|
color = props.color,
|
|
overlayInnerStyle = props.overlayInnerStyle,
|
|
children = props.children;
|
|
var prefixCls = getPrefixCls('tooltip', customizePrefixCls);
|
|
var rootPrefixCls = getPrefixCls();
|
|
var tempOpen = open;
|
|
// Hide tooltip when there is no title
|
|
if (!('open' in props) && !('visible' in props) && isNoTitle()) {
|
|
tempOpen = false;
|
|
}
|
|
var child = getDisabledCompatibleChildren((0,reactNode/* isValidElement */.l$)(children) && !(0,reactNode/* isFragment */.M2)(children) ? children : /*#__PURE__*/react.createElement("span", null, children), prefixCls);
|
|
var childProps = child.props;
|
|
var childCls = !childProps.className || typeof childProps.className === 'string' ? classnames_default()(childProps.className, (0,defineProperty/* default */.Z)({}, openClassName || "".concat(prefixCls, "-open"), true)) : childProps.className;
|
|
var customOverlayClassName = classnames_default()(overlayClassName, (_classNames2 = {}, (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-").concat(color), color && PresetColorRegex.test(color)), _classNames2));
|
|
var formattedOverlayInnerStyle = overlayInnerStyle;
|
|
var arrowContentStyle = {};
|
|
if (color && !PresetColorRegex.test(color)) {
|
|
formattedOverlayInnerStyle = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, overlayInnerStyle), {
|
|
background: color
|
|
});
|
|
// @ts-ignore
|
|
arrowContentStyle = {
|
|
'--antd-arrow-background-color': color
|
|
};
|
|
}
|
|
return /*#__PURE__*/react.createElement(rc_tooltip_es, (0,esm_extends/* default */.Z)({}, otherProps, {
|
|
placement: placement,
|
|
mouseEnterDelay: mouseEnterDelay,
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
prefixCls: prefixCls,
|
|
overlayClassName: customOverlayClassName,
|
|
getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,
|
|
ref: ref,
|
|
builtinPlacements: getTooltipPlacements(),
|
|
overlay: getOverlay(),
|
|
visible: tempOpen,
|
|
onVisibleChange: onOpenChange,
|
|
onPopupAlign: onPopupAlign,
|
|
overlayInnerStyle: formattedOverlayInnerStyle,
|
|
arrowContent: /*#__PURE__*/react.createElement("span", {
|
|
className: "".concat(prefixCls, "-arrow-content"),
|
|
style: arrowContentStyle
|
|
}),
|
|
motion: {
|
|
motionName: (0,motion/* getTransitionName */.mL)(rootPrefixCls, 'zoom-big-fast', props.transitionName),
|
|
motionDeadline: 1000
|
|
}
|
|
}), tempOpen ? (0,reactNode/* cloneElement */.Tm)(child, {
|
|
className: childCls
|
|
}) : child);
|
|
});
|
|
if (false) {}
|
|
/* harmony default export */ var tooltip = (tooltip_Tooltip);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 97454:
|
|
/*!***********************************************************************************!*\
|
|
!*** ./node_modules/antd/node_modules/@ant-design/icons/es/icons/LeftOutlined.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_LeftOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/LeftOutlined */ 26554);
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 93771);
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
var LeftOutlined = function LeftOutlined(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_LeftOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
}));
|
|
};
|
|
LeftOutlined.displayName = 'LeftOutlined';
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(LeftOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 62994:
|
|
/*!************************************************************************************!*\
|
|
!*** ./node_modules/antd/node_modules/@ant-design/icons/es/icons/RightOutlined.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_RightOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/RightOutlined */ 50756);
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 93771);
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
var RightOutlined = function RightOutlined(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_RightOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
}));
|
|
};
|
|
RightOutlined.displayName = 'RightOutlined';
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(RightOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 48555:
|
|
/*!*****************************************************************!*\
|
|
!*** ./node_modules/rc-resize-observer/es/index.js + 4 modules ***!
|
|
\*****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ es; }
|
|
});
|
|
|
|
// UNUSED EXPORTS: _rs
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(50344);
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
|
|
var warning = __webpack_require__(80334);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
|
|
var es_ref = __webpack_require__(42550);
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
|
|
var findDOMNode = __webpack_require__(34203);
|
|
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
var ResizeObserver_es = __webpack_require__(91033);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-resize-observer/es/utils/observerUtil.js
|
|
|
|
// =============================== Const ===============================
|
|
var elementListeners = new Map();
|
|
function onResize(entities) {
|
|
entities.forEach(function (entity) {
|
|
var _elementListeners$get;
|
|
var target = entity.target;
|
|
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
|
|
return listener(target);
|
|
});
|
|
});
|
|
}
|
|
// Note: ResizeObserver polyfill not support option to measure border-box resize
|
|
var resizeObserver = new ResizeObserver_es/* default */.Z(onResize);
|
|
// Dev env only
|
|
var _el = (/* unused pure expression or super */ null && ( false ? 0 : null)); // eslint-disable-line
|
|
var _rs = (/* unused pure expression or super */ null && ( false ? 0 : null)); // eslint-disable-line
|
|
// ============================== Observe ==============================
|
|
function observe(element, callback) {
|
|
if (!elementListeners.has(element)) {
|
|
elementListeners.set(element, new Set());
|
|
resizeObserver.observe(element);
|
|
}
|
|
elementListeners.get(element).add(callback);
|
|
}
|
|
function unobserve(element, callback) {
|
|
if (elementListeners.has(element)) {
|
|
elementListeners.get(element).delete(callback);
|
|
if (!elementListeners.get(element).size) {
|
|
resizeObserver.unobserve(element);
|
|
elementListeners.delete(element);
|
|
}
|
|
}
|
|
}
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
var classCallCheck = __webpack_require__(15671);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
var createClass = __webpack_require__(43144);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
var inherits = __webpack_require__(60136);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
var createSuper = __webpack_require__(51630);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fallback to findDOMNode if origin ref do not provide any dom element
|
|
*/
|
|
var DomWrapper = /*#__PURE__*/function (_React$Component) {
|
|
(0,inherits/* default */.Z)(DomWrapper, _React$Component);
|
|
var _super = (0,createSuper/* default */.Z)(DomWrapper);
|
|
function DomWrapper() {
|
|
(0,classCallCheck/* default */.Z)(this, DomWrapper);
|
|
return _super.apply(this, arguments);
|
|
}
|
|
(0,createClass/* default */.Z)(DomWrapper, [{
|
|
key: "render",
|
|
value: function render() {
|
|
return this.props.children;
|
|
}
|
|
}]);
|
|
return DomWrapper;
|
|
}(react.Component);
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-resize-observer/es/Collection.js
|
|
|
|
var CollectionContext = /*#__PURE__*/react.createContext(null);
|
|
/**
|
|
* Collect all the resize event from children ResizeObserver
|
|
*/
|
|
function Collection(_ref) {
|
|
var children = _ref.children,
|
|
onBatchResize = _ref.onBatchResize;
|
|
var resizeIdRef = react.useRef(0);
|
|
var resizeInfosRef = react.useRef([]);
|
|
var onCollectionResize = react.useContext(CollectionContext);
|
|
var onResize = react.useCallback(function (size, element, data) {
|
|
resizeIdRef.current += 1;
|
|
var currentId = resizeIdRef.current;
|
|
resizeInfosRef.current.push({
|
|
size: size,
|
|
element: element,
|
|
data: data
|
|
});
|
|
Promise.resolve().then(function () {
|
|
if (currentId === resizeIdRef.current) {
|
|
onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
|
|
resizeInfosRef.current = [];
|
|
}
|
|
});
|
|
// Continue bubbling if parent exist
|
|
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
|
|
}, [onBatchResize, onCollectionResize]);
|
|
return /*#__PURE__*/react.createElement(CollectionContext.Provider, {
|
|
value: onResize
|
|
}, children);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/rc-resize-observer/es/SingleObserver/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function SingleObserver(props, ref) {
|
|
var children = props.children,
|
|
disabled = props.disabled;
|
|
var elementRef = react.useRef(null);
|
|
var wrapperRef = react.useRef(null);
|
|
var onCollectionResize = react.useContext(CollectionContext);
|
|
// =========================== Children ===========================
|
|
var isRenderProps = typeof children === 'function';
|
|
var mergedChildren = isRenderProps ? children(elementRef) : children;
|
|
// ============================= Size =============================
|
|
var sizeRef = react.useRef({
|
|
width: -1,
|
|
height: -1,
|
|
offsetWidth: -1,
|
|
offsetHeight: -1
|
|
});
|
|
// ============================= Ref ==============================
|
|
var canRef = !isRenderProps && /*#__PURE__*/react.isValidElement(mergedChildren) && (0,es_ref/* supportRef */.Yr)(mergedChildren);
|
|
var originRef = canRef ? mergedChildren.ref : null;
|
|
var mergedRef = react.useMemo(function () {
|
|
return (0,es_ref/* composeRef */.sQ)(originRef, elementRef);
|
|
}, [originRef, elementRef]);
|
|
var getDom = function getDom() {
|
|
return (0,findDOMNode/* default */.Z)(elementRef.current) || (0,findDOMNode/* default */.Z)(wrapperRef.current);
|
|
};
|
|
react.useImperativeHandle(ref, function () {
|
|
return getDom();
|
|
});
|
|
// =========================== Observe ============================
|
|
var propsRef = react.useRef(props);
|
|
propsRef.current = props;
|
|
// Handler
|
|
var onInternalResize = react.useCallback(function (target) {
|
|
var _propsRef$current = propsRef.current,
|
|
onResize = _propsRef$current.onResize,
|
|
data = _propsRef$current.data;
|
|
var _target$getBoundingCl = target.getBoundingClientRect(),
|
|
width = _target$getBoundingCl.width,
|
|
height = _target$getBoundingCl.height;
|
|
var offsetWidth = target.offsetWidth,
|
|
offsetHeight = target.offsetHeight;
|
|
/**
|
|
* Resize observer trigger when content size changed.
|
|
* In most case we just care about element size,
|
|
* let's use `boundary` instead of `contentRect` here to avoid shaking.
|
|
*/
|
|
var fixedWidth = Math.floor(width);
|
|
var fixedHeight = Math.floor(height);
|
|
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
|
|
var size = {
|
|
width: fixedWidth,
|
|
height: fixedHeight,
|
|
offsetWidth: offsetWidth,
|
|
offsetHeight: offsetHeight
|
|
};
|
|
sizeRef.current = size;
|
|
// IE is strange, right?
|
|
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
|
|
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
|
|
var sizeInfo = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, size), {}, {
|
|
offsetWidth: mergedOffsetWidth,
|
|
offsetHeight: mergedOffsetHeight
|
|
});
|
|
// Let collection know what happened
|
|
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
|
|
if (onResize) {
|
|
// defer the callback but not defer to next frame
|
|
Promise.resolve().then(function () {
|
|
onResize(sizeInfo, target);
|
|
});
|
|
}
|
|
}
|
|
}, []);
|
|
// Dynamic observe
|
|
react.useEffect(function () {
|
|
var currentElement = getDom();
|
|
if (currentElement && !disabled) {
|
|
observe(currentElement, onInternalResize);
|
|
}
|
|
return function () {
|
|
return unobserve(currentElement, onInternalResize);
|
|
};
|
|
}, [elementRef.current, disabled]);
|
|
// ============================ Render ============================
|
|
return /*#__PURE__*/react.createElement(DomWrapper, {
|
|
ref: wrapperRef
|
|
}, canRef ? /*#__PURE__*/react.cloneElement(mergedChildren, {
|
|
ref: mergedRef
|
|
}) : mergedChildren);
|
|
}
|
|
var RefSingleObserver = /*#__PURE__*/react.forwardRef(SingleObserver);
|
|
if (false) {}
|
|
/* harmony default export */ var es_SingleObserver = (RefSingleObserver);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-resize-observer/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
|
|
|
|
|
|
function ResizeObserver(props, ref) {
|
|
var children = props.children;
|
|
var childNodes = typeof children === 'function' ? [children] : (0,toArray/* default */.Z)(children);
|
|
if (false) {}
|
|
return childNodes.map(function (child, index) {
|
|
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
|
|
return /*#__PURE__*/react.createElement(es_SingleObserver, (0,esm_extends/* default */.Z)({}, props, {
|
|
key: key,
|
|
ref: index === 0 ? ref : undefined
|
|
}), child);
|
|
});
|
|
}
|
|
var RefResizeObserver = /*#__PURE__*/react.forwardRef(ResizeObserver);
|
|
if (false) {}
|
|
RefResizeObserver.Collection = Collection;
|
|
/* harmony default export */ var es = (RefResizeObserver);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 43159:
|
|
/*!**************************************************!*\
|
|
!*** ./node_modules/rc-tooltip/es/placements.js ***!
|
|
\**************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "C": function() { return /* binding */ placements; }
|
|
/* harmony export */ });
|
|
var autoAdjustOverflow = {
|
|
adjustX: 1,
|
|
adjustY: 1
|
|
};
|
|
var targetOffset = [0, 0];
|
|
var placements = {
|
|
left: {
|
|
points: ['cr', 'cl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [-4, 0],
|
|
targetOffset: targetOffset
|
|
},
|
|
right: {
|
|
points: ['cl', 'cr'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [4, 0],
|
|
targetOffset: targetOffset
|
|
},
|
|
top: {
|
|
points: ['bc', 'tc'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, -4],
|
|
targetOffset: targetOffset
|
|
},
|
|
bottom: {
|
|
points: ['tc', 'bc'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, 4],
|
|
targetOffset: targetOffset
|
|
},
|
|
topLeft: {
|
|
points: ['bl', 'tl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, -4],
|
|
targetOffset: targetOffset
|
|
},
|
|
leftTop: {
|
|
points: ['tr', 'tl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [-4, 0],
|
|
targetOffset: targetOffset
|
|
},
|
|
topRight: {
|
|
points: ['br', 'tr'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, -4],
|
|
targetOffset: targetOffset
|
|
},
|
|
rightTop: {
|
|
points: ['tl', 'tr'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [4, 0],
|
|
targetOffset: targetOffset
|
|
},
|
|
bottomRight: {
|
|
points: ['tr', 'br'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, 4],
|
|
targetOffset: targetOffset
|
|
},
|
|
rightBottom: {
|
|
points: ['bl', 'br'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [4, 0],
|
|
targetOffset: targetOffset
|
|
},
|
|
bottomLeft: {
|
|
points: ['tl', 'bl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, 4],
|
|
targetOffset: targetOffset
|
|
},
|
|
leftBottom: {
|
|
points: ['br', 'bl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [-4, 0],
|
|
targetOffset: targetOffset
|
|
}
|
|
};
|
|
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (placements)));
|
|
|
|
/***/ })
|
|
|
|
}]); |