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.
NewEduCoderBuild/39046.a2363983.async.js

822 lines
37 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[39046],{
/***/ 17852:
/*!**************************************************************************************************!*\
!*** ./src/pages/User/Detail/AccountInfo/components/AppplyDepartmentModal/index.tsx + 1 modules ***!
\**************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_AppplyDepartmentModal; }
});
// 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/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(39647);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// 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__(5841);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(10249);
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// 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/button/index.js
var es_button = __webpack_require__(3113);
;// CONCATENATED MODULE: ./src/pages/User/Detail/AccountInfo/components/AppplyDepartmentModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AppplyDepartmentModalmodules = ({"flexRow":"flexRow___fPYf_","flexColumn":"flexColumn___RQ2Gd","formWrap":"formWrap___f1Xok","example":"example___ZKBAG","footerWrap":"footerWrap___uOSLv"});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/User/Detail/AccountInfo/components/AppplyDepartmentModal/index.tsx
var _excluded = ["account", "globalSetting", "loading", "dispatch", "schoolName", "departmentName", "visible", "onClose", "onSuccess"];
var TextArea = input/* default */.Z.TextArea;
var AppplyDepartmentModal = function AppplyDepartmentModal(_ref) {
var account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
schoolName = _ref.schoolName,
departmentName = _ref.departmentName,
visible = _ref.visible,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
_ref$onSuccess = _ref.onSuccess,
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
props = objectWithoutProperties_default()(_ref, _excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var schoolId = (0,_react_17_0_2_react.useRef)();
(0,_react_17_0_2_react.useEffect)(function () {
schoolId.current = props.schoolId;
}, [props.schoolId]);
(0,_react_17_0_2_react.useEffect)(function () {
form.setFieldsValue({
department: departmentName
});
}, [departmentName]);
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var _ref3, department, remarks, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_ref3 = values || {}, department = _ref3.department, remarks = _ref3.remarks;
_context.next = 3;
return dispatch({
type: 'account/appplyDepartment',
payload: {
school_id: schoolId.current,
name: department,
remarks: remarks
}
});
case 3:
res = _context.sent;
onClose();
if (res) {
message/* default */.ZP.success("新增院系/部门成功!");
onSuccess(department);
}
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
keyboard: false,
closable: false,
destroyOnClose: true,
open: visible,
title: "\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",
width: "600px",
footer: null,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: AppplyDepartmentModalmodules.formWrap,
form: form,
labelCol: {
span: 4
},
wrapperCol: {
span: 20
},
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5355\u4F4D\u540D\u79F0\uFF1A",
children: schoolName
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u90E8\u95E8\u540D\u79F0\uFF1A",
name: "department",
rules: [{
required: true,
message: '请输入部门或者学院名称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BF4\u660E\uFF1A",
name: "remarks",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AppplyDepartmentModalmodules.footerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "mr5",
size: 'middle',
onClick: function onClick() {
onClose();
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: 'middle',
type: "primary",
htmlType: "submit",
loading: loading['account/appplyDepartment'],
children: "\u4FDD\u5B58"
})]
})
})]
})
});
};
/* harmony default export */ var components_AppplyDepartmentModal = ((0,_umi_production_exports.connect)(function (_ref4) {
var account = _ref4.account,
loading = _ref4.loading,
globalSetting = _ref4.globalSetting;
return {
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(AppplyDepartmentModal));
/***/ }),
/***/ 17518:
/*!**********************************************************************************************!*\
!*** ./src/pages/User/Detail/AccountInfo/components/AppplySchoolModal/index.tsx + 1 modules ***!
\**********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_AppplySchoolModal; }
});
// 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/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(39647);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// 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__(5841);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(10249);
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// 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/cascader/index.js + 18 modules
var cascader = __webpack_require__(19842);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
var CheckCircleFilled = __webpack_require__(29679);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
var CloseCircleFilled = __webpack_require__(19248);
// EXTERNAL MODULE: ./src/utils/cityData.ts
var cityData = __webpack_require__(70912);
;// CONCATENATED MODULE: ./src/pages/User/Detail/AccountInfo/components/AppplySchoolModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AppplySchoolModalmodules = ({"flexRow":"flexRow___Ys7oN","flexColumn":"flexColumn___awMMf","formWrap":"formWrap___j8Lzv","example":"example___xf0jY","footerWrap":"footerWrap___GFnQD"});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/User/Detail/AccountInfo/components/AppplySchoolModal/index.tsx
var _excluded = ["account", "globalSetting", "loading", "dispatch", "schoolName", "visible", "onClose", "onSuccess"];
var filter = function filter(inputValue, path) {
return path.some(function (option) {
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
});
};
var TextArea = input/* default */.Z.TextArea;
var AppplySchoolModal = function AppplySchoolModal(_ref) {
var account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
schoolName = _ref.schoolName,
visible = _ref.visible,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
_ref$onSuccess = _ref.onSuccess,
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
props = objectWithoutProperties_default()(_ref, _excluded);
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 () {
form.setFieldsValue({
name: schoolName
});
}, [schoolName]);
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var _ref3, name, _ref3$city, city, address, remarks, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_ref3 = values || {}, name = _ref3.name, _ref3$city = _ref3.city, city = _ref3$city === void 0 ? [] : _ref3$city, address = _ref3.address, remarks = _ref3.remarks;
_context.next = 3;
return dispatch({
type: 'account/appplySchool',
payload: {
name: name,
province: city[0],
city: city[1],
address: address,
remarks: remarks
}
});
case 3:
res = _context.sent;
onClose();
if (res) {
message/* default */.ZP.success("新增学校/单位成功!");
onSuccess(name);
}
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
keyboard: false,
closable: false,
destroyOnClose: true,
open: visible,
title: "\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",
width: "600px",
footer: null,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: AppplySchoolModalmodules.formWrap,
form: form,
labelCol: {
span: 4
},
wrapperCol: {
span: 20
},
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5355\u4F4D\u5168\u79F0\uFF1A",
name: "name",
rules: [{
required: true,
message: '请输入学校或工作单位'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(AppplySchoolModalmodules.flexRow, " ").concat(AppplySchoolModalmodules.example),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u793A\u4F8B\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AppplySchoolModalmodules.flexColumn,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CheckCircleFilled/* default */.Z, {
style: {
color: "rgb(82, 196, 26)"
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 ml5",
children: "\u6B63\u786E\u793A\u4F8B\uFF1A\u6E56\u5357\u5927\u5B66"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CloseCircleFilled/* default */.Z, {
style: {
color: "red"
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 ml5",
children: "\u9519\u8BEF\u793A\u4F8B\uFF1A\u6E56\u5927\u5CB3\u9E93\u4E66\u9662"
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5730\u533A\uFF1A",
name: "city",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cascader/* default */.Z, {
allowClear: true,
size: 'middle',
options: cityData/* CityData */.P,
placeholder: "\u8BF7\u9009\u62E9\u6240\u5728\u5730",
showSearch: {
matchInputWidth: true,
filter: filter
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BE6\u7EC6\u5730\u5740\uFF1A",
name: "address",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BF4\u660E\uFF1A",
name: "remarks",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AppplySchoolModalmodules.footerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "mr5",
size: 'middle',
onClick: function onClick() {
onClose();
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: 'middle',
type: "primary",
htmlType: "submit",
loading: loading['account/appplySchool'],
children: "\u4FDD\u5B58"
})]
})
})]
})
});
};
/* harmony default export */ var components_AppplySchoolModal = ((0,_umi_production_exports.connect)(function (_ref4) {
var account = _ref4.account,
loading = _ref4.loading,
globalSetting = _ref4.globalSetting;
return {
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(AppplySchoolModal));
/***/ }),
/***/ 18175:
/*!*****************************************************!*\
!*** ./src/pages/User/Detail/AccountInfo/index.tsx ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ 5841);
/* harmony import */ var _components_ui_customization__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/ui-customization */ 77421);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var ManageHead = function ManageHead(_ref) {
var children = _ref.children,
active = _ref.active;
var params = (0,umi__WEBPACK_IMPORTED_MODULE_2__.useParams)();
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(active || 1),
_useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
activeTab = _useState2[0],
setActiveTab = _useState2[1];
var username = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
var _location$pathname$sp;
username.current = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[2];
// const active = location.pathname.split('/')?.[3];
// setActiveTab(active);
}, [location.pathname]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("section", {
style: {
backgroundColor: "#fff",
padding: "22px 0 0 38px"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_ui_customization__WEBPACK_IMPORTED_MODULE_3__/* .CustomTabs */ .YG, {
value: active,
onChange: function onChange(e) {
setActiveTab(e);
},
tabBarExtraContent: children,
dataSource: [{
id: 1,
name: '基本信息',
link: "/users/".concat(username.current, "/baseInfo/edit")
}, {
id: 2,
name: '实名认证',
link: "/users/".concat(username.current, "/realNameCertification")
}, {
id: 3,
name: '职业认证',
link: "/users/".concat(username.current, "/careerCertification")
}]
})
});
};
/* harmony default export */ __webpack_exports__.Z = (ManageHead);
/***/ }),
/***/ 88522:
/*!*****************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/auto-complete/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 rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 11592);
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ 2738);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ 92343);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ 57809);
"use client";
const {
Option
} = _select__WEBPACK_IMPORTED_MODULE_3__["default"];
function isSelectOptionOrSelectOptGroup(child) {
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
}
const AutoComplete = (props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
popupClassName,
dropdownClassName,
children,
dataSource
} = props;
const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children);
// ============================= Input =============================
let customizeInput;
if (childNodes.length === 1 && (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
[customizeInput] = childNodes;
}
const getInputElement = customizeInput ? () => customizeInput : undefined;
// ============================ Options ============================
let optionChildren;
// [Legacy] convert `children` or `dataSource` into option children
if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
optionChildren = children;
} else {
optionChildren = dataSource ? dataSource.map(item => {
if ((0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(item)) {
return item;
}
switch (typeof item) {
case 'string':
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
key: item,
value: item
}, item);
case 'object':
{
const {
value: optionValue
} = item;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
key: optionValue,
value: optionValue
}, item.text);
}
default:
false ? 0 : void 0;
return undefined;
}
}) : [];
}
if (false) {}
const {
getPrefixCls
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls('select', customizePrefixCls);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_select__WEBPACK_IMPORTED_MODULE_3__["default"], Object.assign({
ref: ref,
suffixIcon: null
}, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props, ['dataSource', 'dropdownClassName']), {
prefixCls: prefixCls,
popupClassName: popupClassName || dropdownClassName,
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-auto-complete`, className),
mode: _select__WEBPACK_IMPORTED_MODULE_3__["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE
}, {
// Internal api
getInputElement
}), optionChildren);
};
const RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(AutoComplete);
// We don't care debug panel
/* istanbul ignore next */
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(RefAutoComplete);
RefAutoComplete.Option = Option;
RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
if (false) {}
/* harmony default export */ __webpack_exports__.Z = (RefAutoComplete);
/***/ }),
/***/ 57809:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/select/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 rc_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-select */ 77861);
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-util/es/omit */ 2738);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/motion */ 62892);
/* harmony import */ var _util_statusUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/statusUtils */ 19080);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider/DisabledContext */ 1684);
/* harmony import */ var _config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider/defaultRenderEmpty */ 93891);
/* harmony import */ var _config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider/hooks/useSize */ 19716);
/* harmony import */ var _form_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../form/context */ 32441);
/* harmony import */ var _space_Compact__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../space/Compact */ 33234);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 14154);
/* harmony import */ var _useBuiltinPlacements__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./useBuiltinPlacements */ 58582);
/* harmony import */ var _useShowArrow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useShowArrow */ 84443);
/* harmony import */ var _utils_iconUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/iconUtil */ 66339);
"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;
};
// TODO: 4.0 - codemod should help to change `filterOption` to support node props.
const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
const InternalSelect = (_a, ref) => {
var _b;
var {
prefixCls: customizePrefixCls,
bordered = true,
className,
rootClassName,
getPopupContainer,
popupClassName,
dropdownClassName,
listHeight = 256,
placement,
listItemHeight = 24,
size: customizeSize,
disabled: customDisabled,
notFoundContent,
status: customStatus,
builtinPlacements,
dropdownMatchSelectWidth,
popupMatchSelectWidth,
direction: propDirection,
style,
allowClear
} = _a,
props = __rest(_a, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear"]);
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
renderEmpty,
direction: contextDirection,
virtual,
popupMatchSelectWidth: contextPopupMatchSelectWidth,
popupOverflow,
select
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls('select', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
const direction = propDirection !== null && propDirection !== void 0 ? propDirection : contextDirection;
const {
compactSize,
compactItemClassnames
} = (0,_space_Compact__WEBPACK_IMPORTED_MODULE_4__/* .useCompactItemContext */ .ri)(prefixCls, direction);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
const mode = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => {
const {
mode: m
} = props;
if (m === 'combobox') {
return undefined;
}
if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {
return 'combobox';
}
return m;
}, [props.mode]);
const isMultiple = mode === 'multiple' || mode === 'tags';
const showSuffixIcon = (0,_useShowArrow__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props.suffixIcon, props.showArrow);
const mergedPopupMatchSelectWidth = (_b = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _b !== void 0 ? _b : contextPopupMatchSelectWidth;
// ===================== Form Status =====================
const {
status: contextStatus,
hasFeedback,
isFormItemInput,
feedbackIcon
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_form_context__WEBPACK_IMPORTED_MODULE_7__/* .FormItemInputContext */ .aM);
const mergedStatus = (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_8__/* .getMergedStatus */ .F)(contextStatus, customStatus);
// ===================== Empty =====================
let mergedNotFound;
if (notFoundContent !== undefined) {
mergedNotFound = notFoundContent;
} else if (mode === 'combobox') {
mergedNotFound = null;
} else {
mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
componentName: "Select"
});
}
// ===================== Icons =====================
const {
suffixIcon,
itemIcon,
removeIcon,
clearIcon
} = (0,_utils_iconUtil__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)(Object.assign(Object.assign({}, props), {
multiple: isMultiple,
hasFeedback,
feedbackIcon,
showSuffixIcon,
prefixCls,
showArrow: props.showArrow,
componentName: 'Select'
}));
const mergedAllowClear = allowClear === true ? {
clearIcon
} : allowClear;
const selectProps = (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(props, ['suffixIcon', 'itemIcon']);
const rcSelectRtlDropdownClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()(popupClassName || dropdownClassName, {
[`${prefixCls}-dropdown-${direction}`]: direction === 'rtl'
}, rootClassName, hashId);
const mergedSize = (0,_config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(ctx => {
var _a;
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
});
// ===================== Disabled =====================
const disabled = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()({
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-borderless`]: !bordered,
[`${prefixCls}-in-form-item`]: isFormItemInput
}, (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_8__/* .getStatusClassNames */ .Z)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, select === null || select === void 0 ? void 0 : select.className, className, rootClassName, hashId);
// ===================== Placement =====================
const memoPlacement = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => {
if (placement !== undefined) {
return placement;
}
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
}, [placement, direction]);
const mergedBuiltinPlacements = (0,_useBuiltinPlacements__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(builtinPlacements, popupOverflow);
// ====================== Warning ======================
if (false) {}
// ====================== Render =======================
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_select__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP, Object.assign({
ref: ref,
virtual: virtual,
showSearch: select === null || select === void 0 ? void 0 : select.showSearch
}, selectProps, {
style: Object.assign(Object.assign({}, select === null || select === void 0 ? void 0 : select.style), style),
dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,
builtinPlacements: mergedBuiltinPlacements,
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_15__/* .getTransitionName */ .m)(rootPrefixCls, 'slide-up', props.transitionName),
listHeight: listHeight,
listItemHeight: listItemHeight,
mode: mode,
prefixCls: prefixCls,
placement: memoPlacement,
direction: direction,
suffixIcon: suffixIcon,
menuItemSelectedIcon: itemIcon,
removeIcon: removeIcon,
allowClear: mergedAllowClear,
notFoundContent: mergedNotFound,
className: mergedClassName,
getPopupContainer: getPopupContainer || getContextPopupContainer,
dropdownClassName: rcSelectRtlDropdownClassName,
disabled: mergedDisabled
})));
};
if (false) {}
const Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(InternalSelect);
// We don't care debug panel
/* istanbul ignore next */
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z)(Select);
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
Select.Option = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .Option */ .Wx;
Select.OptGroup = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .OptGroup */ .Xo;
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
if (false) {}
/* harmony default export */ __webpack_exports__["default"] = (Select);
/***/ })
}]);