parent
9eed6552ae
commit
971cd4a890
@ -0,0 +1,781 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[25156,64802,34668,54512],{
|
||||
|
||||
/***/ 15997:
|
||||
/*!*****************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
|
||||
\*****************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_EyeOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(38329);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/EyeOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
|
||||
|
||||
// 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/EyeOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_EyeOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 38854:
|
||||
/*!************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules ***!
|
||||
\************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ es_dropdown; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
||||
var dropdown = __webpack_require__(91857);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules
|
||||
var EllipsisOutlined = __webpack_require__(93319);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// 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/space/index.js + 3 modules
|
||||
var space = __webpack_require__(81327);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
||||
var Compact = __webpack_require__(33234);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js + 1 modules
|
||||
var style = __webpack_require__(47211);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown-button.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 DropdownButton = props => {
|
||||
const {
|
||||
getPopupContainer: getContextPopupContainer,
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
type = 'default',
|
||||
danger,
|
||||
disabled,
|
||||
loading,
|
||||
onClick,
|
||||
htmlType,
|
||||
children,
|
||||
className,
|
||||
menu,
|
||||
arrow,
|
||||
autoFocus,
|
||||
overlay,
|
||||
trigger,
|
||||
align,
|
||||
open,
|
||||
onOpenChange,
|
||||
placement,
|
||||
getPopupContainer,
|
||||
href,
|
||||
icon = /*#__PURE__*/_react_17_0_2_react.createElement(EllipsisOutlined/* default */.Z, null),
|
||||
title,
|
||||
buttonsRender = buttons => buttons,
|
||||
mouseEnterDelay,
|
||||
mouseLeaveDelay,
|
||||
overlayClassName,
|
||||
overlayStyle,
|
||||
destroyPopupOnHide,
|
||||
dropdownRender
|
||||
} = props,
|
||||
restProps = __rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]);
|
||||
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
||||
const buttonPrefixCls = `${prefixCls}-button`;
|
||||
const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls);
|
||||
const dropdownProps = {
|
||||
menu,
|
||||
arrow,
|
||||
autoFocus,
|
||||
align,
|
||||
disabled,
|
||||
trigger: disabled ? [] : trigger,
|
||||
onOpenChange,
|
||||
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
||||
mouseEnterDelay,
|
||||
mouseLeaveDelay,
|
||||
overlayClassName,
|
||||
overlayStyle,
|
||||
destroyPopupOnHide,
|
||||
dropdownRender
|
||||
};
|
||||
const {
|
||||
compactSize,
|
||||
compactItemClassnames
|
||||
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
||||
const classes = _classnames_2_3_2_classnames_default()(buttonPrefixCls, compactItemClassnames, className, hashId);
|
||||
if ('overlay' in props) {
|
||||
dropdownProps.overlay = overlay;
|
||||
}
|
||||
if ('open' in props) {
|
||||
dropdownProps.open = open;
|
||||
}
|
||||
if ('placement' in props) {
|
||||
dropdownProps.placement = placement;
|
||||
} else {
|
||||
dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';
|
||||
}
|
||||
const leftButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
||||
type: type,
|
||||
danger: danger,
|
||||
disabled: disabled,
|
||||
loading: loading,
|
||||
onClick: onClick,
|
||||
htmlType: htmlType,
|
||||
href: href,
|
||||
title: title
|
||||
}, children);
|
||||
const rightButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
||||
type: type,
|
||||
danger: danger,
|
||||
icon: icon
|
||||
});
|
||||
const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(space/* default */.Z.Compact, Object.assign({
|
||||
className: classes,
|
||||
size: compactSize,
|
||||
block: true
|
||||
}, restProps), leftButtonToRender, /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({}, dropdownProps), rightButtonToRender)));
|
||||
};
|
||||
DropdownButton.__ANT_BUTTON = true;
|
||||
/* harmony default export */ var dropdown_button = (DropdownButton);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Dropdown = dropdown/* default */.Z;
|
||||
Dropdown.Button = dropdown_button;
|
||||
/* harmony default export */ var es_dropdown = (Dropdown);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1056:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ input; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
|
||||
var form_context = __webpack_require__(32441);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/style/index.js
|
||||
var style = __webpack_require__(9937);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Group.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Group = props => {
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
className
|
||||
} = props;
|
||||
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
|
||||
const inputPrefixCls = getPrefixCls('input');
|
||||
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
|
||||
const cls = _classnames_2_3_2_classnames_default()(prefixCls, {
|
||||
[`${prefixCls}-lg`]: props.size === 'large',
|
||||
[`${prefixCls}-sm`]: props.size === 'small',
|
||||
[`${prefixCls}-compact`]: props.compact,
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl'
|
||||
}, hashId, className);
|
||||
const formItemContext = (0,_react_17_0_2_react.useContext)(form_context/* FormItemInputContext */.aM);
|
||||
const groupFormItemContext = (0,_react_17_0_2_react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
|
||||
isFormItemInput: false
|
||||
}), [formItemContext]);
|
||||
if (false) {}
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: cls,
|
||||
style: props.style,
|
||||
onMouseEnter: props.onMouseEnter,
|
||||
onMouseLeave: props.onMouseLeave,
|
||||
onFocus: props.onFocus,
|
||||
onBlur: props.onBlur
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* FormItemInputContext */.aM.Provider, {
|
||||
value: groupFormItemContext
|
||||
}, props.children)));
|
||||
};
|
||||
/* harmony default export */ var input_Group = (Group);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Input.js + 1 modules
|
||||
var Input = __webpack_require__(9432);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(38329);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
|
||||
|
||||
// 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/EyeInvisibleOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_EyeInvisibleOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
||||
var EyeOutlined = __webpack_require__(15997);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js
|
||||
var omit = __webpack_require__(99468);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/ref.js
|
||||
var es_ref = __webpack_require__(88831);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/hooks/useRemovePasswordTimeout.js
|
||||
var useRemovePasswordTimeout = __webpack_require__(59412);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Password.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 defaultIconRender = visible => visible ? /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_EyeInvisibleOutlined, null);
|
||||
const ActionMap = {
|
||||
click: 'onClick',
|
||||
hover: 'onMouseOver'
|
||||
};
|
||||
const Password = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
const {
|
||||
visibilityToggle = true
|
||||
} = props;
|
||||
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
|
||||
const [visible, setVisible] = (0,_react_17_0_2_react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
|
||||
const inputRef = (0,_react_17_0_2_react.useRef)(null);
|
||||
_react_17_0_2_react.useEffect(() => {
|
||||
if (visibilityControlled) {
|
||||
setVisible(visibilityToggle.visible);
|
||||
}
|
||||
}, [visibilityControlled, visibilityToggle]);
|
||||
// Remove Password value
|
||||
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
|
||||
const onVisibleChange = () => {
|
||||
const {
|
||||
disabled
|
||||
} = props;
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
if (visible) {
|
||||
removePasswordTimeout();
|
||||
}
|
||||
setVisible(prevState => {
|
||||
var _a;
|
||||
const newState = !prevState;
|
||||
if (typeof visibilityToggle === 'object') {
|
||||
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
|
||||
}
|
||||
return newState;
|
||||
});
|
||||
};
|
||||
const getIcon = prefixCls => {
|
||||
const {
|
||||
action = 'click',
|
||||
iconRender = defaultIconRender
|
||||
} = props;
|
||||
const iconTrigger = ActionMap[action] || '';
|
||||
const icon = iconRender(visible);
|
||||
const iconProps = {
|
||||
[iconTrigger]: onVisibleChange,
|
||||
className: `${prefixCls}-icon`,
|
||||
key: 'passwordIcon',
|
||||
onMouseDown: e => {
|
||||
// Prevent focused state lost
|
||||
// https://github.com/ant-design/ant-design/issues/15173
|
||||
e.preventDefault();
|
||||
},
|
||||
onMouseUp: e => {
|
||||
// Prevent caret position change
|
||||
// https://github.com/ant-design/ant-design/issues/23524
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
return /*#__PURE__*/_react_17_0_2_react.cloneElement( /*#__PURE__*/_react_17_0_2_react.isValidElement(icon) ? icon : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, icon), iconProps);
|
||||
};
|
||||
const {
|
||||
className,
|
||||
prefixCls: customizePrefixCls,
|
||||
inputPrefixCls: customizeInputPrefixCls,
|
||||
size
|
||||
} = props,
|
||||
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
|
||||
const {
|
||||
getPrefixCls
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
|
||||
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
||||
const inputClassName = _classnames_2_3_2_classnames_default()(prefixCls, className, {
|
||||
[`${prefixCls}-${size}`]: !!size
|
||||
});
|
||||
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
|
||||
type: visible ? 'text' : 'password',
|
||||
className: inputClassName,
|
||||
prefixCls: inputPrefixCls,
|
||||
suffix: suffixIcon
|
||||
});
|
||||
if (size) {
|
||||
omittedProps.size = size;
|
||||
}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
||||
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
|
||||
}, omittedProps));
|
||||
});
|
||||
if (false) {}
|
||||
/* harmony default export */ var input_Password = (Password);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
||||
var SearchOutlined = __webpack_require__(46820);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
||||
var reactNode = __webpack_require__(92343);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
||||
var useSize = __webpack_require__(19716);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
||||
var Compact = __webpack_require__(33234);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Search.js
|
||||
"use client";
|
||||
|
||||
var Search_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 Search = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
inputPrefixCls: customizeInputPrefixCls,
|
||||
className,
|
||||
size: customizeSize,
|
||||
suffix,
|
||||
enterButton = false,
|
||||
addonAfter,
|
||||
loading,
|
||||
disabled,
|
||||
onSearch: customOnSearch,
|
||||
onChange: customOnChange,
|
||||
onCompositionStart,
|
||||
onCompositionEnd
|
||||
} = props,
|
||||
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const composedRef = _react_17_0_2_react.useRef(false);
|
||||
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
|
||||
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||
const {
|
||||
compactSize
|
||||
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
||||
const size = (0,useSize/* default */.Z)(ctx => {
|
||||
var _a;
|
||||
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
||||
});
|
||||
const inputRef = _react_17_0_2_react.useRef(null);
|
||||
const onChange = e => {
|
||||
if (e && e.target && e.type === 'click' && customOnSearch) {
|
||||
customOnSearch(e.target.value, e, {
|
||||
source: 'clear'
|
||||
});
|
||||
}
|
||||
if (customOnChange) {
|
||||
customOnChange(e);
|
||||
}
|
||||
};
|
||||
const onMouseDown = e => {
|
||||
var _a;
|
||||
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
const onSearch = e => {
|
||||
var _a, _b;
|
||||
if (customOnSearch) {
|
||||
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {
|
||||
source: 'input'
|
||||
});
|
||||
}
|
||||
};
|
||||
const onPressEnter = e => {
|
||||
if (composedRef.current || loading) {
|
||||
return;
|
||||
}
|
||||
onSearch(e);
|
||||
};
|
||||
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/_react_17_0_2_react.createElement(SearchOutlined/* default */.Z, null) : null;
|
||||
const btnClassName = `${prefixCls}-button`;
|
||||
let button;
|
||||
const enterButtonAsElement = enterButton || {};
|
||||
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
|
||||
if (isAntdButton || enterButtonAsElement.type === 'button') {
|
||||
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
|
||||
onMouseDown,
|
||||
onClick: e => {
|
||||
var _a, _b;
|
||||
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
||||
onSearch(e);
|
||||
},
|
||||
key: 'enterButton'
|
||||
}, isAntdButton ? {
|
||||
className: btnClassName,
|
||||
size
|
||||
} : {}));
|
||||
} else {
|
||||
button = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
||||
className: btnClassName,
|
||||
type: enterButton ? 'primary' : undefined,
|
||||
size: size,
|
||||
disabled: disabled,
|
||||
key: "enterButton",
|
||||
onMouseDown: onMouseDown,
|
||||
onClick: onSearch,
|
||||
loading: loading,
|
||||
icon: searchIcon
|
||||
}, enterButton);
|
||||
}
|
||||
if (addonAfter) {
|
||||
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
|
||||
key: 'addonAfter'
|
||||
})];
|
||||
}
|
||||
const cls = _classnames_2_3_2_classnames_default()(prefixCls, {
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-${size}`]: !!size,
|
||||
[`${prefixCls}-with-button`]: !!enterButton
|
||||
}, className);
|
||||
const handleOnCompositionStart = e => {
|
||||
composedRef.current = true;
|
||||
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
|
||||
};
|
||||
const handleOnCompositionEnd = e => {
|
||||
composedRef.current = false;
|
||||
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
|
||||
};
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
||||
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
|
||||
onPressEnter: onPressEnter
|
||||
}, restProps, {
|
||||
size: size,
|
||||
onCompositionStart: handleOnCompositionStart,
|
||||
onCompositionEnd: handleOnCompositionEnd,
|
||||
prefixCls: inputPrefixCls,
|
||||
addonAfter: button,
|
||||
suffix: suffix,
|
||||
onChange: onChange,
|
||||
className: cls,
|
||||
disabled: disabled
|
||||
}));
|
||||
});
|
||||
if (false) {}
|
||||
/* harmony default export */ var input_Search = (Search);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/TextArea.js
|
||||
var TextArea = __webpack_require__(1643);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const input_Input = Input/* default */.Z;
|
||||
if (false) {}
|
||||
input_Input.Group = input_Group;
|
||||
input_Input.Search = input_Search;
|
||||
input_Input.TextArea = TextArea/* default */.Z;
|
||||
input_Input.Password = input_Password;
|
||||
/* harmony default export */ var input = (input_Input);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 81327:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ space; }
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: SpaceContext
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Children/toArray.js
|
||||
var toArray = __webpack_require__(45659);
|
||||
// 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/space/Compact.js
|
||||
var Compact = __webpack_require__(33234);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/context.js
|
||||
|
||||
const SpaceContext = /*#__PURE__*/_react_17_0_2_react.createContext({
|
||||
latestIndex: 0
|
||||
});
|
||||
const SpaceContextProvider = SpaceContext.Provider;
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Item.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Item = _ref => {
|
||||
let {
|
||||
className,
|
||||
index,
|
||||
children,
|
||||
split,
|
||||
style
|
||||
} = _ref;
|
||||
const {
|
||||
latestIndex
|
||||
} = _react_17_0_2_react.useContext(SpaceContext);
|
||||
if (children === null || children === undefined) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: className,
|
||||
style: style
|
||||
}, children), index < latestIndex && split && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${className}-split`
|
||||
}, split));
|
||||
};
|
||||
/* harmony default export */ var space_Item = (Item);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/index.js + 1 modules
|
||||
var space_style = __webpack_require__(2856);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/utils.js
|
||||
function isPresetSize(size) {
|
||||
return ['small', 'middle', 'large'].includes(size);
|
||||
}
|
||||
function isValidGapNumber(size) {
|
||||
if (!size) {
|
||||
// The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.
|
||||
return false;
|
||||
}
|
||||
return typeof size === 'number' && !Number.isNaN(size);
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/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 Space = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
var _a, _b;
|
||||
const {
|
||||
getPrefixCls,
|
||||
space,
|
||||
direction: directionConfig
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const {
|
||||
size = (space === null || space === void 0 ? void 0 : space.size) || 'small',
|
||||
align,
|
||||
className,
|
||||
rootClassName,
|
||||
children,
|
||||
direction = 'horizontal',
|
||||
prefixCls: customizePrefixCls,
|
||||
split,
|
||||
style,
|
||||
wrap = false,
|
||||
classNames: customClassNames,
|
||||
styles
|
||||
} = props,
|
||||
otherProps = __rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]);
|
||||
const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];
|
||||
const isPresetVerticalSize = isPresetSize(verticalSize);
|
||||
const isPresetHorizontalSize = isPresetSize(horizontalSize);
|
||||
const isValidVerticalSize = isValidGapNumber(verticalSize);
|
||||
const isValidHorizontalSize = isValidGapNumber(horizontalSize);
|
||||
const childNodes = (0,toArray/* default */.Z)(children, {
|
||||
keepEmpty: true
|
||||
});
|
||||
const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;
|
||||
const prefixCls = getPrefixCls('space', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = (0,space_style/* default */.Z)(prefixCls);
|
||||
const cls = _classnames_2_3_2_classnames_default()(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, {
|
||||
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
|
||||
[`${prefixCls}-align-${mergedAlign}`]: mergedAlign,
|
||||
[`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,
|
||||
[`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize
|
||||
}, className, rootClassName);
|
||||
const itemClassName = _classnames_2_3_2_classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item);
|
||||
// Calculate latest one
|
||||
let latestIndex = 0;
|
||||
const nodes = childNodes.map((child, i) => {
|
||||
var _a, _b;
|
||||
if (child !== null && child !== undefined) {
|
||||
latestIndex = i;
|
||||
}
|
||||
const key = child && child.key || `${itemClassName}-${i}`;
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(space_Item, {
|
||||
className: itemClassName,
|
||||
key: key,
|
||||
index: i,
|
||||
split: split,
|
||||
style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item
|
||||
}, child);
|
||||
});
|
||||
const spaceContext = _react_17_0_2_react.useMemo(() => ({
|
||||
latestIndex
|
||||
}), [latestIndex]);
|
||||
// =========================== Render ===========================
|
||||
if (childNodes.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const gapStyle = {};
|
||||
if (wrap) {
|
||||
gapStyle.flexWrap = 'wrap';
|
||||
}
|
||||
if (!isPresetHorizontalSize && isValidHorizontalSize) {
|
||||
gapStyle.columnGap = horizontalSize;
|
||||
}
|
||||
if (!isPresetVerticalSize && isValidVerticalSize) {
|
||||
gapStyle.rowGap = verticalSize;
|
||||
}
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
||||
ref: ref,
|
||||
className: cls,
|
||||
style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style)
|
||||
}, otherProps), /*#__PURE__*/_react_17_0_2_react.createElement(SpaceContextProvider, {
|
||||
value: spaceContext
|
||||
}, nodes)));
|
||||
});
|
||||
if (false) {}
|
||||
const CompoundedSpace = Space;
|
||||
CompoundedSpace.Compact = Compact/* default */.ZP;
|
||||
/* harmony default export */ var space = (CompoundedSpace);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
@ -0,0 +1,952 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[68685,15569,64802,10375,34668,54512,25156],{
|
||||
|
||||
/***/ 15997:
|
||||
/*!*****************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
|
||||
\*****************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_EyeOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(38329);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/EyeOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
|
||||
|
||||
// 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/EyeOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_EyeOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56762:
|
||||
/*!************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js ***!
|
||||
\************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Z: function() { return /* binding */ useForceUpdate; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
||||
|
||||
function useForceUpdate() {
|
||||
const [, forceUpdate] = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(x => x + 1, 0);
|
||||
return forceUpdate;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 38854:
|
||||
/*!************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules ***!
|
||||
\************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ es_dropdown; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
||||
var dropdown = __webpack_require__(91857);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules
|
||||
var EllipsisOutlined = __webpack_require__(93319);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// 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/space/index.js + 3 modules
|
||||
var space = __webpack_require__(81327);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
||||
var Compact = __webpack_require__(33234);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js + 1 modules
|
||||
var style = __webpack_require__(47211);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown-button.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 DropdownButton = props => {
|
||||
const {
|
||||
getPopupContainer: getContextPopupContainer,
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
type = 'default',
|
||||
danger,
|
||||
disabled,
|
||||
loading,
|
||||
onClick,
|
||||
htmlType,
|
||||
children,
|
||||
className,
|
||||
menu,
|
||||
arrow,
|
||||
autoFocus,
|
||||
overlay,
|
||||
trigger,
|
||||
align,
|
||||
open,
|
||||
onOpenChange,
|
||||
placement,
|
||||
getPopupContainer,
|
||||
href,
|
||||
icon = /*#__PURE__*/_react_17_0_2_react.createElement(EllipsisOutlined/* default */.Z, null),
|
||||
title,
|
||||
buttonsRender = buttons => buttons,
|
||||
mouseEnterDelay,
|
||||
mouseLeaveDelay,
|
||||
overlayClassName,
|
||||
overlayStyle,
|
||||
destroyPopupOnHide,
|
||||
dropdownRender
|
||||
} = props,
|
||||
restProps = __rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]);
|
||||
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
||||
const buttonPrefixCls = `${prefixCls}-button`;
|
||||
const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls);
|
||||
const dropdownProps = {
|
||||
menu,
|
||||
arrow,
|
||||
autoFocus,
|
||||
align,
|
||||
disabled,
|
||||
trigger: disabled ? [] : trigger,
|
||||
onOpenChange,
|
||||
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
||||
mouseEnterDelay,
|
||||
mouseLeaveDelay,
|
||||
overlayClassName,
|
||||
overlayStyle,
|
||||
destroyPopupOnHide,
|
||||
dropdownRender
|
||||
};
|
||||
const {
|
||||
compactSize,
|
||||
compactItemClassnames
|
||||
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
||||
const classes = _classnames_2_3_2_classnames_default()(buttonPrefixCls, compactItemClassnames, className, hashId);
|
||||
if ('overlay' in props) {
|
||||
dropdownProps.overlay = overlay;
|
||||
}
|
||||
if ('open' in props) {
|
||||
dropdownProps.open = open;
|
||||
}
|
||||
if ('placement' in props) {
|
||||
dropdownProps.placement = placement;
|
||||
} else {
|
||||
dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';
|
||||
}
|
||||
const leftButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
||||
type: type,
|
||||
danger: danger,
|
||||
disabled: disabled,
|
||||
loading: loading,
|
||||
onClick: onClick,
|
||||
htmlType: htmlType,
|
||||
href: href,
|
||||
title: title
|
||||
}, children);
|
||||
const rightButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
||||
type: type,
|
||||
danger: danger,
|
||||
icon: icon
|
||||
});
|
||||
const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(space/* default */.Z.Compact, Object.assign({
|
||||
className: classes,
|
||||
size: compactSize,
|
||||
block: true
|
||||
}, restProps), leftButtonToRender, /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({}, dropdownProps), rightButtonToRender)));
|
||||
};
|
||||
DropdownButton.__ANT_BUTTON = true;
|
||||
/* harmony default export */ var dropdown_button = (DropdownButton);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Dropdown = dropdown/* default */.Z;
|
||||
Dropdown.Button = dropdown_button;
|
||||
/* harmony default export */ var es_dropdown = (Dropdown);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1056:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ input; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
|
||||
var form_context = __webpack_require__(32441);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/style/index.js
|
||||
var style = __webpack_require__(9937);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Group.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Group = props => {
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
className
|
||||
} = props;
|
||||
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
|
||||
const inputPrefixCls = getPrefixCls('input');
|
||||
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
|
||||
const cls = _classnames_2_3_2_classnames_default()(prefixCls, {
|
||||
[`${prefixCls}-lg`]: props.size === 'large',
|
||||
[`${prefixCls}-sm`]: props.size === 'small',
|
||||
[`${prefixCls}-compact`]: props.compact,
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl'
|
||||
}, hashId, className);
|
||||
const formItemContext = (0,_react_17_0_2_react.useContext)(form_context/* FormItemInputContext */.aM);
|
||||
const groupFormItemContext = (0,_react_17_0_2_react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
|
||||
isFormItemInput: false
|
||||
}), [formItemContext]);
|
||||
if (false) {}
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: cls,
|
||||
style: props.style,
|
||||
onMouseEnter: props.onMouseEnter,
|
||||
onMouseLeave: props.onMouseLeave,
|
||||
onFocus: props.onFocus,
|
||||
onBlur: props.onBlur
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* FormItemInputContext */.aM.Provider, {
|
||||
value: groupFormItemContext
|
||||
}, props.children)));
|
||||
};
|
||||
/* harmony default export */ var input_Group = (Group);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Input.js + 1 modules
|
||||
var Input = __webpack_require__(9432);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(38329);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
|
||||
|
||||
// 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/EyeInvisibleOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_EyeInvisibleOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
||||
var EyeOutlined = __webpack_require__(15997);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js
|
||||
var omit = __webpack_require__(99468);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/ref.js
|
||||
var es_ref = __webpack_require__(88831);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/hooks/useRemovePasswordTimeout.js
|
||||
var useRemovePasswordTimeout = __webpack_require__(59412);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Password.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 defaultIconRender = visible => visible ? /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_EyeInvisibleOutlined, null);
|
||||
const ActionMap = {
|
||||
click: 'onClick',
|
||||
hover: 'onMouseOver'
|
||||
};
|
||||
const Password = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
const {
|
||||
visibilityToggle = true
|
||||
} = props;
|
||||
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
|
||||
const [visible, setVisible] = (0,_react_17_0_2_react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
|
||||
const inputRef = (0,_react_17_0_2_react.useRef)(null);
|
||||
_react_17_0_2_react.useEffect(() => {
|
||||
if (visibilityControlled) {
|
||||
setVisible(visibilityToggle.visible);
|
||||
}
|
||||
}, [visibilityControlled, visibilityToggle]);
|
||||
// Remove Password value
|
||||
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
|
||||
const onVisibleChange = () => {
|
||||
const {
|
||||
disabled
|
||||
} = props;
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
if (visible) {
|
||||
removePasswordTimeout();
|
||||
}
|
||||
setVisible(prevState => {
|
||||
var _a;
|
||||
const newState = !prevState;
|
||||
if (typeof visibilityToggle === 'object') {
|
||||
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
|
||||
}
|
||||
return newState;
|
||||
});
|
||||
};
|
||||
const getIcon = prefixCls => {
|
||||
const {
|
||||
action = 'click',
|
||||
iconRender = defaultIconRender
|
||||
} = props;
|
||||
const iconTrigger = ActionMap[action] || '';
|
||||
const icon = iconRender(visible);
|
||||
const iconProps = {
|
||||
[iconTrigger]: onVisibleChange,
|
||||
className: `${prefixCls}-icon`,
|
||||
key: 'passwordIcon',
|
||||
onMouseDown: e => {
|
||||
// Prevent focused state lost
|
||||
// https://github.com/ant-design/ant-design/issues/15173
|
||||
e.preventDefault();
|
||||
},
|
||||
onMouseUp: e => {
|
||||
// Prevent caret position change
|
||||
// https://github.com/ant-design/ant-design/issues/23524
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
return /*#__PURE__*/_react_17_0_2_react.cloneElement( /*#__PURE__*/_react_17_0_2_react.isValidElement(icon) ? icon : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, icon), iconProps);
|
||||
};
|
||||
const {
|
||||
className,
|
||||
prefixCls: customizePrefixCls,
|
||||
inputPrefixCls: customizeInputPrefixCls,
|
||||
size
|
||||
} = props,
|
||||
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
|
||||
const {
|
||||
getPrefixCls
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
|
||||
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
||||
const inputClassName = _classnames_2_3_2_classnames_default()(prefixCls, className, {
|
||||
[`${prefixCls}-${size}`]: !!size
|
||||
});
|
||||
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
|
||||
type: visible ? 'text' : 'password',
|
||||
className: inputClassName,
|
||||
prefixCls: inputPrefixCls,
|
||||
suffix: suffixIcon
|
||||
});
|
||||
if (size) {
|
||||
omittedProps.size = size;
|
||||
}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
||||
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
|
||||
}, omittedProps));
|
||||
});
|
||||
if (false) {}
|
||||
/* harmony default export */ var input_Password = (Password);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
||||
var SearchOutlined = __webpack_require__(46820);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
||||
var reactNode = __webpack_require__(92343);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
||||
var useSize = __webpack_require__(19716);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
||||
var Compact = __webpack_require__(33234);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Search.js
|
||||
"use client";
|
||||
|
||||
var Search_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 Search = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
inputPrefixCls: customizeInputPrefixCls,
|
||||
className,
|
||||
size: customizeSize,
|
||||
suffix,
|
||||
enterButton = false,
|
||||
addonAfter,
|
||||
loading,
|
||||
disabled,
|
||||
onSearch: customOnSearch,
|
||||
onChange: customOnChange,
|
||||
onCompositionStart,
|
||||
onCompositionEnd
|
||||
} = props,
|
||||
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
|
||||
const {
|
||||
getPrefixCls,
|
||||
direction
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const composedRef = _react_17_0_2_react.useRef(false);
|
||||
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
|
||||
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||
const {
|
||||
compactSize
|
||||
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
||||
const size = (0,useSize/* default */.Z)(ctx => {
|
||||
var _a;
|
||||
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
||||
});
|
||||
const inputRef = _react_17_0_2_react.useRef(null);
|
||||
const onChange = e => {
|
||||
if (e && e.target && e.type === 'click' && customOnSearch) {
|
||||
customOnSearch(e.target.value, e, {
|
||||
source: 'clear'
|
||||
});
|
||||
}
|
||||
if (customOnChange) {
|
||||
customOnChange(e);
|
||||
}
|
||||
};
|
||||
const onMouseDown = e => {
|
||||
var _a;
|
||||
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
const onSearch = e => {
|
||||
var _a, _b;
|
||||
if (customOnSearch) {
|
||||
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {
|
||||
source: 'input'
|
||||
});
|
||||
}
|
||||
};
|
||||
const onPressEnter = e => {
|
||||
if (composedRef.current || loading) {
|
||||
return;
|
||||
}
|
||||
onSearch(e);
|
||||
};
|
||||
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/_react_17_0_2_react.createElement(SearchOutlined/* default */.Z, null) : null;
|
||||
const btnClassName = `${prefixCls}-button`;
|
||||
let button;
|
||||
const enterButtonAsElement = enterButton || {};
|
||||
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
|
||||
if (isAntdButton || enterButtonAsElement.type === 'button') {
|
||||
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
|
||||
onMouseDown,
|
||||
onClick: e => {
|
||||
var _a, _b;
|
||||
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
||||
onSearch(e);
|
||||
},
|
||||
key: 'enterButton'
|
||||
}, isAntdButton ? {
|
||||
className: btnClassName,
|
||||
size
|
||||
} : {}));
|
||||
} else {
|
||||
button = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
||||
className: btnClassName,
|
||||
type: enterButton ? 'primary' : undefined,
|
||||
size: size,
|
||||
disabled: disabled,
|
||||
key: "enterButton",
|
||||
onMouseDown: onMouseDown,
|
||||
onClick: onSearch,
|
||||
loading: loading,
|
||||
icon: searchIcon
|
||||
}, enterButton);
|
||||
}
|
||||
if (addonAfter) {
|
||||
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
|
||||
key: 'addonAfter'
|
||||
})];
|
||||
}
|
||||
const cls = _classnames_2_3_2_classnames_default()(prefixCls, {
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-${size}`]: !!size,
|
||||
[`${prefixCls}-with-button`]: !!enterButton
|
||||
}, className);
|
||||
const handleOnCompositionStart = e => {
|
||||
composedRef.current = true;
|
||||
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
|
||||
};
|
||||
const handleOnCompositionEnd = e => {
|
||||
composedRef.current = false;
|
||||
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
|
||||
};
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
||||
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
|
||||
onPressEnter: onPressEnter
|
||||
}, restProps, {
|
||||
size: size,
|
||||
onCompositionStart: handleOnCompositionStart,
|
||||
onCompositionEnd: handleOnCompositionEnd,
|
||||
prefixCls: inputPrefixCls,
|
||||
addonAfter: button,
|
||||
suffix: suffix,
|
||||
onChange: onChange,
|
||||
className: cls,
|
||||
disabled: disabled
|
||||
}));
|
||||
});
|
||||
if (false) {}
|
||||
/* harmony default export */ var input_Search = (Search);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/TextArea.js
|
||||
var TextArea = __webpack_require__(1643);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const input_Input = Input/* default */.Z;
|
||||
if (false) {}
|
||||
input_Input.Group = input_Group;
|
||||
input_Input.Search = input_Search;
|
||||
input_Input.TextArea = TextArea/* default */.Z;
|
||||
input_Input.Password = input_Password;
|
||||
/* harmony default export */ var input = (input_Input);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 81327:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ space; }
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: SpaceContext
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Children/toArray.js
|
||||
var toArray = __webpack_require__(45659);
|
||||
// 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/space/Compact.js
|
||||
var Compact = __webpack_require__(33234);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/context.js
|
||||
|
||||
const SpaceContext = /*#__PURE__*/_react_17_0_2_react.createContext({
|
||||
latestIndex: 0
|
||||
});
|
||||
const SpaceContextProvider = SpaceContext.Provider;
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Item.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Item = _ref => {
|
||||
let {
|
||||
className,
|
||||
index,
|
||||
children,
|
||||
split,
|
||||
style
|
||||
} = _ref;
|
||||
const {
|
||||
latestIndex
|
||||
} = _react_17_0_2_react.useContext(SpaceContext);
|
||||
if (children === null || children === undefined) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: className,
|
||||
style: style
|
||||
}, children), index < latestIndex && split && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${className}-split`
|
||||
}, split));
|
||||
};
|
||||
/* harmony default export */ var space_Item = (Item);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/index.js + 1 modules
|
||||
var space_style = __webpack_require__(2856);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/utils.js
|
||||
function isPresetSize(size) {
|
||||
return ['small', 'middle', 'large'].includes(size);
|
||||
}
|
||||
function isValidGapNumber(size) {
|
||||
if (!size) {
|
||||
// The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.
|
||||
return false;
|
||||
}
|
||||
return typeof size === 'number' && !Number.isNaN(size);
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/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 Space = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
var _a, _b;
|
||||
const {
|
||||
getPrefixCls,
|
||||
space,
|
||||
direction: directionConfig
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const {
|
||||
size = (space === null || space === void 0 ? void 0 : space.size) || 'small',
|
||||
align,
|
||||
className,
|
||||
rootClassName,
|
||||
children,
|
||||
direction = 'horizontal',
|
||||
prefixCls: customizePrefixCls,
|
||||
split,
|
||||
style,
|
||||
wrap = false,
|
||||
classNames: customClassNames,
|
||||
styles
|
||||
} = props,
|
||||
otherProps = __rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]);
|
||||
const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];
|
||||
const isPresetVerticalSize = isPresetSize(verticalSize);
|
||||
const isPresetHorizontalSize = isPresetSize(horizontalSize);
|
||||
const isValidVerticalSize = isValidGapNumber(verticalSize);
|
||||
const isValidHorizontalSize = isValidGapNumber(horizontalSize);
|
||||
const childNodes = (0,toArray/* default */.Z)(children, {
|
||||
keepEmpty: true
|
||||
});
|
||||
const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;
|
||||
const prefixCls = getPrefixCls('space', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = (0,space_style/* default */.Z)(prefixCls);
|
||||
const cls = _classnames_2_3_2_classnames_default()(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, {
|
||||
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
|
||||
[`${prefixCls}-align-${mergedAlign}`]: mergedAlign,
|
||||
[`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,
|
||||
[`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize
|
||||
}, className, rootClassName);
|
||||
const itemClassName = _classnames_2_3_2_classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item);
|
||||
// Calculate latest one
|
||||
let latestIndex = 0;
|
||||
const nodes = childNodes.map((child, i) => {
|
||||
var _a, _b;
|
||||
if (child !== null && child !== undefined) {
|
||||
latestIndex = i;
|
||||
}
|
||||
const key = child && child.key || `${itemClassName}-${i}`;
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(space_Item, {
|
||||
className: itemClassName,
|
||||
key: key,
|
||||
index: i,
|
||||
split: split,
|
||||
style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item
|
||||
}, child);
|
||||
});
|
||||
const spaceContext = _react_17_0_2_react.useMemo(() => ({
|
||||
latestIndex
|
||||
}), [latestIndex]);
|
||||
// =========================== Render ===========================
|
||||
if (childNodes.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const gapStyle = {};
|
||||
if (wrap) {
|
||||
gapStyle.flexWrap = 'wrap';
|
||||
}
|
||||
if (!isPresetHorizontalSize && isValidHorizontalSize) {
|
||||
gapStyle.columnGap = horizontalSize;
|
||||
}
|
||||
if (!isPresetVerticalSize && isValidVerticalSize) {
|
||||
gapStyle.rowGap = verticalSize;
|
||||
}
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
||||
ref: ref,
|
||||
className: cls,
|
||||
style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style)
|
||||
}, otherProps), /*#__PURE__*/_react_17_0_2_react.createElement(SpaceContextProvider, {
|
||||
value: spaceContext
|
||||
}, nodes)));
|
||||
});
|
||||
if (false) {}
|
||||
const CompoundedSpace = Space;
|
||||
CompoundedSpace.Compact = Compact/* default */.ZP;
|
||||
/* harmony default export */ var space = (CompoundedSpace);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 92899:
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/style/motion/move.js ***!
|
||||
\***************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Fm: function() { return /* binding */ initMoveMotion; }
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut */
|
||||
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ 36646);
|
||||
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ 95406);
|
||||
|
||||
|
||||
const moveDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveDownIn', {
|
||||
'0%': {
|
||||
transform: 'translate3d(0, 100%, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
}
|
||||
});
|
||||
const moveDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveDownOut', {
|
||||
'0%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(0, 100%, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
}
|
||||
});
|
||||
const moveLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveLeftIn', {
|
||||
'0%': {
|
||||
transform: 'translate3d(-100%, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
}
|
||||
});
|
||||
const moveLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveLeftOut', {
|
||||
'0%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(-100%, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
}
|
||||
});
|
||||
const moveRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveRightIn', {
|
||||
'0%': {
|
||||
transform: 'translate3d(100%, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
}
|
||||
});
|
||||
const moveRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveRightOut', {
|
||||
'0%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(100%, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
}
|
||||
});
|
||||
const moveUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveUpIn', {
|
||||
'0%': {
|
||||
transform: 'translate3d(0, -100%, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
}
|
||||
});
|
||||
const moveUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveUpOut', {
|
||||
'0%': {
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 1
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translate3d(0, -100%, 0)',
|
||||
transformOrigin: '0 0',
|
||||
opacity: 0
|
||||
}
|
||||
});
|
||||
const moveMotion = {
|
||||
'move-up': {
|
||||
inKeyframes: moveUpIn,
|
||||
outKeyframes: moveUpOut
|
||||
},
|
||||
'move-down': {
|
||||
inKeyframes: moveDownIn,
|
||||
outKeyframes: moveDownOut
|
||||
},
|
||||
'move-left': {
|
||||
inKeyframes: moveLeftIn,
|
||||
outKeyframes: moveLeftOut
|
||||
},
|
||||
'move-right': {
|
||||
inKeyframes: moveRightIn,
|
||||
outKeyframes: moveRightOut
|
||||
}
|
||||
};
|
||||
const initMoveMotion = (token, motionName) => {
|
||||
const {
|
||||
antCls
|
||||
} = token;
|
||||
const motionCls = `${antCls}-${motionName}`;
|
||||
const {
|
||||
inKeyframes,
|
||||
outKeyframes
|
||||
} = moveMotion[motionName];
|
||||
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__/* .initMotion */ .R)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {
|
||||
[`
|
||||
${motionCls}-enter,
|
||||
${motionCls}-appear
|
||||
`]: {
|
||||
opacity: 0,
|
||||
animationTimingFunction: token.motionEaseOutCirc
|
||||
},
|
||||
[`${motionCls}-leave`]: {
|
||||
animationTimingFunction: token.motionEaseInOutCirc
|
||||
}
|
||||
}];
|
||||
};
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
@ -0,0 +1,704 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[47270],{
|
||||
|
||||
/***/ 73208:
|
||||
/*!*****************************************!*\
|
||||
!*** ./src/components/NoData/index.tsx ***!
|
||||
\*****************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
||||
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var noData = function noData(_ref) {
|
||||
var img = _ref.img,
|
||||
_ref$buttonProps = _ref.buttonProps,
|
||||
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
||||
_ref$styles = _ref.styles,
|
||||
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
||||
customText = _ref.customText,
|
||||
ButtonText = _ref.ButtonText,
|
||||
ButtonClick = _ref.ButtonClick,
|
||||
Buttonclass = _ref.Buttonclass,
|
||||
ButtonTwo = _ref.ButtonTwo,
|
||||
imgStyles = _ref.imgStyles,
|
||||
_ref$loading = _ref.loading,
|
||||
loading = _ref$loading === void 0 ? false : _ref$loading;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
||||
className: "tc animated fadeIn",
|
||||
style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
||||
color: '#999',
|
||||
margin: '100px auto',
|
||||
visibility: loading ? 'hidden' : 'visible'
|
||||
}), styles),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
||||
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
||||
style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
||||
className: "mt20 font14",
|
||||
children: customText || '暂时还没有相关数据哦!'
|
||||
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
||||
className: Buttonclass,
|
||||
onClick: ButtonClick
|
||||
}, buttonProps), {}, {
|
||||
children: ButtonText
|
||||
})), ButtonTwo && ButtonTwo]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__.Z = (noData);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 13224:
|
||||
/*!*********************************************!*\
|
||||
!*** ./src/components/WangEditor/index.tsx ***!
|
||||
\*********************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _wangeditor_editor_for_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wangeditor/editor-for-react */ 84686);
|
||||
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/fetch */ 91506);
|
||||
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! umi */ 45295);
|
||||
/* harmony import */ var _wangeditor_editor_dist_css_style_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wangeditor/editor/dist/css/style.css */ 49761);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 引入 css
|
||||
|
||||
|
||||
|
||||
var MyEditor = function MyEditor(_ref) {
|
||||
var defaultvalue = _ref.defaultvalue,
|
||||
onChange = _ref.onChange,
|
||||
style = _ref.style,
|
||||
user = _ref.user,
|
||||
placeholder = _ref.placeholder;
|
||||
//设置分片大小
|
||||
var chunkSize = 1024 * 1024 * 2; // 2MB
|
||||
var abortControllerRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);
|
||||
var concurrency = 4;
|
||||
// editor 实例
|
||||
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),
|
||||
_useState2 = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
||||
editor = _useState2[0],
|
||||
setEditor = _useState2[1]; // TS 语法
|
||||
// const [editor, setEditor] = useState(null) // JS 语法
|
||||
|
||||
// 编辑器内容
|
||||
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(''),
|
||||
_useState4 = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
|
||||
html = _useState4[0],
|
||||
setHtml = _useState4[1];
|
||||
|
||||
// 模拟 ajax 请求,异步设置 html
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
||||
setHtml(defaultvalue);
|
||||
}, [defaultvalue]);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
||||
onChange(html);
|
||||
}, [html]);
|
||||
|
||||
// 工具栏配置
|
||||
var toolbarConfig = {}; // TS 语法
|
||||
// const toolbarConfig = { } // JS 语法
|
||||
|
||||
// 编辑器配置
|
||||
var editorConfig = {
|
||||
// TS 语法
|
||||
// const editorConfig = { // JS 语法
|
||||
placeholder: placeholder || '请输入内容...',
|
||||
MENU_CONF: {}
|
||||
};
|
||||
editorConfig.MENU_CONF['uploadImage'] = {
|
||||
customUpload: function customUpload(file, insertFn) {
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee() {
|
||||
var formData, res;
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
// TS 语法
|
||||
// async customUpload(file, insertFn) { // JS 语法
|
||||
// file 即选中的文件
|
||||
// 自己实现上传,并得到图片 url alt href
|
||||
// 最后插入图片
|
||||
// insertFn(url, alt, href)
|
||||
formData = new FormData();
|
||||
formData.append('file', file);
|
||||
_context.next = 4;
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments.json", {
|
||||
method: 'post',
|
||||
body: formData
|
||||
}, true);
|
||||
case 4:
|
||||
res = _context.sent;
|
||||
insertFn(res === null || res === void 0 ? void 0 : res.url, '', '');
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
}
|
||||
};
|
||||
editorConfig.MENU_CONF['uploadVideo'] = {
|
||||
// 上传视频的配置
|
||||
customUpload: function customUpload(file, insertFn) {
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee2() {
|
||||
var fileSize, totalChunks, _user$userInfo, _user$userInfo2, res, uploadId, promises, percent, _loop, i, completed, step, _promises$slice, subTasks, p, uploadRes;
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee2$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
// TS 语法
|
||||
// async customUpload(file, insertFn) { // JS 语法
|
||||
// file 即选中的文件
|
||||
// 自己实现上传,并得到视频 url poster
|
||||
fileSize = file.size;
|
||||
totalChunks = Math.ceil(fileSize / chunkSize);
|
||||
_context3.prev = 2;
|
||||
_context3.next = 5;
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/multipart_upload_start", {
|
||||
method: 'POST',
|
||||
body: {
|
||||
fileName: file.name,
|
||||
chunkCount: totalChunks,
|
||||
user_id: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id
|
||||
}
|
||||
});
|
||||
case 5:
|
||||
res = _context3.sent;
|
||||
if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) {
|
||||
_context3.next = 8;
|
||||
break;
|
||||
}
|
||||
throw new Error();
|
||||
case 8:
|
||||
uploadId = res.upload_id;
|
||||
abortControllerRef.current = new AbortController();
|
||||
promises = [];
|
||||
percent = 0;
|
||||
_loop = /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _loop() {
|
||||
var start, end, chunk, formData;
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _loop$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
start = i * chunkSize;
|
||||
end = Math.min(start + chunkSize, fileSize);
|
||||
chunk = file.slice(start, end);
|
||||
formData = new FormData();
|
||||
formData.append('chunk', chunk);
|
||||
formData.append('fileName', file.name);
|
||||
formData.append('chunkIndex', (i + 1).toString());
|
||||
formData.append('uploadId', uploadId);
|
||||
|
||||
// for (const key in options) {
|
||||
// if (Object.prototype.hasOwnProperty.call(options, key)) {
|
||||
// formData.append(key, options[key]);
|
||||
// }
|
||||
// }
|
||||
|
||||
promises.push(function () {
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/multipart_upload", {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
signal: abortControllerRef.current.signal
|
||||
}, true).then(function (res) {});
|
||||
});
|
||||
case 9:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _loop);
|
||||
});
|
||||
i = 0;
|
||||
case 14:
|
||||
if (!(i < totalChunks)) {
|
||||
_context3.next = 19;
|
||||
break;
|
||||
}
|
||||
return _context3.delegateYield(_loop(), "t0", 16);
|
||||
case 16:
|
||||
i++;
|
||||
_context3.next = 14;
|
||||
break;
|
||||
case 19:
|
||||
completed = 0;
|
||||
step = concurrency;
|
||||
console.log(promises, 'promises');
|
||||
case 22:
|
||||
if (!(completed < promises.length)) {
|
||||
_context3.next = 31;
|
||||
break;
|
||||
}
|
||||
subTasks = (_promises$slice = promises.slice(completed, completed + step)) === null || _promises$slice === void 0 ? void 0 : _promises$slice.map(function (t) {
|
||||
return t();
|
||||
});
|
||||
if (!(subTasks.length > 0)) {
|
||||
_context3.next = 29;
|
||||
break;
|
||||
}
|
||||
_context3.next = 27;
|
||||
return Promise.all(subTasks);
|
||||
case 27:
|
||||
p = _context3.sent;
|
||||
completed += step;
|
||||
case 29:
|
||||
_context3.next = 22;
|
||||
break;
|
||||
case 31:
|
||||
_context3.next = 33;
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/multipart_upload_end", {
|
||||
method: 'POST',
|
||||
body: {
|
||||
fileName: file.name,
|
||||
chunkCount: totalChunks,
|
||||
uploadId: uploadId,
|
||||
user_id: user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.user_id
|
||||
}
|
||||
});
|
||||
case 33:
|
||||
uploadRes = _context3.sent;
|
||||
// 最后插入视频 参数1 视频地址 参数2 封面地址 选填
|
||||
// debugger
|
||||
insertFn(uploadRes === null || uploadRes === void 0 ? void 0 : uploadRes.object, '');
|
||||
_context3.next = 39;
|
||||
break;
|
||||
case 37:
|
||||
_context3.prev = 37;
|
||||
_context3.t1 = _context3["catch"](2);
|
||||
case 39:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee2, null, [[2, 37]]);
|
||||
}))();
|
||||
}
|
||||
};
|
||||
|
||||
// 及时销毁 editor ,重要!
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
||||
return function () {
|
||||
if (editor == null) return;
|
||||
editor.destroy();
|
||||
setEditor(null);
|
||||
};
|
||||
}, [editor]);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div", {
|
||||
style: {
|
||||
border: '1px solid #ccc',
|
||||
zIndex: 100
|
||||
},
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_wangeditor_editor_for_react__WEBPACK_IMPORTED_MODULE_5__/* .Toolbar */ .o, {
|
||||
editor: editor,
|
||||
defaultConfig: toolbarConfig,
|
||||
mode: "default",
|
||||
style: {
|
||||
borderBottom: '1px solid #ccc'
|
||||
}
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_wangeditor_editor_for_react__WEBPACK_IMPORTED_MODULE_5__/* .Editor */ .M, {
|
||||
defaultConfig: editorConfig,
|
||||
value: html,
|
||||
onCreated: setEditor,
|
||||
onChange: function onChange(editor) {
|
||||
return setHtml(editor.getHtml());
|
||||
},
|
||||
mode: "default",
|
||||
style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
||||
height: '500px',
|
||||
overflowY: 'hidden'
|
||||
}, style)
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_7__.connect)(function (_ref2) {
|
||||
var user = _ref2.user;
|
||||
return {
|
||||
user: user
|
||||
};
|
||||
})(MyEditor));
|
||||
|
||||
// export default MyEditor
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 61500:
|
||||
/*!*****************************************************************************!*\
|
||||
!*** ./src/pages/virtualSpaces/Lists/Activity/Detail/index.tsx + 1 modules ***!
|
||||
\*****************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
"default": function() { return /* binding */ Activity_Detail; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
||||
var objectSpread2 = __webpack_require__(26801);
|
||||
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
||||
var regeneratorRuntime = __webpack_require__(10574);
|
||||
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
||||
var asyncToGenerator = __webpack_require__(39343);
|
||||
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
||||
var slicedToArray = __webpack_require__(11006);
|
||||
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectDestructuringEmpty.js
|
||||
var objectDestructuringEmpty = __webpack_require__(27223);
|
||||
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty);
|
||||
// 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/message/index.js + 4 modules
|
||||
var message = __webpack_require__(8591);
|
||||
// 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__(1056);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
||||
var row = __webpack_require__(95237);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
||||
var col = __webpack_require__(43604);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
|
||||
var date_picker = __webpack_require__(52409);
|
||||
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
||||
var fetch = __webpack_require__(91506);
|
||||
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Activity/Detail/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___Uyk0e","flex_space_between":"flex_space_between___SCn7p","flex_box_vertical_center":"flex_box_vertical_center___tmRlA","flex_box_center_end":"flex_box_center_end___ixeuK","flex_box_column":"flex_box_column___KfStA","wrap":"wrap___nuqpQ","btns":"btns___i5JyO","content":"content___SvNFY"});
|
||||
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 32 modules
|
||||
var ui_customization = __webpack_require__(89200);
|
||||
// EXTERNAL MODULE: ./src/utils/util.tsx
|
||||
var util = __webpack_require__(22739);
|
||||
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(45295);
|
||||
// EXTERNAL MODULE: ./src/components/WangEditor/index.tsx
|
||||
var WangEditor = __webpack_require__(13224);
|
||||
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
||||
var dayjs_min = __webpack_require__(9498);
|
||||
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Activity/Detail/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var Detail = function Detail(_ref) {
|
||||
objectDestructuringEmpty_default()(_ref);
|
||||
var _useState = (0,_react_17_0_2_react.useState)({}),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
item = _useState2[0],
|
||||
setItem = _useState2[1];
|
||||
var query = (0,_umi_production_exports.useParams)();
|
||||
var id = query.id,
|
||||
virtual_spacesId = query.virtual_spacesId;
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
isAddOpen = _useState4[0],
|
||||
setIsAddOpen = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
showEditor = _useState6[0],
|
||||
setShowEditor = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
start_time = _useState8[0],
|
||||
setstart_time = _useState8[1];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
end_time = _useState10[0],
|
||||
setend_time = _useState10[1];
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
if (id) {
|
||||
getItem();
|
||||
}
|
||||
}, [id]);
|
||||
var getItem = /*#__PURE__*/function () {
|
||||
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var res, _res$data, _res$data2, _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(virtual_spacesId, "/activities/").concat(id, ".json"), {
|
||||
method: 'get'
|
||||
});
|
||||
case 2:
|
||||
res = _context.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
||||
setItem(res === null || res === void 0 ? void 0 : res.data);
|
||||
if ((res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.activity_type) == '1') {
|
||||
setShowEditor(false);
|
||||
} else {
|
||||
setShowEditor(true);
|
||||
}
|
||||
form.setFieldValue('activity_type', res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.activity_type.toString());
|
||||
form.setFieldValue('content', res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.content);
|
||||
form.setFieldValue('name', res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.name);
|
||||
form.setFieldValue('start_time', dayjs_min_default()(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.start_time));
|
||||
form.setFieldValue('end_time', dayjs_min_default()(res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.end_time));
|
||||
setstart_time(dayjs_min_default()(res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.start_time).format('YYYY-MM-DD HH:mm:ss'));
|
||||
setend_time(dayjs_min_default()(res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.end_time).format('YYYY-MM-DD HH:mm:ss'));
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function getItem() {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var handleDelete = function handleDelete() {
|
||||
modal/* default */.Z.confirm({
|
||||
title: '提示',
|
||||
okText: '确定删除',
|
||||
okButtonProps: {
|
||||
danger: true
|
||||
},
|
||||
icon: false,
|
||||
cancelText: '取消',
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: "\u786E\u8BA4\u5220\u9664\u8BE5\u6D3B\u52A8\u5417\uFF1F\u8BF7\u8C28\u614E\u64CD\u4F5C"
|
||||
})
|
||||
}),
|
||||
onOk: function () {
|
||||
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(virtual_spacesId, "/activities/").concat(item === null || item === void 0 ? void 0 : item.id, ".json"), {
|
||||
method: 'delete'
|
||||
});
|
||||
case 2:
|
||||
res = _context2.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('删除成功');
|
||||
_umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/activity"));
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}()
|
||||
});
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Detailmodules.wrap,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* HeadBack */.qE, {
|
||||
title: item.name,
|
||||
onClick: function onClick() {
|
||||
return _umi_production_exports.history.push("/".concat(util/* vtrsKey */.AS, "/").concat(virtual_spacesId, "/activity"));
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Detailmodules.btns,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
onClick: function onClick(e) {
|
||||
setIsAddOpen(true);
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
className: "primary-hover",
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
||||
className: "iconfont icon-bianji2 font14 mr5"
|
||||
}), "\u7F16\u8F91"]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
onClick: function onClick() {
|
||||
return handleDelete();
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
className: "delete-hover",
|
||||
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
||||
className: "iconfont icon-piliangshanchubeifen font14 mr5"
|
||||
}), "\u5220\u9664"]
|
||||
})
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Detailmodules.content,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
maxWidth: 1200,
|
||||
overflow: 'hidden'
|
||||
},
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: item === null || item === void 0 ? void 0 : item.content
|
||||
}
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
open: isAddOpen,
|
||||
width: 1200,
|
||||
destroyOnClose: true,
|
||||
centered: true,
|
||||
title: "编辑教研活动",
|
||||
onCancel: function onCancel() {
|
||||
setIsAddOpen(false);
|
||||
getItem();
|
||||
},
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
_context3.next = 2;
|
||||
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(virtual_spacesId, "/activities/").concat(id, ".json"), {
|
||||
method: 'put',
|
||||
body: objectSpread2_default()(objectSpread2_default()({}, form.getFieldsValue()), {}, {
|
||||
start_time: start_time,
|
||||
end_time: end_time
|
||||
})
|
||||
});
|
||||
case 2:
|
||||
res = _context3.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
||||
message/* default */.ZP.success('编辑成功');
|
||||
setIsAddOpen(false);
|
||||
getItem();
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee3);
|
||||
})),
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
form: form,
|
||||
colon: false,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "activity_type",
|
||||
label: "\u6D3B\u52A8\u7C7B\u578B",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
disabled: true,
|
||||
onChange: function onChange(e) {
|
||||
if (e.target.value == '1') {
|
||||
setShowEditor(false);
|
||||
} else {
|
||||
setShowEditor(true);
|
||||
}
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: "1",
|
||||
children: "\u7EBF\u4E0A\u4F1A\u8BAE"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: "2",
|
||||
children: "\u7EBF\u4E0B\u6D3B\u52A8"
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "name",
|
||||
label: "\u6D3B\u52A8\u540D\u79F0",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u6D3B\u52A8\u540D\u79F0"
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
span: 11,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "start_time",
|
||||
label: "\u5F00\u59CB\u65F6\u95F4",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
|
||||
style: {
|
||||
width: "100%"
|
||||
},
|
||||
showTime: true,
|
||||
format: "YYYY-MM-DD HH:mm:ss",
|
||||
onChange: function onChange(time, format) {
|
||||
setstart_time(format);
|
||||
}
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
span: 2
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
span: 11,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "end_time",
|
||||
label: "\u7ED3\u675F\u65F6\u95F4",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
|
||||
style: {
|
||||
width: "100%"
|
||||
},
|
||||
showTime: true,
|
||||
format: "YYYY-MM-DD HH:mm:ss",
|
||||
onChange: function onChange(time, format) {
|
||||
setend_time(format);
|
||||
}
|
||||
})
|
||||
})
|
||||
})]
|
||||
}), showEditor && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "content",
|
||||
label: "\u6D3B\u52A8\u5185\u5BB9",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(WangEditor/* default */.Z, {
|
||||
style: {
|
||||
height: '300px'
|
||||
},
|
||||
defaultvalue: form.getFieldValue('content')
|
||||
})
|
||||
})]
|
||||
})
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Activity_Detail = (Detail);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,871 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[58752],{
|
||||
|
||||
/***/ 73208:
|
||||
/*!*****************************************!*\
|
||||
!*** ./src/components/NoData/index.tsx ***!
|
||||
\*****************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
||||
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var noData = function noData(_ref) {
|
||||
var img = _ref.img,
|
||||
_ref$buttonProps = _ref.buttonProps,
|
||||
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
||||
_ref$styles = _ref.styles,
|
||||
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
||||
customText = _ref.customText,
|
||||
ButtonText = _ref.ButtonText,
|
||||
ButtonClick = _ref.ButtonClick,
|
||||
Buttonclass = _ref.Buttonclass,
|
||||
ButtonTwo = _ref.ButtonTwo,
|
||||
imgStyles = _ref.imgStyles,
|
||||
_ref$loading = _ref.loading,
|
||||
loading = _ref$loading === void 0 ? false : _ref$loading;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
||||
className: "tc animated fadeIn",
|
||||
style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
||||
color: '#999',
|
||||
margin: '100px auto',
|
||||
visibility: loading ? 'hidden' : 'visible'
|
||||
}), styles),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
||||
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
||||
style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
||||
className: "mt20 font14",
|
||||
children: customText || '暂时还没有相关数据哦!'
|
||||
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
||||
className: Buttonclass,
|
||||
onClick: ButtonClick
|
||||
}, buttonProps), {}, {
|
||||
children: ButtonText
|
||||
})), ButtonTwo && ButtonTwo]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__.Z = (noData);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 13224:
|
||||
/*!*********************************************!*\
|
||||
!*** ./src/components/WangEditor/index.tsx ***!
|
||||
\*********************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _wangeditor_editor_for_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wangeditor/editor-for-react */ 84686);
|
||||
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/fetch */ 91506);
|
||||
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! umi */ 45295);
|
||||
/* harmony import */ var _wangeditor_editor_dist_css_style_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wangeditor/editor/dist/css/style.css */ 49761);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 引入 css
|
||||
|
||||
|
||||
|
||||
var MyEditor = function MyEditor(_ref) {
|
||||
var defaultvalue = _ref.defaultvalue,
|
||||
onChange = _ref.onChange,
|
||||
style = _ref.style,
|
||||
user = _ref.user,
|
||||
placeholder = _ref.placeholder;
|
||||
//设置分片大小
|
||||
var chunkSize = 1024 * 1024 * 2; // 2MB
|
||||
var abortControllerRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);
|
||||
var concurrency = 4;
|
||||
// editor 实例
|
||||
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),
|
||||
_useState2 = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
||||
editor = _useState2[0],
|
||||
setEditor = _useState2[1]; // TS 语法
|
||||
// const [editor, setEditor] = useState(null) // JS 语法
|
||||
|
||||
// 编辑器内容
|
||||
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(''),
|
||||
_useState4 = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
|
||||
html = _useState4[0],
|
||||
setHtml = _useState4[1];
|
||||
|
||||
// 模拟 ajax 请求,异步设置 html
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
||||
setHtml(defaultvalue);
|
||||
}, [defaultvalue]);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
||||
onChange(html);
|
||||
}, [html]);
|
||||
|
||||
// 工具栏配置
|
||||
var toolbarConfig = {}; // TS 语法
|
||||
// const toolbarConfig = { } // JS 语法
|
||||
|
||||
// 编辑器配置
|
||||
var editorConfig = {
|
||||
// TS 语法
|
||||
// const editorConfig = { // JS 语法
|
||||
placeholder: placeholder || '请输入内容...',
|
||||
MENU_CONF: {}
|
||||
};
|
||||
editorConfig.MENU_CONF['uploadImage'] = {
|
||||
customUpload: function customUpload(file, insertFn) {
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee() {
|
||||
var formData, res;
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
// TS 语法
|
||||
// async customUpload(file, insertFn) { // JS 语法
|
||||
// file 即选中的文件
|
||||
// 自己实现上传,并得到图片 url alt href
|
||||
// 最后插入图片
|
||||
// insertFn(url, alt, href)
|
||||
formData = new FormData();
|
||||
formData.append('file', file);
|
||||
_context.next = 4;
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments.json", {
|
||||
method: 'post',
|
||||
body: formData
|
||||
}, true);
|
||||
case 4:
|
||||
res = _context.sent;
|
||||
insertFn(res === null || res === void 0 ? void 0 : res.url, '', '');
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
}
|
||||
};
|
||||
editorConfig.MENU_CONF['uploadVideo'] = {
|
||||
// 上传视频的配置
|
||||
customUpload: function customUpload(file, insertFn) {
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee2() {
|
||||
var fileSize, totalChunks, _user$userInfo, _user$userInfo2, res, uploadId, promises, percent, _loop, i, completed, step, _promises$slice, subTasks, p, uploadRes;
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee2$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
// TS 语法
|
||||
// async customUpload(file, insertFn) { // JS 语法
|
||||
// file 即选中的文件
|
||||
// 自己实现上传,并得到视频 url poster
|
||||
fileSize = file.size;
|
||||
totalChunks = Math.ceil(fileSize / chunkSize);
|
||||
_context3.prev = 2;
|
||||
_context3.next = 5;
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/multipart_upload_start", {
|
||||
method: 'POST',
|
||||
body: {
|
||||
fileName: file.name,
|
||||
chunkCount: totalChunks,
|
||||
user_id: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id
|
||||
}
|
||||
});
|
||||
case 5:
|
||||
res = _context3.sent;
|
||||
if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) {
|
||||
_context3.next = 8;
|
||||
break;
|
||||
}
|
||||
throw new Error();
|
||||
case 8:
|
||||
uploadId = res.upload_id;
|
||||
abortControllerRef.current = new AbortController();
|
||||
promises = [];
|
||||
percent = 0;
|
||||
_loop = /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _loop() {
|
||||
var start, end, chunk, formData;
|
||||
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _loop$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
start = i * chunkSize;
|
||||
end = Math.min(start + chunkSize, fileSize);
|
||||
chunk = file.slice(start, end);
|
||||
formData = new FormData();
|
||||
formData.append('chunk', chunk);
|
||||
formData.append('fileName', file.name);
|
||||
formData.append('chunkIndex', (i + 1).toString());
|
||||
formData.append('uploadId', uploadId);
|
||||
|
||||
// for (const key in options) {
|
||||
// if (Object.prototype.hasOwnProperty.call(options, key)) {
|
||||
// formData.append(key, options[key]);
|
||||
// }
|
||||
// }
|
||||
|
||||
promises.push(function () {
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/multipart_upload", {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
signal: abortControllerRef.current.signal
|
||||
}, true).then(function (res) {});
|
||||
});
|
||||
case 9:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _loop);
|
||||
});
|
||||
i = 0;
|
||||
case 14:
|
||||
if (!(i < totalChunks)) {
|
||||
_context3.next = 19;
|
||||
break;
|
||||
}
|
||||
return _context3.delegateYield(_loop(), "t0", 16);
|
||||
case 16:
|
||||
i++;
|
||||
_context3.next = 14;
|
||||
break;
|
||||
case 19:
|
||||
completed = 0;
|
||||
step = concurrency;
|
||||
console.log(promises, 'promises');
|
||||
case 22:
|
||||
if (!(completed < promises.length)) {
|
||||
_context3.next = 31;
|
||||
break;
|
||||
}
|
||||
subTasks = (_promises$slice = promises.slice(completed, completed + step)) === null || _promises$slice === void 0 ? void 0 : _promises$slice.map(function (t) {
|
||||
return t();
|
||||
});
|
||||
if (!(subTasks.length > 0)) {
|
||||
_context3.next = 29;
|
||||
break;
|
||||
}
|
||||
_context3.next = 27;
|
||||
return Promise.all(subTasks);
|
||||
case 27:
|
||||
p = _context3.sent;
|
||||
completed += step;
|
||||
case 29:
|
||||
_context3.next = 22;
|
||||
break;
|
||||
case 31:
|
||||
_context3.next = 33;
|
||||
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/multipart_upload_end", {
|
||||
method: 'POST',
|
||||
body: {
|
||||
fileName: file.name,
|
||||
chunkCount: totalChunks,
|
||||
uploadId: uploadId,
|
||||
user_id: user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.user_id
|
||||
}
|
||||
});
|
||||
case 33:
|
||||
uploadRes = _context3.sent;
|
||||
// 最后插入视频 参数1 视频地址 参数2 封面地址 选填
|
||||
// debugger
|
||||
insertFn(uploadRes === null || uploadRes === void 0 ? void 0 : uploadRes.object, '');
|
||||
_context3.next = 39;
|
||||
break;
|
||||
case 37:
|
||||
_context3.prev = 37;
|
||||
_context3.t1 = _context3["catch"](2);
|
||||
case 39:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee2, null, [[2, 37]]);
|
||||
}))();
|
||||
}
|
||||
};
|
||||
|
||||
// 及时销毁 editor ,重要!
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {
|
||||
return function () {
|
||||
if (editor == null) return;
|
||||
editor.destroy();
|
||||
setEditor(null);
|
||||
};
|
||||
}, [editor]);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div", {
|
||||
style: {
|
||||
border: '1px solid #ccc',
|
||||
zIndex: 100
|
||||
},
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_wangeditor_editor_for_react__WEBPACK_IMPORTED_MODULE_5__/* .Toolbar */ .o, {
|
||||
editor: editor,
|
||||
defaultConfig: toolbarConfig,
|
||||
mode: "default",
|
||||
style: {
|
||||
borderBottom: '1px solid #ccc'
|
||||
}
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_wangeditor_editor_for_react__WEBPACK_IMPORTED_MODULE_5__/* .Editor */ .M, {
|
||||
defaultConfig: editorConfig,
|
||||
value: html,
|
||||
onCreated: setEditor,
|
||||
onChange: function onChange(editor) {
|
||||
return setHtml(editor.getHtml());
|
||||
},
|
||||
mode: "default",
|
||||
style: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
||||
height: '500px',
|
||||
overflowY: 'hidden'
|
||||
}, style)
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_7__.connect)(function (_ref2) {
|
||||
var user = _ref2.user;
|
||||
return {
|
||||
user: user
|
||||
};
|
||||
})(MyEditor));
|
||||
|
||||
// export default MyEditor
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 53986:
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./src/pages/virtualSpaces/Lists/Activity/index.tsx + 2 modules ***!
|
||||
\**********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
"default": function() { return /* binding */ Activity; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
||||
var regeneratorRuntime = __webpack_require__(10574);
|
||||
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
||||
var objectSpread2 = __webpack_require__(26801);
|
||||
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
||||
var asyncToGenerator = __webpack_require__(39343);
|
||||
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
||||
var slicedToArray = __webpack_require__(11006);
|
||||
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: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(45295);
|
||||
// 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/spin/index.js + 1 modules
|
||||
var spin = __webpack_require__(71418);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
||||
var tooltip = __webpack_require__(6848);
|
||||
// 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/message/index.js + 4 modules
|
||||
var message = __webpack_require__(8591);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
||||
var row = __webpack_require__(95237);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
||||
var col = __webpack_require__(43604);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
||||
var pagination = __webpack_require__(41867);
|
||||
// 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__(1056);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
|
||||
var date_picker = __webpack_require__(52409);
|
||||
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
||||
var NoData = __webpack_require__(73208);
|
||||
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Activity/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Activitymodules = ({"flex_box_center":"flex_box_center___zxgMt","flex_space_between":"flex_space_between___G73Wi","flex_box_vertical_center":"flex_box_vertical_center___mPQrm","flex_box_center_end":"flex_box_center_end___dIVnm","flex_box_column":"flex_box_column___Rikag","wrap":"wrap___bYW5K","customTable":"customTable___doDFu","list":"list___UTNYm","list_left":"list_left___Zn46B","list_content":"list_content___Rtk5y","list_shuxin":"list_shuxin___RE9CJ","list_status":"list_status___i4B7J","list_type":"list_type___AGqwz","list_label":"list_label___Br22j","list_value":"list_value___I8ROJ","list_right":"list_right___od9xA"});
|
||||
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Activity/imgs/add.png
|
||||
var add_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAACjVJREFUWEfNlwtwE3Uex7/7SrZNmqRJ06ZPCKWt2FJeFdGTp1d5CMxJFRkV0ONGxDc+0FNP9JzTU1FwRofjnPMUxMdUlJED5byZKr55FEoFWsA+k9Am6ea5yWazu/+bTVtlnDsPBrhxZ/75/zf5Z7+f/++1/z+FX9hF/cJ48H8B2rSJcKqw0VxaMzm1YEFd4ueMcMGBvjlxwrLnlYcWGzXhShDG56yc+uoNdz3R9t+gLjAQof/2p3tWRXt3P+fKjmR3dCehWqs+q19036rL5i859p+gLhzQdYRZd/Fjl0m9OzZfOp52s4qCpq/7wNJxjB5T8+ncWz+/Obcoq/unUBcEqGlXU8mON59Z4e06uOyKyXnu6b/KpcK+MFqOB0DRKRQXsEphxZxnply/9Y8ApZwOdV6BOpua+Pc+fufajkOf3CmKgfEWR7Zx1tQy1I7hEPQICMVC8Aoq8mwSykqKW621W+eX19T1nHegXbt2GU9+vmNKd8fBu8P+9jk2G5ftKHTA7sjCRSN5uEcAQq8ARRPgESiEoyJqK4yarWTO0oc3vvluYyOlDkOdk4X27yfcl9vXjAx4D6/w97as4o1JS9lIF1zFdtgsBmTzGiwWCvl5aUS9IUipIAIpGh1dMi5yJVFSNe1tVLxxd1VVUfCcgbZs2lTY/u2H82JC5yol6ZtUXJaLEe4CuPKyYLdwsFk5wEgQT8rI4RMQTwkQwgEEZQZdHhU2JYoJE6q81hHTG9yzXt4LUESHOmsLtfQR0wdPLL40HDy5Ki32z7fnqvyoiiKMLLbCaTfCYTcgJy8LxjwTYqoGX1sQvCYg5Q+jx9OPfpmBL0jABWOYVs0hd+zCe59u3rrp9Scp6ayAZqwl7DVY8+vj+/9xG0NHphc4WdtItwPuklwUubJgL+CRVWACa8sBeDNUOguxUAKeg+2AGAATi6O1xYMeERhIUOCEJOrzE8i/fM4u85Rbl5WMWTRwxkDb395euu/jjb8L+1t/m5dHl5SPykW524HSIhPsrmxkuXJAW60AlwNQPAhYaBqDeCSCruZDSIUGYFGT2PdVD7wigczwoBMyJksBFNfV+oy19fUV8144+j+ACLX5+XXZXu/RG33ff7Ey2xitrqnON1aMdqC0xAx7cQ6M+VZQZivAWAAYAdCZ2CTQMr0ohtH+dTNifREU8AqOHgrCrxhATCYoogTXkTa4inNI9rSlNzzHvdTYuJhS/0MMEerFF9fzir9tquBpuUdLdF5VUWFja6oLUV6VC1uhBVyeHeBtAGUCYBhKED1z9SYDJAWiphALBdH6xXGEgypG2gm6O2X0iCw0joMkSaAPHIUpmYC74ZZnC++4//EaqkbOADV90GSLBr8yFl/9SOyTdauqksKJFenkyaXuEtoysa4M7ionrIVWMHn5AGsFwANgAKQB6IVWAlFEKLIIORJDxB9ByB+FrzuMYCgBo8mO8gIa/T1JNHsIGCMLWSPguo7D2BNB2ex5O8svm3n9uNkPitQ3u7aV+E82PtXn6bV39pvbWOJZUOyIj5l4STEqastgK3ICVgdA5wxZQ7dCEtASUKQYJDEKMRBG0BdG8FQMQb+IaCiFVFJDOqWBy6HhLC1EqZODIsTR9J0M8BwUUHCmejEi4Idx1MR247SGmdPmPHqK2tP46LNM8N01h1oEaKwZ0+tHwT3ODXNB0aBbMi7RIRLQEgOIR8KIBMIIeAX0e6MI9sUREiSIcQ2KAtAUBZqmQdMMVJUgLqcwurIAF1U5YFdj+NdeETGKg0xouAwBzOA90IyFojLhwfrauau/pg5sX7yfTuyfFJbzMGHmRFhLSzOZkomFVBTRYBCCPwC/L4TeDgH+vjiCQgrxWBopGdBUgBAKKqGgEQqKSqAoBFJaQypNIElpVIzIwVVXujHJDRz4dgBdcRYJsMiio5hl74bdwCNU+eBN1fPWbqWad847qUXay62VtRg9aTKkUB8GfAGc6u1Hb+cAPN4o/P0JhCMy4nECWQE0DRlxVe81QNVIZqz3mXI7dOm1VyUaeIZgxpQi3PgbF/rbB3DMqyHGGJGSE6gydmF0lgq5cvXvqxY+/2dqz3uLWtRQc60ICzSDGR1tffD64hgQZMREfZWAqg4CEI3KJDT5QZWAgu4igKJ0dw01/Z4eHOtZI8sKRhTyuOPmctiJjLa2BCJsFgakNIzJLriRRPaY5S+Nu+Hv91I73rhlBx1pmv/pl0E0f6+BUHRGeLim0LokrQsjIzzcGF2cBpih7/SeoQfhMk2H0XsGSEkEDEtwzex8TKvKQdfReMZCAYVCWOiBLRZDyfglmy+9+a3l1Lt/fegpLr7tsWNHBOz8UkJ2DgeOAVgGyIgOj4fEGWYYisrA/Hg/OHcwqAfn6ED6HFkmSEoaxlfzmFvnQMiTRlykETYY0OE7BU6IoHL8wm0zb3//Wuqt19bPindt/MhpCht2fpoEWBa8YejhNDUIpVvo9NWfboEhS+niP7hJt45u0qHf9MAKhTQUl9C4YmwO6LgBgjeNJG/Edz0DUIUYai+Z/f7cez9soHZv3m0Kh195vdD4z2u7PFZ0eFPgmNTgypnhFNbdxoBh2cFwzQjqHyQjPOzOzHio9g8DDcdWNKqBMQDjqg2wwIRghwohpuBYXwJqNIHJMxq2LFi9dRkFEGrPh49PSwe3vSP5O117W00wWIoO8bxRUuR4HiGyTVNSFk2TDBRUsCwNllHAIAWaoYfAGWi0AbRuRWY4wPVFDMMDqkIQi2uoGcvCmW2C0EvjyLE4OvuTyIKCKXOXvbDwzr88MPjqIIRNvXnrosCJfXfHpPw2g7NuQyIeC5NEZxZlyMoFxVmA9ITQwOGH0/GgneccJ822ohY5GXbRRHGoimgT5aiDpsDp0CAyGHbQ7Zk4Y+lMExNAcQmD6koTEgEeBw6KONwegdPKoX7J/StmL3/8tR9ermvXErpIWpxTNKo6vWDlEz85XRK6tdXv3LN90UdqtGuCgS7Zy1imLJTltBg7dZzJH1NeryYPvZyOnipQFVtbmqp6WyWSQ07G8jUllq8okl2VE7lpOWUlkPhxtRqXZzIzfR4WLd/1wWgp9V2x6LaZVy+5//gZ7xjvuosYR1nnbTKQ7uVmdYCAH/9KTye9AdkcO6Xe+ogc71kq9X1PFYxquO+T1g0vPfkkiF6vGhsbuex02hSL+q2aLDlSaTlPSx2YS8cPLY/645ZIDInSCQ1P19avXFdXV5c+YyDdtdu3bLn88LcbXi3MjVzMJuKIxOw+i9PMllXQ+QFfLwxc2b7S2psaJs++o/fnzu9NnYTvfu++hT1Hmqbnusa2Vl5cv2X2smXiGe8Yf3w4odavfaBhwPvxH1xOrSbfmqZzLDTEVEpNJfgD7rEr16zfsvqL0481Pwd23o7S69euHakq30wtcJKxZjMhLEk3FxTd/tnkqxf3nS3A+TtKX0eY3Y+BNwigZs5EAqAG963neJ1VDJ2j1hn9/RcH9G/18YRhbfi9pgAAAABJRU5ErkJggg==";
|
||||
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
||||
var fetch = __webpack_require__(91506);
|
||||
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 32 modules
|
||||
var ui_customization = __webpack_require__(89200);
|
||||
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
||||
var dayjs_min = __webpack_require__(9498);
|
||||
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
||||
// EXTERNAL MODULE: ./src/utils/authority.ts
|
||||
var authority = __webpack_require__(13186);
|
||||
// EXTERNAL MODULE: ./src/components/WangEditor/index.tsx
|
||||
var WangEditor = __webpack_require__(13224);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Activity/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var Page = function Page(_ref) {
|
||||
var _menus$find;
|
||||
var globalSetting = _ref.globalSetting,
|
||||
dispatch = _ref.dispatch,
|
||||
virtualSpaces = _ref.virtualSpaces;
|
||||
var _useState = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
list = _useState2[0],
|
||||
setList = _useState2[1];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
total = _useState4[0],
|
||||
setTotal = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
loading = _useState6[0],
|
||||
setLoading = _useState6[1];
|
||||
var virtualSpacesDetails = virtualSpaces.virtualSpacesDetails,
|
||||
menus = virtualSpaces.menus;
|
||||
var permission = (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.is_member) || (0,authority/* isSuperAdmins */.Ny)();
|
||||
var moduleName = (menus === null || menus === void 0 || (_menus$find = menus.find(function (e) {
|
||||
return e.module_url === location.pathname;
|
||||
})) === null || _menus$find === void 0 ? void 0 : _menus$find.name) || '';
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
isAddOpen = _useState8[0],
|
||||
setIsAddOpen = _useState8[1];
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
showEditor = _useState10[0],
|
||||
setShowEditor = _useState10[1];
|
||||
var _useState11 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState12 = slicedToArray_default()(_useState11, 2),
|
||||
start_time = _useState12[0],
|
||||
setstart_time = _useState12[1];
|
||||
var _useState13 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState14 = slicedToArray_default()(_useState13, 2),
|
||||
end_time = _useState14[0],
|
||||
setend_time = _useState14[1];
|
||||
var query = (0,_umi_production_exports.useParams)();
|
||||
var _useState15 = (0,_react_17_0_2_react.useState)({
|
||||
page: 1,
|
||||
limit: 10,
|
||||
activity_type: '',
|
||||
activity_status: ''
|
||||
}),
|
||||
_useState16 = slicedToArray_default()(_useState15, 2),
|
||||
params = _useState16[0],
|
||||
setParams = _useState16[1];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
getData();
|
||||
}, [params]);
|
||||
var textbookList = [{
|
||||
id: '',
|
||||
name: '全部'
|
||||
}, {
|
||||
id: '1',
|
||||
name: '线上会议'
|
||||
}, {
|
||||
id: '2',
|
||||
name: '线下活动'
|
||||
}];
|
||||
var genreList = [{
|
||||
id: '',
|
||||
name: '全部'
|
||||
}, {
|
||||
id: 'pending',
|
||||
name: '待开始'
|
||||
}, {
|
||||
id: 'ing',
|
||||
name: '进行中'
|
||||
}, {
|
||||
id: 'ended',
|
||||
name: '已结束'
|
||||
}];
|
||||
var getData = /*#__PURE__*/function () {
|
||||
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var res, _res$data, _res$data2;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(query.virtual_spacesId, "/activities.json"), {
|
||||
method: 'get',
|
||||
params: objectSpread2_default()({}, params)
|
||||
});
|
||||
case 2:
|
||||
res = _context.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
||||
setList(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
|
||||
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function getData() {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var handleChangeTextbook = function handleChangeTextbook(value) {
|
||||
params.page = 1;
|
||||
params.activity_type = value;
|
||||
setParams(objectSpread2_default()({}, params));
|
||||
};
|
||||
var handleChangeGenre = function handleChangeGenre(value) {
|
||||
params.page = 1;
|
||||
params.activity_status = value;
|
||||
setParams(objectSpread2_default()({}, params));
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
||||
className: Activitymodules.wrap,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTabs */.YG, {
|
||||
value: 'all',
|
||||
onChange: function onChange() {},
|
||||
tabBarExtraContent: permission && /*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
|
||||
onClick: function onClick() {
|
||||
setIsAddOpen(true);
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
width: 18,
|
||||
src: add_namespaceObject,
|
||||
style: {
|
||||
margin: '-2px 4px 0 0'
|
||||
}
|
||||
}), "\u521B\u5EFA\u6D3B\u52A8"]
|
||||
}),
|
||||
dataSource: [{
|
||||
id: 'all',
|
||||
name: moduleName,
|
||||
total: total
|
||||
}]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
|
||||
title: "\u4F1A\u8BAE\u7C7B\u578B",
|
||||
className: "mt25",
|
||||
value: params.activity_type,
|
||||
onChange: handleChangeTextbook,
|
||||
dataSource: textbookList,
|
||||
titleWidth: 61,
|
||||
showCount: true
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
|
||||
title: "\u4F1A\u8BAE\u72B6\u6001",
|
||||
value: params.activity_status,
|
||||
onChange: handleChangeGenre,
|
||||
dataSource: genreList,
|
||||
titleWidth: 61,
|
||||
showCount: true
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
||||
spinning: loading,
|
||||
children: [!list.length && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), !!list.length && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [list === null || list === void 0 ? void 0 : list.map(function (v, k) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Activitymodules.list,
|
||||
onClick: function onClick() {
|
||||
_umi_production_exports.history.push("/vtrs/".concat(query.virtual_spacesId, "/activity/").concat(v === null || v === void 0 ? void 0 : v.id, "/detail"));
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Activitymodules.list_left,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
||||
title: v === null || v === void 0 ? void 0 : v.name,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Activitymodules.list_content,
|
||||
children: v === null || v === void 0 ? void 0 : v.name
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Activitymodules.list_shuxin,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Activitymodules.list_status,
|
||||
style: {
|
||||
color: (v === null || v === void 0 ? void 0 : v.activity_status) == 'pending' ? '#019F7B' : (v === null || v === void 0 ? void 0 : v.activity_status) == 'ing' ? '#019F7B' : '#D5404E',
|
||||
border: (v === null || v === void 0 ? void 0 : v.activity_status) == 'pending' ? '1px solid #44D7B6' : (v === null || v === void 0 ? void 0 : v.activity_status) == 'ing' ? '1px solid #44D7B6' : '1px solid #F65160',
|
||||
background: (v === null || v === void 0 ? void 0 : v.activity_status) == 'pending' ? 'rgba(68,215,182,0.35)' : (v === null || v === void 0 ? void 0 : v.activity_status) == 'ing' ? 'rgba(68,215,182,0.80)' : 'rgba(246,81,96,0.35)'
|
||||
},
|
||||
children: (v === null || v === void 0 ? void 0 : v.activity_status) == 'pending' ? '待开始' : (v === null || v === void 0 ? void 0 : v.activity_status) == 'ing' ? '进行中' : '已结束'
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Activitymodules.list_type,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Activitymodules.list_label,
|
||||
children: "\u4F1A\u8BAE\u7C7B\u578B"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Activitymodules.list_value,
|
||||
children: (v === null || v === void 0 ? void 0 : v.activity_type) == '1' ? '线上会议' : '线下活动'
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Activitymodules.list_type,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Activitymodules.list_label,
|
||||
children: "\u4F1A\u8BAE\u65F6\u95F4"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
className: Activitymodules.list_value,
|
||||
children: [dayjs_min_default()(v === null || v === void 0 ? void 0 : v.start_time).format('YYYY年MM月DD日 HH:mm'), " - ", dayjs_min_default()(v === null || v === void 0 ? void 0 : v.end_time).format('YYYY年MM月DD日 HH:mm')]
|
||||
})]
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Activitymodules.list_right,
|
||||
children: [(v === null || v === void 0 ? void 0 : v.activity_type) == '1' && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
||||
children: (v === null || v === void 0 ? void 0 : v.activity_status) == 'ended' ? /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
||||
style: {
|
||||
marginLeft: 20
|
||||
},
|
||||
children: "\u67E5\u770B\u4F1A\u8BAE"
|
||||
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
||||
style: {
|
||||
marginLeft: 20
|
||||
},
|
||||
onClick: function onClick(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
},
|
||||
children: "\u52A0\u5165\u4F1A\u8BAE"
|
||||
})
|
||||
}), (v === null || v === void 0 ? void 0 : v.activity_type) == '2' && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
||||
style: {
|
||||
marginLeft: 20
|
||||
},
|
||||
children: "\u67E5\u770B\u6D3B\u52A8"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
||||
style: {
|
||||
marginLeft: 20
|
||||
},
|
||||
onClick: function onClick(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
modal/* default */.Z.confirm({
|
||||
title: '提示',
|
||||
okText: '确定删除',
|
||||
okButtonProps: {
|
||||
danger: true
|
||||
},
|
||||
icon: false,
|
||||
cancelText: '取消',
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: "\u786E\u8BA4\u5220\u9664\u8BE5\u6D3B\u52A8\u5417\uFF1F\u8BF7\u8C28\u614E\u64CD\u4F5C"
|
||||
})
|
||||
}),
|
||||
onOk: function () {
|
||||
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(query.virtual_spacesId, "/activities/").concat(v === null || v === void 0 ? void 0 : v.id, ".json"), {
|
||||
method: 'delete'
|
||||
});
|
||||
case 2:
|
||||
res = _context2.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
params.page = 1;
|
||||
setParams(objectSpread2_default()({}, params));
|
||||
message/* default */.ZP.success('删除成功');
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}()
|
||||
});
|
||||
},
|
||||
children: "\u5220\u9664"
|
||||
})]
|
||||
})]
|
||||
}, k);
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
wrap: false,
|
||||
align: "middle",
|
||||
justify: "space-between",
|
||||
style: {
|
||||
margin: "20px auto",
|
||||
padding: "0 20px"
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
||||
children: ["\u5171\xA0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: "#165DFF"
|
||||
},
|
||||
children: total || 0
|
||||
}), "\xA0\u6761\u6570\u636E"]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
||||
showSizeChanger: false,
|
||||
showQuickJumper: true,
|
||||
current: params.page,
|
||||
pageSize: params.limit,
|
||||
onChange: function onChange(pageNum, limit) {
|
||||
params.page = pageNum;
|
||||
setParams(objectSpread2_default()({}, params));
|
||||
},
|
||||
total: total || 0
|
||||
})
|
||||
})]
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
open: isAddOpen,
|
||||
width: 1200,
|
||||
destroyOnClose: true,
|
||||
centered: true,
|
||||
title: "创建教研活动",
|
||||
onCancel: function onCancel() {
|
||||
setIsAddOpen(false);
|
||||
},
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
_context3.next = 2;
|
||||
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(query.virtual_spacesId, "/activities.json"), {
|
||||
method: 'post',
|
||||
body: objectSpread2_default()(objectSpread2_default()({}, form.getFieldsValue()), {}, {
|
||||
start_time: start_time,
|
||||
end_time: end_time
|
||||
})
|
||||
});
|
||||
case 2:
|
||||
res = _context3.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
||||
message/* default */.ZP.success('创建成功');
|
||||
setIsAddOpen(false);
|
||||
getData();
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee3);
|
||||
})),
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
form: form,
|
||||
initialValues: {
|
||||
activity_type: '1'
|
||||
},
|
||||
colon: false,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "activity_type",
|
||||
label: "\u6D3B\u52A8\u7C7B\u578B",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
||||
onChange: function onChange(e) {
|
||||
if (e.target.value == '1') {
|
||||
setShowEditor(false);
|
||||
} else {
|
||||
setShowEditor(true);
|
||||
}
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: "1",
|
||||
children: "\u7EBF\u4E0A\u4F1A\u8BAE"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
||||
value: "2",
|
||||
children: "\u7EBF\u4E0B\u6D3B\u52A8"
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "name",
|
||||
label: "\u6D3B\u52A8\u540D\u79F0",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u6D3B\u52A8\u540D\u79F0"
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
span: 11,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "start_time",
|
||||
label: "\u5F00\u59CB\u65F6\u95F4",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
|
||||
style: {
|
||||
width: "100%"
|
||||
},
|
||||
showTime: true,
|
||||
format: "YYYY-MM-DD HH:mm:ss",
|
||||
onChange: function onChange(time, format) {
|
||||
setstart_time(format);
|
||||
}
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
span: 2
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
span: 11,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "end_time",
|
||||
label: "\u7ED3\u675F\u65F6\u95F4",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
|
||||
style: {
|
||||
width: "100%"
|
||||
},
|
||||
showTime: true,
|
||||
format: "YYYY-MM-DD HH:mm:ss",
|
||||
onChange: function onChange(time, format) {
|
||||
setend_time(format);
|
||||
}
|
||||
})
|
||||
})
|
||||
})]
|
||||
}), showEditor && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "content",
|
||||
label: "\u6D3B\u52A8\u5185\u5BB9",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(WangEditor/* default */.Z, {
|
||||
style: {
|
||||
height: '300px'
|
||||
}
|
||||
})
|
||||
})]
|
||||
})
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Activity = ((0,_umi_production_exports.connect)(function (_ref4) {
|
||||
var virtualSpaces = _ref4.virtualSpaces,
|
||||
globalSetting = _ref4.globalSetting;
|
||||
return {
|
||||
globalSetting: globalSetting,
|
||||
virtualSpaces: virtualSpaces
|
||||
};
|
||||
})(Page));
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue