/*
 * ATTENTION: An "eval-source-map" devtool has been used.
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunknocode_platform"] = self["webpackChunknocode_platform"] || []).push([[6516],{

/***/ "./src/web/component/home/HomeContainer.less":
/*!***************************************************!*\
  !*** ./src/web/component/home/HomeContainer.less ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"container\":\"_3sh2aIe2_container\",\"bg_img\":\"_4vGEjwUM_bg_img\",\"main\":\"xaeIbVYZ_main\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9ob21lL0hvbWVDb250YWluZXIubGVzcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L2hvbWUvSG9tZUNvbnRhaW5lci5sZXNzPzQzMmYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQgZGVmYXVsdCB7XCJjb250YWluZXJcIjpcIl8zc2gyYUllMl9jb250YWluZXJcIixcImJnX2ltZ1wiOlwiXzR2R0Vqd1VNX2JnX2ltZ1wiLFwibWFpblwiOlwieGFlSWJWWVpfbWFpblwifTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/home/HomeContainer.less\n");

/***/ }),

/***/ "./src/web/component/permission/RoleSetting.less":
/*!*******************************************************!*\
  !*** ./src/web/component/permission/RoleSetting.less ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"bg\":\"Tx1HgS3g_bg\",\"bg_main\":\"_9JkeT9lS_bg_main\",\"form\":\"gvztMGS9_form\",\"operation-setting\":\"UPZBWhOV_operation-setting\",\"hidden\":\"uP9GE+E5_hidden\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL1JvbGVTZXR0aW5nLmxlc3MiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL1JvbGVTZXR0aW5nLmxlc3M/YTRjZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCBkZWZhdWx0IHtcImJnXCI6XCJUeDFIZ1MzZ19iZ1wiLFwiYmdfbWFpblwiOlwiXzlKa2VUOWxTX2JnX21haW5cIixcImZvcm1cIjpcImd2enRNR1M5X2Zvcm1cIixcIm9wZXJhdGlvbi1zZXR0aW5nXCI6XCJVUFpCV2hPVl9vcGVyYXRpb24tc2V0dGluZ1wiLFwiaGlkZGVuXCI6XCJ1UDlHRStFNV9oaWRkZW5cIn07Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/web/component/permission/RoleSetting.less\n");

/***/ }),

/***/ "./src/web/component/permission/SideBar.less":
/*!***************************************************!*\
  !*** ./src/web/component/permission/SideBar.less ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"aside\":\"H-nO1sIg_aside\",\"searcher\":\"K4HvYwko_searcher\",\"roles\":\"yFQl4Bru_roles\",\"empty\":\"S8FgG0So_empty\",\"role-item\":\"plkEv-uU_role-item\",\"is-active\":\"fuLSaPWb_is-active\",\"role-name\":\"MFm+eXXH_role-name\",\"pop-active\":\"Xb9UaFmD_pop-active\",\"extra\":\"_2fgEs77+_extra\",\"drag-icon\":\"Zqp3Dl-M_drag-icon\",\"popper\":\"W32AqGtK_popper\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL1NpZGVCYXIubGVzcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L3Blcm1pc3Npb24vU2lkZUJhci5sZXNzPzA4MWYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQgZGVmYXVsdCB7XCJhc2lkZVwiOlwiSC1uTzFzSWdfYXNpZGVcIixcInNlYXJjaGVyXCI6XCJLNEh2WXdrb19zZWFyY2hlclwiLFwicm9sZXNcIjpcInlGUWw0QnJ1X3JvbGVzXCIsXCJlbXB0eVwiOlwiUzhGZ0cwU29fZW1wdHlcIixcInJvbGUtaXRlbVwiOlwicGxrRXYtdVVfcm9sZS1pdGVtXCIsXCJpcy1hY3RpdmVcIjpcImZ1TFNhUFdiX2lzLWFjdGl2ZVwiLFwicm9sZS1uYW1lXCI6XCJNRm0rZVhYSF9yb2xlLW5hbWVcIixcInBvcC1hY3RpdmVcIjpcIlhiOVVhRm1EX3BvcC1hY3RpdmVcIixcImV4dHJhXCI6XCJfMmZnRXM3NytfZXh0cmFcIixcImRyYWctaWNvblwiOlwiWnFwM0RsLU1fZHJhZy1pY29uXCIsXCJwb3BwZXJcIjpcIlczMkFxR3RLX3BvcHBlclwifTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/permission/SideBar.less\n");

/***/ }),

/***/ "./src/web/component/permission/rightOfUse/AppPermSetting.less":
/*!*********************************************************************!*\
  !*** ./src/web/component/permission/rightOfUse/AppPermSetting.less ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"setting\":\"_7808LEUd_setting\",\"title\":\"-dgSYDms_title\",\"form-setting\":\"WYzS0mhV_form-setting\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL3JpZ2h0T2ZVc2UvQXBwUGVybVNldHRpbmcubGVzcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L3Blcm1pc3Npb24vcmlnaHRPZlVzZS9BcHBQZXJtU2V0dGluZy5sZXNzPzZlNTQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQgZGVmYXVsdCB7XCJzZXR0aW5nXCI6XCJfNzgwOExFVWRfc2V0dGluZ1wiLFwidGl0bGVcIjpcIi1kZ1NZRG1zX3RpdGxlXCIsXCJmb3JtLXNldHRpbmdcIjpcIldZelMwbWhWX2Zvcm0tc2V0dGluZ1wifTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/permission/rightOfUse/AppPermSetting.less\n");

/***/ }),

/***/ "./src/web/component/permission/rightOfUse/FormPermSetting.less":
/*!**********************************************************************!*\
  !*** ./src/web/component/permission/rightOfUse/FormPermSetting.less ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"form-auth\":\"U7SzRb9N_form-auth\",\"custom-page-auth\":\"PYdjuZoi_custom-page-auth\",\"custom-page-name\":\"_5+FUDQGc_custom-page-name\",\"custom-page-switch\":\"cwFhcktu_custom-page-switch\",\"no-perm\":\"eU6gOA7A_no-perm\",\"auth-item\":\"lBy+E4+f_auth-item\",\"name\":\"MCZ3Wr4x_name\",\"record-auth\":\"_4qPWJGbh_record-auth\",\"filter\":\"vYs-gqET_filter\",\"is-active\":\"oXLqVT2x_is-active\",\"filter-label-bar\":\"RmOUhENY_filter-label-bar\",\"setting\":\"rtslxjPs_setting\",\"title\":\"F2fWcgZL_title\",\"form-setting\":\"DvHxaCFq_form-setting\",\"hidden\":\"HK1UkPB-_hidden\",\"bizButtonSetting\":\"BpNAJGie_bizButtonSetting\",\"row\":\"sa0lZm+M_row\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL3JpZ2h0T2ZVc2UvRm9ybVBlcm1TZXR0aW5nLmxlc3MiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL3JpZ2h0T2ZVc2UvRm9ybVBlcm1TZXR0aW5nLmxlc3M/YWI5MyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCBkZWZhdWx0IHtcImZvcm0tYXV0aFwiOlwiVTdTelJiOU5fZm9ybS1hdXRoXCIsXCJjdXN0b20tcGFnZS1hdXRoXCI6XCJQWWRqdVpvaV9jdXN0b20tcGFnZS1hdXRoXCIsXCJjdXN0b20tcGFnZS1uYW1lXCI6XCJfNStGVURRR2NfY3VzdG9tLXBhZ2UtbmFtZVwiLFwiY3VzdG9tLXBhZ2Utc3dpdGNoXCI6XCJjd0ZoY2t0dV9jdXN0b20tcGFnZS1zd2l0Y2hcIixcIm5vLXBlcm1cIjpcImVVNmdPQTdBX25vLXBlcm1cIixcImF1dGgtaXRlbVwiOlwibEJ5K0U0K2ZfYXV0aC1pdGVtXCIsXCJuYW1lXCI6XCJNQ1ozV3I0eF9uYW1lXCIsXCJyZWNvcmQtYXV0aFwiOlwiXzRxUFdKR2JoX3JlY29yZC1hdXRoXCIsXCJmaWx0ZXJcIjpcInZZcy1ncUVUX2ZpbHRlclwiLFwiaXMtYWN0aXZlXCI6XCJvWExxVlQyeF9pcy1hY3RpdmVcIixcImZpbHRlci1sYWJlbC1iYXJcIjpcIlJtT1VoRU5ZX2ZpbHRlci1sYWJlbC1iYXJcIixcInNldHRpbmdcIjpcInJ0c2x4alBzX3NldHRpbmdcIixcInRpdGxlXCI6XCJGMmZXY2daTF90aXRsZVwiLFwiZm9ybS1zZXR0aW5nXCI6XCJEdkh4YUNGcV9mb3JtLXNldHRpbmdcIixcImhpZGRlblwiOlwiSEsxVWtQQi1faGlkZGVuXCIsXCJiaXpCdXR0b25TZXR0aW5nXCI6XCJCcE5BSkdpZV9iaXpCdXR0b25TZXR0aW5nXCIsXCJyb3dcIjpcInNhMGxabStNX3Jvd1wifTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/permission/rightOfUse/FormPermSetting.less\n");

/***/ }),

/***/ "./src/web/component/permission/rightOfUse/index.less":
/*!************************************************************!*\
  !*** ./src/web/component/permission/rightOfUse/index.less ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"right-of-use\":\"pVT4jUkh_right-of-use\",\"operation-setting\":\"PPefB9lA_operation-setting\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL3JpZ2h0T2ZVc2UvaW5kZXgubGVzcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L3Blcm1pc3Npb24vcmlnaHRPZlVzZS9pbmRleC5sZXNzP2ZlMjMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQgZGVmYXVsdCB7XCJyaWdodC1vZi11c2VcIjpcInBWVDRqVWtoX3JpZ2h0LW9mLXVzZVwiLFwib3BlcmF0aW9uLXNldHRpbmdcIjpcIlBQZWZCOWxBX29wZXJhdGlvbi1zZXR0aW5nXCJ9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/web/component/permission/rightOfUse/index.less\n");

/***/ }),

/***/ "./src/web/pages/admin/permission/AdminPermissionPage.less":
/*!*****************************************************************!*\
  !*** ./src/web/pages/admin/permission/AdminPermissionPage.less ***!
  \*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"wrapper\":\"O5iM66b+_wrapper\",\"role-item\":\"_10gFKvcz_role-item\",\"extra\":\"_4ZXSf5B-_extra\",\"role-name\":\"FmxUjSdg_role-name\",\"drag-icon\":\"ZBmAX4bi_drag-icon\",\"title-more\":\"Q56ul5XT_title-more\",\"title-drag\":\"qgSPImSR_title-drag\",\"title\":\"DYV44+u-_title\",\"title-icon\":\"sPJrAaBV_title-icon\",\"delete_content\":\"tineTX0e_delete_content\",\"desc\":\"LDV2utUZ_desc\"});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL3BhZ2VzL2FkbWluL3Blcm1pc3Npb24vQWRtaW5QZXJtaXNzaW9uUGFnZS5sZXNzIiwibWFwcGluZ3MiOiI7QUFBQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vbm9jb2RlLXBsYXRmb3JtLy4vc3JjL3dlYi9wYWdlcy9hZG1pbi9wZXJtaXNzaW9uL0FkbWluUGVybWlzc2lvblBhZ2UubGVzcz9mYWJmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IGRlZmF1bHQge1wid3JhcHBlclwiOlwiTzVpTTY2Yitfd3JhcHBlclwiLFwicm9sZS1pdGVtXCI6XCJfMTBnRkt2Y3pfcm9sZS1pdGVtXCIsXCJleHRyYVwiOlwiXzRaWFNmNUItX2V4dHJhXCIsXCJyb2xlLW5hbWVcIjpcIkZteFVqU2RnX3JvbGUtbmFtZVwiLFwiZHJhZy1pY29uXCI6XCJaQm1BWDRiaV9kcmFnLWljb25cIixcInRpdGxlLW1vcmVcIjpcIlE1NnVsNVhUX3RpdGxlLW1vcmVcIixcInRpdGxlLWRyYWdcIjpcInFnU1BJbVNSX3RpdGxlLWRyYWdcIixcInRpdGxlXCI6XCJEWVY0NCt1LV90aXRsZVwiLFwidGl0bGUtaWNvblwiOlwic1BKckFhQlZfdGl0bGUtaWNvblwiLFwiZGVsZXRlX2NvbnRlbnRcIjpcInRpbmVUWDBlX2RlbGV0ZV9jb250ZW50XCIsXCJkZXNjXCI6XCJMRFYydXRVWl9kZXNjXCJ9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/web/pages/admin/permission/AdminPermissionPage.less\n");

/***/ }),

/***/ "./src/hooks/useDragSort.js":
/*!**********************************!*\
  !*** ./src/hooks/useDragSort.js ***!
  \**********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = useDragSort;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /*\n * @Description:\n * @Author: jianhang_he\n * @Date: 2022-11-07 13:41:07\n * @LastEditTime: 2023-01-09 19:17:11\n * @Last Modified by: jianhang_he\n */\nvar dataTopDragStyle = 'data-top-drag-style';\nvar dataBottomDragStyle = 'data-bottom-drag-style';\nvar dataDragging = 'data-dragging';\nvar dataDragKey = 'data-drag-key';\n\n// 拖拽样式的自定义属性\nvar dragDatasetProps = [dataTopDragStyle, dataBottomDragStyle];\n\n// 移除相应属性\nvar removeAllDragDatasetStyle = function removeAllDragDatasetStyle(dom) {\n  dragDatasetProps.forEach(function (datasetProp) {\n    return dom.removeAttribute(datasetProp);\n  });\n};\nvar addClass = function addClass(element) {\n  var draggingDom = document.querySelector(\"[\".concat(dataDragging, \"]\"));\n  var sourceIndex = draggingDom.getAttribute(dataDragKey);\n  var destinationIndex = element.getAttribute(dataDragKey);\n  if (+sourceIndex > +destinationIndex) {\n    element.setAttribute(dataTopDragStyle, true);\n  } else {\n    element.setAttribute(dataBottomDragStyle, true);\n  }\n};\nvar removeClass = function removeClass(element) {\n  removeAllDragDatasetStyle(element);\n};\n\n// let cloneDraggaleWrapperElement = null\n// const cloneDraggableElement = (element) => {\n//   const curElementCssText = window.getComputedStyle(element, null).cssText\n//   // const { width, height } = element.getBoundingClientRect()\n\n//   const cloneElement = element.cloneNode(true)\n//   cloneElement.style.cssText = curElementCssText\n\n//   cloneDraggaleWrapperElement = document.createElement('div')\n//   cloneDraggaleWrapperElement.style.cssText += `;opacity: 1;width:0;height:0;position:absolute;right:9999px;z-index: 99999;background:${cloneElement.style.backgroundColor}`\n\n//   cloneDraggaleWrapperElement.appendChild(cloneElement)\n//   document.body.appendChild(cloneDraggaleWrapperElement)\n\n//   return cloneDraggaleWrapperElement\n// }\n\n// const removeDraggaleElement = () => {\n//   cloneDraggaleWrapperElement && document.body.removeChild(cloneDraggaleWrapperElement)\n// }\n\nfunction useDragSort() {\n  var dragEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var onDragStart = dragEvent.onDragStart,\n    onDragEnter = dragEvent.onDragEnter,\n    onDragLeave = dragEvent.onDragLeave,\n    onDragOver = dragEvent.onDragOver,\n    onDragEnd = dragEvent.onDragEnd,\n    onDrop = dragEvent.onDrop;\n\n  /**\n   * 拖拽开始\n   * @param {*} e\n   */\n  var handleDragStart = function handleDragStart(e) {\n    e.stopPropagation();\n    // e.dataTransfer.effectAllowed = 'move'\n\n    var target = e.currentTarget;\n    // target.style.opacity = 1\n    target.setAttribute(dataDragging, true);\n    var key = target.getAttribute(dataDragKey);\n    // IE下的setData只支持key为text或者Text。因此这里做了兼容\n    e.dataTransfer.setData('text', key);\n\n    // IE不支持setDragImage，默认是拖拽元素的本身\n    // if (e.dataTransfer.setDragImage) {\n    //   const cloneElement = cloneDraggableElement(target)\n    //   e.dataTransfer.setDragImage(cloneElement, 20, 20)\n    // }\n\n    onDragStart === null || onDragStart === void 0 || onDragStart(e);\n  };\n  var handleDragOver = function handleDragOver(e) {\n    e.preventDefault();\n    // e.dataTransfer.dropEffect = 'move'\n\n    onDragOver === null || onDragOver === void 0 || onDragOver(e);\n  };\n  var handleDragEnter = function handleDragEnter(e) {\n    var target = e.currentTarget;\n    addClass(target);\n    onDragEnter === null || onDragEnter === void 0 || onDragEnter(e);\n  };\n  var handleDragLeave = function handleDragLeave(e) {\n    var target = e.currentTarget;\n    removeClass(target);\n    onDragLeave === null || onDragLeave === void 0 || onDragLeave(e);\n  };\n  var handleDragEnd = function handleDragEnd(e) {\n    var target = e.currentTarget;\n    target.removeAttribute(dataDragging);\n    target.style.opacity = '';\n    onDragEnd === null || onDragEnd === void 0 || onDragEnd(e);\n\n    // removeDraggaleElement()\n  };\n  var handleDrop = function handleDrop(e) {\n    var sourceIndex = e.dataTransfer.getData('text');\n    var target = e.currentTarget;\n    console.log('target', target);\n    var destinationIndex = target === null || target === void 0 ? void 0 : target.getAttribute(dataDragKey);\n    onDrop === null || onDrop === void 0 || onDrop(e, {\n      sourceIndex: sourceIndex,\n      destinationIndex: destinationIndex\n    });\n    removeClass(target);\n  };\n  var event = {\n    onDragStart: handleDragStart,\n    onDragEnter: handleDragEnter,\n    onDragLeave: handleDragLeave,\n    onDragOver: handleDragOver,\n    onDragEnd: handleDragEnd,\n    onDrop: handleDrop\n  };\n  var dragDropEvent = function dragDropEvent(key) {\n    return _objectSpread(_objectSpread({}, event), {}, (0, _defineProperty2.default)({\n      draggable: true\n    }, dataDragKey, key));\n  };\n\n  // useEffect(() => {\n  //   return () => {\n  //     removeDraggaleElement()\n  //   }\n  // }, [])\n\n  return {\n    dragDropEvent: dragDropEvent\n  };\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/hooks/useDragSort.js\n");

