parent
074d3c9c3e
commit
dac972fe5a
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,679 @@
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[1661],{
|
||||
|
||||
/***/ 14234:
|
||||
/*!**********************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileTextOutlined.js + 1 modules ***!
|
||||
\**********************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_FileTextOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(79384);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.0@@ant-design/icons-svg/es/asn/FileTextOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var FileTextOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_FileTextOutlined = (FileTextOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(91851);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileTextOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var FileTextOutlined_FileTextOutlined = function FileTextOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_FileTextOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_FileTextOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(FileTextOutlined_FileTextOutlined));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 31797:
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules ***!
|
||||
\*************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ es_statistic; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js
|
||||
var useForceUpdate = __webpack_require__(56762);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
||||
var reactNode = __webpack_require__(92343);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
||||
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
||||
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
||||
var skeleton = __webpack_require__(48978);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Number.js
|
||||
"use client";
|
||||
|
||||
|
||||
const StatisticNumber = props => {
|
||||
const {
|
||||
value,
|
||||
formatter,
|
||||
precision,
|
||||
decimalSeparator,
|
||||
groupSeparator = '',
|
||||
prefixCls
|
||||
} = props;
|
||||
let valueNode;
|
||||
if (typeof formatter === 'function') {
|
||||
// Customize formatter
|
||||
valueNode = formatter(value);
|
||||
} else {
|
||||
// Internal formatter
|
||||
const val = String(value);
|
||||
const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
|
||||
// Process if illegal number
|
||||
if (!cells || val === '-') {
|
||||
valueNode = val;
|
||||
} else {
|
||||
const negative = cells[1];
|
||||
let int = cells[2] || '0';
|
||||
let decimal = cells[4] || '';
|
||||
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
||||
if (typeof precision === 'number') {
|
||||
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
|
||||
}
|
||||
if (decimal) {
|
||||
decimal = `${decimalSeparator}${decimal}`;
|
||||
}
|
||||
valueNode = [/*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
key: "int",
|
||||
className: `${prefixCls}-content-value-int`
|
||||
}, negative, int), decimal && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
key: "decimal",
|
||||
className: `${prefixCls}-content-value-decimal`
|
||||
}, decimal)];
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${prefixCls}-content-value`
|
||||
}, valueNode);
|
||||
};
|
||||
/* harmony default export */ var statistic_Number = (StatisticNumber);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
||||
var style = __webpack_require__(17313);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
||||
var genComponentStyleHook = __webpack_require__(83116);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
||||
var statistic = __webpack_require__(37613);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/style/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const genStatisticStyle = token => {
|
||||
const {
|
||||
componentCls,
|
||||
marginXXS,
|
||||
padding,
|
||||
colorTextDescription,
|
||||
titleFontSize,
|
||||
colorTextHeading,
|
||||
contentFontSize,
|
||||
fontFamily
|
||||
} = token;
|
||||
return {
|
||||
[`${componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
||||
[`${componentCls}-title`]: {
|
||||
marginBottom: marginXXS,
|
||||
color: colorTextDescription,
|
||||
fontSize: titleFontSize
|
||||
},
|
||||
[`${componentCls}-skeleton`]: {
|
||||
paddingTop: padding
|
||||
},
|
||||
[`${componentCls}-content`]: {
|
||||
color: colorTextHeading,
|
||||
fontSize: contentFontSize,
|
||||
fontFamily,
|
||||
[`${componentCls}-content-value`]: {
|
||||
display: 'inline-block',
|
||||
direction: 'ltr'
|
||||
},
|
||||
[`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
|
||||
display: 'inline-block'
|
||||
},
|
||||
[`${componentCls}-content-prefix`]: {
|
||||
marginInlineEnd: marginXXS
|
||||
},
|
||||
[`${componentCls}-content-suffix`]: {
|
||||
marginInlineStart: marginXXS
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
};
|
||||
// ============================== Export ==============================
|
||||
/* harmony default export */ var statistic_style = ((0,genComponentStyleHook/* default */.Z)('Statistic', token => {
|
||||
const statisticToken = (0,statistic/* merge */.TS)(token, {});
|
||||
return [genStatisticStyle(statisticToken)];
|
||||
}, token => {
|
||||
const {
|
||||
fontSizeHeading3,
|
||||
fontSize
|
||||
} = token;
|
||||
return {
|
||||
titleFontSize: fontSize,
|
||||
contentFontSize: fontSizeHeading3
|
||||
};
|
||||
}));
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Statistic.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Statistic = props => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
className,
|
||||
rootClassName,
|
||||
style,
|
||||
valueStyle,
|
||||
value = 0,
|
||||
title,
|
||||
valueRender,
|
||||
prefix,
|
||||
suffix,
|
||||
loading = false,
|
||||
onMouseEnter,
|
||||
onMouseLeave,
|
||||
decimalSeparator = '.',
|
||||
groupSeparator = ','
|
||||
} = props;
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction,
|
||||
statistic
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = statistic_style(prefixCls);
|
||||
const valueNode = /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Number, Object.assign({
|
||||
decimalSeparator: decimalSeparator,
|
||||
groupSeparator: groupSeparator,
|
||||
prefixCls: prefixCls
|
||||
}, props, {
|
||||
value: value
|
||||
}));
|
||||
const cls = _classnames_2_5_1_classnames_default()(prefixCls, {
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl'
|
||||
}, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId);
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: cls,
|
||||
style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style),
|
||||
onMouseEnter: onMouseEnter,
|
||||
onMouseLeave: onMouseLeave
|
||||
}, title && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: `${prefixCls}-title`
|
||||
}, title), /*#__PURE__*/_react_17_0_2_react.createElement(skeleton/* default */.Z, {
|
||||
paragraph: false,
|
||||
loading: loading,
|
||||
className: `${prefixCls}-skeleton`
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
style: valueStyle,
|
||||
className: `${prefixCls}-content`
|
||||
}, prefix && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${prefixCls}-content-prefix`
|
||||
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${prefixCls}-content-suffix`
|
||||
}, suffix)))));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var statistic_Statistic = (Statistic);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/utils.js
|
||||
// Countdown
|
||||
const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds
|
||||
];
|
||||
|
||||
function formatTimeStr(duration, format) {
|
||||
let leftDuration = duration;
|
||||
const escapeRegex = /\[[^\]]*]/g;
|
||||
const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
|
||||
const templateText = format.replace(escapeRegex, '[]');
|
||||
const replacedText = timeUnits.reduce((current, _ref) => {
|
||||
let [name, unit] = _ref;
|
||||
if (current.includes(name)) {
|
||||
const value = Math.floor(leftDuration / unit);
|
||||
leftDuration -= value * unit;
|
||||
return current.replace(new RegExp(`${name}+`, 'g'), match => {
|
||||
const len = match.length;
|
||||
return value.toString().padStart(len, '0');
|
||||
});
|
||||
}
|
||||
return current;
|
||||
}, templateText);
|
||||
let index = 0;
|
||||
return replacedText.replace(escapeRegex, () => {
|
||||
const match = keepList[index];
|
||||
index += 1;
|
||||
return match;
|
||||
});
|
||||
}
|
||||
function formatCountdown(value, config) {
|
||||
const {
|
||||
format = ''
|
||||
} = config;
|
||||
const target = new Date(value).getTime();
|
||||
const current = Date.now();
|
||||
const diff = Math.max(target - current, 0);
|
||||
return formatTimeStr(diff, format);
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/Countdown.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const REFRESH_INTERVAL = 1000 / 30;
|
||||
function getTime(value) {
|
||||
return new Date(value).getTime();
|
||||
}
|
||||
const Countdown = props => {
|
||||
const {
|
||||
value,
|
||||
format = 'HH:mm:ss',
|
||||
onChange,
|
||||
onFinish
|
||||
} = props;
|
||||
const forceUpdate = (0,useForceUpdate/* default */.Z)();
|
||||
const countdown = _react_17_0_2_react.useRef(null);
|
||||
const stopTimer = () => {
|
||||
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
|
||||
if (countdown.current) {
|
||||
clearInterval(countdown.current);
|
||||
countdown.current = null;
|
||||
}
|
||||
};
|
||||
const syncTimer = () => {
|
||||
const timestamp = getTime(value);
|
||||
if (timestamp >= Date.now()) {
|
||||
countdown.current = setInterval(() => {
|
||||
forceUpdate();
|
||||
onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now());
|
||||
if (timestamp < Date.now()) {
|
||||
stopTimer();
|
||||
}
|
||||
}, REFRESH_INTERVAL);
|
||||
}
|
||||
};
|
||||
_react_17_0_2_react.useEffect(() => {
|
||||
syncTimer();
|
||||
return () => {
|
||||
if (countdown.current) {
|
||||
clearInterval(countdown.current);
|
||||
countdown.current = null;
|
||||
}
|
||||
};
|
||||
}, [value]);
|
||||
const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), {
|
||||
format
|
||||
}));
|
||||
const valueRender = node => (0,reactNode/* cloneElement */.Tm)(node, {
|
||||
title: undefined
|
||||
});
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(statistic_Statistic, Object.assign({}, props, {
|
||||
valueRender: valueRender,
|
||||
formatter: formatter
|
||||
}));
|
||||
};
|
||||
/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/_react_17_0_2_react.memo(Countdown));
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
statistic_Statistic.Countdown = statistic_Countdown;
|
||||
/* harmony default export */ var es_statistic = (statistic_Statistic);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 51581:
|
||||
/*!****************************************************************************************************!*\
|
||||
!*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/dist/InfiniteScroll.js ***!
|
||||
\****************************************************************************************************/
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _react = __webpack_require__(/*! react */ 59301);
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
|
||||
var _propTypes = __webpack_require__(/*! prop-types */ 12708);
|
||||
|
||||
var _propTypes2 = _interopRequireDefault(_propTypes);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var InfiniteScroll = function (_Component) {
|
||||
_inherits(InfiniteScroll, _Component);
|
||||
|
||||
function InfiniteScroll(props) {
|
||||
_classCallCheck(this, InfiniteScroll);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));
|
||||
|
||||
_this.scrollListener = _this.scrollListener.bind(_this);
|
||||
_this.eventListenerOptions = _this.eventListenerOptions.bind(_this);
|
||||
_this.mousewheelListener = _this.mousewheelListener.bind(_this);
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(InfiniteScroll, [{
|
||||
key: 'componentDidMount',
|
||||
value: function componentDidMount() {
|
||||
this.pageLoaded = this.props.pageStart;
|
||||
this.options = this.eventListenerOptions();
|
||||
this.attachScrollListener();
|
||||
}
|
||||
}, {
|
||||
key: 'componentDidUpdate',
|
||||
value: function componentDidUpdate() {
|
||||
if (this.props.isReverse && this.loadMore) {
|
||||
var parentElement = this.getParentElement(this.scrollComponent);
|
||||
parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;
|
||||
this.loadMore = false;
|
||||
}
|
||||
this.attachScrollListener();
|
||||
}
|
||||
}, {
|
||||
key: 'componentWillUnmount',
|
||||
value: function componentWillUnmount() {
|
||||
this.detachScrollListener();
|
||||
this.detachMousewheelListener();
|
||||
}
|
||||
}, {
|
||||
key: 'isPassiveSupported',
|
||||
value: function isPassiveSupported() {
|
||||
var passive = false;
|
||||
|
||||
var testOptions = {
|
||||
get passive() {
|
||||
passive = true;
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
document.addEventListener('test', null, testOptions);
|
||||
document.removeEventListener('test', null, testOptions);
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
return passive;
|
||||
}
|
||||
}, {
|
||||
key: 'eventListenerOptions',
|
||||
value: function eventListenerOptions() {
|
||||
var options = this.props.useCapture;
|
||||
|
||||
if (this.isPassiveSupported()) {
|
||||
options = {
|
||||
useCapture: this.props.useCapture,
|
||||
passive: true
|
||||
};
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
// Set a defaut loader for all your `InfiniteScroll` components
|
||||
|
||||
}, {
|
||||
key: 'setDefaultLoader',
|
||||
value: function setDefaultLoader(loader) {
|
||||
this.defaultLoader = loader;
|
||||
}
|
||||
}, {
|
||||
key: 'detachMousewheelListener',
|
||||
value: function detachMousewheelListener() {
|
||||
var scrollEl = window;
|
||||
if (this.props.useWindow === false) {
|
||||
scrollEl = this.scrollComponent.parentNode;
|
||||
}
|
||||
|
||||
scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
||||
}
|
||||
}, {
|
||||
key: 'detachScrollListener',
|
||||
value: function detachScrollListener() {
|
||||
var scrollEl = window;
|
||||
if (this.props.useWindow === false) {
|
||||
scrollEl = this.getParentElement(this.scrollComponent);
|
||||
}
|
||||
|
||||
scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
}
|
||||
}, {
|
||||
key: 'getParentElement',
|
||||
value: function getParentElement(el) {
|
||||
var scrollParent = this.props.getScrollParent && this.props.getScrollParent();
|
||||
if (scrollParent != null) {
|
||||
return scrollParent;
|
||||
}
|
||||
return el && el.parentNode;
|
||||
}
|
||||
}, {
|
||||
key: 'filterProps',
|
||||
value: function filterProps(props) {
|
||||
return props;
|
||||
}
|
||||
}, {
|
||||
key: 'attachScrollListener',
|
||||
value: function attachScrollListener() {
|
||||
var parentElement = this.getParentElement(this.scrollComponent);
|
||||
|
||||
if (!this.props.hasMore || !parentElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
var scrollEl = window;
|
||||
if (this.props.useWindow === false) {
|
||||
scrollEl = parentElement;
|
||||
}
|
||||
|
||||
scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
||||
scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
|
||||
if (this.props.initialLoad) {
|
||||
this.scrollListener();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'mousewheelListener',
|
||||
value: function mousewheelListener(e) {
|
||||
// Prevents Chrome hangups
|
||||
// See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257
|
||||
if (e.deltaY === 1 && !this.isPassiveSupported()) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'scrollListener',
|
||||
value: function scrollListener() {
|
||||
var el = this.scrollComponent;
|
||||
var scrollEl = window;
|
||||
var parentNode = this.getParentElement(el);
|
||||
|
||||
var offset = void 0;
|
||||
if (this.props.useWindow) {
|
||||
var doc = document.documentElement || document.body.parentNode || document.body;
|
||||
var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;
|
||||
if (this.props.isReverse) {
|
||||
offset = scrollTop;
|
||||
} else {
|
||||
offset = this.calculateOffset(el, scrollTop);
|
||||
}
|
||||
} else if (this.props.isReverse) {
|
||||
offset = parentNode.scrollTop;
|
||||
} else {
|
||||
offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;
|
||||
}
|
||||
|
||||
// Here we make sure the element is visible as well as checking the offset
|
||||
if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {
|
||||
this.detachScrollListener();
|
||||
this.beforeScrollHeight = parentNode.scrollHeight;
|
||||
this.beforeScrollTop = parentNode.scrollTop;
|
||||
// Call loadMore after detachScrollListener to allow for non-async loadMore functions
|
||||
if (typeof this.props.loadMore === 'function') {
|
||||
this.props.loadMore(this.pageLoaded += 1);
|
||||
this.loadMore = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'calculateOffset',
|
||||
value: function calculateOffset(el, scrollTop) {
|
||||
if (!el) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);
|
||||
}
|
||||
}, {
|
||||
key: 'calculateTopPosition',
|
||||
value: function calculateTopPosition(el) {
|
||||
if (!el) {
|
||||
return 0;
|
||||
}
|
||||
return el.offsetTop + this.calculateTopPosition(el.offsetParent);
|
||||
}
|
||||
}, {
|
||||
key: 'render',
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
var renderProps = this.filterProps(this.props);
|
||||
|
||||
var children = renderProps.children,
|
||||
element = renderProps.element,
|
||||
hasMore = renderProps.hasMore,
|
||||
initialLoad = renderProps.initialLoad,
|
||||
isReverse = renderProps.isReverse,
|
||||
loader = renderProps.loader,
|
||||
loadMore = renderProps.loadMore,
|
||||
pageStart = renderProps.pageStart,
|
||||
ref = renderProps.ref,
|
||||
threshold = renderProps.threshold,
|
||||
useCapture = renderProps.useCapture,
|
||||
useWindow = renderProps.useWindow,
|
||||
getScrollParent = renderProps.getScrollParent,
|
||||
props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);
|
||||
|
||||
props.ref = function (node) {
|
||||
_this2.scrollComponent = node;
|
||||
if (ref) {
|
||||
ref(node);
|
||||
}
|
||||
};
|
||||
|
||||
var childrenArray = [children];
|
||||
if (hasMore) {
|
||||
if (loader) {
|
||||
isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);
|
||||
} else if (this.defaultLoader) {
|
||||
isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);
|
||||
}
|
||||
}
|
||||
return _react2.default.createElement(element, props, childrenArray);
|
||||
}
|
||||
}]);
|
||||
|
||||
return InfiniteScroll;
|
||||
}(_react.Component);
|
||||
|
||||
InfiniteScroll.propTypes = {
|
||||
children: _propTypes2.default.node.isRequired,
|
||||
element: _propTypes2.default.node,
|
||||
hasMore: _propTypes2.default.bool,
|
||||
initialLoad: _propTypes2.default.bool,
|
||||
isReverse: _propTypes2.default.bool,
|
||||
loader: _propTypes2.default.node,
|
||||
loadMore: _propTypes2.default.func.isRequired,
|
||||
pageStart: _propTypes2.default.number,
|
||||
ref: _propTypes2.default.func,
|
||||
getScrollParent: _propTypes2.default.func,
|
||||
threshold: _propTypes2.default.number,
|
||||
useCapture: _propTypes2.default.bool,
|
||||
useWindow: _propTypes2.default.bool
|
||||
};
|
||||
InfiniteScroll.defaultProps = {
|
||||
element: 'div',
|
||||
hasMore: false,
|
||||
initialLoad: true,
|
||||
pageStart: 0,
|
||||
ref: null,
|
||||
threshold: 250,
|
||||
useWindow: true,
|
||||
isReverse: false,
|
||||
useCapture: false,
|
||||
loader: null,
|
||||
getScrollParent: null
|
||||
};
|
||||
exports["default"] = InfiniteScroll;
|
||||
module.exports = exports['default'];
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26724:
|
||||
/*!**************************************************************************************!*\
|
||||
!*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js ***!
|
||||
\**************************************************************************************/
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 51581)
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,784 +0,0 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[21154],{
|
||||
|
||||
/***/ 21154:
|
||||
/*!***************************************************************!*\
|
||||
!*** ./src/components/ReuseShixunModal/index.tsx + 1 modules ***!
|
||||
\***************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ components_ReuseShixunModal; },
|
||||
P: function() { return /* binding */ useReuseModal; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
||||
var toConsumableArray = __webpack_require__(37205);
|
||||
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
||||
var objectWithoutProperties = __webpack_require__(39647);
|
||||
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
||||
var regeneratorRuntime = __webpack_require__(7557);
|
||||
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
||||
var objectSpread2 = __webpack_require__(82242);
|
||||
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
||||
var asyncToGenerator = __webpack_require__(41498);
|
||||
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
||||
var slicedToArray = __webpack_require__(79800);
|
||||
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
||||
var es_form = __webpack_require__(78241);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
||||
var modal = __webpack_require__(43418);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
||||
var es_radio = __webpack_require__(5112);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
||||
var input = __webpack_require__(11694);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
||||
var table = __webpack_require__(96860);
|
||||
;// CONCATENATED MODULE: ./src/components/ReuseShixunModal/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var ReuseShixunModalmodules = ({"brief":"brief___LOzpE","contentTitle":"contentTitle___xkdcN","content":"content___Vtri0","tips":"tips___tuAtH","antdTable":"antdTable___s8T2N","tableCell":"tableCell___kN9Fw","antdModal":"antdModal___WVBk3","orangeColor":"orangeColor___ryB2u"});
|
||||
// EXTERNAL MODULE: ./src/service/shixuns.ts
|
||||
var shixuns = __webpack_require__(47907);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/components/ReuseShixunModal/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _excluded = ["isImportMultipleCourse"];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var StudentInfo = function StudentInfo(_ref) {
|
||||
var studentNames = _ref.studentNames,
|
||||
total = _ref.total;
|
||||
var Map = ['', '一', '两', '三'];
|
||||
return total > 3 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: ["\u8BFE\u5802\u5185\u6709", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: studentNames === null || studentNames === void 0 ? void 0 : studentNames.join('、')
|
||||
}), "\u7B49", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: total
|
||||
}), "\u540D\u5B66\u751F"]
|
||||
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: ["\u8BFE\u5802\u5185\u6709", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: studentNames === null || studentNames === void 0 ? void 0 : studentNames.join('、')
|
||||
}), Map[total], "\u540D\u5B66\u751F"]
|
||||
});
|
||||
};
|
||||
|
||||
//根据使用场景区分文案
|
||||
var generateBrief = function generateBrief(_ref2) {
|
||||
var used = _ref2.used,
|
||||
copy = _ref2.copy,
|
||||
canNotCopy = _ref2.canNotCopy,
|
||||
studentNames = _ref2.studentNames,
|
||||
studentCount = _ref2.studentCount,
|
||||
inPaper = _ref2.inPaper,
|
||||
_ref2$is_random = _ref2.is_random,
|
||||
is_random = _ref2$is_random === void 0 ? false : _ref2$is_random,
|
||||
_ref2$position = _ref2.position,
|
||||
position = _ref2$position === void 0 ? '' : _ref2$position;
|
||||
var copyStatusDescribe = function copyStatusDescribe() {
|
||||
if (copy > 0 && canNotCopy > 0) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: ["\u5176\u4E2D", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: copy
|
||||
}), "\u4E2A\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: canNotCopy
|
||||
}), "\u4E2A\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236"]
|
||||
});
|
||||
} else if (copy > 0 && canNotCopy === 0) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: ["\u5176\u4E2D", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: copy
|
||||
}), "\u4E2A\u9879\u76EE\u652F\u6301\u590D\u5236"]
|
||||
});
|
||||
} else if (copy === 0 && canNotCopy > 0) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: ["\u5176\u4E2D", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: canNotCopy
|
||||
}), "\u4E2A\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236"]
|
||||
});
|
||||
}
|
||||
};
|
||||
var currentPosition = position || (inPaper ? '试卷' : '课程');
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(StudentInfo, {
|
||||
studentNames: studentNames,
|
||||
total: studentCount
|
||||
}), "\u5B66\u4E60\u8FC7", currentPosition, "\u4E2D\u7684", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: used
|
||||
}), "\u4E2A\u9879\u76EE\uFF0C", copyStatusDescribe(), "\u3002\u8BF7\u9009\u62E9", is_random ? '' : '是否继续使用和', "\u662F\u5426\u590D\u5236\u4E3A\u65B0\u9879\u76EE\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\uFF1F"]
|
||||
});
|
||||
};
|
||||
|
||||
//单个实训时的情况
|
||||
var ReuseSingleShixunModal = function ReuseSingleShixunModal(_ref3) {
|
||||
var onCancel = _ref3.onCancel,
|
||||
onOk = _ref3.onOk,
|
||||
visible = _ref3.visible,
|
||||
inPaper = _ref3.inPaper,
|
||||
renderData = _ref3.renderData,
|
||||
type = _ref3.type,
|
||||
_ref3$isMultipleCours = _ref3.isMultipleCourse,
|
||||
isMultipleCourse = _ref3$isMultipleCours === void 0 ? false : _ref3$isMultipleCours;
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
var _useState = (0,_react_17_0_2_react.useState)(1),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
radioValue = _useState2[0],
|
||||
setRadioValue = _useState2[1];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
confirmLoading = _useState4[0],
|
||||
setConfirmLoading = _useState4[1];
|
||||
var canCopy = (0,_react_17_0_2_react.useMemo)(function () {
|
||||
return (renderData === null || renderData === void 0 ? void 0 : renderData.total_num) === 1 && (renderData === null || renderData === void 0 ? void 0 : renderData.can_copy_num) === 1;
|
||||
}, [renderData]);
|
||||
var courseDataList = (0,_react_17_0_2_react.useMemo)(function () {
|
||||
var _renderData$course_da;
|
||||
return renderData === null || renderData === void 0 || (_renderData$course_da = renderData.course_data_list) === null || _renderData$course_da === void 0 ? void 0 : _renderData$course_da.filter(function (e) {
|
||||
return e.is_show;
|
||||
});
|
||||
}, [renderData]);
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
||||
children: canCopy ? /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
||||
centered: true,
|
||||
closable: true,
|
||||
open: visible,
|
||||
destroyOnClose: true,
|
||||
title: "\u63D0\u793A",
|
||||
className: ReuseShixunModalmodules.antdModal,
|
||||
width: 682,
|
||||
confirmLoading: confirmLoading,
|
||||
onCancel: onCancel,
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var data, _renderData$course_da2, param;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
setConfirmLoading(true);
|
||||
data = radioValue;
|
||||
if (isMultipleCourse) {
|
||||
param = objectSpread2_default()({}, form.getFieldsValue());
|
||||
data = renderData === null || renderData === void 0 || (_renderData$course_da2 = renderData.course_data_list) === null || _renderData$course_da2 === void 0 ? void 0 : _renderData$course_da2.map(function (e) {
|
||||
if (param[e.id] !== undefined) {
|
||||
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
||||
is_copy: param[e.id]
|
||||
});
|
||||
}
|
||||
return e;
|
||||
});
|
||||
}
|
||||
_context.next = 5;
|
||||
return onOk(data);
|
||||
case 5:
|
||||
setConfirmLoading(false);
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
})),
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.content,
|
||||
style: {
|
||||
marginBottom: 20
|
||||
},
|
||||
children: isMultipleCourse ? '检测到以下课堂已在教学课堂中使用,请问是否复制成新的实训发送至教学课堂中?' : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(StudentInfo, {
|
||||
studentNames: renderData === null || renderData === void 0 ? void 0 : renderData.student_names,
|
||||
total: renderData === null || renderData === void 0 ? void 0 : renderData.student_count
|
||||
}), "\u5B66\u4E60\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\u3002\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u5C06\u8BE5\u9879\u76EE\u590D\u5236\u4E3A\u65B0\u9879\u76EE\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\uFF1F"]
|
||||
})
|
||||
}), isMultipleCourse ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
||||
form: form,
|
||||
preserve: false,
|
||||
children: courseDataList === null || courseDataList === void 0 ? void 0 : courseDataList.map(function (item) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", {
|
||||
className: "ml15 mb5",
|
||||
children: item.name
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: item.id,
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
className: ReuseShixunModalmodules.content,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
style: {
|
||||
color: '#464f66'
|
||||
},
|
||||
children: "\u590D\u5236\u5B9E\u8BAD"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
style: {
|
||||
color: '#464f66'
|
||||
},
|
||||
children: "\u4E0D\u590D\u5236\u5B9E\u8BAD"
|
||||
})]
|
||||
})
|
||||
})]
|
||||
}, item.id);
|
||||
})
|
||||
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
value: radioValue,
|
||||
onChange: function onChange(e) {
|
||||
return setRadioValue(e.target.value);
|
||||
},
|
||||
className: ReuseShixunModalmodules.content,
|
||||
style: {
|
||||
marginBottom: 30
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
style: {
|
||||
color: '#464f66'
|
||||
},
|
||||
children: "\u590D\u5236"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
style: {
|
||||
color: '#464f66'
|
||||
},
|
||||
children: "\u4E0D\u590D\u5236"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.content,
|
||||
style: {
|
||||
marginBottom: 10
|
||||
},
|
||||
children: "* \u8BF4\u660E\uFF1A"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.content,
|
||||
style: {
|
||||
marginBottom: 20
|
||||
},
|
||||
children: "1\u3001\u590D\u5236\uFF1A\u7CFB\u7EDF\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u53D1\u9001\u5230\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF08\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF09\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\u3002"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: "".concat(ReuseShixunModalmodules.content, " ").concat(ReuseShixunModalmodules.orangeColor),
|
||||
children: "2\u3001\u4E0D\u590D\u5236\uFF1A\u5F53\u524D\u9879\u76EE\u4F1A\u88AB\u76F4\u63A5\u53D1\u9001\u5230\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u6311\u6218\u8FC7\u8BE5\u9879\u76EE\u7684\u5B66\u751F\u518D\u6B21\u8FDB\u5165\u9879\u76EE\u5F00\u542F\u6311\u6218\u65F6\uFF0C\u4F1A\u6E05\u7A7A\u4E4B\u524D\u7684\u6311\u6218\u8BB0\u5F55\u3002"
|
||||
})]
|
||||
})]
|
||||
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
centered: true,
|
||||
closable: true,
|
||||
destroyOnClose: true,
|
||||
open: visible,
|
||||
confirmLoading: confirmLoading,
|
||||
title: "\u63D0\u793A",
|
||||
width: 682,
|
||||
onCancel: onCancel,
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
||||
var data, _renderData$course_da3, param;
|
||||
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
setConfirmLoading(true);
|
||||
data = 0;
|
||||
if (isMultipleCourse) {
|
||||
param = objectSpread2_default()({}, form.getFieldsValue());
|
||||
data = renderData === null || renderData === void 0 || (_renderData$course_da3 = renderData.course_data_list) === null || _renderData$course_da3 === void 0 ? void 0 : _renderData$course_da3.map(function (e) {
|
||||
if (param[e.id] !== undefined) {
|
||||
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
||||
is_use: param[e.id]
|
||||
});
|
||||
}
|
||||
return e;
|
||||
});
|
||||
}
|
||||
_context2.next = 5;
|
||||
return onOk(data);
|
||||
case 5:
|
||||
setConfirmLoading(false);
|
||||
case 6:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
})),
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: ReuseShixunModalmodules.content,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(StudentInfo, {
|
||||
studentNames: renderData === null || renderData === void 0 ? void 0 : renderData.student_names,
|
||||
total: renderData === null || renderData === void 0 ? void 0 : renderData.student_count
|
||||
}), "\u5B66\u4E60\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\u3002", isMultipleCourse ? /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
form: form,
|
||||
preserve: false,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", {
|
||||
children: "\u5F53\u524D\u5B9E\u8BAD\u4E0D\u53EF\u590D\u5236\uFF0C\u5DF2\u7ECF\u68C0\u6D4B\u5230\u4EE5\u4E0B\u8BFE\u5802\u5B58\u5728\u8BE5\u5B9E\u8BAD\uFF0C\u540C\u4E00\u5B9E\u8BAD\u5728\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u4E92\u76F8\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528"
|
||||
}), courseDataList === null || courseDataList === void 0 ? void 0 : courseDataList.map(function (item) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", {
|
||||
className: "ml15 mb5",
|
||||
children: item.name
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: item.id,
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
className: ReuseShixunModalmodules.content,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
style: {
|
||||
color: '#464f66'
|
||||
},
|
||||
children: "\u7EE7\u7EED\u4F7F\u7528"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
style: {
|
||||
color: '#464f66'
|
||||
},
|
||||
children: "\u4E0D\u4F7F\u7528"
|
||||
})]
|
||||
})
|
||||
})]
|
||||
}, item.id);
|
||||
})]
|
||||
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: ["\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u82E5\u786E\u8BA4\u7EE7\u7EED\u53D1\u9001\uFF0C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: "\u5F53\u524D\u9879\u76EE\u4F1A\u88AB\u76F4\u63A5\u53D1\u9001\u5230\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u6311\u6218\u8FC7\u8BE5\u9879\u76EE\u7684\u5B66\u751F\u518D\u6B21\u8FDB\u5165\u9879\u76EE\u5F00\u542F\u6311\u6218\u65F6\uFF0C\u4F1A\u6E05\u7A7A\u4E4B\u524D\u7684\u6311\u6218\u8BB0\u5F55\u3002"
|
||||
}), "\uFF08\u5982\u679C\u4E0D\u60F3\u6E05\u7A7A\u5B66\u751F\u4E4B\u524D\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u5EFA\u8BAE\u53C2\u7167\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u5185\u5BB9\u81EA\u884C\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u6216\u8005\u5C1D\u8BD5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u4EBA\u5F00\u653E\u672C\u9879\u76EE\u7684\u590D\u5236\u6743\u9650\uFF09\u3002"]
|
||||
})]
|
||||
})
|
||||
})
|
||||
});
|
||||
};
|
||||
var useReuseModal = function useReuseModal() {
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
modalVisible = _useState6[0],
|
||||
setModalVisible = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
renderData = _useState8[0],
|
||||
setRenderData = _useState8[1];
|
||||
var closeModalFn = function closeModalFn() {
|
||||
return setModalVisible(false);
|
||||
};
|
||||
var showModal = /*#__PURE__*/function () {
|
||||
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(reqParams) {
|
||||
var _reqParams$isImportMu, isImportMultipleCourse, param, res, _res$course_data_list, isModalVisible;
|
||||
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
_reqParams$isImportMu = reqParams.isImportMultipleCourse, isImportMultipleCourse = _reqParams$isImportMu === void 0 ? false : _reqParams$isImportMu, param = objectWithoutProperties_default()(reqParams, _excluded);
|
||||
_context3.next = 3;
|
||||
return (0,shixuns/* checkShixunCopy */.Tr)(param);
|
||||
case 3:
|
||||
res = _context3.sent;
|
||||
if (!('status' in res)) {
|
||||
_context3.next = 6;
|
||||
break;
|
||||
}
|
||||
return _context3.abrupt("return", false);
|
||||
case 6:
|
||||
if (!isImportMultipleCourse) {
|
||||
_context3.next = 13;
|
||||
break;
|
||||
}
|
||||
isModalVisible = res === null || res === void 0 || (_res$course_data_list = res.course_data_list) === null || _res$course_data_list === void 0 ? void 0 : _res$course_data_list.some(function (e) {
|
||||
return e.is_show;
|
||||
});
|
||||
if (!isModalVisible) {
|
||||
_context3.next = 12;
|
||||
break;
|
||||
}
|
||||
setRenderData(res);
|
||||
setModalVisible(true);
|
||||
return _context3.abrupt("return", true);
|
||||
case 12:
|
||||
return _context3.abrupt("return", res.course_data_list || []);
|
||||
case 13:
|
||||
if (!(res.student_count === 0)) {
|
||||
_context3.next = 15;
|
||||
break;
|
||||
}
|
||||
return _context3.abrupt("return", false);
|
||||
case 15:
|
||||
setRenderData(res);
|
||||
setModalVisible(true);
|
||||
return _context3.abrupt("return", true);
|
||||
case 18:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee3);
|
||||
}));
|
||||
return function showModal(_x) {
|
||||
return _ref6.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
return [modalVisible, closeModalFn, renderData, showModal];
|
||||
};
|
||||
|
||||
//多个实训时的情况
|
||||
var ReuseMultipleShixunModal = function ReuseMultipleShixunModal(props) {
|
||||
var _Form$useForm3 = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm4 = slicedToArray_default()(_Form$useForm3, 1),
|
||||
form = _Form$useForm4[0];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
confirmLoading = _useState10[0],
|
||||
setConfirmLoading = _useState10[1];
|
||||
var onCancel = props.onCancel,
|
||||
onOk = props.onOk,
|
||||
visible = props.visible,
|
||||
_props$inPaper = props.inPaper,
|
||||
inPaper = _props$inPaper === void 0 ? false : _props$inPaper,
|
||||
renderData = props.renderData,
|
||||
type = props.type,
|
||||
_props$isMultipleCour = props.isMultipleCourse,
|
||||
isMultipleCourse = _props$isMultipleCour === void 0 ? false : _props$isMultipleCour,
|
||||
position = props.position;
|
||||
var reproducibleShixunColumns = (0,_react_17_0_2_react.useMemo)(function () {
|
||||
return inPaper ? [{
|
||||
title: '实践项目名称',
|
||||
dataIndex: 'name',
|
||||
width: 424,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
className: ReuseShixunModalmodules.tableCell,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
||||
href: "/shixuns/".concat(record.identifier, "/challenges"),
|
||||
target: "_blank",
|
||||
children: text
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '是否复制',
|
||||
dataIndex: 'is_copy',
|
||||
align: 'center',
|
||||
render: function render(value, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record.stage_shixun_id : record.shixun_course_id || record.id), 'is_copy'],
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
children: "\u662F"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
children: "\u5426"
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_use'],
|
||||
hidden: true,
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
type: "hidden"
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
}] : [{
|
||||
title: '实践项目名称',
|
||||
dataIndex: 'name',
|
||||
width: 424,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
className: ReuseShixunModalmodules.tableCell,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
||||
href: "/shixuns/".concat(record.identifier, "/challenges"),
|
||||
target: "_blank",
|
||||
children: text
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '是否使用',
|
||||
dataIndex: 'is_use',
|
||||
align: 'center',
|
||||
render: function render(value, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record.stage_shixun_id : record.shixun_course_id || record.id), 'is_use'],
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
children: "\u662F"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
children: "\u5426"
|
||||
})]
|
||||
})
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '是否复制',
|
||||
dataIndex: 'is_copy',
|
||||
align: 'center',
|
||||
render: function render(value, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record.stage_shixun_id : record.shixun_course_id || record.id), 'is_copy'],
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
children: "\u662F"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
children: "\u5426"
|
||||
})]
|
||||
})
|
||||
});
|
||||
}
|
||||
}];
|
||||
}, [inPaper]);
|
||||
var irreproducibleShixunColumns = (0,_react_17_0_2_react.useMemo)(function () {
|
||||
return inPaper ? [{
|
||||
title: '实践项目名称',
|
||||
dataIndex: 'name',
|
||||
width: 424,
|
||||
className: ReuseShixunModalmodules.tableCell,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
render: function render(value, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
||||
href: "/shixuns/".concat(record.identifier, "/challenges"),
|
||||
target: "_blank",
|
||||
children: value
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_copy'],
|
||||
hidden: true,
|
||||
initialValue: 0,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
type: "hidden"
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_use'],
|
||||
hidden: true,
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
type: "hidden"
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
}] : [{
|
||||
title: '实践项目名称',
|
||||
dataIndex: 'name',
|
||||
width: 424,
|
||||
className: ReuseShixunModalmodules.tableCell,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
||||
href: "/shixuns/".concat(record.identifier, "/challenges"),
|
||||
target: "_blank",
|
||||
children: text
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '是否使用',
|
||||
dataIndex: 'is_use',
|
||||
align: 'center',
|
||||
render: function render(value, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_use'],
|
||||
initialValue: 0,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 1,
|
||||
children: "\u662F"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: 0,
|
||||
children: "\u5426"
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_copy'],
|
||||
hidden: true,
|
||||
initialValue: 0,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
type: "hidden"
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
}];
|
||||
}, [inPaper]);
|
||||
|
||||
//可以选择多个课堂的时候
|
||||
if (isMultipleCourse) {
|
||||
var param = {
|
||||
title: '课堂名称',
|
||||
ellipsis: true,
|
||||
dataIndex: 'course_name',
|
||||
width: 190,
|
||||
align: 'center',
|
||||
className: ReuseShixunModalmodules.tableCell,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
||||
href: "/classrooms/".concat(record.course_id),
|
||||
children: text
|
||||
});
|
||||
}
|
||||
};
|
||||
reproducibleShixunColumns = [param].concat(toConsumableArray_default()(reproducibleShixunColumns));
|
||||
irreproducibleShixunColumns = [param].concat(toConsumableArray_default()(irreproducibleShixunColumns));
|
||||
}
|
||||
var dynamicBrief = (0,_react_17_0_2_react.useMemo)(function () {
|
||||
return generateBrief({
|
||||
used: renderData === null || renderData === void 0 ? void 0 : renderData.repeat_shixun_num,
|
||||
copy: renderData === null || renderData === void 0 ? void 0 : renderData.can_copy_num,
|
||||
canNotCopy: renderData === null || renderData === void 0 ? void 0 : renderData.no_copy_num,
|
||||
studentNames: renderData === null || renderData === void 0 ? void 0 : renderData.student_names,
|
||||
studentCount: renderData === null || renderData === void 0 ? void 0 : renderData.student_count,
|
||||
is_random: renderData === null || renderData === void 0 ? void 0 : renderData.is_random,
|
||||
inPaper: inPaper,
|
||||
position: position
|
||||
});
|
||||
}, [renderData, inPaper, position]);
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
title: "\u63D0\u793A",
|
||||
centered: true,
|
||||
open: visible,
|
||||
confirmLoading: confirmLoading,
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
||||
var formValues, ids;
|
||||
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
||||
while (1) switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
setConfirmLoading(true);
|
||||
formValues = form.getFieldsValue();
|
||||
ids = Object.keys(formValues).map(function (key) {
|
||||
return {
|
||||
id: parseInt(key.split('_')[0]),
|
||||
course_id: parseInt(key.split('_')[1]),
|
||||
is_use: formValues[key].is_use,
|
||||
is_copy: formValues[key].is_copy
|
||||
};
|
||||
});
|
||||
_context4.next = 5;
|
||||
return onOk(ids);
|
||||
case 5:
|
||||
setConfirmLoading(false);
|
||||
case 6:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
}
|
||||
}, _callee4);
|
||||
})),
|
||||
onCancel: onCancel,
|
||||
width: 880,
|
||||
okText: "\u786E\u8BA4",
|
||||
className: ReuseShixunModalmodules.antdModal,
|
||||
destroyOnClose: true,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
form: form,
|
||||
preserve: false,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.brief,
|
||||
children: dynamicBrief
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
style: {
|
||||
marginBottom: 30
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
marginBottom: 20
|
||||
},
|
||||
children: "* \u8BF4\u660E"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
marginBottom: 20
|
||||
},
|
||||
children: "1\u3001\u590D\u5236\uFF1A\u7CFB\u7EDF\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u53D1\u9001\u5230\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF08\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF09\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\u3002"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.orangeColor,
|
||||
children: "2\u3001\u4E0D\u590D\u5236\uFF1A\u5F53\u524D\u9879\u76EE\u4F1A\u88AB\u76F4\u63A5\u53D1\u9001\u5230\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u6311\u6218\u8FC7\u8BE5\u9879\u76EE\u7684\u5B66\u751F\u518D\u6B21\u8FDB\u5165\u9879\u76EE\u5F00\u542F\u6311\u6218\u65F6\uFF0C\u4F1A\u6E05\u7A7A\u4E4B\u524D\u7684\u6311\u6218\u8BB0\u5F55\u3002"
|
||||
})]
|
||||
}), (renderData === null || renderData === void 0 ? void 0 : renderData.can_copy_num) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.contentTitle,
|
||||
children: "\u652F\u6301\u590D\u5236\u7684\u9879\u76EE"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
columns: reproducibleShixunColumns,
|
||||
className: ReuseShixunModalmodules.antdTable,
|
||||
dataSource: renderData === null || renderData === void 0 ? void 0 : renderData.can_copy_list,
|
||||
rowKey: type === 'subject' ? "stage_shixun_id" : 'id',
|
||||
pagination: false,
|
||||
scroll: {
|
||||
y: 240
|
||||
},
|
||||
bordered: true
|
||||
})]
|
||||
}), (renderData === null || renderData === void 0 ? void 0 : renderData.no_copy_num) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ReuseShixunModalmodules.contentTitle,
|
||||
children: "\u4E0D\u652F\u6301\u590D\u5236\u7684\u9879\u76EE"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
columns: irreproducibleShixunColumns,
|
||||
className: ReuseShixunModalmodules.antdTable,
|
||||
dataSource: renderData === null || renderData === void 0 ? void 0 : renderData.no_copy_list,
|
||||
rowKey: type === 'subject' ? "stage_shixun_id" : 'id',
|
||||
pagination: false,
|
||||
scroll: {
|
||||
y: 200
|
||||
},
|
||||
bordered: true
|
||||
})]
|
||||
}), (renderData === null || renderData === void 0 ? void 0 : renderData.no_use_list.length) > 0 && (renderData === null || renderData === void 0 ? void 0 : renderData.no_use_list.map(function (record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_copy'],
|
||||
hidden: true,
|
||||
initialValue: 0,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
type: "hidden"
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: ["".concat(type === 'subject' ? record === null || record === void 0 ? void 0 : record.stage_shixun_id : record.shixun_course_id || record.id), 'is_use'],
|
||||
hidden: true,
|
||||
initialValue: 1,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
type: "hidden"
|
||||
})
|
||||
})]
|
||||
}, type === 'subject' ? record.stage_shixun_id : record.shixun_course_id || record.id);
|
||||
}))]
|
||||
})
|
||||
});
|
||||
};
|
||||
var ReuseShixunModal = function ReuseShixunModal(props) {
|
||||
var modalType = props.modalType;
|
||||
return modalType === 'multiple' ? /*#__PURE__*/(0,jsx_runtime.jsx)(ReuseMultipleShixunModal, objectSpread2_default()({}, props)) : /*#__PURE__*/(0,jsx_runtime.jsx)(ReuseSingleShixunModal, objectSpread2_default()({}, props));
|
||||
};
|
||||
/* harmony default export */ var components_ReuseShixunModal = (ReuseShixunModal);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,876 @@
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[31989],{
|
||||
|
||||
/***/ 39225:
|
||||
/*!*******************************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
|
||||
\*******************************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(79384);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.0@@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(91851);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_ExclamationCircleOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 88522:
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js ***!
|
||||
\*****************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 45659);
|
||||
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ 99468);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
|
||||
/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ 92343);
|
||||
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 36355);
|
||||
/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ 57809);
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const {
|
||||
Option
|
||||
} = _select__WEBPACK_IMPORTED_MODULE_3__["default"];
|
||||
function isSelectOptionOrSelectOptGroup(child) {
|
||||
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
|
||||
}
|
||||
const AutoComplete = (props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
className,
|
||||
popupClassName,
|
||||
dropdownClassName,
|
||||
children,
|
||||
dataSource
|
||||
} = props;
|
||||
const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children);
|
||||
// ============================= Input =============================
|
||||
let customizeInput;
|
||||
if (childNodes.length === 1 && (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
|
||||
[customizeInput] = childNodes;
|
||||
}
|
||||
const getInputElement = customizeInput ? () => customizeInput : undefined;
|
||||
// ============================ Options ============================
|
||||
let optionChildren;
|
||||
// [Legacy] convert `children` or `dataSource` into option children
|
||||
if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
|
||||
optionChildren = children;
|
||||
} else {
|
||||
optionChildren = dataSource ? dataSource.map(item => {
|
||||
if ((0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(item)) {
|
||||
return item;
|
||||
}
|
||||
switch (typeof item) {
|
||||
case 'string':
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
|
||||
key: item,
|
||||
value: item
|
||||
}, item);
|
||||
case 'object':
|
||||
{
|
||||
const {
|
||||
value: optionValue
|
||||
} = item;
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
|
||||
key: optionValue,
|
||||
value: optionValue
|
||||
}, item.text);
|
||||
}
|
||||
default:
|
||||
false ? 0 : void 0;
|
||||
return undefined;
|
||||
}
|
||||
}) : [];
|
||||
}
|
||||
if (false) {}
|
||||
const {
|
||||
getPrefixCls
|
||||
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_);
|
||||
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_select__WEBPACK_IMPORTED_MODULE_3__["default"], Object.assign({
|
||||
ref: ref,
|
||||
suffixIcon: null
|
||||
}, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props, ['dataSource', 'dropdownClassName']), {
|
||||
prefixCls: prefixCls,
|
||||
popupClassName: popupClassName || dropdownClassName,
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-auto-complete`, className),
|
||||
mode: _select__WEBPACK_IMPORTED_MODULE_3__["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE
|
||||
}, {
|
||||
// Internal api
|
||||
getInputElement
|
||||
}), optionChildren);
|
||||
};
|
||||
const RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(AutoComplete);
|
||||
// We don't care debug panel
|
||||
/* istanbul ignore next */
|
||||
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(RefAutoComplete);
|
||||
RefAutoComplete.Option = Option;
|
||||
RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
||||
if (false) {}
|
||||
/* harmony default export */ __webpack_exports__.Z = (RefAutoComplete);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 28103:
|
||||
/*!***********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
|
||||
\***********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ divider; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
||||
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
||||
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
||||
var style = __webpack_require__(17313);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
||||
var genComponentStyleHook = __webpack_require__(83116);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
||||
var statistic = __webpack_require__(37613);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
|
||||
|
||||
|
||||
// ============================== Shared ==============================
|
||||
const genSharedDividerStyle = token => {
|
||||
const {
|
||||
componentCls,
|
||||
sizePaddingEdgeHorizontal,
|
||||
colorSplit,
|
||||
lineWidth,
|
||||
textPaddingInline,
|
||||
orientationMargin,
|
||||
verticalMarginInline
|
||||
} = token;
|
||||
return {
|
||||
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
||||
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
||||
// vertical
|
||||
'&-vertical': {
|
||||
position: 'relative',
|
||||
top: '-0.06em',
|
||||
display: 'inline-block',
|
||||
height: '0.9em',
|
||||
marginInline: verticalMarginInline,
|
||||
marginBlock: 0,
|
||||
verticalAlign: 'middle',
|
||||
borderTop: 0,
|
||||
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
||||
},
|
||||
'&-horizontal': {
|
||||
display: 'flex',
|
||||
clear: 'both',
|
||||
width: '100%',
|
||||
minWidth: '100%',
|
||||
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
||||
},
|
||||
[`&-horizontal${componentCls}-with-text`]: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
||||
color: token.colorTextHeading,
|
||||
fontWeight: 500,
|
||||
fontSize: token.fontSizeLG,
|
||||
whiteSpace: 'nowrap',
|
||||
textAlign: 'center',
|
||||
borderBlockStart: `0 ${colorSplit}`,
|
||||
'&::before, &::after': {
|
||||
position: 'relative',
|
||||
width: '50%',
|
||||
borderBlockStart: `${lineWidth}px solid transparent`,
|
||||
// Chrome not accept `inherit` in `border-top`
|
||||
borderBlockStartColor: 'inherit',
|
||||
borderBlockEnd: 0,
|
||||
transform: 'translateY(50%)',
|
||||
content: "''"
|
||||
}
|
||||
},
|
||||
[`&-horizontal${componentCls}-with-text-left`]: {
|
||||
'&::before': {
|
||||
width: `${orientationMargin * 100}%`
|
||||
},
|
||||
'&::after': {
|
||||
width: `${100 - orientationMargin * 100}%`
|
||||
}
|
||||
},
|
||||
[`&-horizontal${componentCls}-with-text-right`]: {
|
||||
'&::before': {
|
||||
width: `${100 - orientationMargin * 100}%`
|
||||
},
|
||||
'&::after': {
|
||||
width: `${orientationMargin * 100}%`
|
||||
}
|
||||
},
|
||||
[`${componentCls}-inner-text`]: {
|
||||
display: 'inline-block',
|
||||
paddingBlock: 0,
|
||||
paddingInline: textPaddingInline
|
||||
},
|
||||
'&-dashed': {
|
||||
background: 'none',
|
||||
borderColor: colorSplit,
|
||||
borderStyle: 'dashed',
|
||||
borderWidth: `${lineWidth}px 0 0`
|
||||
},
|
||||
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
||||
'&::before, &::after': {
|
||||
borderStyle: 'dashed none none'
|
||||
}
|
||||
},
|
||||
[`&-vertical${componentCls}-dashed`]: {
|
||||
borderInlineStartWidth: lineWidth,
|
||||
borderInlineEnd: 0,
|
||||
borderBlockStart: 0,
|
||||
borderBlockEnd: 0
|
||||
},
|
||||
[`&-plain${componentCls}-with-text`]: {
|
||||
color: token.colorText,
|
||||
fontWeight: 'normal',
|
||||
fontSize: token.fontSize
|
||||
},
|
||||
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
||||
'&::before': {
|
||||
width: 0
|
||||
},
|
||||
'&::after': {
|
||||
width: '100%'
|
||||
},
|
||||
[`${componentCls}-inner-text`]: {
|
||||
paddingInlineStart: sizePaddingEdgeHorizontal
|
||||
}
|
||||
},
|
||||
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
||||
'&::before': {
|
||||
width: '100%'
|
||||
},
|
||||
'&::after': {
|
||||
width: 0
|
||||
},
|
||||
[`${componentCls}-inner-text`]: {
|
||||
paddingInlineEnd: sizePaddingEdgeHorizontal
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
};
|
||||
// ============================== Export ==============================
|
||||
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
||||
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
||||
dividerHorizontalWithTextGutterMargin: token.margin,
|
||||
dividerHorizontalGutterMargin: token.marginLG,
|
||||
sizePaddingEdgeHorizontal: 0
|
||||
});
|
||||
return [genSharedDividerStyle(dividerToken)];
|
||||
}, token => ({
|
||||
textPaddingInline: '1em',
|
||||
orientationMargin: 0.05,
|
||||
verticalMarginInline: token.marginXS
|
||||
})));
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
|
||||
"use client";
|
||||
|
||||
var __rest = undefined && undefined.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Divider = props => {
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction,
|
||||
divider
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
type = 'horizontal',
|
||||
orientation = 'center',
|
||||
orientationMargin,
|
||||
className,
|
||||
rootClassName,
|
||||
children,
|
||||
dashed,
|
||||
plain,
|
||||
style
|
||||
} = props,
|
||||
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
||||
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = divider_style(prefixCls);
|
||||
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
||||
const hasChildren = !!children;
|
||||
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
||||
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
||||
const classString = _classnames_2_5_1_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
||||
[`${prefixCls}-with-text`]: hasChildren,
|
||||
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
||||
[`${prefixCls}-dashed`]: !!dashed,
|
||||
[`${prefixCls}-plain`]: !!plain,
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
||||
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
||||
}, className, rootClassName);
|
||||
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
|
||||
if (typeof orientationMargin === 'number') {
|
||||
return orientationMargin;
|
||||
}
|
||||
if (/^\d+$/.test(orientationMargin)) {
|
||||
return Number(orientationMargin);
|
||||
}
|
||||
return orientationMargin;
|
||||
}, [orientationMargin]);
|
||||
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
||||
marginLeft: memoizedOrientationMargin
|
||||
}), hasCustomMarginRight && {
|
||||
marginRight: memoizedOrientationMargin
|
||||
});
|
||||
// Warning children not work in vertical mode
|
||||
if (false) {}
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
||||
className: classString,
|
||||
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
||||
}, restProps, {
|
||||
role: "separator"
|
||||
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${prefixCls}-inner-text`,
|
||||
style: innerStyle
|
||||
}, children)));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var divider = (Divider);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 44000:
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/layout/index.js ***!
|
||||
\**********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layout */ 84966);
|
||||
/* harmony import */ var _Sider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Sider */ 72792);
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Layout = _layout__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP;
|
||||
Layout.Header = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Header */ .h4;
|
||||
Layout.Footer = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Footer */ .$_;
|
||||
Layout.Content = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Content */ .VY;
|
||||
Layout.Sider = _Sider__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
||||
/* harmony default export */ __webpack_exports__.Z = (Layout);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83145:
|
||||
/*!**********************************************************************************************!*\
|
||||
!*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/Component.js ***!
|
||||
\**********************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.CopyToClipboard = void 0;
|
||||
|
||||
var _react = _interopRequireDefault(__webpack_require__(/*! react */ 59301));
|
||||
|
||||
var _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ 25769));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
|
||||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
var CopyToClipboard =
|
||||
/*#__PURE__*/
|
||||
function (_React$PureComponent) {
|
||||
_inherits(CopyToClipboard, _React$PureComponent);
|
||||
|
||||
function CopyToClipboard() {
|
||||
var _getPrototypeOf2;
|
||||
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, CopyToClipboard);
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
||||
|
||||
_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
|
||||
var _this$props = _this.props,
|
||||
text = _this$props.text,
|
||||
onCopy = _this$props.onCopy,
|
||||
children = _this$props.children,
|
||||
options = _this$props.options;
|
||||
|
||||
var elem = _react["default"].Children.only(children);
|
||||
|
||||
var result = (0, _copyToClipboard["default"])(text, options);
|
||||
|
||||
if (onCopy) {
|
||||
onCopy(text, result);
|
||||
} // Bypass onClick if it was present
|
||||
|
||||
|
||||
if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
||||
elem.props.onClick(event);
|
||||
}
|
||||
});
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(CopyToClipboard, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props2 = this.props,
|
||||
_text = _this$props2.text,
|
||||
_onCopy = _this$props2.onCopy,
|
||||
_options = _this$props2.options,
|
||||
children = _this$props2.children,
|
||||
props = _objectWithoutProperties(_this$props2, ["text", "onCopy", "options", "children"]);
|
||||
|
||||
var elem = _react["default"].Children.only(children);
|
||||
|
||||
return _react["default"].cloneElement(elem, _objectSpread({}, props, {
|
||||
onClick: this.onClick
|
||||
}));
|
||||
}
|
||||
}]);
|
||||
|
||||
return CopyToClipboard;
|
||||
}(_react["default"].PureComponent);
|
||||
|
||||
exports.CopyToClipboard = CopyToClipboard;
|
||||
|
||||
_defineProperty(CopyToClipboard, "defaultProps", {
|
||||
onCopy: undefined,
|
||||
options: undefined
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56102:
|
||||
/*!******************************************************************************************!*\
|
||||
!*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js ***!
|
||||
\******************************************************************************************/
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _require = __webpack_require__(/*! ./Component */ 83145),
|
||||
CopyToClipboard = _require.CopyToClipboard;
|
||||
|
||||
CopyToClipboard.CopyToClipboard = CopyToClipboard;
|
||||
module.exports = CopyToClipboard;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 51581:
|
||||
/*!****************************************************************************************************!*\
|
||||
!*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/dist/InfiniteScroll.js ***!
|
||||
\****************************************************************************************************/
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _react = __webpack_require__(/*! react */ 59301);
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
|
||||
var _propTypes = __webpack_require__(/*! prop-types */ 12708);
|
||||
|
||||
var _propTypes2 = _interopRequireDefault(_propTypes);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var InfiniteScroll = function (_Component) {
|
||||
_inherits(InfiniteScroll, _Component);
|
||||
|
||||
function InfiniteScroll(props) {
|
||||
_classCallCheck(this, InfiniteScroll);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));
|
||||
|
||||
_this.scrollListener = _this.scrollListener.bind(_this);
|
||||
_this.eventListenerOptions = _this.eventListenerOptions.bind(_this);
|
||||
_this.mousewheelListener = _this.mousewheelListener.bind(_this);
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(InfiniteScroll, [{
|
||||
key: 'componentDidMount',
|
||||
value: function componentDidMount() {
|
||||
this.pageLoaded = this.props.pageStart;
|
||||
this.options = this.eventListenerOptions();
|
||||
this.attachScrollListener();
|
||||
}
|
||||
}, {
|
||||
key: 'componentDidUpdate',
|
||||
value: function componentDidUpdate() {
|
||||
if (this.props.isReverse && this.loadMore) {
|
||||
var parentElement = this.getParentElement(this.scrollComponent);
|
||||
parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;
|
||||
this.loadMore = false;
|
||||
}
|
||||
this.attachScrollListener();
|
||||
}
|
||||
}, {
|
||||
key: 'componentWillUnmount',
|
||||
value: function componentWillUnmount() {
|
||||
this.detachScrollListener();
|
||||
this.detachMousewheelListener();
|
||||
}
|
||||
}, {
|
||||
key: 'isPassiveSupported',
|
||||
value: function isPassiveSupported() {
|
||||
var passive = false;
|
||||
|
||||
var testOptions = {
|
||||
get passive() {
|
||||
passive = true;
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
document.addEventListener('test', null, testOptions);
|
||||
document.removeEventListener('test', null, testOptions);
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
return passive;
|
||||
}
|
||||
}, {
|
||||
key: 'eventListenerOptions',
|
||||
value: function eventListenerOptions() {
|
||||
var options = this.props.useCapture;
|
||||
|
||||
if (this.isPassiveSupported()) {
|
||||
options = {
|
||||
useCapture: this.props.useCapture,
|
||||
passive: true
|
||||
};
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
// Set a defaut loader for all your `InfiniteScroll` components
|
||||
|
||||
}, {
|
||||
key: 'setDefaultLoader',
|
||||
value: function setDefaultLoader(loader) {
|
||||
this.defaultLoader = loader;
|
||||
}
|
||||
}, {
|
||||
key: 'detachMousewheelListener',
|
||||
value: function detachMousewheelListener() {
|
||||
var scrollEl = window;
|
||||
if (this.props.useWindow === false) {
|
||||
scrollEl = this.scrollComponent.parentNode;
|
||||
}
|
||||
|
||||
scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
||||
}
|
||||
}, {
|
||||
key: 'detachScrollListener',
|
||||
value: function detachScrollListener() {
|
||||
var scrollEl = window;
|
||||
if (this.props.useWindow === false) {
|
||||
scrollEl = this.getParentElement(this.scrollComponent);
|
||||
}
|
||||
|
||||
scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
}
|
||||
}, {
|
||||
key: 'getParentElement',
|
||||
value: function getParentElement(el) {
|
||||
var scrollParent = this.props.getScrollParent && this.props.getScrollParent();
|
||||
if (scrollParent != null) {
|
||||
return scrollParent;
|
||||
}
|
||||
return el && el.parentNode;
|
||||
}
|
||||
}, {
|
||||
key: 'filterProps',
|
||||
value: function filterProps(props) {
|
||||
return props;
|
||||
}
|
||||
}, {
|
||||
key: 'attachScrollListener',
|
||||
value: function attachScrollListener() {
|
||||
var parentElement = this.getParentElement(this.scrollComponent);
|
||||
|
||||
if (!this.props.hasMore || !parentElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
var scrollEl = window;
|
||||
if (this.props.useWindow === false) {
|
||||
scrollEl = parentElement;
|
||||
}
|
||||
|
||||
scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
||||
scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
||||
|
||||
if (this.props.initialLoad) {
|
||||
this.scrollListener();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'mousewheelListener',
|
||||
value: function mousewheelListener(e) {
|
||||
// Prevents Chrome hangups
|
||||
// See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257
|
||||
if (e.deltaY === 1 && !this.isPassiveSupported()) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'scrollListener',
|
||||
value: function scrollListener() {
|
||||
var el = this.scrollComponent;
|
||||
var scrollEl = window;
|
||||
var parentNode = this.getParentElement(el);
|
||||
|
||||
var offset = void 0;
|
||||
if (this.props.useWindow) {
|
||||
var doc = document.documentElement || document.body.parentNode || document.body;
|
||||
var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;
|
||||
if (this.props.isReverse) {
|
||||
offset = scrollTop;
|
||||
} else {
|
||||
offset = this.calculateOffset(el, scrollTop);
|
||||
}
|
||||
} else if (this.props.isReverse) {
|
||||
offset = parentNode.scrollTop;
|
||||
} else {
|
||||
offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;
|
||||
}
|
||||
|
||||
// Here we make sure the element is visible as well as checking the offset
|
||||
if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {
|
||||
this.detachScrollListener();
|
||||
this.beforeScrollHeight = parentNode.scrollHeight;
|
||||
this.beforeScrollTop = parentNode.scrollTop;
|
||||
// Call loadMore after detachScrollListener to allow for non-async loadMore functions
|
||||
if (typeof this.props.loadMore === 'function') {
|
||||
this.props.loadMore(this.pageLoaded += 1);
|
||||
this.loadMore = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'calculateOffset',
|
||||
value: function calculateOffset(el, scrollTop) {
|
||||
if (!el) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);
|
||||
}
|
||||
}, {
|
||||
key: 'calculateTopPosition',
|
||||
value: function calculateTopPosition(el) {
|
||||
if (!el) {
|
||||
return 0;
|
||||
}
|
||||
return el.offsetTop + this.calculateTopPosition(el.offsetParent);
|
||||
}
|
||||
}, {
|
||||
key: 'render',
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
var renderProps = this.filterProps(this.props);
|
||||
|
||||
var children = renderProps.children,
|
||||
element = renderProps.element,
|
||||
hasMore = renderProps.hasMore,
|
||||
initialLoad = renderProps.initialLoad,
|
||||
isReverse = renderProps.isReverse,
|
||||
loader = renderProps.loader,
|
||||
loadMore = renderProps.loadMore,
|
||||
pageStart = renderProps.pageStart,
|
||||
ref = renderProps.ref,
|
||||
threshold = renderProps.threshold,
|
||||
useCapture = renderProps.useCapture,
|
||||
useWindow = renderProps.useWindow,
|
||||
getScrollParent = renderProps.getScrollParent,
|
||||
props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);
|
||||
|
||||
props.ref = function (node) {
|
||||
_this2.scrollComponent = node;
|
||||
if (ref) {
|
||||
ref(node);
|
||||
}
|
||||
};
|
||||
|
||||
var childrenArray = [children];
|
||||
if (hasMore) {
|
||||
if (loader) {
|
||||
isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);
|
||||
} else if (this.defaultLoader) {
|
||||
isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);
|
||||
}
|
||||
}
|
||||
return _react2.default.createElement(element, props, childrenArray);
|
||||
}
|
||||
}]);
|
||||
|
||||
return InfiniteScroll;
|
||||
}(_react.Component);
|
||||
|
||||
InfiniteScroll.propTypes = {
|
||||
children: _propTypes2.default.node.isRequired,
|
||||
element: _propTypes2.default.node,
|
||||
hasMore: _propTypes2.default.bool,
|
||||
initialLoad: _propTypes2.default.bool,
|
||||
isReverse: _propTypes2.default.bool,
|
||||
loader: _propTypes2.default.node,
|
||||
loadMore: _propTypes2.default.func.isRequired,
|
||||
pageStart: _propTypes2.default.number,
|
||||
ref: _propTypes2.default.func,
|
||||
getScrollParent: _propTypes2.default.func,
|
||||
threshold: _propTypes2.default.number,
|
||||
useCapture: _propTypes2.default.bool,
|
||||
useWindow: _propTypes2.default.bool
|
||||
};
|
||||
InfiniteScroll.defaultProps = {
|
||||
element: 'div',
|
||||
hasMore: false,
|
||||
initialLoad: true,
|
||||
pageStart: 0,
|
||||
ref: null,
|
||||
threshold: 250,
|
||||
useWindow: true,
|
||||
isReverse: false,
|
||||
useCapture: false,
|
||||
loader: null,
|
||||
getScrollParent: null
|
||||
};
|
||||
exports["default"] = InfiniteScroll;
|
||||
module.exports = exports['default'];
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26724:
|
||||
/*!**************************************************************************************!*\
|
||||
!*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js ***!
|
||||
\**************************************************************************************/
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 51581)
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue