You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1756 lines
77 KiB
1756 lines
77 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[30067],{
|
|
|
|
/***/ 30631:
|
|
/*!*****************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.5.2@@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.26.0@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(5891);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@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.5.2@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(88853);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.5.2@@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
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_EyeOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 53694:
|
|
/*!*************************************************!*\
|
|
!*** ./src/pages/Message/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 */ pages_Message; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectDestructuringEmpty.js
|
|
var objectDestructuringEmpty = __webpack_require__(70236);
|
|
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/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// 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/popover/index.js
|
|
var popover = __webpack_require__(60324);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(36920);
|
|
// 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/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
var es_radio = __webpack_require__(5112);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules
|
|
var space = __webpack_require__(81327);
|
|
;// CONCATENATED MODULE: ./src/pages/Message/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Messagemodules = ({"flex_box_center":"flex_box_center___Ja97S","flex_space_between":"flex_space_between___RJu4E","flex_box_vertical_center":"flex_box_vertical_center___jhPTF","flex_box_center_end":"flex_box_center_end___ZtezU","flex_box_column":"flex_box_column___MqeI4","wrap":"wrap___k3OOZ","head":"head___h6t3O","empty":"empty___S6QaM","content":"content___sMZPl","left":"left___J41Si","title":"title___GUZvZ","leftBar":"leftBar___u_UUF","li":"li___Hnrra","active":"active___N4MxL","right":"right___eLWWO","rightBar":"rightBar___fMTLo","center":"center____NDzP","tabs":"tabs___jdS5u","cut":"cut___w1Pz_","action":"action___QkQ0f","actActive":"actActive___ESHzD","answers":"answers___dVktP","btn":"btn___BnDvU","disableBtn":"disableBtn___WYJSQ","unsolved":"unsolved___z4SON","box":"box____EpoE","hot":"hot___oUwVX","animation":"animation___YQjk7","text":"text___Si2da"});
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(5219);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(42289);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(69824);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(22805);
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/reset.less?modules
|
|
var resetmodules = __webpack_require__(89642);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(61186);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
;// CONCATENATED MODULE: ./src/pages/Message/img/pt0.png
|
|
var pt0_namespaceObject = __webpack_require__.p + "static/pt0.03c22983.png";
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Message/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Message = function Message(_ref) {
|
|
var _rightData$data$, _rightData$data, _rightData$data2;
|
|
objectDestructuringEmpty_default()(_ref);
|
|
var _getJsonFromUrl = (0,util/* getJsonFromUrl */.oP)(),
|
|
id = _getJsonFromUrl.id,
|
|
position = _getJsonFromUrl.position;
|
|
var _useState = (0,_react_17_0_2_react.useState)(true),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
loading = _useState2[0],
|
|
setLoading = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
btnDisable = _useState4[0],
|
|
setBtnDisable = _useState4[1];
|
|
var placementRef = (0,_react_17_0_2_react.useRef)("bottomRight");
|
|
var mouseOutRef = (0,_react_17_0_2_react.useRef)();
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
openPop = _useState6[0],
|
|
setOpenPop = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(Number(id)),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
active = _useState8[0],
|
|
setActive = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
leftList = _useState10[0],
|
|
setLeftList = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(1),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
barBottomIndex = _useState12[0],
|
|
setBarBottomIndex = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(Number(position)),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
challengeId = _useState14[0],
|
|
setChallengeId = _useState14[1];
|
|
var saveChallengeId = (0,_react_17_0_2_react.useRef)(Number(position));
|
|
var _useState15 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
challengeList = _useState16[0],
|
|
setChallengeList = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
load = _useState18[0],
|
|
setLoad = _useState18[1];
|
|
var rightBar = (0,_react_17_0_2_react.useRef)(null);
|
|
var loadData = (0,_react_17_0_2_react.useRef)(1);
|
|
var _useState19 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
rightData = _useState20[0],
|
|
setRightData = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
value = _useState22[0],
|
|
setValue = _useState22[1];
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
visible = _useState24[0],
|
|
setVisible = _useState24[1];
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
isLoading = _useState26[0],
|
|
setisLoading = _useState26[1];
|
|
|
|
// const [disSubmit, setdisSubmit] = useState(false)
|
|
// const items = challengeList?.map((item: any) => {
|
|
// return {
|
|
// label:
|
|
// <Radio.Group value={challengeId} onChange={(k) => {
|
|
// setChallengeId(k.target.value)
|
|
// getRightData(active, k.target.value)
|
|
// }}>
|
|
// <Radio key={item.id} value={item.id}>{item.id === 0 ? item.subject : `${item.subject} 实训---第${item?.position}关`}</Radio>
|
|
// </Radio.Group>
|
|
// ,
|
|
// key: item.id
|
|
// }
|
|
// })
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
(0,_umi_production_exports.getDvaApp)()._store.dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: false
|
|
});
|
|
return function () {
|
|
(0,_umi_production_exports.getDvaApp)()._store.dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: true
|
|
});
|
|
};
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData();
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
rightBar.current.scrollTop = rightBar.current.scrollHeight;
|
|
}, [barBottomIndex]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
var dom = document.getElementById('wechat_QR_code_ids');
|
|
dom.classList.add('hide');
|
|
return function () {
|
|
dom.classList.remove('hide');
|
|
};
|
|
}, []);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res, result, _result$data, findId;
|
|
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/chats.json", {
|
|
method: 'post',
|
|
body: {
|
|
to_user_id: id
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
|
|
_context.next = 8;
|
|
break;
|
|
}
|
|
_context.next = 6;
|
|
return (0,fetch/* default */.ZP)("/api/chats.json", {
|
|
method: 'get',
|
|
params: {
|
|
to_user_id: id,
|
|
challenge_id: Number(position) || ''
|
|
}
|
|
});
|
|
case 6:
|
|
result = _context.sent;
|
|
if (result !== null && result !== void 0 && result.data) {
|
|
setLeftList((result === null || result === void 0 ? void 0 : result.data) || []);
|
|
findId = result === null || result === void 0 || (_result$data = result.data) === null || _result$data === void 0 || (_result$data = _result$data.find(function (e) {
|
|
return e.to_user_id === Number(id);
|
|
})) === null || _result$data === void 0 ? void 0 : _result$data.id;
|
|
setActive(findId);
|
|
getChallengeData(findId);
|
|
getRightData(findId, position);
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getChallengeData = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(itemId) {
|
|
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/chats/challenge_list.json", {
|
|
method: 'get',
|
|
params: {
|
|
id: itemId,
|
|
challenge_id: challengeId || ''
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
if (res !== null && res !== void 0 && res.challenges) {
|
|
setChallengeList([{
|
|
id: 0,
|
|
subject: "全部"
|
|
}].concat(toConsumableArray_default()(res.challenges)) || []);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function getChallengeData(_x) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getLeftData = /*#__PURE__*/function () {
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(itemId, challenge_id) {
|
|
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/chats.json", {
|
|
method: 'get',
|
|
params: {
|
|
to_user_id: itemId,
|
|
challenge_id: challenge_id || ''
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context3.sent;
|
|
if (res !== null && res !== void 0 && res.data) {
|
|
setLeftList((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return function getLeftData(_x2, _x3) {
|
|
return _ref4.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getRightData = /*#__PURE__*/function () {
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(itemId, challenge_id, isBottom) {
|
|
var res, _leftList$find, findId;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
setLoading(true);
|
|
_context4.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/chats/".concat(itemId, ".json"), {
|
|
method: 'get',
|
|
params: {
|
|
challenge_id: Number(challenge_id) || ''
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context4.sent;
|
|
if (res !== null && res !== void 0 && res.data) {
|
|
setRightData(objectSpread2_default()({}, res) || {});
|
|
setLoad(true);
|
|
findId = leftList === null || leftList === void 0 || (_leftList$find = leftList.find(function (e) {
|
|
return e.id === itemId;
|
|
})) === null || _leftList$find === void 0 ? void 0 : _leftList$find.to_user_id; //在这里改变传参:
|
|
if (window.location.host === "gpt.educoder.net") {
|
|
_umi_production_exports.history.replace("/chatgpt?id=0&position=0");
|
|
} else {
|
|
_umi_production_exports.history.replace("/chatgpt?id=".concat(findId || id, "&position=").concat(challenge_id));
|
|
}
|
|
if (isBottom) {
|
|
setBarBottomIndex(Math.random());
|
|
getLeftData(findId, challenge_id);
|
|
}
|
|
}
|
|
setLoading(false);
|
|
case 6:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return function getRightData(_x4, _x5, _x6) {
|
|
return _ref5.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleChange = function handleChange(e) {
|
|
setValue(e.target.value);
|
|
// 判断是否为纯空格
|
|
if (e.target.value.trim().length === 0) {
|
|
return;
|
|
}
|
|
};
|
|
var handleLeftChange = function handleLeftChange(itemId) {
|
|
loadData.current = loadData.current + 1;
|
|
setActive(itemId);
|
|
setChallengeId(0);
|
|
setValue('');
|
|
setBtnDisable(false);
|
|
getRightData(itemId, 0);
|
|
getChallengeData(itemId);
|
|
};
|
|
// 点击发送触发
|
|
var handleSummit = /*#__PURE__*/function () {
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
var _newRightData$data;
|
|
var now, newRightData, index, res;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
if (!(value.trim().length === 0)) {
|
|
_context5.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.error("不能输入纯空格");
|
|
return _context5.abrupt("return");
|
|
case 3:
|
|
if (!btnDisable) {
|
|
_context5.next = 5;
|
|
break;
|
|
}
|
|
return _context5.abrupt("return");
|
|
case 5:
|
|
if (value) {
|
|
_context5.next = 8;
|
|
break;
|
|
}
|
|
message/* default */.ZP.warning('请输入你要问的问题');
|
|
return _context5.abrupt("return");
|
|
case 8:
|
|
// setBtnDisable(true);
|
|
now = dayjs_min_default()().format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
|
newRightData = JSON.parse(JSON.stringify(rightData));
|
|
newRightData === null || newRightData === void 0 || (_newRightData$data = newRightData.data) === null || _newRightData$data === void 0 || _newRightData$data.push({
|
|
id: 0,
|
|
updated_at: now,
|
|
question: value,
|
|
answer: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Messagemodules.animation,
|
|
children: "\u8001\u5E08\u6B63\u5728\u56DE\u7B54\u4E2D\uFF0C\u8BF7\u7A0D\u540E"
|
|
})
|
|
});
|
|
setRightData(newRightData);
|
|
setBarBottomIndex(barBottomIndex + 1);
|
|
setValue('');
|
|
loadData.current = loadData.current + 1;
|
|
index = loadData.current; // getRightData(active, challengeId, true)
|
|
// // 判断是否为纯空格
|
|
// if (value.trim().length === 0) {
|
|
// message.error("不能输入纯空格")
|
|
// return
|
|
// }
|
|
setisLoading(true);
|
|
_context5.next = 19;
|
|
return (0,fetch/* default */.ZP)("/api/chats/get_answer", {
|
|
method: 'post',
|
|
body: {
|
|
chat_id: active,
|
|
to_user_id: id,
|
|
question: value,
|
|
challenge_id: challengeId || '',
|
|
time: now
|
|
}
|
|
});
|
|
case 19:
|
|
res = _context5.sent;
|
|
if (!(index !== loadData.current)) {
|
|
_context5.next = 22;
|
|
break;
|
|
}
|
|
return _context5.abrupt("return");
|
|
case 22:
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setisLoading(false);
|
|
// setdisSubmit(false)
|
|
getRightData(active, challengeId, true);
|
|
} else {
|
|
// setdisSubmit(false)
|
|
setisLoading(false);
|
|
}
|
|
// setBtnDisable(false)
|
|
case 23:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return function handleSummit() {
|
|
return _ref6.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleOk = function handleOk() {
|
|
getRightData(active, challengeId);
|
|
getLeftData(id, challengeId);
|
|
setVisible(false);
|
|
};
|
|
var handleAction = /*#__PURE__*/function () {
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(itemId, satisfied) {
|
|
var content,
|
|
res,
|
|
_args6 = arguments;
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
content = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : '';
|
|
setLoading(true);
|
|
_context6.next = 4;
|
|
return (0,fetch/* default */.ZP)("/api/chats/praise.json", {
|
|
method: 'post',
|
|
body: {
|
|
id: itemId,
|
|
satisfied: satisfied,
|
|
content: content
|
|
}
|
|
});
|
|
case 4:
|
|
res = _context6.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getRightData(active, challengeId);
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return function handleAction(_x7, _x8) {
|
|
return _ref7.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleKeyDown = function handleKeyDown(event) {
|
|
if (event.shiftKey && event.keyCode === 13) {
|
|
// 判断是否同时按下了Shift和Enter键
|
|
return;
|
|
}
|
|
if (event.keyCode === 13) {
|
|
event.preventDefault(); // 禁止换行操作
|
|
handleSummit();
|
|
}
|
|
};
|
|
var magList = ["\u8BF7".concat(rightData === null || rightData === void 0 ? void 0 : rightData.user_name, "\u8001\u5E08\u5C1D\u8BD5\u518D\u56DE\u7B54\u4E00\u6B21"), '可能启用了机器人,请老师亲自回答'];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.head,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
children: "\u5B9E\u8BAD >"
|
|
}), "\u6559\u5B66\u8F85\u5BFC\uFF08beta\u7248\u672C\uFF09"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.left,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Messagemodules.title,
|
|
children: "\u95EE\u7B54\u5217\u8868"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Messagemodules.leftBar,
|
|
children: leftList.map(function (e) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
onClick: function onClick() {
|
|
return handleLeftChange(e.id);
|
|
},
|
|
className: "".concat(Messagemodules.li, " ").concat(e.id === active ? Messagemodules.active : ''),
|
|
children: [e !== null && e !== void 0 && e.avatar ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(e === null || e === void 0 ? void 0 : e.avatar)
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: pt0_namespaceObject
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
title: e.user_name,
|
|
children: e.user_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: e.time
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: e.last_message
|
|
})]
|
|
})]
|
|
}, e.id);
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.right,
|
|
children: [load && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Messagemodules.title,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Messagemodules.center,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u4E0E", rightData === null || rightData === void 0 ? void 0 : rightData.user_name, "\u8001\u5E08\u6C9F\u901A\u4E2D\u2026"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.tabs,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-lianjie3"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A", rightData !== null && rightData !== void 0 && rightData.challenge_name ? "".concat(rightData === null || rightData === void 0 || (_rightData$data$ = rightData.data[0]) === null || _rightData$data$ === void 0 || (_rightData$data$ = _rightData$data$.shixun) === null || _rightData$data$ === void 0 ? void 0 : _rightData$data$.name, " \u5B9E\u8BAD---\u7B2C").concat(rightData === null || rightData === void 0 ? void 0 : rightData.challenge_position, "\u5173") : '全部']
|
|
}), !btnDisable && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
saveChallengeId.current = challengeId;
|
|
setVisible(true);
|
|
},
|
|
className: Messagemodules.cut,
|
|
children: "\u5207\u6362"
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Messagemodules.rightBar,
|
|
ref: rightBar,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
spinning: loading,
|
|
children: [!(rightData !== null && rightData !== void 0 && (_rightData$data = rightData.data) !== null && _rightData$data !== void 0 && _rightData$data.length) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Messagemodules.empty
|
|
}), rightData === null || rightData === void 0 || (_rightData$data2 = rightData.data) === null || _rightData$data2 === void 0 ? void 0 : _rightData$data2.map(function (e, i) {
|
|
var _e$shixun, _e$shixun2, _e$challenge;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
children: [!!e.question && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.li,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(rightData === null || rightData === void 0 ? void 0 : rightData.my_avatar)
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
children: rightData.my_user_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: dayjs_min_default()(e.updated_at).format("YYYY-MM-DD HH:mm")
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("pre", {
|
|
children: e.question
|
|
})]
|
|
})]
|
|
}), !!e.answer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: i === 0 ? {
|
|
borderTop: 0
|
|
} : {},
|
|
className: "".concat(Messagemodules.li, " ").concat(Messagemodules.active),
|
|
children: [rightData !== null && rightData !== void 0 && rightData.avatar ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(rightData === null || rightData === void 0 ? void 0 : rightData.avatar)
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: pt0_namespaceObject
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: "flex"
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
style: {
|
|
marginRight: "20px"
|
|
},
|
|
children: rightData.user_name
|
|
}), (_e$shixun = e.shixun) !== null && _e$shixun !== void 0 && _e$shixun.name ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
display: "flex",
|
|
alignItems: "center"
|
|
},
|
|
children: ["\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A", (_e$shixun2 = e.shixun) === null || _e$shixun2 === void 0 ? void 0 : _e$shixun2.name, " \u5B9E\u8BAD---\u7B2C", (_e$challenge = e.challenge) === null || _e$challenge === void 0 ? void 0 : _e$challenge.position, "\u5173"]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
display: "flex",
|
|
alignItems: "center"
|
|
},
|
|
children: "\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A\u5168\u90E8"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: dayjs_min_default()(e.updated_at).format("YYYY-MM-DD HH:mm")
|
|
})]
|
|
}), typeof e.answer === "string" ? /*#__PURE__*/(0,jsx_runtime.jsx)("pre", {
|
|
children: e.answer
|
|
}) : e.answer, !!e.question && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.action,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
onClick: function onClick() {
|
|
handleAction(e.id, e.satisfied === 1 ? -1 : 1);
|
|
},
|
|
className: "mr30 ".concat(e.satisfied === 1 ? Messagemodules.actActive : ''),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-yijiejue"
|
|
}), "\u5DF2\u89E3\u51B3"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
autoAdjustOverflow: false,
|
|
destroyTooltipOnHide: true,
|
|
open: openPop[i],
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
return trigger;
|
|
},
|
|
placement: placementRef.current,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.box,
|
|
onMouseLeave: function onMouseLeave(e) {
|
|
clearTimeout(mouseOutRef.current);
|
|
openPop[i] = false;
|
|
setOpenPop(objectSpread2_default()({}, openPop));
|
|
},
|
|
onMouseOver: function onMouseOver() {
|
|
clearTimeout(mouseOutRef.current);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5\uFF1A"
|
|
}), magList.map(function (p, n) {
|
|
var isTrue = p === e.content;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
// style={n === 0 ? { width: p.length * 17 } : {}}
|
|
onClick: function onClick() {
|
|
handleAction(e.id, isTrue ? -1 : 0, isTrue ? '' : p);
|
|
},
|
|
className: isTrue ? Messagemodules.hot : '',
|
|
children: p
|
|
}, p);
|
|
})]
|
|
}),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
onMouseOver: function onMouseOver(e) {
|
|
clearTimeout(mouseOutRef.current);
|
|
if (window.innerHeight - e.target.getBoundingClientRect().top < 350) {
|
|
placementRef.current = "topRight";
|
|
} else {
|
|
placementRef.current = "bottomRight";
|
|
}
|
|
openPop = {};
|
|
openPop[i] = true;
|
|
setOpenPop(objectSpread2_default()({}, openPop));
|
|
},
|
|
onMouseOut: function onMouseOut(e) {
|
|
mouseOutRef.current = setTimeout(function () {
|
|
clearTimeout(mouseOutRef.current);
|
|
openPop[i] = false;
|
|
setOpenPop(objectSpread2_default()({}, openPop));
|
|
}, 800);
|
|
},
|
|
className: "".concat(Messagemodules.unsolved, " ").concat(e.satisfied === 0 ? Messagemodules.actActive : ''),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-weijiejuezhengchang"
|
|
}), "\u672A\u89E3\u51B3"]
|
|
})
|
|
})]
|
|
})]
|
|
})]
|
|
})]
|
|
}, e.id);
|
|
})]
|
|
})
|
|
}), load && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Messagemodules.answers,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
// onKeyDown={handleKeyDown}
|
|
value: value,
|
|
onChange: handleChange
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
loading: isLoading,
|
|
onClick: handleSummit,
|
|
className: Messagemodules.btn,
|
|
children: "\u53D1\u9001"
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
keyboard: false,
|
|
closable: false,
|
|
destroyOnClose: true,
|
|
onCancel: function onCancel() {
|
|
setChallengeId(saveChallengeId.current);
|
|
setVisible(false);
|
|
},
|
|
onOk: handleOk,
|
|
open: visible,
|
|
wrapClassName: resetmodules/* default */.Z.CustomCss,
|
|
title: "\u66F4\u6362\u5173\u8054",
|
|
width: "666px",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
value: challengeId,
|
|
onChange: function onChange(k) {
|
|
return setChallengeId(k.target.value);
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(space/* default */.Z, {
|
|
direction: "vertical",
|
|
children: challengeList === null || challengeList === void 0 ? void 0 : challengeList.map(function (e) {
|
|
var _e$shixun3;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: e.id,
|
|
children: e.id === 0 ? e.subject : "".concat((_e$shixun3 = e.shixun) === null || _e$shixun3 === void 0 ? void 0 : _e$shixun3.name, " \u5B9E\u8BAD---\u7B2C").concat(e === null || e === void 0 ? void 0 : e.challenge_position, "\u5173")
|
|
}, e.id);
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var pages_Message = (Message);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 89642:
|
|
/*!************************************************************!*\
|
|
!*** ./src/components/ui-customization/reset.less?modules ***!
|
|
\************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___vG4eV","flex_space_between":"flex_space_between___qVVxe","flex_box_vertical_center":"flex_box_vertical_center___P8Z8s","flex_box_center_end":"flex_box_center_end___VMme3","flex_box_column":"flex_box_column___VMHwm","dropdownmenus":"dropdownmenus___oVzoj","popupClassNames":"popupClassNames___OcZq7","selectdown":"selectdown___mmcA8"});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 77578:
|
|
/*!**********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/_util/getRenderPropValue.js ***!
|
|
\**********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Z: function() { return /* binding */ getRenderPropValue; }
|
|
/* harmony export */ });
|
|
const getRenderPropValue = propValue => {
|
|
if (!propValue) {
|
|
return null;
|
|
}
|
|
if (typeof propValue === 'function') {
|
|
return propValue();
|
|
}
|
|
return propValue;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ 36920:
|
|
/*!*********************************************************************!*\
|
|
!*** ./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.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/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_5_1_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.26.0@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(5891);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@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.5.2@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(88853);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.5.2@@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
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_EyeInvisibleOutlined = (RefIcon);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.2@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
|
var EyeOutlined = __webpack_require__(30631);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.2@rc-util/es/omit.js
|
|
var omit = __webpack_require__(45115);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.2@rc-util/es/ref.js
|
|
var es_ref = __webpack_require__(35648);
|
|
// 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_5_1_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.5.2@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
|
var SearchOutlined = __webpack_require__(21970);
|
|
// 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_5_1_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);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 39722:
|
|
/*!***************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/PurePanel.js ***!
|
|
\***************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ t5: function() { return /* binding */ RawPurePanel; }
|
|
/* harmony export */ });
|
|
/* unused harmony export getOverlay */
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tooltip */ 55477);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 17356);
|
|
"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 getOverlay = (prefixCls, title, content) => {
|
|
if (!title && !content) return undefined;
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
className: `${prefixCls}-title`
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
className: `${prefixCls}-inner-content`
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(content)));
|
|
};
|
|
const RawPurePanel = props => {
|
|
const {
|
|
hashId,
|
|
prefixCls,
|
|
className,
|
|
style,
|
|
placement = 'top',
|
|
title,
|
|
content,
|
|
children
|
|
} = props;
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className),
|
|
style: style
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
className: `${prefixCls}-arrow`
|
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_tooltip__WEBPACK_IMPORTED_MODULE_1__/* .Popup */ .G, Object.assign({}, props, {
|
|
className: hashId,
|
|
prefixCls: prefixCls
|
|
}), children || getOverlay(prefixCls, title, content)));
|
|
};
|
|
const PurePanel = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls"]);
|
|
const {
|
|
getPrefixCls
|
|
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_4__/* .ConfigContext */ .E_);
|
|
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
|
|
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(RawPurePanel, Object.assign({}, restProps, {
|
|
prefixCls: prefixCls,
|
|
hashId: hashId
|
|
})));
|
|
};
|
|
/* harmony default export */ __webpack_exports__.ZP = (PurePanel);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 60324:
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/index.js ***!
|
|
\***********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
|
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/motion */ 62892);
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tooltip */ 6848);
|
|
/* harmony import */ var _PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PurePanel */ 39722);
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 17356);
|
|
"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;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CSSINJS
|
|
|
|
const Overlay = _ref => {
|
|
let {
|
|
title,
|
|
content,
|
|
prefixCls
|
|
} = _ref;
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
className: `${prefixCls}-title`
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
className: `${prefixCls}-inner-content`
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(content)));
|
|
};
|
|
const Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.forwardRef((props, ref) => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
title,
|
|
content,
|
|
overlayClassName,
|
|
placement = 'top',
|
|
trigger = 'hover',
|
|
mouseEnterDelay = 0.1,
|
|
mouseLeaveDelay = 0.1,
|
|
overlayStyle = {}
|
|
} = props,
|
|
otherProps = __rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle"]);
|
|
const {
|
|
getPrefixCls
|
|
} = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
|
|
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(prefixCls);
|
|
const rootPrefixCls = getPrefixCls();
|
|
const overlayCls = classnames__WEBPACK_IMPORTED_MODULE_0___default()(overlayClassName, hashId);
|
|
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, Object.assign({
|
|
placement: placement,
|
|
trigger: trigger,
|
|
mouseEnterDelay: mouseEnterDelay,
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
overlayStyle: overlayStyle
|
|
}, otherProps, {
|
|
prefixCls: prefixCls,
|
|
overlayClassName: overlayCls,
|
|
ref: ref,
|
|
overlay: title || content ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Overlay, {
|
|
prefixCls: prefixCls,
|
|
title: title,
|
|
content: content
|
|
}) : null,
|
|
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_6__/* .getTransitionName */ .m)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
|
|
"data-popover-inject": true
|
|
})));
|
|
});
|
|
if (false) {}
|
|
Popover._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP;
|
|
/* harmony default export */ __webpack_exports__.Z = (Popover);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 17356:
|
|
/*!*****************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/style/index.js ***!
|
|
\*****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 17313);
|
|
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ 29878);
|
|
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/placementArrow */ 19447);
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 33166);
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 83116);
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ 37613);
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
const genBaseStyle = token => {
|
|
const {
|
|
componentCls,
|
|
popoverColor,
|
|
minWidth,
|
|
fontWeightStrong,
|
|
popoverPadding,
|
|
boxShadowSecondary,
|
|
colorTextHeading,
|
|
borderRadiusLG: borderRadius,
|
|
zIndexPopup,
|
|
marginXS,
|
|
colorBgElevated,
|
|
popoverBg
|
|
} = token;
|
|
return [{
|
|
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), {
|
|
position: 'absolute',
|
|
top: 0,
|
|
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
left: {
|
|
_skip_check_: true,
|
|
value: 0
|
|
},
|
|
zIndex: zIndexPopup,
|
|
fontWeight: 'normal',
|
|
whiteSpace: 'normal',
|
|
textAlign: 'start',
|
|
cursor: 'auto',
|
|
userSelect: 'text',
|
|
transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,
|
|
'--antd-arrow-background-color': colorBgElevated,
|
|
'&-rtl': {
|
|
direction: 'rtl'
|
|
},
|
|
'&-hidden': {
|
|
display: 'none'
|
|
},
|
|
[`${componentCls}-content`]: {
|
|
position: 'relative'
|
|
},
|
|
[`${componentCls}-inner`]: {
|
|
backgroundColor: popoverBg,
|
|
backgroundClip: 'padding-box',
|
|
borderRadius,
|
|
boxShadow: boxShadowSecondary,
|
|
padding: popoverPadding
|
|
},
|
|
[`${componentCls}-title`]: {
|
|
minWidth,
|
|
marginBottom: marginXS,
|
|
color: colorTextHeading,
|
|
fontWeight: fontWeightStrong
|
|
},
|
|
[`${componentCls}-inner-content`]: {
|
|
color: popoverColor
|
|
}
|
|
})
|
|
},
|
|
// Arrow Style
|
|
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(token, {
|
|
colorBg: 'var(--antd-arrow-background-color)'
|
|
}),
|
|
// Pure Render
|
|
{
|
|
[`${componentCls}-pure`]: {
|
|
position: 'relative',
|
|
maxWidth: 'none',
|
|
margin: token.sizePopupArrow,
|
|
display: 'inline-block',
|
|
[`${componentCls}-content`]: {
|
|
display: 'inline-block'
|
|
}
|
|
}
|
|
}];
|
|
};
|
|
const genColorStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[componentCls]: _theme_internal__WEBPACK_IMPORTED_MODULE_2__/* .PresetColors */ .i.map(colorKey => {
|
|
const lightColor = token[`${colorKey}6`];
|
|
return {
|
|
[`&${componentCls}-${colorKey}`]: {
|
|
'--antd-arrow-background-color': lightColor,
|
|
[`${componentCls}-inner`]: {
|
|
backgroundColor: lightColor
|
|
},
|
|
[`${componentCls}-arrow`]: {
|
|
background: 'transparent'
|
|
}
|
|
}
|
|
};
|
|
})
|
|
};
|
|
};
|
|
const genWireframeStyle = token => {
|
|
const {
|
|
componentCls,
|
|
lineWidth,
|
|
lineType,
|
|
colorSplit,
|
|
paddingSM,
|
|
controlHeight,
|
|
fontSize,
|
|
lineHeight,
|
|
padding
|
|
} = token;
|
|
const titlePaddingBlockDist = controlHeight - Math.round(fontSize * lineHeight);
|
|
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
|
|
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
|
|
const popoverPaddingHorizontal = padding;
|
|
return {
|
|
[componentCls]: {
|
|
[`${componentCls}-inner`]: {
|
|
padding: 0
|
|
},
|
|
[`${componentCls}-title`]: {
|
|
margin: 0,
|
|
padding: `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px`,
|
|
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`
|
|
},
|
|
[`${componentCls}-inner-content`]: {
|
|
padding: `${paddingSM}px ${popoverPaddingHorizontal}px`
|
|
}
|
|
}
|
|
};
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Popover', token => {
|
|
const {
|
|
colorBgElevated,
|
|
colorText,
|
|
wireframe
|
|
} = token;
|
|
const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__/* .merge */ .TS)(token, {
|
|
popoverPadding: 12,
|
|
popoverBg: colorBgElevated,
|
|
popoverColor: colorText
|
|
});
|
|
return [genBaseStyle(popoverToken), genColorStyle(popoverToken), wireframe && genWireframeStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__/* .initZoomMotion */ ._y)(popoverToken, 'zoom-big')];
|
|
}, token => ({
|
|
width: 177,
|
|
minWidth: 177,
|
|
zIndexPopup: token.zIndexPopupBase + 30
|
|
}), {
|
|
resetStyle: false,
|
|
deprecatedTokens: [['width', 'minWidth']]
|
|
}));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.2@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(84147);
|
|
// 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_5_1_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_5_1_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);
|
|
|
|
/***/ })
|
|
|
|
}]); |