/***/ }),

/***/ "./src/web/component/home/HomeContainer.tsx":
/*!**************************************************!*\
  !*** ./src/web/component/home/HomeContainer.tsx ***!
  \**************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _container_bg_img = _interopRequireDefault(__webpack_require__(/*! @@/assets/img/container_bg_img.png */ \"./assets/img/container_bg_img.png\"));\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _HomeContainer = _interopRequireDefault(__webpack_require__(/*! ./HomeContainer.less */ \"./src/web/component/home/HomeContainer.less\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nvar Container = (0, _react.memo)(function (_ref) {\n  var children = _ref.children,\n    className = _ref.className,\n    mainClassName = _ref.mainClassName;\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: (0, _classnames.default)(className, _HomeContainer.default.container)\n  }, /*#__PURE__*/_react.default.createElement(\"img\", {\n    src: _container_bg_img.default,\n    className: _HomeContainer.default.bg_img,\n    width: \"100%\",\n    height: 520\n  }), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: (0, _classnames.default)(mainClassName, _HomeContainer.default.main)\n  }, children));\n});\nContainer.displayName = 'BgContainer';\nvar _default = exports[\"default\"] = Container;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9ob21lL0hvbWVDb250YWluZXIudHN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBUUE7QUFJQTtBQUZBO0FBQ0E7QUFFQTtBQUNBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUtBO0FBRUE7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL25vY29kZS1wbGF0Zm9ybS8uL3NyYy93ZWIvY29tcG9uZW50L2hvbWUvSG9tZUNvbnRhaW5lci50c3g/ZmE3ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgbWVtbywgRkMgfSBmcm9tICdyZWFjdCdcbmltcG9ydCBjb250YWluZXJCZ0ltYWdlIGZyb20gJ0BAL2Fzc2V0cy9pbWcvY29udGFpbmVyX2JnX2ltZy5wbmcnXG5pbXBvcnQgY2xhc3NOYW1lcyBmcm9tICdjbGFzc25hbWVzJ1xuaW1wb3J0IHN0eWxlcyBmcm9tICcuL0hvbWVDb250YWluZXIubGVzcydcblxuaW50ZXJmYWNlIENvbnRhaW5lckFwaSB7XG4gIGNoaWxkcmVuOiBSZWFjdC5SZWFjdE5vZGUsXG4gIGNsYXNzTmFtZT86IHN0cmluZyxcbiAgbWFpbkNsYXNzTmFtZT86IHN0cmluZ1xufVxuXG5jb25zdCBDb250YWluZXI6IEZDPENvbnRhaW5lckFwaT4gPSBtZW1vKCh7XG4gIGNoaWxkcmVuLFxuICBjbGFzc05hbWUsXG4gIG1haW5DbGFzc05hbWVcbn0pID0+IHtcbiAgcmV0dXJuIChcbiAgICA8ZGl2IGNsYXNzTmFtZT17Y2xhc3NOYW1lcyhjbGFzc05hbWUsIHN0eWxlcy5jb250YWluZXIpfT5cbiAgICAgIDxpbWcgc3JjPXtjb250YWluZXJCZ0ltYWdlfSBjbGFzc05hbWU9e3N0eWxlcy5iZ19pbWd9IHdpZHRoPScxMDAlJyBoZWlnaHQ9ezUyMH0gLz5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPXtjbGFzc05hbWVzKG1haW5DbGFzc05hbWUsIHN0eWxlcy5tYWluKX0+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59KVxuXG5Db250YWluZXIuZGlzcGxheU5hbWUgPSAnQmdDb250YWluZXInXG5cbmV4cG9ydCBkZWZhdWx0IENvbnRhaW5lclxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/web/component/home/HomeContainer.tsx\n");

/***/ }),

/***/ "./src/web/component/permission/RoleSetting.tsx":
/*!******************************************************!*\
  !*** ./src/web/component/permission/RoleSetting.tsx ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys2 = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\"));\nvar _promise = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/promise */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/promise.js\"));\nvar _values = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/values */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/values.js\"));\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\"));\nvar _keys = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\"));\nvar _reduce = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/reduce */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js\"));\nvar _trim = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/trim */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _PersonAuthorize = _interopRequireDefault(__webpack_require__(/*! ./PersonAuthorize */ \"./src/web/component/permission/PersonAuthorize.tsx\"));\nvar _admin = __webpack_require__(/*! @/actions/admin */ \"./src/actions/admin.js\");\nvar _OrgAuthorize = _interopRequireDefault(__webpack_require__(/*! ./OrgAuthorize */ \"./src/web/component/permission/OrgAuthorize.tsx\"));\nvar _index = _interopRequireWildcard(__webpack_require__(/*! ./rightOfUse/index */ \"./src/web/component/permission/rightOfUse/index.tsx\"));\nvar _AppPermSetting = _interopRequireWildcard(__webpack_require__(/*! ./rightOfUse/AppPermSetting */ \"./src/web/component/permission/rightOfUse/AppPermSetting.tsx\"));\nvar _FormPermSetting = _interopRequireWildcard(__webpack_require__(/*! ./rightOfUse/FormPermSetting */ \"./src/web/component/permission/rightOfUse/FormPermSetting.tsx\"));\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _reducer = __webpack_require__(/*! @/utils/reducer */ \"./src/utils/reducer.ts\");\nvar _RoleSetting = _interopRequireDefault(__webpack_require__(/*! ./RoleSetting.less */ \"./src/web/component/permission/RoleSetting.less\"));\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _lodash = __webpack_require__(/*! kd_libs/lodash */ \"webpack/container/remote/kd_libs/lodash\");\nvar _HomeContainer = _interopRequireDefault(__webpack_require__(/*! ../../component/home/HomeContainer */ \"./src/web/component/home/HomeContainer.tsx\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n// 将管理权转换成字符串，true => '0'， false => '1'\nvar transformManageToStr = function transformManageToStr(flag) {\n  return flag ? MANAGE_TYPE_ALL : MANAGE_TYPE_NONE;\n};\nvar transformData = function transformData(rolePermission) {\n  var _rolePermission$name = rolePermission.name,\n    name = _rolePermission$name === void 0 ? '' : _rolePermission$name,\n    _rolePermission$desc = rolePermission.desc,\n    desc = _rolePermission$desc === void 0 ? '' : _rolePermission$desc,\n    _rolePermission$users = rolePermission.users,\n    users = _rolePermission$users === void 0 ? [] : _rolePermission$users,\n    id = rolePermission.id,\n    manage = rolePermission.manage,\n    useType = rolePermission.useType,\n    _rolePermission$orgs = rolePermission.orgs,\n    orgs = _rolePermission$orgs === void 0 ? [] : _rolePermission$orgs;\n  return {\n    id: id,\n    name: name,\n    desc: desc,\n    users: users,\n    orgs: orgs,\n    useType: useType,\n    manage: manage ? MANAGE_TYPE_ALL : MANAGE_TYPE_NONE\n  };\n};\nvar MANAGE_TYPE_ALL = '0';\nvar MANAGE_TYPE_NONE = '1';\nvar MANAGE_OPTIONS = [{\n  label: '拥有应用的全部管理权',\n  value: MANAGE_TYPE_ALL\n}, {\n  label: '无',\n  value: MANAGE_TYPE_NONE\n}];\nvar RoleSetting = function RoleSetting(_ref) {\n  var formList = _ref.formList,\n    appId = _ref.appId,\n    creatorId = _ref.creatorId,\n    rolePermission = _ref.rolePermission,\n    onAfterSave = _ref.onAfterSave,\n    setRolePermission = _ref.setRolePermission;\n  var _Form$useForm = _kdesign.Form.useForm(),\n    _Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),\n    form = _Form$useForm2[0];\n  var _useReducer = (0, _react.useReducer)(_reducer.assignDataReducer, transformData(rolePermission)),\n    _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),\n    formData = _useReducer2[0],\n    dispatchFormData = _useReducer2[1];\n  var formPermSettingRef = (0, _react.useRef)(null);\n  var appPermSettingRef = (0, _react.useRef)(null);\n  var _useState = (0, _react.useState)(false),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    formPermEmpty = _useState2[0],\n    setFormPermEmpty = _useState2[1];\n  var _useState3 = (0, _react.useState)(false),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    appPermEmpty = _useState4[0],\n    setAppPermEmpty = _useState4[1];\n  var _useState5 = (0, _react.useState)(true),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    formPermEqual = _useState6[0],\n    setFormPermEqual = _useState6[1];\n  var _useState7 = (0, _react.useState)(true),\n    _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n    appPermEqual = _useState8[0],\n    setAppPermEqual = _useState8[1];\n  var isUseTypeDisabled = formData.manage === '0';\n  var isAdmin = !!rolePermission.system;\n  var isSaveRef = (0, _react.useRef)(false);\n  var validateFields = function validateFields() {\n    return new _promise.default(function (resolve, reject) {\n      form.validateFields().then(function (_ref2) {\n        var values = (0, _values.default)(_ref2);\n        resolve(values);\n      }).catch(function (e) {\n        return reject(e);\n      });\n    });\n  };\n  var handleSave = /*#__PURE__*/function () {\n    var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(paramObj) {\n      var param, closeMessage, _yield$saveRole, failCount, result, _result$, _roleId, newRolePermission, message;\n      return _regenerator.default.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            param = {\n              data: [paramObj]\n            };\n            isSaveRef.current = true;\n            closeMessage = (0, _utils.showLoadingMessage)('保存中，请稍候...');\n            _context.prev = 3;\n            _context.next = 6;\n            return (0, _admin.saveRole)(param);\n          case 6:\n            _yield$saveRole = _context.sent;\n            failCount = _yield$saveRole.failCount;\n            result = _yield$saveRole.result;\n            isSaveRef.current = false;\n            if (failCount === '0') {\n              closeMessage({\n                type: 'success',\n                content: '保存成功'\n              });\n              _roleId = result === null || result === void 0 || (_result$ = result[0]) === null || _result$ === void 0 ? void 0 : _result$.id;\n              onAfterSave(_roleId);\n              newRolePermission = _objectSpread(_objectSpread({}, paramObj), {}, {\n                id: _roleId,\n                system: rolePermission.system\n              });\n              setRolePermission(newRolePermission);\n            }\n            _context.next = 19;\n            break;\n          case 13:\n            _context.prev = 13;\n            _context.t0 = _context[\"catch\"](3);\n            isSaveRef.current = false;\n            console.log(_context.t0);\n            message = _context.t0.message;\n            closeMessage({\n              type: 'error',\n              content: message,\n              duration: 0\n            });\n          case 19:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee, null, [[3, 13]]);\n    }));\n    return function handleSave(_x) {\n      return _ref3.apply(this, arguments);\n    };\n  }();\n  var handleConfirm = function handleConfirm() {\n    if (useEmpty) {\n      return (0, _utils.showNotice)('error', '应用使用权不能为空');\n    }\n    if (isSaveRef.current) return;\n    validateFields().then(function (formData) {\n      console.log('formData-----', formData);\n      var useType = formData.useType,\n        name = formData.name,\n        desc = formData.desc,\n        manage = formData.manage,\n        users = formData.users,\n        orgs = formData.orgs;\n      var id = rolePermission.id,\n        appId = rolePermission.appId,\n        seq = rolePermission.seq;\n      var paramObj = {\n        name: name,\n        desc: desc,\n        appId: appId,\n        manage: manage === MANAGE_TYPE_ALL,\n        users: users,\n        orgs: orgs,\n        useType: useType\n      };\n      if (id) {\n        paramObj.id = id;\n      }\n      // if (seq !== undefined) {\n      //   paramObj.seq = seq\n      // }\n      if (useType === _index.USE_TYPE_CUSTOM) {\n        var formPerm = formPermSettingRef.current.formPerm;\n        console.log('formPerm----', formPerm);\n        paramObj.formPerm = formPerm;\n      }\n      if (useType === _index.USE_TYPE_SELF) {\n        var _appPerm = appPermSettingRef.current.appPerm;\n        paramObj.appPerm = _appPerm;\n      }\n      console.log('params-----', paramObj);\n      handleSave(paramObj);\n    }).catch(function (e) {\n      console.warn(e);\n      var message = e.message;\n      (0, _utils.showNotice)('error', message);\n    });\n  };\n  var handleUsersChange = function handleUsersChange(value) {\n    dispatchFormData({\n      users: value\n    });\n  };\n  var handleOrgsChange = function handleOrgsChange(value) {\n    dispatchFormData({\n      orgs: value\n    });\n  };\n  var handleManageChange = function handleManageChange(value) {\n    var useType = formData.useType;\n    if (value === MANAGE_TYPE_ALL && useType !== _index.USE_TYPE_ALL) {\n      // 拥有应用的全部管理权，则应用使用权要相应更改为“可以使用所有表单记录”\n      dispatchFormData({\n        manage: value,\n        useType: _index.USE_TYPE_ALL\n      });\n      form.setFieldsValue({\n        manage: value,\n        useType: _index.USE_TYPE_ALL\n      });\n    } else {\n      dispatchFormData({\n        manage: value\n      });\n    }\n  };\n  (0, _react.useEffect)(function () {\n    var newFormData = transformData(rolePermission);\n    var name = newFormData.name,\n      desc = newFormData.desc,\n      manage = newFormData.manage,\n      useType = newFormData.useType,\n      users = newFormData.users,\n      orgs = newFormData.orgs;\n    dispatchFormData(newFormData);\n    form.setFieldsValue({\n      name: name,\n      desc: desc,\n      manage: manage,\n      useType: useType,\n      users: users,\n      orgs: orgs\n    });\n  }, [rolePermission]);\n\n  // 这个变量用于判断表单是否被更改过\n  var btnDisabled = (0, _react.useMemo)(function () {\n    var name = formData.name,\n      desc = formData.desc,\n      _formData$users = formData.users,\n      users = _formData$users === void 0 ? [] : _formData$users,\n      manage = formData.manage,\n      useType = formData.useType,\n      id = formData.id,\n      _formData$orgs = formData.orgs,\n      orgs = _formData$orgs === void 0 ? [] : _formData$orgs;\n    var oldName = rolePermission.name,\n      oldDesc = rolePermission.desc,\n      _rolePermission$users2 = rolePermission.users,\n      oldUsers = _rolePermission$users2 === void 0 ? [] : _rolePermission$users2,\n      _rolePermission$orgs2 = rolePermission.orgs,\n      oldOrgs = _rolePermission$orgs2 === void 0 ? [] : _rolePermission$orgs2,\n      oldManage = rolePermission.manage,\n      oldUseType = rolePermission.useType,\n      oldId = rolePermission.id;\n    if (id !== oldId) return true;\n    return name === oldName && desc === oldDesc && (0, _lodash.isEqual)(users, oldUsers) && (0, _lodash.isEqual)(orgs, oldOrgs) && manage === transformManageToStr(oldManage) && useType === oldUseType && formPermEqual && appPermEqual;\n  }, [formData, rolePermission, formPermEqual, appPermEqual]);\n  var handleCancel = function handleCancel() {\n    if (isSaveRef.current) return;\n    var name = rolePermission.name,\n      desc = rolePermission.desc,\n      _rolePermission$users3 = rolePermission.users,\n      users = _rolePermission$users3 === void 0 ? [] : _rolePermission$users3,\n      useType = rolePermission.useType,\n      manage = rolePermission.manage,\n      _rolePermission$orgs3 = rolePermission.orgs,\n      orgs = _rolePermission$orgs3 === void 0 ? [] : _rolePermission$orgs3;\n    // const { useType } = formData\n    dispatchFormData({\n      name: name,\n      desc: desc,\n      users: users,\n      orgs: orgs,\n      useType: useType,\n      manage: transformManageToStr(manage)\n    });\n    form.setFieldsValue({\n      name: name,\n      desc: desc,\n      users: users,\n      orgs: orgs,\n      useType: useType,\n      manage: transformManageToStr(manage)\n    });\n    if (useType === _index.USE_TYPE_CUSTOM) {\n      (0, _setTimeout2.default)(function () {\n        var dispatchSetting = formPermSettingRef.current.dispatchSetting;\n        dispatchSetting === null || dispatchSetting === void 0 || dispatchSetting({\n          type: 'MERGE',\n          payload: formPermSetting\n        });\n      });\n    }\n    if (useType === _index.USE_TYPE_SELF) {\n      (0, _setTimeout2.default)(function () {\n        var dispatchSetting = appPermSettingRef.current.dispatchSetting;\n        dispatchSetting === null || dispatchSetting === void 0 || dispatchSetting((0, _AppPermSetting.transformAppPerm)(appPerm));\n      });\n    }\n  };\n  var handleAppPermChange = function handleAppPermChange(data) {\n    var funcPermSet = data.funcPermSet;\n    setAppPermEmpty(!(funcPermSet !== null && funcPermSet !== void 0 && funcPermSet.length));\n  };\n  var handleFormPermChange = function handleFormPermChange(data) {\n    var isEmpty = (0, _keys.default)(data).every(function (formId) {\n      var _ref4 = data[formId] || {},\n        _ref4$funcPermSet = _ref4.funcPermSet,\n        funcPermSet = _ref4$funcPermSet === void 0 ? [] : _ref4$funcPermSet;\n      return !(funcPermSet !== null && funcPermSet !== void 0 && funcPermSet.length);\n    });\n    setFormPermEmpty(isEmpty);\n  };\n\n  // 判断应用使用权是否为空\n  var useEmpty = (0, _react.useMemo)(function () {\n    var useType = formData.useType;\n    if (useType === _index.USE_TYPE_SELF && appPermEmpty || useType === _index.USE_TYPE_CUSTOM && formPermEmpty) {\n      return true;\n    }\n    return false;\n  }, [formData, appPermEmpty, formPermEmpty]);\n  var disabledDeleteUserIds = (0, _react.useMemo)(function () {\n    return creatorId && isAdmin ? [creatorId] : [];\n  }, [isAdmin, creatorId]);\n  var formPermSetting = (0, _react.useMemo)(function () {\n    var formPermValue = rolePermission !== null && rolePermission !== void 0 && rolePermission.formPerm ? (0, _reduce.default)(formList).call(formList, function (perm, form) {\n      var _rolePermission$formP;\n      var formId = form.formId;\n      if (rolePermission !== null && rolePermission !== void 0 && (_rolePermission$formP = rolePermission.formPerm) !== null && _rolePermission$formP !== void 0 && _rolePermission$formP[formId]) {\n        var _rolePermission$formP2;\n        perm[formId] = rolePermission === null || rolePermission === void 0 || (_rolePermission$formP2 = rolePermission.formPerm) === null || _rolePermission$formP2 === void 0 ? void 0 : _rolePermission$formP2[formId];\n      }\n      return perm;\n    }, {}) : (0, _reduce.default)(formList).call(formList, function (perm, form) {\n      var formId = form.formId;\n      perm[formId] = _FormPermSetting.INIT_FORM_PERM;\n      return perm;\n    }, {});\n    return formPermValue;\n  }, [rolePermission, formList]);\n  var appPerm = (0, _react.useMemo)(function () {\n    return rolePermission === null || rolePermission === void 0 ? void 0 : rolePermission.appPerm;\n  }, [rolePermission]);\n  if (!rolePermission) return null;\n  return /*#__PURE__*/_react.default.createElement(_HomeContainer.default, {\n    className: _RoleSetting.default.bg,\n    mainClassName: _RoleSetting.default.bg_main\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _RoleSetting.default.form\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Form, {\n    layout: \"vertical\",\n    form: form,\n    labelWidth: \"100%\",\n    wrapperWidth: \"100%\",\n    onValuesChange: function onValuesChange(changedValue, values) {\n      console.log('form', changedValue, values);\n    }\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: /*#__PURE__*/_react.default.createElement(\"span\", {\n      title: \"\\u89D2\\u8272\\u7684\\u540D\\u79F0\"\n    }, \"\\u89D2\\u8272\\u540D\\u79F0\"),\n    name: \"name\",\n    required: true,\n    validateTrigger: \"onBlur\",\n    rules: [{\n      required: true,\n      message: '请输入角色名称'\n    }, {\n      type: 'string',\n      validator: function validator(rule, value, callback, source, options) {\n        if (!(value !== null && value !== void 0 && (0, _trim.default)(value).call(value))) {\n          return [new Error('请输入角色名称')];\n        } else {\n          return [];\n        }\n      }\n    }]\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Input, {\n    type: \"text\",\n    borderType: \"bordered\",\n    size: \"large\",\n    placeholder: \"\\u8BF7\\u8F93\\u5165\\u89D2\\u8272\\u540D\\u79F0\",\n    maxLength: 30,\n    value: formData.name,\n    onChange: function onChange(e) {\n      return dispatchFormData({\n        name: e.target.value\n      });\n    }\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: /*#__PURE__*/_react.default.createElement(\"span\", {\n      title: \"\\u89D2\\u8272\\u7684\\u63CF\\u8FF0\"\n    }, \"\\u63CF\\u8FF0\"),\n    name: \"desc\"\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Input, {\n    type: \"text\",\n    borderType: \"bordered\",\n    size: \"large\",\n    placeholder: \"\\u8BF7\\u8F93\\u5165\\u63CF\\u8FF0\",\n    maxLength: 50,\n    value: formData.desc,\n    onChange: function onChange(e) {\n      return dispatchFormData({\n        desc: e.target.value\n      });\n    }\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: /*#__PURE__*/_react.default.createElement(\"span\", {\n      title: \"\\u9009\\u62E9\\u53EF\\u4EE5\\u4F7F\\u7528\\u8BE5\\u89D2\\u8272\\u7684\\u7EC4\\u7EC7\"\n    }, \"\\u6388\\u6743\\u7EC4\\u7EC7\"),\n    name: \"orgs\"\n  }, /*#__PURE__*/_react.default.createElement(_OrgAuthorize.default, {\n    value: formData.orgs,\n    onChange: handleOrgsChange,\n    withScope: true\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: /*#__PURE__*/_react.default.createElement(\"span\", {\n      title: \"\\u9009\\u62E9\\u53EF\\u4EE5\\u4F7F\\u7528\\u8BE5\\u89D2\\u8272\\u7684\\u4EBA\\u5458\"\n    }, \"\\u6388\\u6743\\u4EBA\\u5458\"),\n    name: \"users\"\n  }, /*#__PURE__*/_react.default.createElement(_PersonAuthorize.default, {\n    value: formData.users,\n    disabledIds: disabledDeleteUserIds,\n    onChange: handleUsersChange,\n    withScope: true\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: /*#__PURE__*/_react.default.createElement(\"span\", {\n      title: \"\\u8BBE\\u7F6E\\u89D2\\u8272\\u7684\\u5E94\\u7528\\u7BA1\\u7406\\u6743\"\n    }, \"\\u5E94\\u7528\\u7BA1\\u7406\\u6743\"),\n    name: \"manage\"\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Select, {\n    value: formData.manage,\n    options: MANAGE_OPTIONS,\n    borderType: \"bordered\",\n    size: \"large\",\n    placeholder: \"\\u8BF7\\u9009\\u62E9\",\n    disabled: isAdmin,\n    onChange: function onChange(value) {\n      return handleManageChange(value);\n    }\n  })), /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n    label: /*#__PURE__*/_react.default.createElement(\"span\", {\n      title: \"\\u8BBE\\u7F6E\\u89D2\\u8272\\u7684\\u5E94\\u7528\\u4F7F\\u7528\\u6743\"\n    }, \"\\u5E94\\u7528\\u4F7F\\u7528\\u6743\"),\n    name: \"useType\"\n  }, /*#__PURE__*/_react.default.createElement(_index.default, {\n    value: formData.useType,\n    disabled: isUseTypeDisabled,\n    onChange: function onChange(value) {\n      return dispatchFormData({\n        useType: value\n      });\n    },\n    footer: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: (0, _classnames.default)([_RoleSetting.default['operation-setting'], (0, _defineProperty2.default)({}, _RoleSetting.default.hidden, formData.useType !== _index.USE_TYPE_SELF)])\n    }, /*#__PURE__*/_react.default.createElement(_AppPermSetting.default, {\n      ref: appPermSettingRef,\n      allowFieldAuth: false,\n      value: appPerm,\n      handleEqualChange: function handleEqualChange(result) {\n        return setAppPermEqual(result);\n      },\n      onChange: handleAppPermChange\n    })), /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: (0, _classnames.default)([(0, _defineProperty2.default)({}, _RoleSetting.default.hidden, formData.useType !== _index.USE_TYPE_CUSTOM)])\n    }, /*#__PURE__*/_react.default.createElement(_FormPermSetting.default, {\n      ref: formPermSettingRef,\n      key: \"\".concat(rolePermission === null || rolePermission === void 0 ? void 0 : rolePermission.id, \"-formPermSetting\"),\n      roleId: rolePermission === null || rolePermission === void 0 ? void 0 : rolePermission.id,\n      formList: formList,\n      value: formPermSetting,\n      appId: appId,\n      handleEqualChange: function handleEqualChange(result) {\n        return setFormPermEqual(result);\n      },\n      onChange: handleFormPermChange\n    })), /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: \"kd-form-field-wrapper-message\"\n    }, useEmpty && '应用使用权不能为空'))\n  }))), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _RoleSetting.default['btn-area']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    type: \"primary\",\n    disabled: btnDisabled,\n    onClick: handleConfirm\n  }, \"\\u4FDD\\u5B58\"), /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    disabled: btnDisabled,\n    style: {\n      marginLeft: '12px'\n    },\n    onClick: handleCancel\n  }, \"\\u53D6\\u6D88\"))));\n};\nvar _default = exports[\"default\"] = RoleSetting;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/permission/RoleSetting.tsx\n");

/***/ }),

/***/ "./src/web/component/permission/SideBar.tsx":
/*!**************************************************!*\
  !*** ./src/web/component/permission/SideBar.tsx ***!
  \**************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nvar _splice = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/splice */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/splice.js\"));\nvar _filter = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\"));\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _indexOf = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js\"));\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/extends */ \"../../node_modules/@babel/runtime-corejs3/helpers/extends.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/toConsumableArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _WebUI = __webpack_require__(/*! nocode_component/WebUI */ \"webpack/container/remote/nocode_component/WebUI\");\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _useDebounce = _interopRequireDefault(__webpack_require__(/*! @/hooks/useDebounce */ \"./src/hooks/useDebounce.tsx\"));\nvar _useDragSort2 = _interopRequireDefault(__webpack_require__(/*! @/hooks/useDragSort */ \"./src/hooks/useDragSort.js\"));\nvar _SideBar = _interopRequireDefault(__webpack_require__(/*! ./SideBar.less */ \"./src/web/component/permission/SideBar.less\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nvar options = [{\n  name: '复制',\n  key: 'copy'\n}, {\n  name: '删除',\n  key: 'delete'\n}];\nvar RoleItem = function RoleItem(_ref) {\n  var name = _ref.name,\n    index = _ref.index,\n    isSelected = _ref.isSelected,\n    isAdmin = _ref.isAdmin,\n    onClick = _ref.onClick,\n    setRoles = _ref.setRoles,\n    handleMenuItemClick = _ref.handleMenuItemClick,\n    onSort = _ref.onSort;\n  var _useState = (0, _react.useState)(false),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    visible = _useState2[0],\n    setVisible = _useState2[1];\n  var handleVisibleChange = function handleVisibleChange(vi) {\n    setVisible(vi);\n  };\n  var onDrop = function onDrop(e, data) {\n    var sourceIndex = data.sourceIndex,\n      destinationIndex = data.destinationIndex;\n    if (sourceIndex !== destinationIndex && index === +destinationIndex) {\n      setRoles(function (oldRoles) {\n        var resortedList = (0, _toConsumableArray2.default)(oldRoles);\n        var _resortedList$splice = (0, _splice.default)(resortedList).call(resortedList, sourceIndex, 1),\n          _resortedList$splice2 = (0, _slicedToArray2.default)(_resortedList$splice, 1),\n          from = _resortedList$splice2[0];\n        (0, _splice.default)(resortedList).call(resortedList, destinationIndex, 0, from);\n        onSort === null || onSort === void 0 || onSort(resortedList);\n        return resortedList;\n      });\n    }\n  };\n  var onItemClick = function onItemClick(key) {\n    setVisible(false);\n    handleMenuItemClick === null || handleMenuItemClick === void 0 || handleMenuItemClick(key);\n  };\n  var _useDragSort = (0, _useDragSort2.default)({\n      onDrop: onDrop\n    }),\n    dragDropEvent = _useDragSort.dragDropEvent;\n  var roleMenuOpts = (0, _react.useMemo)(function () {\n    return isAdmin ? (0, _filter.default)(options).call(options, function (item) {\n      return item.key !== 'delete';\n    }) : options;\n  }, [isAdmin]);\n  return /*#__PURE__*/_react.default.createElement(\"div\", (0, _extends2.default)({\n    className: (0, _classnames.default)(_SideBar.default['role-item'], (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _SideBar.default['pop-active'], visible), _SideBar.default['is-active'], isSelected))\n  }, dragDropEvent(index)), /*#__PURE__*/_react.default.createElement(\"span\", {\n    className: _SideBar.default['role-name'],\n    onClick: onClick\n  }, name), /*#__PURE__*/_react.default.createElement(\"span\", {\n    className: _SideBar.default.extra\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Dropdown, {\n    menu: /*#__PURE__*/_react.default.createElement(_kdesign.Dropdown.Menu, null, roleMenuOpts === null || roleMenuOpts === void 0 ? void 0 : (0, _map.default)(roleMenuOpts).call(roleMenuOpts, function (item) {\n      // const attrs = item.key === 'copy' ? { 'data-nc-action': `${appId}||sa_pm_copy` } : {}\n      return /*#__PURE__*/_react.default.createElement(_kdesign.Dropdown.Item, {\n        key: item.key\n      }, /*#__PURE__*/_react.default.createElement(\"span\", null, item.name));\n    })),\n    popperClassName: _SideBar.default.popper,\n    visible: visible,\n    onItemClick: onItemClick,\n    onVisibleChange: handleVisibleChange,\n    trigger: \"hover\"\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    type: \"text\"\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n    prefix: \"nocodeplatformicon\",\n    type: \"gengduo3\"\n  }))), /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    type: \"text\",\n    className: _SideBar.default['drag-icon']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n    prefix: \"nocodeplatformicon\",\n    type: \"tuozhuai\"\n  }))));\n};\nvar SideBar = function SideBar(_ref2) {\n  var activeRoleId = _ref2.activeRoleId,\n    appId = _ref2.appId,\n    roleList = _ref2.roleList,\n    onAdd = _ref2.onAdd,\n    onCopy = _ref2.onCopy,\n    onDelete = _ref2.onDelete,\n    onSort = _ref2.onSort,\n    setActiveRoleId = _ref2.setActiveRoleId;\n  var _useState3 = (0, _react.useState)(roleList || []),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    roles = _useState4[0],\n    setRoles = _useState4[1];\n  var inputRef = (0, _react.useRef)(null);\n  var _useState5 = (0, _react.useState)(''),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    keywords = _useState6[0],\n    setKeywords = _useState6[1];\n  var handleSearch = function handleSearch(e) {\n    var _inputRef$current;\n    e === null || e === void 0 || e.persist();\n    var value = (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || (_inputRef$current = _inputRef$current.input) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;\n    setKeywords(value);\n  };\n  var debounceHandleSearch = (0, _useDebounce.default)(handleSearch, 500);\n  var _handleMenuItemClick = function handleMenuItemClick(key, role) {\n    switch (key) {\n      case 'delete':\n        onDelete && onDelete(role);\n        break;\n      case 'copy':\n        onCopy && onCopy(role);\n        break;\n      default:\n        break;\n    }\n  };\n  (0, _react.useEffect)(function () {\n    setRoles(roleList || []);\n  }, [roleList]);\n  var filteredRoles = (0, _react.useMemo)(function () {\n    if (!keywords) return roles;\n    return (0, _filter.default)(roles).call(roles, function (role) {\n      var name = role.name;\n      return (0, _indexOf.default)(name).call(name, keywords) > -1;\n    });\n  }, [keywords, roles]);\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _SideBar.default.aside\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _SideBar.default.searcher\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Input, {\n    size: \"small\",\n    ref: inputRef,\n    className: _SideBar.default.search_box,\n    defaultValue: keywords,\n    prefix: /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n      prefix: \"nocodeplatformicon\",\n      type: \"sousuo\"\n    }),\n    onChange: debounceHandleSearch,\n    placeholder: \"\\u641C\\u7D22\\u89D2\\u8272\",\n    borderType: \"bordered\"\n  }), /*#__PURE__*/_react.default.createElement(_kdesign.Button, {\n    icon: /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n      prefix: \"nocodeplatformicon\",\n      type: \"jia4\"\n    }),\n    type: \"primary\",\n    onClick: onAdd\n  })), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _SideBar.default.roles\n  }, keywords && !filteredRoles.length ? /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _SideBar.default.empty\n  }, /*#__PURE__*/_react.default.createElement(_WebUI.EmptyData, {\n    desc: \"\\u6682\\u65E0\\u641C\\u7D22\\u7ED3\\u679C\"\n  })) : (0, _map.default)(filteredRoles).call(filteredRoles, function (role, index) {\n    var name = role.name,\n      id = role.id,\n      system = role.system;\n    return /*#__PURE__*/_react.default.createElement(RoleItem, {\n      name: name,\n      id: id,\n      key: id,\n      index: index\n      // appId={appId}\n      ,\n      handleMenuItemClick: function handleMenuItemClick(key) {\n        return _handleMenuItemClick(key, role);\n      },\n      isSelected: activeRoleId === id,\n      isAdmin: !!system,\n      setRoles: setRoles,\n      onClick: function onClick(e) {\n        return setActiveRoleId(id);\n      },\n      onSort: onSort\n    });\n  })));\n};\nvar _default = exports[\"default\"] = SideBar;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/permission/SideBar.tsx\n");

/***/ }),

/***/ "./src/web/component/permission/rightOfUse/AppPermSetting.tsx":
/*!********************************************************************!*\
  !*** ./src/web/component/permission/rightOfUse/AppPermSetting.tsx ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.transformAppPerm = exports[\"default\"] = exports.VIEW_OPTIONS_VALUE = exports.VIEW_OPTIONS = exports.SettingItem = exports.EDIT_OPTIONS_VALUE = exports.EDIT_OPTIONS = exports.ADD_OPTIONS_VALUE = exports.ADD_OPTIONS = void 0;\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\"));\nvar _filter = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\"));\nvar _keys = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\"));\nvar _reduce = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/reduce */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js\"));\nvar _includes = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/includes */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js\"));\nvar _concat = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\"));\nvar _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/toConsumableArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _fieldPermission = _interopRequireDefault(__webpack_require__(/*! ../../fieldPermission */ \"./src/web/component/fieldPermission/index.tsx\"));\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _reducer = __webpack_require__(/*! @/utils/reducer */ \"./src/utils/reducer.ts\");\nvar _lodash = __webpack_require__(/*! kd_libs/lodash */ \"webpack/container/remote/kd_libs/lodash\");\nvar _AppPermSetting = _interopRequireDefault(__webpack_require__(/*! ./AppPermSetting.less */ \"./src/web/component/permission/rightOfUse/AppPermSetting.less\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/**\n * 应用权限设置\n */\n\nvar hidePermMenu = function hidePermMenu(controlType, parentType) {\n  return controlType === 'NoCodeBizButtonAp' || controlType === 'BizBtnFlexPanelAp' || parentType === 'NoCodeEntryEntity';\n};\nvar SettingItem = exports.SettingItem = function SettingItem(_ref) {\n  var title = _ref.title,\n    value = _ref.value,\n    options = _ref.options,\n    allowFieldAuth = _ref.allowFieldAuth,\n    onChange = _ref.onChange,\n    formId = _ref.formId,\n    appId = _ref.appId,\n    checked = _ref.checked,\n    onSwitchChange = _ref.onSwitchChange,\n    fieldPermSet = _ref.fieldPermSet,\n    onPermSetChange = _ref.onPermSetChange;\n  var _useState = (0, _react.useState)(checked),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    swicthOpen = _useState2[0],\n    setSwitchOpen = _useState2[1];\n  var _useState3 = (0, _react.useState)(value),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    operation = _useState4[0],\n    setOperation = _useState4[1];\n  var _useState5 = (0, _react.useState)(false),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    visible = _useState6[0],\n    setVisible = _useState6[1];\n  var switchOpenRef = (0, _react.useRef)(checked);\n  switchOpenRef.current = swicthOpen;\n  var handleSwitchChange = function handleSwitchChange(checked) {\n    setSwitchOpen(checked);\n    var newOperation = checked ? (0, _map.default)(options).call(options, function (item) {\n      return item.value;\n    }) : [];\n    setOperation(newOperation);\n    onSwitchChange(checked);\n    (0, _setTimeout2.default)(function () {\n      onChange === null || onChange === void 0 || onChange(newOperation);\n    }, 0);\n  };\n  var handleCheckboxChange = function handleCheckboxChange(newVal) {\n    setOperation(newVal);\n    if (!switchOpenRef.current && newVal.length) {\n      setSwitchOpen(true);\n      (0, _setTimeout2.default)(function () {\n        onSwitchChange(true);\n      }, 0);\n    }\n    onChange === null || onChange === void 0 || onChange(newVal);\n  };\n  (0, _react.useEffect)(function () {\n    setOperation(value);\n  }, [value]);\n  (0, _react.useEffect)(function () {\n    setSwitchOpen(checked);\n  }, [checked]);\n  var handleChangeFieldPermission = (0, _react.useCallback)(function (data) {\n    var _context;\n    var noPermControlIds = (0, _filter.default)(_context = (0, _keys.default)(data)).call(_context, function (fieldKey) {\n      var fieldStatus = data[fieldKey];\n      return fieldStatus === 'noperm';\n    });\n    onPermSetChange === null || onPermSetChange === void 0 || onPermSetChange(noPermControlIds);\n  }, []);\n  var permission = (0, _react.useMemo)(function () {\n    return fieldPermSet === null || fieldPermSet === void 0 ? void 0 : (0, _reduce.default)(fieldPermSet).call(fieldPermSet, function (statusMap, fieldId) {\n      statusMap[fieldId] = 'noperm';\n      return statusMap;\n    }, {});\n  }, [fieldPermSet]);\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AppPermSetting.default.setting\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AppPermSetting.default.title\n  }, title), /*#__PURE__*/_react.default.createElement(_kdesign.Switch, {\n    checked: swicthOpen,\n    onChange: handleSwitchChange\n  }), allowFieldAuth && /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AppPermSetting.default['form-setting'],\n    onClick: function onClick() {\n      return setVisible(true);\n    }\n  }, fieldPermSet !== null && fieldPermSet !== void 0 && fieldPermSet.length ? '部分权限' : '全部权限'), /*#__PURE__*/_react.default.createElement(_kdesign.Checkbox.Group, {\n    onChange: handleCheckboxChange,\n    style: {\n      marginLeft: '24px'\n    },\n    value: operation\n  }, (0, _map.default)(options).call(options, function (_ref2) {\n    var value = _ref2.value,\n      label = _ref2.label;\n    return /*#__PURE__*/_react.default.createElement(_kdesign.Checkbox, {\n      value: value,\n      key: value\n    }, label);\n  })), /*#__PURE__*/_react.default.createElement(_fieldPermission.default, {\n    title: \"\\u7F16\\u8F91\\u6743\\u9650\",\n    visible: visible,\n    setVisible: setVisible,\n    formId: formId,\n    appId: appId,\n    value: permission,\n    fieldStatusSettingMode: \"permission\",\n    fieldPermissionMenu: [{\n      key: 'hasperm',\n      label: '有权限'\n    }, {\n      key: 'noperm',\n      label: '无权限'\n    }],\n    fieldStatusSettingOptions: {\n      defaultStatus: 'hasperm',\n      hideMenu: hidePermMenu\n    },\n    onChange: handleChangeFieldPermission\n  }));\n};\nvar VIEW_OPTIONS = exports.VIEW_OPTIONS = [{\n  value: 'view-001',\n  label: '导出'\n}, {\n  value: 'view-002',\n  label: '打印'\n}, {\n  value: 'view-003',\n  label: '统计'\n}, {\n  value: 'view-004',\n  label: '详情页分享（登录）'\n}, {\n  value: 'view-005',\n  label: '详情页分享（免登录）'\n}];\nvar ADD_OPTIONS = exports.ADD_OPTIONS = [{\n  value: 'add-001',\n  label: '导入'\n}, {\n  value: 'add-002',\n  label: '录入页分享（登录）'\n}, {\n  value: 'add-003',\n  label: '录入页分享（免登录）'\n}];\nvar EDIT_OPTIONS = exports.EDIT_OPTIONS = [{\n  value: 'edit-001',\n  label: '编辑页分享（登录）'\n}];\nvar VIEW_OPTIONS_VALUE = exports.VIEW_OPTIONS_VALUE = (0, _map.default)(VIEW_OPTIONS).call(VIEW_OPTIONS, function (op) {\n  return op.value;\n});\nvar ADD_OPTIONS_VALUE = exports.ADD_OPTIONS_VALUE = (0, _map.default)(ADD_OPTIONS).call(ADD_OPTIONS, function (op) {\n  return op.value;\n});\nvar EDIT_OPTIONS_VALUE = exports.EDIT_OPTIONS_VALUE = (0, _map.default)(EDIT_OPTIONS).call(EDIT_OPTIONS, function (op) {\n  return op.value;\n});\nvar INIT_APP_PERM = {\n  funcPermSet: ['view', 'view-001', 'view-002', 'view-003', 'view-004', 'view-005', 'add', 'add-001', 'add-002', 'add-003', 'edit', 'edit-001', 'delete']\n};\nvar transformAppPerm = exports.transformAppPerm = function transformAppPerm() {\n  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INIT_APP_PERM;\n  var funcPermSet = value.funcPermSet;\n  return {\n    viewFuncPerms: (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n      return (0, _includes.default)(VIEW_OPTIONS_VALUE).call(VIEW_OPTIONS_VALUE, func);\n    }),\n    addFuncPerms: (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n      return (0, _includes.default)(ADD_OPTIONS_VALUE).call(ADD_OPTIONS_VALUE, func);\n    }),\n    editFuncPerms: (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n      return (0, _includes.default)(EDIT_OPTIONS_VALUE).call(EDIT_OPTIONS_VALUE, func);\n    }),\n    isDeleteOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'delete'),\n    isViewOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'view'),\n    isAddOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'add'),\n    isEditOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'edit')\n  };\n};\nvar AppPermSetting = (0, _react.forwardRef)(function (_ref3, ref) {\n  var value = _ref3.value,\n    _ref3$allowFieldAuth = _ref3.allowFieldAuth,\n    allowFieldAuth = _ref3$allowFieldAuth === void 0 ? true : _ref3$allowFieldAuth,\n    formId = _ref3.formId,\n    appId = _ref3.appId,\n    handleEqualChange = _ref3.handleEqualChange,\n    onChange = _ref3.onChange;\n  var _useReducer = (0, _react.useReducer)(_reducer.assignDataReducer, transformAppPerm(value || INIT_APP_PERM)),\n    _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),\n    setting = _useReducer2[0],\n    dispatchSetting = _useReducer2[1];\n\n  // 编辑功能权限发生变化\n  var handleEditPermChange = (0, _react.useCallback)(function (newVal) {\n    dispatchSetting({\n      editFuncPerms: newVal\n    });\n  }, [dispatchSetting]);\n\n  // 录入功能权限发生变化\n  var handleAddPermChange = (0, _react.useCallback)(function (newVal) {\n    dispatchSetting({\n      addFuncPerms: newVal\n    });\n  }, [dispatchSetting]);\n\n  // 查看功能权限发生变化\n  var handleViewPermChange = (0, _react.useCallback)(function (newVal) {\n    dispatchSetting({\n      viewFuncPerms: newVal\n    });\n  }, [dispatchSetting]);\n\n  // 删除功能权限发生变化\n  var handleDeletePermChange = function handleDeletePermChange(checked) {\n    dispatchSetting({\n      isDeleteOpOpen: checked\n    });\n  };\n  var getAppPerm = function getAppPerm(data) {\n    var _context2;\n    var viewFuncPerms = data.viewFuncPerms,\n      editFuncPerms = data.editFuncPerms,\n      addFuncPerms = data.addFuncPerms,\n      isDeleteOpOpen = data.isDeleteOpOpen,\n      isViewOpOpen = data.isViewOpOpen,\n      isEditOpOpen = data.isEditOpOpen,\n      isAddOpOpen = data.isAddOpOpen;\n    var newFuncPermSet = (0, _concat.default)(_context2 = []).call(_context2, (0, _toConsumableArray2.default)(viewFuncPerms), (0, _toConsumableArray2.default)(editFuncPerms), (0, _toConsumableArray2.default)(addFuncPerms));\n    isDeleteOpOpen && newFuncPermSet.push('delete');\n    isViewOpOpen && newFuncPermSet.push('view');\n    isAddOpOpen && newFuncPermSet.push('add');\n    isEditOpOpen && newFuncPermSet.push('edit');\n    return {\n      funcPermSet: newFuncPermSet\n    };\n  };\n  (0, _react.useImperativeHandle)(ref, function () {\n    var appPerm = getAppPerm(setting);\n    return {\n      appPerm: appPerm,\n      dispatchSetting: dispatchSetting\n    };\n  }, [setting]);\n  (0, _react.useEffect)(function () {\n    var newSetting = transformAppPerm(value);\n    if (!(0, _lodash.isEqual)((0, _utils.deepTransformArrayToObj)(newSetting), (0, _utils.deepTransformArrayToObj)(setting))) {\n      dispatchSetting(newSetting);\n    }\n    handleEqualChange(true);\n  }, [value]);\n  (0, _react.useEffect)(function () {\n    var newSetting = transformAppPerm(value);\n    var isValueEqual = (0, _lodash.isEqual)((0, _utils.deepTransformArrayToObj)(newSetting), (0, _utils.deepTransformArrayToObj)(setting));\n    handleEqualChange(isValueEqual);\n    onChange === null || onChange === void 0 || onChange(getAppPerm(setting));\n  }, [setting]);\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AppPermSetting.default['operate-setting']\n  }, /*#__PURE__*/_react.default.createElement(SettingItem, {\n    title: \"\\u67E5\\u770B\",\n    options: VIEW_OPTIONS,\n    value: setting.viewFuncPerms,\n    allowFieldAuth: allowFieldAuth,\n    formId: formId,\n    appId: appId,\n    checked: setting.isViewOpOpen,\n    onSwitchChange: function onSwitchChange(checked) {\n      dispatchSetting({\n        isViewOpOpen: checked\n      });\n    },\n    onChange: handleViewPermChange\n  }), /*#__PURE__*/_react.default.createElement(SettingItem, {\n    title: \"\\u5F55\\u5165\",\n    options: ADD_OPTIONS,\n    value: setting.addFuncPerms,\n    allowFieldAuth: false,\n    formId: formId,\n    appId: appId,\n    checked: setting.isAddOpOpen,\n    onSwitchChange: function onSwitchChange(checked) {\n      dispatchSetting({\n        isAddOpOpen: checked\n      });\n    },\n    onChange: handleAddPermChange\n  }), /*#__PURE__*/_react.default.createElement(SettingItem, {\n    title: \"\\u7F16\\u8F91\",\n    options: EDIT_OPTIONS,\n    value: setting.editFuncPerms,\n    allowFieldAuth: allowFieldAuth,\n    formId: formId,\n    appId: appId,\n    checked: setting.isEditOpOpen,\n    onSwitchChange: function onSwitchChange(checked) {\n      dispatchSetting({\n        isEditOpOpen: checked\n      });\n    },\n    onChange: handleEditPermChange\n  }), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AppPermSetting.default.setting\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AppPermSetting.default.title\n  }, \"\\u5220\\u9664\"), /*#__PURE__*/_react.default.createElement(_kdesign.Switch, {\n    checked: setting.isDeleteOpOpen,\n    onChange: handleDeletePermChange\n  })));\n});\nvar _default = exports[\"default\"] = AppPermSetting;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/permission/rightOfUse/AppPermSetting.tsx\n");

/***/ }),

/***/ "./src/web/component/permission/rightOfUse/FormPermSetting.tsx":
/*!*********************************************************************!*\
  !*** ./src/web/component/permission/rightOfUse/FormPermSetting.tsx ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _Object$keys2 = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\nvar _Object$getOwnPropertySymbols = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\nvar _filterInstanceProperty2 = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _Object$getOwnPropertyDescriptors = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\nvar _Object$defineProperties = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = exports.INIT_FORM_PERM = void 0;\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\"));\nvar _has = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/reflect/has */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/reflect/has.js\"));\nvar _keys = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\"));\nvar _filter = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\"));\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _includes = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/includes */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js\"));\nvar _find = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js\"));\nvar _concat = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\"));\nvar _setTimeout2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\"));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _AppPermSetting = __webpack_require__(/*! ./AppPermSetting */ \"./src/web/component/permission/rightOfUse/AppPermSetting.tsx\");\nvar _listSettingUtil = __webpack_require__(/*! @/utils/listSettingUtil */ \"./src/utils/listSettingUtil.js\");\nvar _menuTableUtil = __webpack_require__(/*! @/utils/menuTableUtil */ \"./src/utils/menuTableUtil.js\");\nvar _menuTableActions = __webpack_require__(/*! @/utils/menuTableActions */ \"./src/utils/menuTableActions.ts\");\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _WebUI = __webpack_require__(/*! nocode_component/WebUI */ \"webpack/container/remote/nocode_component/WebUI\");\nvar _apps = __webpack_require__(/*! @/actions/apps */ \"./src/actions/apps.ts\");\nvar _common = __webpack_require__(/*! @/actions/common */ \"./src/actions/common.js\");\nvar _FormPermSetting = _interopRequireDefault(__webpack_require__(/*! ./FormPermSetting.less */ \"./src/web/component/permission/rightOfUse/FormPermSetting.less\"));\nvar _lodash = __webpack_require__(/*! kd_libs/lodash */ \"webpack/container/remote/kd_libs/lodash\");\nvar _index = __webpack_require__(/*! @/utils/index */ \"./src/utils/index.tsx\");\nvar _env = __webpack_require__(/*! @/constants/env */ \"./src/constants/env.js\");\nvar _ListFilterSetting = _interopRequireDefault(__webpack_require__(/*! ../../common/ListFilterSetting */ \"./src/web/component/common/ListFilterSetting.tsx\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /**\n * 表单权限设置\n */\nvar EMPTY_FILTERS = [];\nvar MERGE = 'MERGE';\nvar UPDATE = 'UPDATE';\nvar DELETE = 'DELETE';\nvar permSettingReducer = function permSettingReducer(state, action) {\n  var type = action.type,\n    payload = action.payload,\n    deleteKey = action.deleteKey;\n  switch (type) {\n    case MERGE:\n      return _objectSpread({}, payload);\n    case UPDATE:\n      return _objectSpread(_objectSpread({}, state), payload);\n    case DELETE:\n      var newState = _objectSpread({}, state);\n      if ((0, _has.default)(newState, deleteKey)) {\n        delete newState[deleteKey];\n      }\n      return newState;\n    default:\n      return state;\n  }\n};\nvar reducer = function reducer(state, newData) {\n  var newState = _objectSpread({}, state);\n  (0, _keys.default)(newData).forEach(function (key) {\n    var val = newData[key];\n    if (Array.isArray(val) && !val.length) {\n      delete newState[key];\n    } else {\n      newState[key] = val;\n    }\n  });\n  return newState;\n};\nvar INIT_CUSTOM_PAGE_PERM = {\n  funcPermSet: ['view']\n};\nvar INIT_FORM_PERM = exports.INIT_FORM_PERM = {\n  record: '0',\n  funcPermSet: ['view', 'view-001', 'view-002', 'view-003', 'view-004', 'view-005', 'add', 'add-001', 'add-002', 'add-003', 'edit', 'edit-001', 'delete'],\n  fieldPermSet: {},\n  filters: []\n};\n\n/**\n * 业务操作权限\n */\nvar BizButtonPerm = function BizButtonPerm(_ref) {\n  var value = _ref.value,\n    options = _ref.options,\n    onChange = _ref.onChange;\n  var _useState = (0, _react.useState)(value),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    checked = _useState2[0],\n    setChecked = _useState2[1];\n  var handleCheckboxChange = function handleCheckboxChange(newVal) {\n    var _context;\n    setChecked(newVal);\n    var uncheckedVal = (0, _filter.default)(_context = (0, _map.default)(options).call(options, function (item) {\n      return item.id;\n    })).call(_context, function (opKey) {\n      return !(0, _includes.default)(newVal).call(newVal, opKey);\n    });\n    onChange === null || onChange === void 0 || onChange(uncheckedVal);\n  };\n  (0, _react.useEffect)(function () {\n    setChecked(value);\n  }, [value]);\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.bizButtonSetting\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.row\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.title\n  }, \"\\u4E1A\\u52A1\\u64CD\\u4F5C\"), /*#__PURE__*/_react.default.createElement(_kdesign.Checkbox.Group, {\n    onChange: handleCheckboxChange,\n    style: {\n      marginLeft: '108px'\n    },\n    value: checked\n  }, (0, _map.default)(options).call(options, function (_ref2) {\n    var id = _ref2.id,\n      text = _ref2.text;\n    return /*#__PURE__*/_react.default.createElement(_kdesign.Checkbox, {\n      value: id,\n      key: id\n    }, (text === null || text === void 0 ? void 0 : text.zh_CN) || '');\n  }))));\n};\nvar FormPerm = function FormPerm(_ref3) {\n  var formInfo = _ref3.formInfo,\n    value = _ref3.value,\n    appId = _ref3.appId,\n    onChange = _ref3.onChange;\n  var name = formInfo.name,\n    formId = formInfo.formId;\n  var _useState3 = (0, _react.useState)(!!value),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    hasPerm = _useState4[0],\n    setHasPerm = _useState4[1];\n  var _useReducer = (0, _react.useReducer)(reducer, value || INIT_FORM_PERM),\n    _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),\n    formPerm = _useReducer2[0],\n    dispatchFormPerm = _useReducer2[1];\n  var _useState5 = (0, _react.useState)([]),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    panelActiveKey = _useState6[0],\n    setPanelActiveKey = _useState6[1];\n  var _useState7 = (0, _react.useState)(false),\n    _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n    isOpen = _useState8[0],\n    setIsOpen = _useState8[1];\n  var _useState9 = (0, _react.useState)(false),\n    _useState10 = (0, _slicedToArray2.default)(_useState9, 2),\n    showFilterSettingPop = _useState10[0],\n    setShowFilterSettingPop = _useState10[1];\n  // const [configuredFilterItems, setConfiguredFilterItems] = useState(formPerm.filters || [])\n  var _useState11 = (0, _react.useState)(),\n    _useState12 = (0, _slicedToArray2.default)(_useState11, 2),\n    colHeadFilter = _useState12[0],\n    setColHeadFilter = _useState12[1];\n  var _useState13 = (0, _react.useState)([]),\n    _useState14 = (0, _slicedToArray2.default)(_useState13, 2),\n    listFilterConfig = _useState14[0],\n    setListFilterConfig = _useState14[1];\n  var _useState15 = (0, _react.useState)([]),\n    _useState16 = (0, _slicedToArray2.default)(_useState15, 2),\n    bizButtonOptions = _useState16[0],\n    setBizButtonOptions = _useState16[1];\n  var hasLoadListConfig = (0, _react.useRef)(false);\n  var hasLoadBizButton = (0, _react.useRef)(false);\n  var hasChildDropdown = (0, _react.useRef)();\n  // const [recordType, setRecordType] = useState('0')\n  var isCustomRecord = formPerm.record === '2';\n  // const isCustomRecord = recordType === '2'\n  var formPermDataRef = (0, _react.useRef)({});\n  var bizButtonRef = (0, _react.useRef)([]);\n  formPermDataRef.current = formPerm;\n  bizButtonRef.current = bizButtonOptions;\n  var handleCloseFilterSetting = (0, _react.useCallback)(function () {\n    setShowFilterSettingPop(false);\n  }, []);\n  var handleFilterConfirm = function handleFilterConfirm(values) {\n    var newConfiguredFilterItems = (0, _menuTableUtil.getEffectiveFilterItems)(values);\n    // setConfiguredFilterItems(newConfiguredFilterItems)\n    handleChangeAndNotify({\n      filters: newConfiguredFilterItems\n    });\n    setShowFilterSettingPop(false);\n  };\n  var handlePanelChange = function handlePanelChange() {\n    // 切换面板的展开、收起\n    var newIsOpen = !isOpen;\n    setIsOpen(newIsOpen);\n  };\n  var onDelete = function onDelete(i) {\n    var _ref4;\n    var newItems = (_ref4 = formPerm.filters || []) === null || _ref4 === void 0 ? void 0 : (0, _filter.default)(_ref4).call(_ref4, function (item, index) {\n      return i !== index;\n    });\n    handleChangeAndNotify({\n      filters: newItems\n    });\n  };\n  var getEnumFilterValue = /*#__PURE__*/function () {\n    var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(v, newConfiguredFilterItems) {\n      return _regenerator.default.wrap(function _callee$(_context2) {\n        while (1) switch (_context2.prev = _context2.next) {\n          case 0:\n            _context2.next = 2;\n            return (0, _menuTableActions.getEnumFilterValue)(appId, formId, _env.ENV_APP, newConfiguredFilterItems || formPerm.filters || [], listFilterConfig, {\n              fieldName: v === null || v === void 0 ? void 0 : v.fieldName,\n              compareType: v === null || v === void 0 ? void 0 : v.compareType,\n              value: v === null || v === void 0 ? void 0 : v.value\n            }, 'schemaConfig');\n          case 2:\n            return _context2.abrupt(\"return\", _context2.sent);\n          case 3:\n          case \"end\":\n            return _context2.stop();\n        }\n      }, _callee);\n    }));\n    return function getEnumFilterValue(_x, _x2) {\n      return _ref5.apply(this, arguments);\n    };\n  }();\n  var handleGetColHeadFilter = (0, _react.useCallback)(function (v, configuredFilterItems) {\n    getEnumFilterValue({\n      fieldName: v === null || v === void 0 ? void 0 : v.fieldName,\n      compareType: v === null || v === void 0 ? void 0 : v.compareType,\n      value: v === null || v === void 0 ? void 0 : v.value\n    }, configuredFilterItems).then(function (data) {\n      setColHeadFilter(function (filter) {\n        return _objectSpread(_objectSpread({}, filter), {}, (0, _defineProperty2.default)({}, v === null || v === void 0 ? void 0 : v.fieldName, data));\n      });\n    });\n  }, [getEnumFilterValue]);\n  var filters = (0, _react.useMemo)(function () {\n    return (0, _listSettingUtil.getTransferFilters)((0, _listSettingUtil.getFilters)(formPerm.filters || [], listFilterConfig));\n  }, [formPerm.filters, listFilterConfig]);\n  var handleRecordAuthChange = function handleRecordAuthChange(e) {\n    var fieldPermSet = formPermDataRef.current.fieldPermSet;\n    // 这里主要处理：业务操作的权限不被重置\n    var _fieldPermSet$view = fieldPermSet.view,\n      viewFieldPerm = _fieldPermSet$view === void 0 ? [] : _fieldPermSet$view;\n    var newViewFieldPerm = (0, _filter.default)(viewFieldPerm).call(viewFieldPerm, function (key) {\n      return (0, _find.default)(bizButtonOptions).call(bizButtonOptions, function (button) {\n        return button.id === key;\n      });\n    });\n    var newFieldPermSet = newViewFieldPerm.length ? {\n      view: newViewFieldPerm\n    } : {};\n    var newVal = e.target.value === '3' ? _objectSpread(_objectSpread({}, INIT_FORM_PERM), {}, {\n      fieldPermSet: newFieldPermSet,\n      record: e.target.value\n    }) : {\n      record: e.target.value\n    };\n    handleChangeAndNotify(newVal);\n    // setRecordType(e.target.value)\n  };\n  var getListConfig = /*#__PURE__*/function () {\n    var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n      var _ref7, _ref7$rows, rows, _ref8, _ref8$listFilterConfi, _listFilterConfig, _ref8$listItemConfig, listItemConfig, message;\n      return _regenerator.default.wrap(function _callee2$(_context3) {\n        while (1) switch (_context3.prev = _context3.next) {\n          case 0:\n            _context3.prev = 0;\n            _context3.next = 3;\n            return (0, _apps.getFormDataListSetting)(appId, formId, '1', {});\n          case 3:\n            _context3.t0 = _context3.sent;\n            if (_context3.t0) {\n              _context3.next = 6;\n              break;\n            }\n            _context3.t0 = {};\n          case 6:\n            _ref7 = _context3.t0;\n            _ref7$rows = _ref7.rows;\n            rows = _ref7$rows === void 0 ? [] : _ref7$rows;\n            _ref8 = rows[0] || {}, _ref8$listFilterConfi = _ref8.listFilterConfig, _listFilterConfig = _ref8$listFilterConfi === void 0 ? [] : _ref8$listFilterConfi, _ref8$listItemConfig = _ref8.listItemConfig, listItemConfig = _ref8$listItemConfig === void 0 ? [] : _ref8$listItemConfig; // 应该取listItemConfig，需要获取配置信息\n            setListFilterConfig((0, _map.default)(_listFilterConfig).call(_listFilterConfig, function (filter) {\n              var itemConfig = (0, _find.default)(listItemConfig).call(listItemConfig, function (item) {\n                return filter.fieldName === item.number;\n              }) || {};\n              return _objectSpread(_objectSpread({}, filter), itemConfig);\n            }));\n            hasLoadListConfig.current = true;\n            _context3.next = 19;\n            break;\n          case 14:\n            _context3.prev = 14;\n            _context3.t1 = _context3[\"catch\"](0);\n            console.log(_context3.t1);\n            message = _context3.t1.message;\n            (0, _utils.showNotice)('error', message);\n          case 19:\n          case \"end\":\n            return _context3.stop();\n        }\n      }, _callee2, null, [[0, 14]]);\n    }));\n    return function getListConfig() {\n      return _ref6.apply(this, arguments);\n    };\n  }();\n  var getBizButtonOptions = /*#__PURE__*/function () {\n    var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {\n      var _ref10, _ref10$rows, rows, message;\n      return _regenerator.default.wrap(function _callee3$(_context4) {\n        while (1) switch (_context4.prev = _context4.next) {\n          case 0:\n            _context4.prev = 0;\n            _context4.next = 3;\n            return (0, _common.getBizButtonByFormId)(appId, formId);\n          case 3:\n            _context4.t0 = _context4.sent;\n            if (_context4.t0) {\n              _context4.next = 6;\n              break;\n            }\n            _context4.t0 = {};\n          case 6:\n            _ref10 = _context4.t0;\n            _ref10$rows = _ref10.rows;\n            rows = _ref10$rows === void 0 ? [] : _ref10$rows;\n            setBizButtonOptions(rows || []);\n            hasLoadBizButton.current = true;\n            _context4.next = 18;\n            break;\n          case 13:\n            _context4.prev = 13;\n            _context4.t1 = _context4[\"catch\"](0);\n            console.log(_context4.t1);\n            message = _context4.t1.message;\n            (0, _utils.showNotice)('error', message);\n          case 18:\n          case \"end\":\n            return _context4.stop();\n        }\n      }, _callee3, null, [[0, 13]]);\n    }));\n    return function getBizButtonOptions() {\n      return _ref9.apply(this, arguments);\n    };\n  }();\n  (0, _react.useEffect)(function () {\n    if (isOpen && !hasLoadListConfig.current) {\n      // 加载筛选项数据\n      getListConfig();\n    }\n    if (isOpen && !hasLoadBizButton.current) {\n      // 加载所有业务操作按钮\n      getBizButtonOptions();\n    }\n  }, [isOpen]);\n  var handleChangeAndNotify = function handleChangeAndNotify(change) {\n    var newFormPerm = _objectSpread(_objectSpread({}, formPermDataRef.current), change);\n    dispatchFormPerm(change);\n    onChange === null || onChange === void 0 || onChange(newFormPerm);\n  };\n\n  // 编辑功能权限发生变化\n  var handleFuncPermChange = function handleFuncPermChange(newVal, type) {\n    var _context5;\n    console.log('funcPermSet------', formPerm.funcPermSet);\n    var _formPermDataRef$curr = formPermDataRef.current.funcPermSet,\n      funcPermSet = _formPermDataRef$curr === void 0 ? [] : _formPermDataRef$curr;\n    var valueMap = {\n      add: _AppPermSetting.ADD_OPTIONS_VALUE,\n      edit: _AppPermSetting.EDIT_OPTIONS_VALUE,\n      view: _AppPermSetting.VIEW_OPTIONS_VALUE\n    };\n    var options = valueMap[type] || [];\n    var newFuncPermSet = (0, _concat.default)(_context5 = (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n      return !(0, _includes.default)(options).call(options, func);\n    })).call(_context5, newVal);\n    handleChangeAndNotify({\n      funcPermSet: newFuncPermSet\n    });\n  };\n  var handleSwitchChange = function handleSwitchChange(checked, funcKey) {\n    console.log('funcPermSet------', formPerm.funcPermSet);\n    var _formPermDataRef$curr2 = formPermDataRef.current.funcPermSet,\n      funcPermSet = _formPermDataRef$curr2 === void 0 ? [] : _formPermDataRef$curr2;\n    var newFuncPermSet = checked ? (0, _concat.default)(funcPermSet).call(funcPermSet, funcKey) : (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n      return func !== funcKey;\n    });\n    handleChangeAndNotify({\n      funcPermSet: newFuncPermSet\n    });\n  };\n  var handleViewFieldPermChange = function handleViewFieldPermChange(newVal) {\n    var _context6, _context7;\n    var _formPermDataRef$curr3 = formPermDataRef.current.fieldPermSet,\n      fieldPermSet = _formPermDataRef$curr3 === void 0 ? {} : _formPermDataRef$curr3;\n    var _fieldPermSet$view2 = fieldPermSet.view,\n      viewFieldPerm = _fieldPermSet$view2 === void 0 ? [] : _fieldPermSet$view2;\n    var bizButtonIds = (0, _map.default)(_context6 = bizButtonRef.current).call(_context6, function (item) {\n      return item.id;\n    });\n    var newViewFieldPerm = (0, _concat.default)(_context7 = (0, _filter.default)(viewFieldPerm).call(viewFieldPerm, function (key) {\n      return (0, _includes.default)(bizButtonIds).call(bizButtonIds, key);\n    })).call(_context7, newVal);\n    var newFieldPermSet = _objectSpread(_objectSpread({}, fieldPermSet), {}, {\n      view: newViewFieldPerm\n    });\n    handleChangeAndNotify({\n      fieldPermSet: newFieldPermSet\n    });\n  };\n  var handleAddFieldPermChange = function handleAddFieldPermChange(newVal) {\n    var _formPermDataRef$curr4 = formPermDataRef.current.fieldPermSet,\n      fieldPermSet = _formPermDataRef$curr4 === void 0 ? {} : _formPermDataRef$curr4;\n    var newFieldPermSet = _objectSpread(_objectSpread({}, fieldPermSet), {}, {\n      input: newVal\n    });\n    handleChangeAndNotify({\n      fieldPermSet: newFieldPermSet\n    });\n  };\n  var handleEditFieldPermChange = function handleEditFieldPermChange(newVal) {\n    var _formPermDataRef$curr5 = formPermDataRef.current.fieldPermSet,\n      fieldPermSet = _formPermDataRef$curr5 === void 0 ? {} : _formPermDataRef$curr5;\n    var newFieldPermSet = _objectSpread(_objectSpread({}, fieldPermSet), {}, {\n      edit: newVal\n    });\n    handleChangeAndNotify({\n      fieldPermSet: newFieldPermSet\n    });\n  };\n  var handleBizButtonPermChange = function handleBizButtonPermChange(hiddenKeys) {\n    var _context8;\n    var _formPermDataRef$curr6 = formPermDataRef.current.fieldPermSet,\n      fieldPermSet = _formPermDataRef$curr6 === void 0 ? {} : _formPermDataRef$curr6;\n    var _fieldPermSet$view3 = fieldPermSet.view,\n      viewFieldPerm = _fieldPermSet$view3 === void 0 ? [] : _fieldPermSet$view3;\n    var newViewFieldPerm = (0, _concat.default)(_context8 = (0, _filter.default)(viewFieldPerm).call(viewFieldPerm, function (key) {\n      return !(0, _find.default)(bizButtonOptions).call(bizButtonOptions, function (button) {\n        return button.id === key;\n      });\n    })).call(_context8, hiddenKeys);\n    var newFieldPermSet = _objectSpread(_objectSpread({}, fieldPermSet), {}, {\n      view: newViewFieldPerm\n    });\n    handleChangeAndNotify({\n      fieldPermSet: newFieldPermSet\n    });\n  };\n  (0, _react.useEffect)(function () {\n    if (!(0, _lodash.isEqual)((0, _index.deepTransformArrayToObj)(value), (0, _index.deepTransformArrayToObj)(formPerm))) {\n      setHasPerm(!!value);\n      dispatchFormPerm(value || INIT_FORM_PERM);\n    }\n  }, [value]);\n  var funcSetting = (0, _react.useMemo)(function () {\n    var _formPerm$funcPermSet = formPerm.funcPermSet,\n      funcPermSet = _formPerm$funcPermSet === void 0 ? [] : _formPerm$funcPermSet;\n    return {\n      viewFuncPerms: (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n        return (0, _includes.default)(_AppPermSetting.VIEW_OPTIONS_VALUE).call(_AppPermSetting.VIEW_OPTIONS_VALUE, func);\n      }),\n      addFuncPerms: (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n        return (0, _includes.default)(_AppPermSetting.ADD_OPTIONS_VALUE).call(_AppPermSetting.ADD_OPTIONS_VALUE, func);\n      }),\n      editFuncPerms: (0, _filter.default)(funcPermSet).call(funcPermSet, function (func) {\n        return (0, _includes.default)(_AppPermSetting.EDIT_OPTIONS_VALUE).call(_AppPermSetting.EDIT_OPTIONS_VALUE, func);\n      }),\n      isDeleteOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'delete'),\n      isViewOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'view'),\n      isAddOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'add'),\n      isEditOpOpen: funcPermSet === null || funcPermSet === void 0 ? void 0 : (0, _includes.default)(funcPermSet).call(funcPermSet, 'edit')\n    };\n  }, [formPerm]);\n  var viewFieldPerm = (0, _react.useMemo)(function () {\n    var _context9;\n    var _formPerm$fieldPermSe = formPerm.fieldPermSet,\n      fieldPermSet = _formPerm$fieldPermSe === void 0 ? {} : _formPerm$fieldPermSe;\n    return (0, _filter.default)(_context9 = (fieldPermSet === null || fieldPermSet === void 0 ? void 0 : fieldPermSet.view) || []).call(_context9, function (key) {\n      return !(0, _find.default)(bizButtonOptions).call(bizButtonOptions, function (item) {\n        return item.id === key;\n      });\n    });\n  }, [formPerm, bizButtonOptions]);\n  var addFieldPerm = (0, _react.useMemo)(function () {\n    var _formPerm$fieldPermSe2 = formPerm.fieldPermSet,\n      fieldPermSet = _formPerm$fieldPermSe2 === void 0 ? {} : _formPerm$fieldPermSe2;\n    return (fieldPermSet === null || fieldPermSet === void 0 ? void 0 : fieldPermSet.input) || [];\n  }, [formPerm]);\n  var editFieldPerm = (0, _react.useMemo)(function () {\n    var _formPerm$fieldPermSe3 = formPerm.fieldPermSet,\n      fieldPermSet = _formPerm$fieldPermSe3 === void 0 ? {} : _formPerm$fieldPermSe3;\n    return (fieldPermSet === null || fieldPermSet === void 0 ? void 0 : fieldPermSet.edit) || [];\n  }, [formPerm]);\n  var bizButtonIds = (0, _react.useMemo)(function () {\n    var _context10;\n    var _formPerm$fieldPermSe4 = formPerm.fieldPermSet,\n      fieldPermSet = _formPerm$fieldPermSe4 === void 0 ? {} : _formPerm$fieldPermSe4;\n    return (0, _filter.default)(_context10 = (0, _map.default)(bizButtonOptions).call(bizButtonOptions, function (item) {\n      return item.id;\n    })).call(_context10, function (buttonId) {\n      var _context11;\n      return !(0, _includes.default)(_context11 = (fieldPermSet === null || fieldPermSet === void 0 ? void 0 : fieldPermSet.view) || []).call(_context11, buttonId);\n    });\n  }, [formPerm, bizButtonOptions]);\n  var handleFormPermChange = function handleFormPermChange(checked) {\n    setHasPerm(checked);\n    var newFormPerm = checked ? formPerm : undefined;\n    onChange === null || onChange === void 0 || onChange(newFormPerm);\n  };\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['form-auth']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Collapse, {\n    defaultActiveKey: panelActiveKey,\n    name: \"Collapse_\".concat(formId),\n    onChange: handlePanelChange\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Collapse.Panel, {\n    header: name,\n    panelKey: formId,\n    extra: /*#__PURE__*/_react.default.createElement(_kdesign.Switch, {\n      checked: hasPerm,\n      onChange: handleFormPermChange\n    })\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _FormPermSetting.default['no-perm'], true), _FormPermSetting.default.hidden, hasPerm))\n  }, \"[\\u8BB0\\u5F55\\u8303\\u56F4]\\u3001[\\u64CD\\u4F5C\\u6743\\u9650] \\u7684\\u914D\\u7F6E\\u9700\\u5F00\\u542F\\u540E\\u751F\\u6548\"), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: (0, _classnames.default)((0, _defineProperty2.default)({}, _FormPermSetting.default.hidden, !hasPerm))\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['auth-item']\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.name,\n    title: \"\\u8BBE\\u7F6E\\u89D2\\u8272\\u53EF\\u4EE5\\u4F7F\\u7528\\u7684\\u8BB0\\u5F55\\u8303\\u56F4\"\n  }, \"\\u8BB0\\u5F55\\u8303\\u56F4\"), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['record-auth']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Radio.Group, {\n    onChange: handleRecordAuthChange,\n    value: formPerm.record\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Radio, {\n    value: \"0\"\n  }, \"\\u53EF\\u4EE5\\u4F7F\\u7528\\u6240\\u6709\\u8BB0\\u5F55\"), /*#__PURE__*/_react.default.createElement(_kdesign.Radio, {\n    value: \"1\"\n  }, \"\\u53EF\\u4EE5\\u4F7F\\u7528\\u81EA\\u5DF1\\u7684\\u8BB0\\u5F55\"), /*#__PURE__*/_react.default.createElement(_kdesign.Radio, {\n    value: \"3\"\n  }, \"\\u53EF\\u4EE5\\u67E5\\u770B\\u6240\\u6709\\u8BB0\\u5F55\\uFF0C\\u53EA\\u80FD\\u7F16\\u8F91\\u3001\\u5220\\u9664\\u81EA\\u5DF1\\u5F55\\u5165\\u7684\\u8BB0\\u5F55\"), /*#__PURE__*/_react.default.createElement(_kdesign.Radio, {\n    value: \"2\"\n  }, \"\\u81EA\\u5B9A\\u4E49\")), isCustomRecord && /*#__PURE__*/_react.default.createElement(_ListFilterSetting.default, {\n    title: \"\\u7B5B\\u9009\",\n    onClose: handleCloseFilterSetting,\n    onConfirm: handleFilterConfirm,\n    data: listFilterConfig || [],\n    configuredFilterItems: formPerm.filters || EMPTY_FILTERS,\n    style: {\n      width: '640px',\n      height: '332px'\n    },\n    maskClosable: true,\n    maskStyle: {\n      opacity: 0\n    }\n    // className={style['filter-popup']}\n    ,\n    draggable: true,\n    showClearAll: true,\n    onDelete: onDelete,\n    onColHeadFilterVisibleChange: handleGetColHeadFilter,\n    colHeadFilter: colHeadFilter,\n    visible: showFilterSettingPop,\n    onDropdownVisibleChange: function onDropdownVisibleChange(v) {\n      hasChildDropdown.current = v;\n    },\n    onVisibleChange: function onVisibleChange(v) {\n      (0, _setTimeout2.default)(function () {\n        // 如果子组件存在激活的dropdown, 阻止弹窗关闭\n        if (!hasChildDropdown.current) {\n          setShowFilterSettingPop(v);\n        }\n      });\n    }\n  }, /*#__PURE__*/_react.default.createElement(\"p\", {\n    className: (0, _classnames.default)([(0, _filter.default)(_FormPermSetting.default), (0, _defineProperty2.default)({}, _FormPermSetting.default['is-active'], showFilterSettingPop)])\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Icon, {\n    prefix: \"nocodeplatformicon\",\n    type: \"shaixuan\"\n  }), \"\\u7B5B\\u9009\"))), isCustomRecord && /*#__PURE__*/_react.default.createElement(_WebUI.FilterLabelBar, {\n    maxLabelCount: 3,\n    filters: filters,\n    onDelete: onDelete,\n    className: _FormPermSetting.default['filter-label-bar']\n  })), formPerm.record !== '3' && /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['auth-item']\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.name,\n    title: \"\\u8BBE\\u7F6E\\u89D2\\u8272\\u7684\\u64CD\\u4F5C\\u6743\\u9650\"\n  }, \"\\u64CD\\u4F5C\\u6743\\u9650\"), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['op-auth']\n  }, /*#__PURE__*/_react.default.createElement(_AppPermSetting.SettingItem, {\n    title: \"\\u67E5\\u770B\",\n    options: _AppPermSetting.VIEW_OPTIONS,\n    value: funcSetting.viewFuncPerms,\n    allowFieldAuth: true,\n    formId: formId,\n    appId: appId,\n    checked: funcSetting.isViewOpOpen,\n    onSwitchChange: function onSwitchChange(checked) {\n      handleSwitchChange(checked, 'view');\n    },\n    fieldPermSet: viewFieldPerm,\n    onChange: function onChange(v) {\n      return handleFuncPermChange(v, 'view');\n    },\n    onPermSetChange: handleViewFieldPermChange\n  }), /*#__PURE__*/_react.default.createElement(_AppPermSetting.SettingItem, {\n    title: \"\\u5F55\\u5165\",\n    options: _AppPermSetting.ADD_OPTIONS,\n    value: funcSetting.addFuncPerms,\n    allowFieldAuth: true,\n    formId: formId,\n    appId: appId,\n    checked: funcSetting.isAddOpOpen,\n    onSwitchChange: function onSwitchChange(checked) {\n      handleSwitchChange(checked, 'add');\n    },\n    onChange: function onChange(v) {\n      return handleFuncPermChange(v, 'add');\n    },\n    fieldPermSet: addFieldPerm,\n    onPermSetChange: handleAddFieldPermChange\n  }), /*#__PURE__*/_react.default.createElement(_AppPermSetting.SettingItem, {\n    title: \"\\u7F16\\u8F91\",\n    options: _AppPermSetting.EDIT_OPTIONS,\n    value: funcSetting.editFuncPerms,\n    allowFieldAuth: true,\n    formId: formId,\n    appId: appId,\n    fieldPermSet: editFieldPerm,\n    checked: funcSetting.isEditOpOpen,\n    onSwitchChange: function onSwitchChange(checked) {\n      handleSwitchChange(checked, 'edit');\n    },\n    onChange: function onChange(v) {\n      return handleFuncPermChange(v, 'edit');\n    },\n    onPermSetChange: handleEditFieldPermChange\n  }), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.setting\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.title\n  }, \"\\u5220\\u9664\"), /*#__PURE__*/_react.default.createElement(_kdesign.Switch, {\n    checked: funcSetting.isDeleteOpOpen,\n    onChange: function onChange(checked) {\n      handleSwitchChange(checked, 'delete');\n    }\n  })), !!bizButtonOptions.length && /*#__PURE__*/_react.default.createElement(BizButtonPerm, {\n    options: bizButtonOptions,\n    value: bizButtonIds,\n    onChange: handleBizButtonPermChange\n  }))), formPerm.record === '3' && !!bizButtonOptions.length && /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['auth-item']\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default.name,\n    title: \"\\u8BBE\\u7F6E\\u89D2\\u8272\\u7684\\u64CD\\u4F5C\\u6743\\u9650\"\n  }, \"\\u64CD\\u4F5C\\u6743\\u9650\"), /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['op-auth']\n  }, /*#__PURE__*/_react.default.createElement(BizButtonPerm, {\n    options: bizButtonOptions,\n    value: bizButtonIds,\n    onChange: handleBizButtonPermChange\n  })))))));\n};\n\n// 卡片看板权限\nvar CustomPagePerm = function CustomPagePerm(_ref12) {\n  var formInfo = _ref12.formInfo,\n    value = _ref12.value,\n    onChange = _ref12.onChange;\n  var name = formInfo.name;\n  var _useState17 = (0, _react.useState)(!!value),\n    _useState18 = (0, _slicedToArray2.default)(_useState17, 2),\n    hasPerm = _useState18[0],\n    setHasPerm = _useState18[1];\n  var handlePermChange = function handlePermChange(checked) {\n    setHasPerm(checked);\n    var newFormPerm = checked ? INIT_CUSTOM_PAGE_PERM : undefined;\n    onChange === null || onChange === void 0 || onChange(newFormPerm);\n  };\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: (0, _classnames.default)(_FormPermSetting.default['form-auth'], _FormPermSetting.default['custom-page-auth'])\n  }, /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _FormPermSetting.default['custom-page-name']\n  }, name), /*#__PURE__*/_react.default.createElement(_kdesign.Switch, {\n    className: _FormPermSetting.default['custom-page-switch'],\n    checked: hasPerm,\n    onChange: handlePermChange\n  }));\n};\nvar FormPermSetting = (0, _react.forwardRef)(function (_ref13, ref) {\n  var roleId = _ref13.roleId,\n    formList = _ref13.formList,\n    _ref13$value = _ref13.value,\n    value = _ref13$value === void 0 ? {} : _ref13$value,\n    appId = _ref13.appId,\n    handleEqualChange = _ref13.handleEqualChange,\n    onChange = _ref13.onChange;\n  var _useReducer3 = (0, _react.useReducer)(permSettingReducer, value),\n    _useReducer4 = (0, _slicedToArray2.default)(_useReducer3, 2),\n    setting = _useReducer4[0],\n    dispatchSetting = _useReducer4[1];\n  var handleChange = function handleChange(formId, newVal) {\n    if (newVal === undefined) {\n      dispatchSetting({\n        type: DELETE,\n        deleteKey: formId\n      });\n    } else {\n      dispatchSetting({\n        type: UPDATE,\n        payload: (0, _defineProperty2.default)({}, formId, newVal)\n      });\n    }\n  };\n  (0, _react.useEffect)(function () {\n    if (!(0, _lodash.isEqual)((0, _index.deepTransformArrayToObj)(value), (0, _index.deepTransformArrayToObj)(setting))) {\n      dispatchSetting({\n        type: MERGE,\n        payload: value\n      });\n    }\n    handleEqualChange(true);\n  }, [value]);\n  (0, _react.useEffect)(function () {\n    var isValueEqual = (0, _lodash.isEqual)((0, _index.deepTransformArrayToObj)(value), (0, _index.deepTransformArrayToObj)(setting));\n    handleEqualChange(isValueEqual);\n    onChange === null || onChange === void 0 || onChange(setting);\n  }, [setting]);\n  (0, _react.useImperativeHandle)(ref, function () {\n    return {\n      formPerm: setting,\n      dispatchSetting: dispatchSetting\n    };\n  }, [setting, dispatchSetting]);\n  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _map.default)(formList).call(formList, function (formInfo) {\n    var _context13;\n    var formId = formInfo.formId,\n      type = formInfo.type;\n    if (type === 'custom') {\n      var _context12;\n      // 卡片看板\n      return /*#__PURE__*/_react.default.createElement(CustomPagePerm, {\n        formInfo: formInfo,\n        key: (0, _concat.default)(_context12 = \"\".concat(roleId, \"-\")).call(_context12, formId),\n        value: setting[formId],\n        onChange: function onChange(v) {\n          return handleChange(formId, v);\n        }\n      });\n    }\n    return /*#__PURE__*/_react.default.createElement(FormPerm, {\n      formInfo: formInfo,\n      key: (0, _concat.default)(_context13 = \"\".concat(roleId, \"-\")).call(_context13, formId),\n      appId: appId,\n      value: setting[formId],\n      onChange: function onChange(v) {\n        return handleChange(formId, v);\n      }\n    });\n  }));\n});\nvar _default = exports[\"default\"] = FormPermSetting;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/component/permission/rightOfUse/FormPermSetting.tsx\n");

/***/ }),

/***/ "./src/web/component/permission/rightOfUse/index.tsx":
/*!***********************************************************!*\
  !*** ./src/web/component/permission/rightOfUse/index.tsx ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = exports.USE_TYPE_VIEWALL = exports.USE_TYPE_SELF = exports.USE_TYPE_CUSTOM = exports.USE_TYPE_ALL = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./index.less */ \"./src/web/component/permission/rightOfUse/index.less\"));\n/**\r\n * 选择器-应用使用权\r\n */\n\nvar USE_TYPE_ALL = exports.USE_TYPE_ALL = 'all';\nvar USE_TYPE_SELF = exports.USE_TYPE_SELF = 'own';\nvar USE_TYPE_CUSTOM = exports.USE_TYPE_CUSTOM = 'custom';\nvar USE_TYPE_VIEWALL = exports.USE_TYPE_VIEWALL = 'viewall';\nvar RIGHT_OF_USE_OPTIONS = [{\n  label: '可以使用所有的表单记录',\n  value: USE_TYPE_ALL\n}, {\n  label: '可以使用自己录入的表单记录',\n  value: USE_TYPE_SELF\n}, {\n  label: '可以查看所有记录，只能编辑、删除自己录入的记录',\n  value: USE_TYPE_VIEWALL\n}, {\n  label: '自定义',\n  value: USE_TYPE_CUSTOM\n}];\nvar RightOfUse = function RightOfUse(_ref) {\n  var value = _ref.value,\n    disabled = _ref.disabled,\n    _onChange = _ref.onChange,\n    footer = _ref.footer;\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _index.default['right-of-use']\n  }, /*#__PURE__*/_react.default.createElement(_kdesign.Select, {\n    value: value,\n    options: RIGHT_OF_USE_OPTIONS,\n    borderType: \"bordered\",\n    size: \"large\",\n    placeholder: \"\\u8BF7\\u9009\\u62E9\",\n    disabled: disabled,\n    onChange: function onChange(v) {\n      return _onChange === null || _onChange === void 0 ? void 0 : _onChange(v);\n    }\n  }), footer);\n};\nvar _default = exports[\"default\"] = RightOfUse;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2NvbXBvbmVudC9wZXJtaXNzaW9uL3JpZ2h0T2ZVc2UvaW5kZXgudHN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBR0E7QUFDQTtBQUNBO0FBTEE7QUFDQTtBQUNBOztBQVlBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFDQTtBQUFBO0FBQUE7QUFHQTtBQUtBO0FBSEE7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUFBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFLQTtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vbm9jb2RlLXBsYXRmb3JtLy4vc3JjL3dlYi9jb21wb25lbnQvcGVybWlzc2lvbi9yaWdodE9mVXNlL2luZGV4LnRzeD8xNmRmIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxyXG4gKiDpgInmi6nlmagt5bqU55So5L2/55So5p2DXHJcbiAqL1xyXG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXHJcbmltcG9ydCB7IFNlbGVjdCB9IGZyb20gJ0BrZGNsb3VkanMva2Rlc2lnbidcclxuaW1wb3J0IHN0eWxlcyBmcm9tICcuL2luZGV4Lmxlc3MnXHJcblxyXG5pbnRlcmZhY2UgUmlnaHRPZlVzZVByb3BzIHtcclxuICB2YWx1ZTogYW55O1xyXG4gIGRpc2FibGVkOiBib29sZWFuO1xyXG4gIG9uQ2hhbmdlPzogKHY6IHN0cmluZykgPT4gdm9pZDtcclxuICBmb290ZXI6IFJlYWN0LlJlYWN0Tm9kZTtcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IFVTRV9UWVBFX0FMTCA9ICdhbGwnXHJcbmV4cG9ydCBjb25zdCBVU0VfVFlQRV9TRUxGID0gJ293bidcclxuZXhwb3J0IGNvbnN0IFVTRV9UWVBFX0NVU1RPTSA9ICdjdXN0b20nXHJcbmV4cG9ydCBjb25zdCBVU0VfVFlQRV9WSUVXQUxMID0gJ3ZpZXdhbGwnXHJcblxyXG5jb25zdCBSSUdIVF9PRl9VU0VfT1BUSU9OUyA9IFtcclxuICB7IGxhYmVsOiAn5Y+v5Lul5L2/55So5omA5pyJ55qE6KGo5Y2V6K6w5b2VJywgdmFsdWU6IFVTRV9UWVBFX0FMTCB9LFxyXG4gIHsgbGFiZWw6ICflj6/ku6Xkvb/nlKjoh6rlt7HlvZXlhaXnmoTooajljZXorrDlvZUnLCB2YWx1ZTogVVNFX1RZUEVfU0VMRiB9LFxyXG4gIHsgbGFiZWw6ICflj6/ku6Xmn6XnnIvmiYDmnInorrDlvZXvvIzlj6rog73nvJbovpHjgIHliKDpmaToh6rlt7HlvZXlhaXnmoTorrDlvZUnLCB2YWx1ZTogVVNFX1RZUEVfVklFV0FMTCB9LFxyXG4gIHsgbGFiZWw6ICfoh6rlrprkuYknLCB2YWx1ZTogVVNFX1RZUEVfQ1VTVE9NIH1cclxuXVxyXG5cclxuY29uc3QgUmlnaHRPZlVzZTogUmVhY3QuRkM8UmlnaHRPZlVzZVByb3BzPiA9ICh7XHJcbiAgdmFsdWUsIC8vIOWIneWni+WAvFxyXG4gIGRpc2FibGVkLFxyXG4gIG9uQ2hhbmdlLCAvLyBvbkNoYW5nZeS6i+S7tlxyXG4gIGZvb3RlclxyXG59OiBhbnkpID0+IHtcclxuICByZXR1cm4gKFxyXG4gICAgPGRpdiBjbGFzc05hbWU9e3N0eWxlc1sncmlnaHQtb2YtdXNlJ119PlxyXG4gICAgICA8U2VsZWN0XHJcbiAgICAgICAgdmFsdWU9e3ZhbHVlfVxyXG4gICAgICAgIG9wdGlvbnM9e1JJR0hUX09GX1VTRV9PUFRJT05TfVxyXG4gICAgICAgIGJvcmRlclR5cGU9J2JvcmRlcmVkJ1xyXG4gICAgICAgIHNpemU9J2xhcmdlJ1xyXG4gICAgICAgIHBsYWNlaG9sZGVyPSfor7fpgInmi6knXHJcbiAgICAgICAgZGlzYWJsZWQ9e2Rpc2FibGVkfVxyXG4gICAgICAgIG9uQ2hhbmdlPXsodikgPT4gb25DaGFuZ2U/Lih2KX1cclxuICAgICAgLz5cclxuICAgICAge2Zvb3Rlcn1cclxuICAgIDwvZGl2PlxyXG4gIClcclxufVxyXG5cclxuZXhwb3J0IGRlZmF1bHQgUmlnaHRPZlVzZVxyXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/web/component/permission/rightOfUse/index.tsx\n");

/***/ }),

/***/ "./src/web/pages/admin/permission/AdminPermissionPage.tsx":
/*!****************************************************************!*\
  !*** ./src/web/pages/admin/permission/AdminPermissionPage.tsx ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _typeof = __webpack_require__(/*! @babel/runtime-corejs3/helpers/typeof */ \"../../node_modules/@babel/runtime-corejs3/helpers/typeof.js\");\nvar _WeakMap = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/weak-map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/weak-map.js\");\nvar _Object$defineProperty = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\nvar _Object$getOwnPropertyDescriptor = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime-corejs3/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault.js\");\n_Object$defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getNextSelectedId = exports[\"default\"] = void 0;\nvar _map = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js\"));\nvar _values = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/values */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/values.js\"));\nvar _trim = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/trim */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js\"));\nvar _findIndex = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find-index */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/find-index.js\"));\nvar _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/regenerator */ \"../../node_modules/@babel/runtime-corejs3/regenerator/index.js\"));\nvar _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/asyncToGenerator */ \"../../node_modules/@babel/runtime-corejs3/helpers/asyncToGenerator.js\"));\nvar _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js\"));\nvar _react = _interopRequireWildcard(__webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\"));\nvar _SideBar = _interopRequireDefault(__webpack_require__(/*! @/web/component/permission/SideBar */ \"./src/web/component/permission/SideBar.tsx\"));\nvar _RoleSetting = _interopRequireDefault(__webpack_require__(/*! @/web/component/permission/RoleSetting */ \"./src/web/component/permission/RoleSetting.tsx\"));\nvar _auth = __webpack_require__(/*! @/actions/auth */ \"./src/actions/auth.js\");\nvar _admin = __webpack_require__(/*! @/actions/admin */ \"./src/actions/admin.js\");\nvar _home = __webpack_require__(/*! @/actions/home */ \"./src/actions/home.js\");\nvar _utils = __webpack_require__(/*! @/utils */ \"./src/utils/index.tsx\");\nvar _reactRouterDom = __webpack_require__(/*! react-router-dom */ \"../../node_modules/react-router-dom/index.js\");\nvar _app = __webpack_require__(/*! @/app */ \"./src/app.jsx\");\nvar _WebUI = __webpack_require__(/*! nocode_component/WebUI */ \"webpack/container/remote/nocode_component/WebUI\");\nvar _kdesign = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\nvar _rightOfUse = __webpack_require__(/*! @/web/component/permission/rightOfUse */ \"./src/web/component/permission/rightOfUse/index.tsx\");\nvar _PageEventService = __webpack_require__(/*! @/service/PageEventService */ \"./src/service/PageEventService.ts\");\nvar _AdminPermissionPage = _interopRequireDefault(__webpack_require__(/*! ./AdminPermissionPage.less */ \"./src/web/pages/admin/permission/AdminPermissionPage.less\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nvar AdminPermissionPage = function AdminPermissionPage() {\n  var _currentRole$current2;\n  var _useParams = (0, _reactRouterDom.useParams)(),\n    appId = _useParams.appId;\n  var _useContext = (0, _react.useContext)(_app.Context),\n    state = _useContext.state,\n    dispatch = _useContext.dispatch;\n  var appInfo = state.appsList[appId];\n  var userInfo = state.userInfo;\n  var _ref = appInfo || {},\n    creater = _ref.creater;\n  var _ref2 = creater || {},\n    _ref2$id = _ref2.id,\n    creatorId = _ref2$id === void 0 ? '' : _ref2$id;\n  var _useState = (0, _react.useState)([]),\n    _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n    formList = _useState2[0],\n    setFormList = _useState2[1];\n  var _useState3 = (0, _react.useState)(null),\n    _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n    roleList = _useState4[0],\n    setRoleList = _useState4[1];\n  var _useState5 = (0, _react.useState)(''),\n    _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n    activeRoleId = _useState6[0],\n    setActiveRoleId = _useState6[1];\n  var _Form$useForm = _kdesign.Form.useForm(),\n    _Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),\n    form = _Form$useForm2[0];\n  var _useState7 = (0, _react.useState)(''),\n    _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n    deleteName = _useState8[0],\n    setDeleteName = _useState8[1];\n  var _useState9 = (0, _react.useState)(false),\n    _useState10 = (0, _slicedToArray2.default)(_useState9, 2),\n    deleteConfirmVi = _useState10[0],\n    setDeleteConfirmVi = _useState10[1];\n  var _useState11 = (0, _react.useState)(null),\n    _useState12 = (0, _slicedToArray2.default)(_useState11, 2),\n    rolePermission = _useState12[0],\n    setRolePermission = _useState12[1];\n  var _useState13 = (0, _react.useState)([]),\n    _useState14 = (0, _slicedToArray2.default)(_useState13, 2),\n    disabledActions = _useState14[0],\n    setDisabledActions = _useState14[1];\n  var currentRole = (0, _react.useRef)(null);\n\n  // 获取当前应用下的所有表单\n  var getFormByAppId = /*#__PURE__*/function () {\n    var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n      var res, _ref4, _ref4$rows, list, message;\n      return _regenerator.default.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            _context.prev = 0;\n            _context.next = 3;\n            return (0, _auth.getPermForms)(appId);\n          case 3:\n            res = _context.sent;\n            _ref4 = res || {}, _ref4$rows = _ref4.rows, list = _ref4$rows === void 0 ? [] : _ref4$rows;\n            setFormList(list);\n            _context.next = 14;\n            break;\n          case 8:\n            _context.prev = 8;\n            _context.t0 = _context[\"catch\"](0);\n            console.log(_context.t0);\n            message = _context.t0.message;\n            (0, _utils.showNotice)('error', message);\n            setFormList([]);\n          case 14:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee, null, [[0, 8]]);\n    }));\n    return function getFormByAppId() {\n      return _ref3.apply(this, arguments);\n    };\n  }();\n\n  // 获取角色列表\n  var initRoleList = /*#__PURE__*/function () {\n    var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(selectRoleId) {\n      var res, _ref6, _ref6$rows, rows, id, message;\n      return _regenerator.default.wrap(function _callee2$(_context2) {\n        while (1) switch (_context2.prev = _context2.next) {\n          case 0:\n            _context2.prev = 0;\n            _context2.next = 3;\n            return (0, _admin.getRoleList)(appId);\n          case 3:\n            res = _context2.sent;\n            _ref6 = res || {}, _ref6$rows = _ref6.rows, rows = _ref6$rows === void 0 ? [] : _ref6$rows;\n            setRoleList(rows);\n            if (rows.length) {\n              if (selectRoleId) {\n                setActiveRoleId(selectRoleId);\n              } else {\n                id = rows[0].id;\n                setActiveRoleId(id);\n              }\n            }\n            _context2.next = 14;\n            break;\n          case 9:\n            _context2.prev = 9;\n            _context2.t0 = _context2[\"catch\"](0);\n            console.log(_context2.t0);\n            message = _context2.t0.message;\n            (0, _utils.showNotice)('error', message);\n          case 14:\n          case \"end\":\n            return _context2.stop();\n        }\n      }, _callee2, null, [[0, 9]]);\n    }));\n    return function initRoleList(_x) {\n      return _ref5.apply(this, arguments);\n    };\n  }();\n  var getRoleInfoById = /*#__PURE__*/function () {\n    var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(roleId) {\n      var res, _res$rows, rows, message;\n      return _regenerator.default.wrap(function _callee3$(_context3) {\n        while (1) switch (_context3.prev = _context3.next) {\n          case 0:\n            if (roleId) {\n              _context3.next = 2;\n              break;\n            }\n            return _context3.abrupt(\"return\");\n          case 2:\n            _context3.prev = 2;\n            _context3.next = 5;\n            return (0, _admin.getRoleDetail)(roleId);\n          case 5:\n            _context3.t0 = _context3.sent;\n            if (_context3.t0) {\n              _context3.next = 8;\n              break;\n            }\n            _context3.t0 = {};\n          case 8:\n            res = _context3.t0;\n            _res$rows = res.rows, rows = _res$rows === void 0 ? [] : _res$rows;\n            setRolePermission(rows[0] || null);\n            _context3.next = 18;\n            break;\n          case 13:\n            _context3.prev = 13;\n            _context3.t1 = _context3[\"catch\"](2);\n            console.log(_context3.t1);\n            message = _context3.t1.message;\n            (0, _utils.showNotice)('error', message);\n          case 18:\n          case \"end\":\n            return _context3.stop();\n        }\n      }, _callee3, null, [[2, 13]]);\n    }));\n    return function getRoleInfoById(_x2) {\n      return _ref7.apply(this, arguments);\n    };\n  }();\n\n  // 保存新角色并刷新角色信息\n  var saveRoleAndRefresh = /*#__PURE__*/function () {\n    var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(newRole, msg) {\n      var param, _yield$saveRole, failCount, result, _result$, roleId, message;\n      return _regenerator.default.wrap(function _callee4$(_context4) {\n        while (1) switch (_context4.prev = _context4.next) {\n          case 0:\n            param = {\n              data: [newRole]\n            };\n            _context4.prev = 1;\n            _context4.next = 4;\n            return (0, _admin.saveRole)(param);\n          case 4:\n            _yield$saveRole = _context4.sent;\n            failCount = _yield$saveRole.failCount;\n            result = _yield$saveRole.result;\n            if (failCount === '0') {\n              (0, _utils.showNotice)('success', msg || '新增角色成功');\n              roleId = result === null || result === void 0 || (_result$ = result[0]) === null || _result$ === void 0 ? void 0 : _result$.id;\n              initRoleList(roleId);\n            }\n            _context4.next = 15;\n            break;\n          case 10:\n            _context4.prev = 10;\n            _context4.t0 = _context4[\"catch\"](1);\n            console.log(_context4.t0);\n            message = _context4.t0.message;\n            (0, _utils.showNotice)('error', message);\n          case 15:\n          case \"end\":\n            return _context4.stop();\n        }\n      }, _callee4, null, [[1, 10]]);\n    }));\n    return function saveRoleAndRefresh(_x3, _x4) {\n      return _ref8.apply(this, arguments);\n    };\n  }();\n\n  // 新增角色\n  var handleAddRole = function handleAddRole() {\n    (0, _PageEventService.publishClickUserEvent)({\n      appId: appId,\n      formId: '',\n      action: 'sa_pm_cr'\n    });\n    var newRole = {\n      appId: appId,\n      name: '未命名角色',\n      // formPerm: newFormPerm,\n      manage: true,\n      useType: _rightOfUse.USE_TYPE_ALL,\n      users: [],\n      orgs: []\n    };\n    saveRoleAndRefresh(newRole, '新增角色成功');\n  };\n  var handleCopyRole = /*#__PURE__*/function () {\n    var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(role) {\n      var id, newRole;\n      return _regenerator.default.wrap(function _callee5$(_context5) {\n        while (1) switch (_context5.prev = _context5.next) {\n          case 0:\n            (0, _PageEventService.publishClickUserEvent)({\n              appId: appId,\n              formId: '',\n              action: 'sa_pm_copy'\n            });\n            id = role.id;\n            newRole = {\n              id: id,\n              copy: true\n            };\n            saveRoleAndRefresh(newRole, '复制角色成功');\n          case 4:\n          case \"end\":\n            return _context5.stop();\n        }\n      }, _callee5);\n    }));\n    return function handleCopyRole(_x5) {\n      return _ref9.apply(this, arguments);\n    };\n  }();\n  var handleSortRole = /*#__PURE__*/function () {\n    var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(newList) {\n      var param, _yield$saveRole2, failCount, message;\n      return _regenerator.default.wrap(function _callee6$(_context6) {\n        while (1) switch (_context6.prev = _context6.next) {\n          case 0:\n            param = {\n              data: (0, _map.default)(newList).call(newList, function (item) {\n                return {\n                  id: item.id,\n                  appId: appId\n                };\n              }),\n              reorder: true\n            };\n            _context6.prev = 1;\n            _context6.next = 4;\n            return (0, _admin.saveRole)(param);\n          case 4:\n            _yield$saveRole2 = _context6.sent;\n            failCount = _yield$saveRole2.failCount;\n            if (failCount === '0') {\n              (0, _utils.showNotice)('success', '排序成功');\n            }\n            _context6.next = 13;\n            break;\n          case 9:\n            _context6.prev = 9;\n            _context6.t0 = _context6[\"catch\"](1);\n            message = _context6.t0.message;\n            (0, _utils.showNotice)('error', message);\n          case 13:\n          case \"end\":\n            return _context6.stop();\n        }\n      }, _callee6, null, [[1, 9]]);\n    }));\n    return function handleSortRole(_x6) {\n      return _ref10.apply(this, arguments);\n    };\n  }();\n  (0, _react.useEffect)(function () {\n    getFormByAppId();\n    initRoleList();\n  }, []);\n  (0, _react.useEffect)(function () {\n    getRoleInfoById(activeRoleId);\n  }, [activeRoleId]);\n  (0, _react.useEffect)(function () {\n    !appInfo && (0, _home.getAppInfoById)(appId, dispatch);\n  }, [appInfo, userInfo]);\n\n  // 点击角色的“删除”下拉菜单\n  var handleDeleteRole = /*#__PURE__*/function () {\n    var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(role) {\n      return _regenerator.default.wrap(function _callee7$(_context7) {\n        while (1) switch (_context7.prev = _context7.next) {\n          case 0:\n            currentRole.current = role;\n            setDeleteConfirmVi(true);\n          case 2:\n          case \"end\":\n            return _context7.stop();\n        }\n      }, _callee7);\n    }));\n    return function handleDeleteRole(_x7) {\n      return _ref11.apply(this, arguments);\n    };\n  }();\n\n  // 执行删除操作\n  var doDeleteRole = /*#__PURE__*/function () {\n    var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(role) {\n      var closeMessage, id, nextSelectedId, param, res, failCount, message;\n      return _regenerator.default.wrap(function _callee8$(_context8) {\n        while (1) switch (_context8.prev = _context8.next) {\n          case 0:\n            closeMessage = (0, _utils.showLoadingMessage)('角色删除中，请稍候...');\n            id = role.id; // 删除角色，自动选中相邻角色\n            nextSelectedId = activeRoleId;\n            if (activeRoleId === id) {\n              nextSelectedId = getNextSelectedId(id, roleList);\n            }\n            param = [{\n              id: id\n            }];\n            _context8.prev = 5;\n            _context8.next = 8;\n            return (0, _admin.deleteRole)(param);\n          case 8:\n            res = _context8.sent;\n            failCount = res.failCount; // setRoleList(rows)\n            if (failCount === '0') {\n              closeMessage({\n                type: 'success',\n                content: '删除成功'\n              });\n              deleteConfirmVi && setDeleteConfirmVi(false);\n              setDeleteName('');\n              initRoleList(nextSelectedId);\n            }\n            _context8.next = 18;\n            break;\n          case 13:\n            _context8.prev = 13;\n            _context8.t0 = _context8[\"catch\"](5);\n            console.log(_context8.t0);\n            message = _context8.t0.message;\n            closeMessage({\n              type: 'error',\n              content: message\n            });\n          case 18:\n            setDisabledActions([]);\n          case 19:\n          case \"end\":\n            return _context8.stop();\n        }\n      }, _callee8, null, [[5, 13]]);\n    }));\n    return function doDeleteRole(_x8) {\n      return _ref12.apply(this, arguments);\n    };\n  }();\n\n  // 保存成功后刷新角色数据\n  var handleAfterSave = /*#__PURE__*/function () {\n    var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(id) {\n      return _regenerator.default.wrap(function _callee9$(_context9) {\n        while (1) switch (_context9.prev = _context9.next) {\n          case 0:\n            initRoleList(id);\n            // getRoleInfoById(id)\n          case 1:\n          case \"end\":\n            return _context9.stop();\n        }\n      }, _callee9);\n    }));\n    return function handleAfterSave(_x9) {\n      return _ref13.apply(this, arguments);\n    };\n  }();\n  var onConfirmOk = function onConfirmOk() {\n    form.validateFields().then(function (_ref14) {\n      var _currentRole$current;\n      var values = (0, _values.default)(_ref14);\n      if (deleteName === ((_currentRole$current = currentRole.current) === null || _currentRole$current === void 0 ? void 0 : _currentRole$current.name)) {\n        doDeleteRole(currentRole.current);\n        setDisabledActions(['ok', 'cancel']);\n      } else {\n        (0, _utils.showNotice)('error', '名称输入错误，删除失败');\n      }\n    }).catch(function (e) {\n      return console.log(e);\n    });\n  };\n  var onConfirmCancel = function onConfirmCancel() {\n    setDeleteName('');\n    setDeleteConfirmVi(false);\n  };\n  var handleConfirmAction = function handleConfirmAction(key) {\n    switch (key) {\n      case 'ok':\n        onConfirmOk();\n        break;\n      case 'cancel':\n        onConfirmCancel();\n        break;\n      default:\n        break;\n    }\n  };\n\n  // const rolePermission = useMemo(() => {\n  //   if (!activeRoleId || !roleList) return null\n  //   return roleList.find(role => role.id === activeRoleId)\n  // }, [activeRoleId])\n\n  return /*#__PURE__*/_react.default.createElement(\"div\", {\n    className: _AdminPermissionPage.default.wrapper\n  }, /*#__PURE__*/_react.default.createElement(_SideBar.default, {\n    activeRoleId: activeRoleId,\n    roleList: roleList,\n    onAdd: handleAddRole,\n    onDelete: handleDeleteRole,\n    onCopy: handleCopyRole,\n    onSort: handleSortRole,\n    setActiveRoleId: setActiveRoleId\n  }), roleList && (rolePermission ? /*#__PURE__*/_react.default.createElement(_RoleSetting.default, {\n    key: rolePermission === null || rolePermission === void 0 ? void 0 : rolePermission.id,\n    formList: formList,\n    appId: appId,\n    creatorId: creatorId,\n    rolePermission: rolePermission,\n    setRolePermission: setRolePermission,\n    onAfterSave: handleAfterSave\n  }) : null\n  // <EmptyData src={NoDataImg} desc='暂无数据' imageWidth={224} imageHeight={128} textGap={16} />\n  ), /*#__PURE__*/_react.default.createElement(_WebUI.ConfirmModal, {\n    visible: deleteConfirmVi,\n    type: \"delete\",\n    disabledActions: disabledActions,\n    title: \"\\u786E\\u5B9A\\u8981\\u5220\\u9664\\u89D2\\u8272\\\"\".concat((_currentRole$current2 = currentRole.current) === null || _currentRole$current2 === void 0 ? void 0 : _currentRole$current2.name, \"\\\"\\u5417\\uFF1F\"),\n    content: /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: _AdminPermissionPage.default.delete_content\n    }, /*#__PURE__*/_react.default.createElement(\"div\", {\n      className: _AdminPermissionPage.default.desc\n    }, \"\\u5220\\u9664\\u89D2\\u8272\\u540E\\uFF0C\\u8BE5\\u89D2\\u8272\\u6388\\u6743\\u7684\\u7EC4\\u7EC7\\u3001\\u4EBA\\u5458\\u6743\\u9650\\u5C06\\u4E00\\u5E76\\u5220\\u9664\\uFF0C\\u4E0D\\u53EF\\u6062\\u590D\"), /*#__PURE__*/_react.default.createElement(_kdesign.Form, {\n      layout: \"vertical\",\n      form: form,\n      labelWidth: \"100%\",\n      wrapperWidth: \"100%\",\n      onValuesChange: function onValuesChange(changedValue, values) {\n        console.log('form', changedValue, values);\n      }\n    }, /*#__PURE__*/_react.default.createElement(_kdesign.Form.Item, {\n      label: \"\\u8BF7\\u8F93\\u5165\\u8BE5\\u89D2\\u8272\\u540D\\u79F0\",\n      name: \"name\",\n      required: true,\n      validateTrigger: \"onBlur\",\n      rules: [{\n        required: true,\n        message: '请输入角色名称'\n      }, {\n        type: 'string',\n        validator: function validator(rule, value, callback, source, options) {\n          if (!(value !== null && value !== void 0 && (0, _trim.default)(value).call(value))) {\n            return [new Error('请输入角色名称')];\n          } else {\n            return [];\n          }\n        }\n      }]\n    }, /*#__PURE__*/_react.default.createElement(_kdesign.Input, {\n      type: \"text\",\n      borderType: \"bordered\",\n      size: \"large\",\n      placeholder: \"\\u8BF7\\u8F93\\u5165\",\n      maxLength: 50,\n      value: deleteName,\n      onChange: function onChange(e) {\n        return setDeleteName(e.target.value);\n      }\n    })))),\n    onAction: handleConfirmAction\n  }));\n};\nvar getNextSelectedId = exports.getNextSelectedId = function getNextSelectedId(id, list) {\n  var index = (0, _findIndex.default)(list).call(list, function (item) {\n    return item.id === id;\n  });\n  // 删除角色，自动选中相邻角色\n  var nextSelectedId;\n  var prevRole = index > 0 ? list[index - 1] : undefined;\n  var nextRole = list[index + 1];\n  if (prevRole) {\n    nextSelectedId = prevRole.id;\n  } else if (nextRole) {\n    nextSelectedId = nextRole.id;\n  }\n  return nextSelectedId;\n};\nvar _default = exports[\"default\"] = AdminPermissionPage;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/web/pages/admin/permission/AdminPermissionPage.tsx\n");

/***/ }),

/***/ "./assets/img/container_bg_img.png":
/*!*****************************************!*\
  !*** ./assets/img/container_bg_img.png ***!
  \*****************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

"use strict";
module.exports = __webpack_require__.p + "ncp/nocode/images/141804a566a929dccb3e.png";

/***/ }),

/***/ "../../node_modules/@babel/runtime-corejs3/core-js-stable/reflect/has.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@babel/runtime-corejs3/core-js-stable/reflect/has.js ***!
  \*******************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! core-js-pure/stable/reflect/has */ \"../../node_modules/core-js-pure/stable/reflect/has.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lLWNvcmVqczMvY29yZS1qcy1zdGFibGUvcmVmbGVjdC9oYXMuanMiLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi4vLi4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lLWNvcmVqczMvY29yZS1qcy1zdGFibGUvcmVmbGVjdC9oYXMuanM/NzFhZCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJjb3JlLWpzLXB1cmUvc3RhYmxlL3JlZmxlY3QvaGFzXCIpOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../node_modules/@babel/runtime-corejs3/core-js-stable/reflect/has.js\n");

/***/ }),

/***/ "../../node_modules/core-js-pure/es/reflect/has.js":
/*!*********************************************************!*\
  !*** ../../node_modules/core-js-pure/es/reflect/has.js ***!
  \*********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

"use strict";
eval("\n__webpack_require__(/*! ../../modules/es.reflect.has */ \"../../node_modules/core-js-pure/modules/es.reflect.has.js\");\nvar path = __webpack_require__(/*! ../../internals/path */ \"../../node_modules/core-js-pure/internals/path.js\");\n\nmodule.exports = path.Reflect.has;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMtcHVyZS9lcy9yZWZsZWN0L2hhcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vbm9jb2RlLXBsYXRmb3JtLy4uLy4uL25vZGVfbW9kdWxlcy9jb3JlLWpzLXB1cmUvZXMvcmVmbGVjdC9oYXMuanM/YTU1NyJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzLnJlZmxlY3QuaGFzJyk7XG52YXIgcGF0aCA9IHJlcXVpcmUoJy4uLy4uL2ludGVybmFscy9wYXRoJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gcGF0aC5SZWZsZWN0LmhhcztcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../node_modules/core-js-pure/es/reflect/has.js\n");

/***/ }),

/***/ "../../node_modules/core-js-pure/modules/es.reflect.has.js":
/*!*****************************************************************!*\
  !*** ../../node_modules/core-js-pure/modules/es.reflect.has.js ***!
  \*****************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"../../node_modules/core-js-pure/internals/export.js\");\n\n// `Reflect.has` method\n// https://tc39.es/ecma262/#sec-reflect.has\n$({ target: 'Reflect', stat: true }, {\n  has: function has(target, propertyKey) {\n    return propertyKey in target;\n  }\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMtcHVyZS9tb2R1bGVzL2VzLnJlZmxlY3QuaGFzLmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vbm9jb2RlLXBsYXRmb3JtLy4uLy4uL25vZGVfbW9kdWxlcy9jb3JlLWpzLXB1cmUvbW9kdWxlcy9lcy5yZWZsZWN0Lmhhcy5qcz8xNjFkIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkID0gcmVxdWlyZSgnLi4vaW50ZXJuYWxzL2V4cG9ydCcpO1xuXG4vLyBgUmVmbGVjdC5oYXNgIG1ldGhvZFxuLy8gaHR0cHM6Ly90YzM5LmVzL2VjbWEyNjIvI3NlYy1yZWZsZWN0Lmhhc1xuJCh7IHRhcmdldDogJ1JlZmxlY3QnLCBzdGF0OiB0cnVlIH0sIHtcbiAgaGFzOiBmdW5jdGlvbiBoYXModGFyZ2V0LCBwcm9wZXJ0eUtleSkge1xuICAgIHJldHVybiBwcm9wZXJ0eUtleSBpbiB0YXJnZXQ7XG4gIH1cbn0pO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../node_modules/core-js-pure/modules/es.reflect.has.js\n");

/***/ }),

/***/ "../../node_modules/core-js-pure/stable/reflect/has.js":
/*!*************************************************************!*\
  !*** ../../node_modules/core-js-pure/stable/reflect/has.js ***!
  \*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

"use strict";
eval("\nvar parent = __webpack_require__(/*! ../../es/reflect/has */ \"../../node_modules/core-js-pure/es/reflect/has.js\");\n\nmodule.exports = parent;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMtcHVyZS9zdGFibGUvcmVmbGVjdC9oYXMuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9ub2NvZGUtcGxhdGZvcm0vLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMtcHVyZS9zdGFibGUvcmVmbGVjdC9oYXMuanM/MTYxYSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG52YXIgcGFyZW50ID0gcmVxdWlyZSgnLi4vLi4vZXMvcmVmbGVjdC9oYXMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBwYXJlbnQ7XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../node_modules/core-js-pure/stable/reflect/has.js\n");

/***/ })

}]);