@kne-components/components-core 0.4.55 → 0.4.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +101 -101
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/1742.a9e7d49d.chunk.css +2 -0
- package/build/static/css/{1742.03847555.chunk.css.map → 1742.a9e7d49d.chunk.css.map} +1 -1
- package/build/static/css/196.5f0ce7a6.chunk.css +2 -0
- package/build/static/css/196.5f0ce7a6.chunk.css.map +1 -0
- package/build/static/css/{1996.52b54fae.chunk.css → 1996.dbf20496.chunk.css} +2 -2
- package/build/static/css/{1996.52b54fae.chunk.css.map → 1996.dbf20496.chunk.css.map} +1 -1
- package/build/static/css/2004.656acb97.chunk.css +2 -0
- package/build/static/css/{2004.eec37a64.chunk.css.map → 2004.656acb97.chunk.css.map} +1 -1
- package/build/static/css/2307.890877a5.chunk.css +2 -0
- package/build/static/css/{2307.6ddbd7f7.chunk.css.map → 2307.890877a5.chunk.css.map} +1 -1
- package/build/static/css/3404.31ba58c7.chunk.css +2 -0
- package/build/static/css/{3404.de7ce057.chunk.css.map → 3404.31ba58c7.chunk.css.map} +1 -1
- package/build/static/css/{3771.da0e55cc.chunk.css → 3771.e7f37635.chunk.css} +2 -2
- package/build/static/css/{3771.da0e55cc.chunk.css.map → 3771.e7f37635.chunk.css.map} +1 -1
- package/build/static/css/{3790.733f427f.chunk.css → 3790.cc8c138d.chunk.css} +2 -2
- package/build/static/css/{3790.733f427f.chunk.css.map → 3790.cc8c138d.chunk.css.map} +1 -1
- package/build/static/css/5195.e8df8ddf.chunk.css +2 -0
- package/build/static/css/{5195.c3b6a429.chunk.css.map → 5195.e8df8ddf.chunk.css.map} +1 -1
- package/build/static/css/5674.0f53f51b.chunk.css +2 -0
- package/build/static/css/{5674.893e1abf.chunk.css.map → 5674.0f53f51b.chunk.css.map} +1 -1
- package/build/static/css/{5886.3a4e5dc5.chunk.css → 5886.30dadf9b.chunk.css} +2 -2
- package/build/static/css/5886.30dadf9b.chunk.css.map +1 -0
- package/build/static/css/{7569.ce87712d.chunk.css → 6086.02c4cedd.chunk.css} +2 -2
- package/build/static/css/6086.02c4cedd.chunk.css.map +1 -0
- package/build/static/css/{6763.6578d2d0.chunk.css → 6763.424b8c22.chunk.css} +2 -2
- package/build/static/css/{6763.6578d2d0.chunk.css.map → 6763.424b8c22.chunk.css.map} +1 -1
- package/build/static/css/7227.6cd9459f.chunk.css +2 -0
- package/build/static/css/{7227.711c4a45.chunk.css.map → 7227.6cd9459f.chunk.css.map} +1 -1
- package/build/static/css/{7589.7ea92074.chunk.css → 7589.b8b3fd34.chunk.css} +2 -2
- package/build/static/css/{7589.7ea92074.chunk.css.map → 7589.b8b3fd34.chunk.css.map} +1 -1
- package/build/static/css/{760.3a83f721.chunk.css → 760.f956ae3e.chunk.css} +2 -2
- package/build/static/css/{760.3a83f721.chunk.css.map → 760.f956ae3e.chunk.css.map} +1 -1
- package/build/static/css/7672.430c060a.chunk.css +2 -0
- package/build/static/css/{7672.14e578e2.chunk.css.map → 7672.430c060a.chunk.css.map} +1 -1
- package/build/static/css/7857.02416fcf.chunk.css +2 -0
- package/build/static/css/{7857.66c3f790.chunk.css.map → 7857.02416fcf.chunk.css.map} +1 -1
- package/build/static/css/{8593.62034b09.chunk.css → 8593.b7a05105.chunk.css} +2 -2
- package/build/static/css/{8593.62034b09.chunk.css.map → 8593.b7a05105.chunk.css.map} +1 -1
- package/build/static/css/9096.aadfbff2.chunk.css +2 -0
- package/build/static/css/{9096.6d07eac4.chunk.css.map → 9096.aadfbff2.chunk.css.map} +1 -1
- package/build/static/css/9414.9f6558ea.chunk.css +2 -0
- package/build/static/css/{9414.ecf35928.chunk.css.map → 9414.9f6558ea.chunk.css.map} +1 -1
- package/build/static/css/9556.b22490cc.chunk.css +2 -0
- package/build/static/css/{9556.6a067fdf.chunk.css.map → 9556.b22490cc.chunk.css.map} +1 -1
- package/build/static/js/1180.e6414cfa.chunk.js +2 -0
- package/build/static/js/1180.e6414cfa.chunk.js.map +1 -0
- package/build/static/js/1742.7fa6dc3f.chunk.js +2 -0
- package/build/static/js/{1742.62787e6c.chunk.js.map → 1742.7fa6dc3f.chunk.js.map} +1 -1
- package/build/static/js/{196.214579b7.chunk.js → 196.17367c48.chunk.js} +1 -1
- package/build/static/js/1996.254c4856.chunk.js +2 -0
- package/build/static/js/{1996.1827d217.chunk.js.map → 1996.254c4856.chunk.js.map} +1 -1
- package/build/static/js/{2004.7e368edd.chunk.js → 2004.26575696.chunk.js} +3 -3
- package/build/static/js/{2004.7e368edd.chunk.js.map → 2004.26575696.chunk.js.map} +1 -1
- package/build/static/js/{2242.8e6e0cf0.chunk.js → 2242.639d5592.chunk.js} +2 -2
- package/build/static/js/2242.639d5592.chunk.js.map +1 -0
- package/build/static/js/{3404.1b919e24.chunk.js → 3404.a955d753.chunk.js} +3 -3
- package/build/static/js/{3404.1b919e24.chunk.js.map → 3404.a955d753.chunk.js.map} +1 -1
- package/build/static/js/3771.8c912a37.chunk.js +2 -0
- package/build/static/js/{3771.3a914de6.chunk.js.map → 3771.8c912a37.chunk.js.map} +1 -1
- package/build/static/js/{3790.b0de8e99.chunk.js → 3790.f227673d.chunk.js} +2 -2
- package/build/static/js/{3790.b0de8e99.chunk.js.map → 3790.f227673d.chunk.js.map} +1 -1
- package/build/static/js/3856.cbaff1f3.chunk.js +2 -0
- package/build/static/js/{3856.b5ee159e.chunk.js.map → 3856.cbaff1f3.chunk.js.map} +1 -1
- package/build/static/js/4474.3a3ee34e.chunk.js +2 -0
- package/build/static/js/4474.3a3ee34e.chunk.js.map +1 -0
- package/build/static/js/5195.1c77ed62.chunk.js +2 -0
- package/build/static/js/{5195.6ba4a3cd.chunk.js.map → 5195.1c77ed62.chunk.js.map} +1 -1
- package/build/static/js/{5674.8b0b441a.chunk.js → 5674.066ef6ac.chunk.js} +2 -2
- package/build/static/js/{5674.8b0b441a.chunk.js.map → 5674.066ef6ac.chunk.js.map} +1 -1
- package/build/static/js/{7569.fb3b67eb.chunk.js → 6086.de95d820.chunk.js} +2 -2
- package/build/static/js/{7569.fb3b67eb.chunk.js.map → 6086.de95d820.chunk.js.map} +1 -1
- package/build/static/js/{6453.9d92cb2b.chunk.js → 6453.4791ad76.chunk.js} +2 -2
- package/build/static/js/6453.4791ad76.chunk.js.map +1 -0
- package/build/static/js/{6763.b3a677b0.chunk.js → 6763.254ed2cd.chunk.js} +2 -2
- package/build/static/js/{6763.b3a677b0.chunk.js.map → 6763.254ed2cd.chunk.js.map} +1 -1
- package/build/static/js/7227.80984ee8.chunk.js +3 -0
- package/build/static/js/{7227.58192d4e.chunk.js.map → 7227.80984ee8.chunk.js.map} +1 -1
- package/build/static/js/{7459.2107b74d.chunk.js → 7459.1bd15405.chunk.js} +2 -2
- package/build/static/js/{7459.2107b74d.chunk.js.map → 7459.1bd15405.chunk.js.map} +1 -1
- package/build/static/js/{7589.8d760625.chunk.js → 7589.affbfe09.chunk.js} +2 -2
- package/build/static/js/{7589.8d760625.chunk.js.map → 7589.affbfe09.chunk.js.map} +1 -1
- package/build/static/js/{760.4077d10d.chunk.js → 760.b5b1b5c1.chunk.js} +2 -2
- package/build/static/js/{760.4077d10d.chunk.js.map → 760.b5b1b5c1.chunk.js.map} +1 -1
- package/build/static/js/{7672.67c8e8b0.chunk.js → 7672.13077ba4.chunk.js} +2 -2
- package/build/static/js/{7672.67c8e8b0.chunk.js.map → 7672.13077ba4.chunk.js.map} +1 -1
- package/build/static/js/7857.3fe96dcc.chunk.js +2 -0
- package/build/static/js/{7857.8427c99a.chunk.js.map → 7857.3fe96dcc.chunk.js.map} +1 -1
- package/build/static/js/8103.8912fc44.chunk.js +3 -0
- package/build/static/js/8103.8912fc44.chunk.js.map +1 -0
- package/build/static/js/8593.21d30c61.chunk.js +2 -0
- package/build/static/js/{8593.cc4fb7c9.chunk.js.map → 8593.21d30c61.chunk.js.map} +1 -1
- package/build/static/js/{9096.ff785d3f.chunk.js → 9096.f0020023.chunk.js} +2 -2
- package/build/static/js/{9096.ff785d3f.chunk.js.map → 9096.f0020023.chunk.js.map} +1 -1
- package/build/static/js/9414.ad7c0c83.chunk.js +2 -0
- package/build/static/js/{9414.0447ded2.chunk.js.map → 9414.ad7c0c83.chunk.js.map} +1 -1
- package/build/static/js/{9556.d2889a84.chunk.js → 9556.7af66a1d.chunk.js} +3 -3
- package/build/static/js/{9556.d2889a84.chunk.js.map → 9556.7af66a1d.chunk.js.map} +1 -1
- package/build/static/js/{main.87568377.js → main.6fb86b69.js} +2 -2
- package/build/static/js/{main.87568377.js.map → main.6fb86b69.js.map} +1 -1
- package/package.json +3 -3
- package/build/static/css/1742.03847555.chunk.css +0 -2
- package/build/static/css/196.f9f2d227.chunk.css +0 -2
- package/build/static/css/196.f9f2d227.chunk.css.map +0 -1
- package/build/static/css/2004.eec37a64.chunk.css +0 -2
- package/build/static/css/2307.6ddbd7f7.chunk.css +0 -2
- package/build/static/css/3404.de7ce057.chunk.css +0 -2
- package/build/static/css/5195.c3b6a429.chunk.css +0 -2
- package/build/static/css/5674.893e1abf.chunk.css +0 -2
- package/build/static/css/5886.3a4e5dc5.chunk.css.map +0 -1
- package/build/static/css/7227.711c4a45.chunk.css +0 -2
- package/build/static/css/7569.ce87712d.chunk.css.map +0 -1
- package/build/static/css/7672.14e578e2.chunk.css +0 -2
- package/build/static/css/7857.66c3f790.chunk.css +0 -2
- package/build/static/css/9096.6d07eac4.chunk.css +0 -2
- package/build/static/css/9414.ecf35928.chunk.css +0 -2
- package/build/static/css/9556.6a067fdf.chunk.css +0 -2
- package/build/static/js/1180.c0e9b64a.chunk.js +0 -2
- package/build/static/js/1180.c0e9b64a.chunk.js.map +0 -1
- package/build/static/js/1742.62787e6c.chunk.js +0 -2
- package/build/static/js/1996.1827d217.chunk.js +0 -2
- package/build/static/js/2242.8e6e0cf0.chunk.js.map +0 -1
- package/build/static/js/3771.3a914de6.chunk.js +0 -2
- package/build/static/js/3856.b5ee159e.chunk.js +0 -2
- package/build/static/js/4474.8ecbed71.chunk.js +0 -2
- package/build/static/js/4474.8ecbed71.chunk.js.map +0 -1
- package/build/static/js/5195.6ba4a3cd.chunk.js +0 -2
- package/build/static/js/6453.9d92cb2b.chunk.js.map +0 -1
- package/build/static/js/7227.58192d4e.chunk.js +0 -3
- package/build/static/js/7746.6492ef40.chunk.js +0 -3
- package/build/static/js/7746.6492ef40.chunk.js.map +0 -1
- package/build/static/js/7857.8427c99a.chunk.js +0 -2
- package/build/static/js/8593.cc4fb7c9.chunk.js +0 -2
- package/build/static/js/9414.0447ded2.chunk.js +0 -2
- /package/build/static/js/{2004.7e368edd.chunk.js.LICENSE.txt → 2004.26575696.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{3404.1b919e24.chunk.js.LICENSE.txt → 3404.a955d753.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.58192d4e.chunk.js.LICENSE.txt → 7227.80984ee8.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7746.6492ef40.chunk.js.LICENSE.txt → 8103.8912fc44.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9556.d2889a84.chunk.js.LICENSE.txt → 9556.7af66a1d.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[760,2908,8593],{28148(e,s,t){t.r(s),t.d(s,{default:()=>v});var n=t(89379),a=t(53986);const l={menu:"style_menu__gvIvn__2jD5x","all-no-start-icon":"style_all-no-start-icon__CA+zR__2jD5x","no-start-icon":"style_no-start-icon__LnC1S__2jD5x","has-children":"style_has-children__m9tce__2jD5x","has-children-node":"style_has-children-node__2bhEB__2jD5x","is-root":"style_is-root__4hhOc__2jD5x",title:"style_title__+Hcar__2jD5x",active:"style_active__WU49K__2jD5x","no-collapse":"style_no-collapse__aIZBM__2jD5x","title-content":"style_title-content__cQXpK__2jD5x",loading:"style_loading__1pU4P__2jD5x"};var r=t(83136),o=t.n(r),i=t(55199),c=t(94679),d=t(29053),h=t(10986),p=t.n(h),u=t(64671),_=t(73884),y=t(18081),m=t.n(y),g=t(87558),f=t(70579);const j=["className","allowCollapsed","pathMatch","defaultItems"],x=["children","key","originItem"],K=e=>{const s=(0,c.useNavigate)(),{id:t,className:n,label:a,iconType:r,icon:h,path:p,request:_,onClick:y,isOpen:m,isSelected:j,onOpenChange:x,children:K,fetchOptions:v,depth:O,onLoad:C,allowCollapsed:A}=e,k=Array.isArray(K)&&K.length>0||v,{refresh:b,isLoading:N}=(0,g.useFetch)(Object.assign({},v,{auto:!A&&v,onRequestSuccess:e=>{C(e)}}));return(0,f.jsx)(d.default,{request:_,children:(0,f.jsxs)("div",{className:o()(n,l["menu-item"]),children:[(0,f.jsxs)("div",{className:o()(l.title,{[l.active]:j,[l["has-children"]]:k,[l["no-collapse"]]:k&&!A,[l["no-start-icon"]]:!r&&!h,[l["is-root"]]:0===O}),onClick:n=>{n.stopPropagation(),k||!p?k||v?A&&(v&&b({}),x(!m)):null===y||void 0===y||y(t,e):s(p)},children:[r&&!h&&(0,f.jsx)(u.default,{type:r}),h||null,(0,f.jsx)("span",{className:l["title-content"],children:a}),k&&A&&(0,f.jsx)(u.default,{type:m?"icon-arrow-bold-down":"icon-arrow-bold-right"})]}),k?!A||m&&K?(0,f.jsx)("div",{className:l["children-list"],children:K}):!A||m&&N?(0,f.jsx)("div",{className:l["children-list"],children:(0,f.jsx)(i.Spin,{className:l.loading,size:"small"})}):void 0:null]})})},v=e=>{let{className:s,allowCollapsed:t=!0,pathMatch:r,defaultItems:i=[]}=e,d=(0,a.A)(e,j);const{pathname:h,search:u}=(0,c.useLocation)(),[y,g]=p()(d,{value:"currentKey",defaultValue:"defaultCurrentKey"}),[v,O]=p()((0,n.A)({defaultItems:i},d),{defaultValue:"defaultItems",value:"items",onChange:"onItemsChange"}),{items:C,defaultOpenKeys:A,links:k,childrenKeys:b,hasStartIcon:N,hasChildren:I}=(0,_.useMemo)(()=>{var e;const{items:s,childrenKeys:t,nodeMapping:n}=(e=>{const s={},t=[],n=(e,a)=>{const{parentKey:l,depth:r}=Object.assign({parentKey:"root",depth:0,paths:[]},a);return Array.isArray(e)&&e.length>0?e.map((e,a)=>{const o="".concat(e.key||"".concat("root"!==l?"".concat(l,"-"):"","node-").concat(a));s[l]||(s[l]=[]),s[l].push(o);const i=n(e.children,{parentKey:o,depth:r+1});s[o]&&s[l].push(...s[o]);const c=Object.assign({},e,{key:o,parentKey:l,depth:r,children:i,originItem:e});return t[o]=c,c}):null};return{items:n(e),childrenKeys:s,nodeMapping:t}})(v);let a=!1,l=!1;const r=[],o=[];return null===t||void 0===t||null===(e=t.root)||void 0===e||e.forEach(e=>{const s=n[e];(s.iconType||s.icon)&&(a=!0),s.path&&r.push({path:s.path,key:e}),Array.isArray(s.children)&&s.children.length>0&&(l=!0,o.push(s.key))}),{defaultOpenKeys:o,links:r,items:s,childrenKeys:t,hasStartIcon:a,hasChildren:l}},[v]);(0,_.useEffect)(()=>{const e=k.find(e=>{let{path:s}=e;return"function"===typeof r?r(s,{pathname:h,search:u}):m()(h.replace(/[#,?].*/,""))===m()(s)||m()(h+u)===m()(s)});e&&g(e.key)},[k,h,u,g,r]);const[D,q]=p()(Object.assign({},d,{defaultOpenKeys:d.defaultOpenKeys||A}),{value:"openKeys",defaultValue:"defaultOpenKeys",onChange:"onOpenChange"}),w=(0,_.useCallback)((e,s)=>{const{parentKey:l,depth:r,selectedKey:o,openKeys:i,paths:c}=Object.assign({parentKey:null,depth:0,paths:[]},s);return Array.isArray(e)&&e.length>0?e.map(e=>{let{children:s,key:d,originItem:h}=e,p=(0,a.A)(e,x);return(0,_.createElement)(K,(0,n.A)((0,n.A)({},Object.assign({},p)),{},{id:d,parentId:l,depth:r,allowCollapsed:t,isSelected:d===o||b[d]&&b[d].indexOf(o)>-1,onClick:g,onLoad:e=>{O(s=>{const t=s=>Array.isArray(s)&&s.length>0?s.map(s=>Object.assign({},s,{children:h===s?e:t(s.children)})):null;return t(s)})},isOpen:(i||[]).indexOf(d)>-1,key:d,onOpenChange:()=>{q(e=>{const s=e.slice(0);return e.indexOf(d)>-1?s.splice(e.indexOf(d),1):s.push(d),s})}}),w(s,{parentKey:l,depth:r+1,selectedKey:o,openKeys:i,paths:[...c,d]}))}):null},[O,q,g,b,t]);return(0,f.jsx)("div",{className:o()(s,l.menu,{[l["all-no-start-icon"]]:!N,[l["has-children-node"]]:I}),children:w(C,{selectedKey:y,openKeys:D})})}},29053(e,s,t){t.r(s),t.d(s,{computedIsPass:()=>y,default:()=>f,usePermissions:()=>m,usePermissionsPass:()=>g});var n=t(89379),a=t(53986),l=t(73884),r=t(55199),o=t(33097),i=t.n(o),c=t(83136),d=t.n(c);const h="style_outer__vbHB9__2jD5x";var p=t(72752),u=t(70579);const _=["type","className","tagName","message","request","children"],y=e=>{let{permissions:s,request:t}=e;return!(Array.isArray(t)&&t.length>0)||t.some(e=>(s||[]).indexOf(e)>-1)},m=()=>{const{global:e}=(0,p.useGlobalContext)(),{permissions:s,permissionsPath:t}=(0,p.usePreset)();return{permissions:e.permissions||s||t&&i()(e,t)||[]}},g=e=>{let{request:s}=e;const{permissions:t}=m();return y({permissions:t,request:s})},f=e=>{let{type:s="hidden",className:t,tagName:o="span",message:i="\u60a8\u6682\u65e0\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458",request:c,children:p}=e,y=(0,a.A)(e,_);const m=g({request:c});return"function"===typeof p?p({isPass:m,type:s,request:c}):!0===m?p:"error"===s?(0,u.jsx)(r.Result,{status:"403",subTitle:i}):"tooltip"===s?(0,u.jsx)(r.Tooltip,{title:i,children:(0,l.createElement)(o,(0,n.A)((0,n.A)({},y),{},{className:d()(h,t)}),p)}):null}}}]);
|
|
2
|
+
//# sourceMappingURL=8593.21d30c61.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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ACfnC,EAAS,QACT4G,EAAU,OAAM,QAChBC,EAAU,2EAAc,QACxBxG,EAAO,SACPK,GAEH+E,EADM7F,GAAK6C,EAAAA,EAAAA,GAAAgD,EAAA/C,GAE7B,MAAMoE,EAASH,EAAmB,CAACtG,YACnC,MAAwB,oBAAbK,EACAA,EAAS,CAACoG,SAAQ3E,OAAM9B,aAGpB,IAAXyG,EACOpG,EAGE,UAATyB,GACOR,EAAAA,EAAAA,KAACoF,EAAAA,OAAM,CAACC,OAAO,MAAMC,SAAUJ,IAG7B,YAAT1E,GACQR,EAAAA,EAAAA,KAACuF,EAAAA,QAAO,CAACC,MAAON,EAAQnG,UAC3B0G,EAAAA,EAAAA,eAAcR,GAAOvD,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAAMzD,GAAK,IAAEI,UAAW8B,IAAWC,EAAgB/B,KAAaU,KAIvF,K","sources":["webpack://@kne-components/components-core/./src/components/Menu/style.module.scss?ca16","components/Menu/index.js","webpack://@kne-components/components-core/./src/components/Permissions/style.module.scss?e327","components/Permissions/index.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"menu\":\"style_menu__gvIvn__VYtrL\",\"all-no-start-icon\":\"style_all-no-start-icon__CA+zR__VYtrL\",\"no-start-icon\":\"style_no-start-icon__LnC1S__VYtrL\",\"has-children\":\"style_has-children__m9tce__VYtrL\",\"has-children-node\":\"style_has-children-node__2bhEB__VYtrL\",\"is-root\":\"style_is-root__4hhOc__VYtrL\",\"title\":\"style_title__+Hcar__VYtrL\",\"active\":\"style_active__WU49K__VYtrL\",\"no-collapse\":\"style_no-collapse__aIZBM__VYtrL\",\"title-content\":\"style_title-content__cQXpK__VYtrL\",\"loading\":\"style_loading__1pU4P__VYtrL\"};","import style from \"./style.module.scss\";\nimport classnames from \"classnames\";\nimport {Spin} from \"antd\";\nimport {useLocation, useNavigate} from \"react-router-dom\";\nimport Permissions from \"@components/Permissions\";\nimport useControlValue from \"@kne/use-control-value\";\nimport Icon from \"@components/Icon\";\nimport {useCallback, useEffect, useMemo} from \"react\";\nimport ensureSlash from \"@kne/ensure-slash\";\nimport {useFetch} from \"@kne/react-fetch\";\n\nconst treeEnhance = (items) => {\n const childrenKeys = {}, nodeMapping = [];\n const traversal = (children, options) => {\n const {parentKey, depth} = Object.assign({\n parentKey: \"root\", depth: 0, paths: [],\n }, options);\n if (!(Array.isArray(children) && children.length > 0)) {\n return null;\n }\n return children.map((item, index) => {\n const currentKey = `${item.key || `${parentKey !== \"root\" ? `${parentKey}-` : \"\"}node-${index}`}`;\n if (!childrenKeys[parentKey]) {\n childrenKeys[parentKey] = [];\n }\n childrenKeys[parentKey].push(currentKey);\n const children = traversal(item.children, {\n parentKey: currentKey, depth: depth + 1,\n });\n childrenKeys[currentKey] && childrenKeys[parentKey].push(...childrenKeys[currentKey]);\n const targetItem = Object.assign({}, item, {\n key: currentKey, parentKey, depth, children: children, originItem: item,\n });\n nodeMapping[currentKey] = targetItem;\n return targetItem;\n });\n };\n\n return {items: traversal(items), childrenKeys, nodeMapping};\n};\n\nconst MenuItem = (props) => {\n const navigation = useNavigate();\n const {\n id,\n className,\n label,\n iconType,\n icon,\n path,\n request,\n onClick,\n isOpen,\n isSelected,\n onOpenChange,\n children,\n fetchOptions,\n depth,\n onLoad,\n allowCollapsed,\n } = props;\n\n const hasChildren = (Array.isArray(children) && children.length > 0) || fetchOptions;\n const {refresh, isLoading} = useFetch(Object.assign({}, fetchOptions, {\n auto: !allowCollapsed && fetchOptions, onRequestSuccess: (data) => {\n onLoad(data);\n },\n }));\n\n const renderChildren = () => {\n if (!hasChildren) {\n return null;\n }\n if (!allowCollapsed || (isOpen && children)) {\n return <div className={style[\"children-list\"]}>{children}</div>;\n }\n\n if (!allowCollapsed || (isOpen && isLoading)) {\n return (<div className={style[\"children-list\"]}>\n <Spin className={style[\"loading\"]} size=\"small\"/>\n </div>);\n }\n };\n return (<Permissions request={request}>\n <div className={classnames(className, style[\"menu-item\"])}>\n <div\n className={classnames(style[\"title\"], {\n [style[\"active\"]]: isSelected,\n [style[\"has-children\"]]: hasChildren,\n [style[\"no-collapse\"]]: hasChildren && !allowCollapsed,\n [style[\"no-start-icon\"]]: !iconType && !icon,\n [style[\"is-root\"]]: depth === 0,\n })}\n onClick={(e) => {\n e.stopPropagation();\n if (!hasChildren && path) {\n navigation(path);\n return;\n }\n if (!hasChildren && !fetchOptions) {\n onClick?.(id, props);\n return;\n }\n if (!allowCollapsed) {\n return;\n }\n fetchOptions && refresh({});\n onOpenChange(!isOpen);\n }}\n >\n {iconType && !icon && <Icon type={iconType}/>}\n {icon || null}\n <span className={style[\"title-content\"]}>{label}</span>\n {hasChildren && allowCollapsed && (<Icon\n type={isOpen ? \"icon-arrow-bold-down\" : \"icon-arrow-bold-right\"}\n />)}\n </div>\n {renderChildren()}\n </div>\n </Permissions>);\n};\n\nconst Menu = ({className, allowCollapsed = true, pathMatch, defaultItems = [], ...props}) => {\n const {pathname, search} = useLocation();\n const [selectedKey, setSelectKeyChange] = useControlValue(props, {\n value: \"currentKey\", defaultValue: \"defaultCurrentKey\",\n });\n\n const [items, setItems] = useControlValue({defaultItems, ...props}, {\n defaultValue: \"defaultItems\", value: \"items\", onChange: \"onItemsChange\",\n });\n\n const {\n items: targetItems, defaultOpenKeys, links, childrenKeys, hasStartIcon, hasChildren,\n } = useMemo(() => {\n const {\n items: targetItems, childrenKeys, nodeMapping,\n } = treeEnhance(items);\n let hasStartIcon = false, hasChildren = false;\n const links = [], defaultOpenKeys = [];\n childrenKeys?.[\"root\"]?.forEach((key) => {\n const node = nodeMapping[key];\n if (node.iconType || node.icon) {\n hasStartIcon = true;\n }\n node.path && links.push({path: node.path, key});\n if (Array.isArray(node.children) && node.children.length > 0) {\n hasChildren = true;\n defaultOpenKeys.push(node.key);\n }\n });\n return {\n defaultOpenKeys, links, items: targetItems, childrenKeys, hasStartIcon, hasChildren,\n };\n }, [items]);\n useEffect(() => {\n const matchedPath = links.find(({path}) => {\n if (typeof pathMatch === \"function\") {\n return pathMatch(path, {pathname, search});\n }\n return (ensureSlash(pathname.replace(/[#,?].*/, \"\")) === ensureSlash(path) || ensureSlash(pathname + search) === ensureSlash(path));\n });\n if (matchedPath) {\n setSelectKeyChange(matchedPath.key);\n }\n }, [links, pathname, search, setSelectKeyChange, pathMatch]);\n\n const [openKeys, setOpenKeys] = useControlValue(Object.assign({}, props, {\n defaultOpenKeys: props.defaultOpenKeys || defaultOpenKeys,\n }), {\n value: \"openKeys\", defaultValue: \"defaultOpenKeys\", onChange: \"onOpenChange\",\n });\n\n const renderChildren = useCallback((children, options) => {\n const {parentKey, depth, selectedKey, openKeys, paths} = Object.assign({\n parentKey: null, depth: 0, paths: [],\n }, options);\n if (Array.isArray(children) && children.length > 0) {\n return children.map(({children, key: currentKey, originItem, ...item}) => {\n return (<MenuItem\n {...Object.assign({}, item)}\n id={currentKey}\n parentId={parentKey}\n depth={depth}\n allowCollapsed={allowCollapsed}\n isSelected={currentKey === selectedKey || (childrenKeys[currentKey] && childrenKeys[currentKey].indexOf(selectedKey) > -1)}\n onClick={setSelectKeyChange}\n onLoad={(data) => {\n setItems((items) => {\n const core = (children) => {\n if (Array.isArray(children) && children.length > 0) {\n return children.map((item) => {\n return Object.assign({}, item, {\n children: originItem === item ? data : core(item.children),\n });\n });\n }\n return null;\n };\n\n return core(items);\n });\n }}\n isOpen={(openKeys || []).indexOf(currentKey) > -1}\n key={currentKey}\n onOpenChange={() => {\n setOpenKeys((openKeys) => {\n const newOpenKeys = openKeys.slice(0);\n if (openKeys.indexOf(currentKey) > -1) {\n newOpenKeys.splice(openKeys.indexOf(currentKey), 1);\n } else {\n newOpenKeys.push(currentKey);\n }\n return newOpenKeys;\n });\n }}\n >\n {renderChildren(children, {\n parentKey, depth: depth + 1, selectedKey, openKeys, paths: [...paths, currentKey],\n })}\n </MenuItem>);\n });\n }\n return null;\n }, [setItems, setOpenKeys, setSelectKeyChange, childrenKeys, allowCollapsed]);\n\n return (<div\n className={classnames(className, style[\"menu\"], {\n [style[\"all-no-start-icon\"]]: !hasStartIcon, [style[\"has-children-node\"]]: hasChildren,\n })}\n >\n {renderChildren(targetItems, {selectedKey, openKeys})}\n </div>);\n};\n\nexport default Menu;\n","// extracted by mini-css-extract-plugin\nexport default {\"outer\":\"style_outer__vbHB9__VYtrL\"};","import {createElement} from \"react\";\nimport {Result, Tooltip} from \"antd\";\nimport get from \"lodash/get\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport {useGlobalContext, usePreset} from \"@components/Global\";\n\nexport const computedIsPass = ({permissions, request}) => {\n return Array.isArray(request) && request.length > 0 ? request.some((currentKey) => (permissions || []).indexOf(currentKey) > -1) : true;\n};\n\nexport const usePermissions = () => {\n const {global} = useGlobalContext();\n const {permissions, permissionsPath} = usePreset();\n return {\n permissions: global.permissions || permissions || (permissionsPath && get(global, permissionsPath)) || [],\n };\n};\n\nexport const usePermissionsPass = ({request}) => {\n const {permissions} = usePermissions();\n return computedIsPass({permissions, request});\n};\n\nconst Permissions = ({\n type = 'hidden',\n className,\n tagName = 'span',\n message = '您暂无权限,请联系管理员',\n request,\n children,\n ...props\n }) => {\n const isPass = usePermissionsPass({request});\n if (typeof children === \"function\") {\n return children({isPass, type, request});\n }\n\n if (isPass === true) {\n return children;\n }\n\n if (type === \"error\") {\n return <Result status=\"403\" subTitle={message}/>;\n }\n\n if (type === \"tooltip\") {\n return (<Tooltip title={message}>\n {createElement(tagName, {...props, className: classnames(style[\"outer\"], className)}, children)}\n </Tooltip>);\n }\n\n return null;\n};\n\nexport default Permissions;\n"],"names":["MenuItem","props","navigation","useNavigate","id","className","label","iconType","icon","path","request","onClick","isOpen","isSelected","onOpenChange","children","fetchOptions","depth","onLoad","allowCollapsed","hasChildren","Array","isArray","length","refresh","isLoading","useFetch","Object","assign","auto","onRequestSuccess","data","_jsx","Permissions","_jsxs","classnames","style","e","stopPropagation","Icon","type","Spin","size","_ref","pathMatch","defaultItems","_objectWithoutProperties","_excluded","pathname","search","useLocation","selectedKey","setSelectKeyChange","useControlValue","value","defaultValue","items","setItems","_objectSpread","onChange","targetItems","defaultOpenKeys","links","childrenKeys","hasStartIcon","useMemo","_childrenKeys$root","nodeMapping","traversal","options","parentKey","paths","map","item","index","currentKey","concat","key","push","targetItem","originItem","treeEnhance","forEach","node","useEffect","matchedPath","find","_ref2","ensureSlash","replace","openKeys","setOpenKeys","renderChildren","useCallback","_ref3","_excluded2","_createElement","parentId","indexOf","core","newOpenKeys","slice","splice","computedIsPass","permissions","some","usePermissions","global","useGlobalContext","permissionsPath","usePreset","get","usePermissionsPass","tagName","message","isPass","Result","status","subTitle","Tooltip","title","createElement"],"ignoreList":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/8593.21d30c61.chunk.js","mappings":"iNACA,SAAgB,KAAO,2BAA2B,oBAAoB,wCAAwC,gBAAgB,oCAAoC,eAAe,mCAAmC,oBAAoB,wCAAwC,UAAU,8BAA8B,MAAQ,4BAA4B,OAAS,6BAA6B,cAAc,kCAAkC,gBAAgB,oCAAoC,QAAU,+B,iPCwC1eA,EAAYC,IACd,MAAMC,GAAaC,EAAAA,EAAAA,gBACb,GACFC,EAAE,UACFC,EAAS,MACTC,EAAK,SACLC,EAAQ,KACRC,EAAI,KACJC,EAAI,QACJC,EAAO,QACPC,EAAO,OACPC,EAAM,WACNC,EAAU,aACVC,EAAY,SACZC,EAAQ,aACRC,EAAY,MACZC,EAAK,OACLC,EAAM,eACNC,GACAlB,EAEEmB,EAAeC,MAAMC,QAAQP,IAAaA,EAASQ,OAAS,GAAMP,GAClE,QAACQ,EAAO,UAAEC,IAAaC,EAAAA,EAAAA,UAASC,OAAOC,OAAO,CAAC,EAAGZ,EAAc,CAClEa,MAAOV,GAAkBH,EAAcc,iBAAmBC,IACtDb,EAAOa,OAkBf,OAAQC,EAAAA,EAAAA,KAACC,EAAAA,QAAW,CAACvB,QAASA,EAAQK,UAClCmB,EAAAA,EAAAA,MAAA,OAAK7B,UAAW8B,IAAW9B,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,IAAYA,EAAQa,OAAS,IAAIb,EAAQ+F,KAAM9B,IAAgB6B,GAAe,IAAIN,QAAQvB,IAAe,IAGrH+B,EAAiBA,KAC1B,MAAM,OAACC,IAAUC,EAAAA,EAAAA,qBACX,YAACJ,EAAW,gBAAEK,IAAmBC,EAAAA,EAAAA,aACvC,MAAO,CACHN,YAAaG,EAAOH,aAAeA,GAAgBK,GAAmBE,IAAIJ,EAAQE,IAAqB,KAIlGG,EAAqBzB,IAAgB,IAAf,QAAC7E,GAAQ6E,EACxC,MAAM,YAACiB,GAAeE,IACtB,OAAOH,EAAe,CAACC,cAAa9F,aAkCxC,EA/BoBoF,IAQQ,IARP,KACItD,EAAO,SAAQ,UACfnC,EAAS,QACT4G,EAAU,OAAM,QAChBC,EAAU,2EAAc,QACxBxG,EAAO,SACPK,GAEH+E,EADM7F,GAAK6C,EAAAA,EAAAA,GAAAgD,EAAA/C,GAE7B,MAAMoE,EAASH,EAAmB,CAACtG,YACnC,MAAwB,oBAAbK,EACAA,EAAS,CAACoG,SAAQ3E,OAAM9B,aAGpB,IAAXyG,EACOpG,EAGE,UAATyB,GACOR,EAAAA,EAAAA,KAACoF,EAAAA,OAAM,CAACC,OAAO,MAAMC,SAAUJ,IAG7B,YAAT1E,GACQR,EAAAA,EAAAA,KAACuF,EAAAA,QAAO,CAACC,MAAON,EAAQnG,UAC3B0G,EAAAA,EAAAA,eAAcR,GAAOvD,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAAMzD,GAAK,IAAEI,UAAW8B,IAAWC,EAAgB/B,KAAaU,KAIvF,K","sources":["webpack://@kne-components/components-core/./src/components/Menu/style.module.scss?ca16","components/Menu/index.js","webpack://@kne-components/components-core/./src/components/Permissions/style.module.scss?e327","components/Permissions/index.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"menu\":\"style_menu__gvIvn__2jD5x\",\"all-no-start-icon\":\"style_all-no-start-icon__CA+zR__2jD5x\",\"no-start-icon\":\"style_no-start-icon__LnC1S__2jD5x\",\"has-children\":\"style_has-children__m9tce__2jD5x\",\"has-children-node\":\"style_has-children-node__2bhEB__2jD5x\",\"is-root\":\"style_is-root__4hhOc__2jD5x\",\"title\":\"style_title__+Hcar__2jD5x\",\"active\":\"style_active__WU49K__2jD5x\",\"no-collapse\":\"style_no-collapse__aIZBM__2jD5x\",\"title-content\":\"style_title-content__cQXpK__2jD5x\",\"loading\":\"style_loading__1pU4P__2jD5x\"};","import style from \"./style.module.scss\";\nimport classnames from \"classnames\";\nimport {Spin} from \"antd\";\nimport {useLocation, useNavigate} from \"react-router-dom\";\nimport Permissions from \"@components/Permissions\";\nimport useControlValue from \"@kne/use-control-value\";\nimport Icon from \"@components/Icon\";\nimport {useCallback, useEffect, useMemo} from \"react\";\nimport ensureSlash from \"@kne/ensure-slash\";\nimport {useFetch} from \"@kne/react-fetch\";\n\nconst treeEnhance = (items) => {\n const childrenKeys = {}, nodeMapping = [];\n const traversal = (children, options) => {\n const {parentKey, depth} = Object.assign({\n parentKey: \"root\", depth: 0, paths: [],\n }, options);\n if (!(Array.isArray(children) && children.length > 0)) {\n return null;\n }\n return children.map((item, index) => {\n const currentKey = `${item.key || `${parentKey !== \"root\" ? `${parentKey}-` : \"\"}node-${index}`}`;\n if (!childrenKeys[parentKey]) {\n childrenKeys[parentKey] = [];\n }\n childrenKeys[parentKey].push(currentKey);\n const children = traversal(item.children, {\n parentKey: currentKey, depth: depth + 1,\n });\n childrenKeys[currentKey] && childrenKeys[parentKey].push(...childrenKeys[currentKey]);\n const targetItem = Object.assign({}, item, {\n key: currentKey, parentKey, depth, children: children, originItem: item,\n });\n nodeMapping[currentKey] = targetItem;\n return targetItem;\n });\n };\n\n return {items: traversal(items), childrenKeys, nodeMapping};\n};\n\nconst MenuItem = (props) => {\n const navigation = useNavigate();\n const {\n id,\n className,\n label,\n iconType,\n icon,\n path,\n request,\n onClick,\n isOpen,\n isSelected,\n onOpenChange,\n children,\n fetchOptions,\n depth,\n onLoad,\n allowCollapsed,\n } = props;\n\n const hasChildren = (Array.isArray(children) && children.length > 0) || fetchOptions;\n const {refresh, isLoading} = useFetch(Object.assign({}, fetchOptions, {\n auto: !allowCollapsed && fetchOptions, onRequestSuccess: (data) => {\n onLoad(data);\n },\n }));\n\n const renderChildren = () => {\n if (!hasChildren) {\n return null;\n }\n if (!allowCollapsed || (isOpen && children)) {\n return <div className={style[\"children-list\"]}>{children}</div>;\n }\n\n if (!allowCollapsed || (isOpen && isLoading)) {\n return (<div className={style[\"children-list\"]}>\n <Spin className={style[\"loading\"]} size=\"small\"/>\n </div>);\n }\n };\n return (<Permissions request={request}>\n <div className={classnames(className, style[\"menu-item\"])}>\n <div\n className={classnames(style[\"title\"], {\n [style[\"active\"]]: isSelected,\n [style[\"has-children\"]]: hasChildren,\n [style[\"no-collapse\"]]: hasChildren && !allowCollapsed,\n [style[\"no-start-icon\"]]: !iconType && !icon,\n [style[\"is-root\"]]: depth === 0,\n })}\n onClick={(e) => {\n e.stopPropagation();\n if (!hasChildren && path) {\n navigation(path);\n return;\n }\n if (!hasChildren && !fetchOptions) {\n onClick?.(id, props);\n return;\n }\n if (!allowCollapsed) {\n return;\n }\n fetchOptions && refresh({});\n onOpenChange(!isOpen);\n }}\n >\n {iconType && !icon && <Icon type={iconType}/>}\n {icon || null}\n <span className={style[\"title-content\"]}>{label}</span>\n {hasChildren && allowCollapsed && (<Icon\n type={isOpen ? \"icon-arrow-bold-down\" : \"icon-arrow-bold-right\"}\n />)}\n </div>\n {renderChildren()}\n </div>\n </Permissions>);\n};\n\nconst Menu = ({className, allowCollapsed = true, pathMatch, defaultItems = [], ...props}) => {\n const {pathname, search} = useLocation();\n const [selectedKey, setSelectKeyChange] = useControlValue(props, {\n value: \"currentKey\", defaultValue: \"defaultCurrentKey\",\n });\n\n const [items, setItems] = useControlValue({defaultItems, ...props}, {\n defaultValue: \"defaultItems\", value: \"items\", onChange: \"onItemsChange\",\n });\n\n const {\n items: targetItems, defaultOpenKeys, links, childrenKeys, hasStartIcon, hasChildren,\n } = useMemo(() => {\n const {\n items: targetItems, childrenKeys, nodeMapping,\n } = treeEnhance(items);\n let hasStartIcon = false, hasChildren = false;\n const links = [], defaultOpenKeys = [];\n childrenKeys?.[\"root\"]?.forEach((key) => {\n const node = nodeMapping[key];\n if (node.iconType || node.icon) {\n hasStartIcon = true;\n }\n node.path && links.push({path: node.path, key});\n if (Array.isArray(node.children) && node.children.length > 0) {\n hasChildren = true;\n defaultOpenKeys.push(node.key);\n }\n });\n return {\n defaultOpenKeys, links, items: targetItems, childrenKeys, hasStartIcon, hasChildren,\n };\n }, [items]);\n useEffect(() => {\n const matchedPath = links.find(({path}) => {\n if (typeof pathMatch === \"function\") {\n return pathMatch(path, {pathname, search});\n }\n return (ensureSlash(pathname.replace(/[#,?].*/, \"\")) === ensureSlash(path) || ensureSlash(pathname + search) === ensureSlash(path));\n });\n if (matchedPath) {\n setSelectKeyChange(matchedPath.key);\n }\n }, [links, pathname, search, setSelectKeyChange, pathMatch]);\n\n const [openKeys, setOpenKeys] = useControlValue(Object.assign({}, props, {\n defaultOpenKeys: props.defaultOpenKeys || defaultOpenKeys,\n }), {\n value: \"openKeys\", defaultValue: \"defaultOpenKeys\", onChange: \"onOpenChange\",\n });\n\n const renderChildren = useCallback((children, options) => {\n const {parentKey, depth, selectedKey, openKeys, paths} = Object.assign({\n parentKey: null, depth: 0, paths: [],\n }, options);\n if (Array.isArray(children) && children.length > 0) {\n return children.map(({children, key: currentKey, originItem, ...item}) => {\n return (<MenuItem\n {...Object.assign({}, item)}\n id={currentKey}\n parentId={parentKey}\n depth={depth}\n allowCollapsed={allowCollapsed}\n isSelected={currentKey === selectedKey || (childrenKeys[currentKey] && childrenKeys[currentKey].indexOf(selectedKey) > -1)}\n onClick={setSelectKeyChange}\n onLoad={(data) => {\n setItems((items) => {\n const core = (children) => {\n if (Array.isArray(children) && children.length > 0) {\n return children.map((item) => {\n return Object.assign({}, item, {\n children: originItem === item ? data : core(item.children),\n });\n });\n }\n return null;\n };\n\n return core(items);\n });\n }}\n isOpen={(openKeys || []).indexOf(currentKey) > -1}\n key={currentKey}\n onOpenChange={() => {\n setOpenKeys((openKeys) => {\n const newOpenKeys = openKeys.slice(0);\n if (openKeys.indexOf(currentKey) > -1) {\n newOpenKeys.splice(openKeys.indexOf(currentKey), 1);\n } else {\n newOpenKeys.push(currentKey);\n }\n return newOpenKeys;\n });\n }}\n >\n {renderChildren(children, {\n parentKey, depth: depth + 1, selectedKey, openKeys, paths: [...paths, currentKey],\n })}\n </MenuItem>);\n });\n }\n return null;\n }, [setItems, setOpenKeys, setSelectKeyChange, childrenKeys, allowCollapsed]);\n\n return (<div\n className={classnames(className, style[\"menu\"], {\n [style[\"all-no-start-icon\"]]: !hasStartIcon, [style[\"has-children-node\"]]: hasChildren,\n })}\n >\n {renderChildren(targetItems, {selectedKey, openKeys})}\n </div>);\n};\n\nexport default Menu;\n","// extracted by mini-css-extract-plugin\nexport default {\"outer\":\"style_outer__vbHB9__2jD5x\"};","import {createElement} from \"react\";\nimport {Result, Tooltip} from \"antd\";\nimport get from \"lodash/get\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport {useGlobalContext, usePreset} from \"@components/Global\";\n\nexport const computedIsPass = ({permissions, request}) => {\n return Array.isArray(request) && request.length > 0 ? request.some((currentKey) => (permissions || []).indexOf(currentKey) > -1) : true;\n};\n\nexport const usePermissions = () => {\n const {global} = useGlobalContext();\n const {permissions, permissionsPath} = usePreset();\n return {\n permissions: global.permissions || permissions || (permissionsPath && get(global, permissionsPath)) || [],\n };\n};\n\nexport const usePermissionsPass = ({request}) => {\n const {permissions} = usePermissions();\n return computedIsPass({permissions, request});\n};\n\nconst Permissions = ({\n type = 'hidden',\n className,\n tagName = 'span',\n message = '您暂无权限,请联系管理员',\n request,\n children,\n ...props\n }) => {\n const isPass = usePermissionsPass({request});\n if (typeof children === \"function\") {\n return children({isPass, type, request});\n }\n\n if (isPass === true) {\n return children;\n }\n\n if (type === \"error\") {\n return <Result status=\"403\" subTitle={message}/>;\n }\n\n if (type === \"tooltip\") {\n return (<Tooltip title={message}>\n {createElement(tagName, {...props, className: classnames(style[\"outer\"], className)}, children)}\n </Tooltip>);\n }\n\n return null;\n};\n\nexport default Permissions;\n"],"names":["MenuItem","props","navigation","useNavigate","id","className","label","iconType","icon","path","request","onClick","isOpen","isSelected","onOpenChange","children","fetchOptions","depth","onLoad","allowCollapsed","hasChildren","Array","isArray","length","refresh","isLoading","useFetch","Object","assign","auto","onRequestSuccess","data","_jsx","Permissions","_jsxs","classnames","style","e","stopPropagation","Icon","type","Spin","size","_ref","pathMatch","defaultItems","_objectWithoutProperties","_excluded","pathname","search","useLocation","selectedKey","setSelectKeyChange","useControlValue","value","defaultValue","items","setItems","_objectSpread","onChange","targetItems","defaultOpenKeys","links","childrenKeys","hasStartIcon","useMemo","_childrenKeys$root","nodeMapping","traversal","options","parentKey","paths","map","item","index","currentKey","concat","key","push","targetItem","originItem","treeEnhance","forEach","node","useEffect","matchedPath","find","_ref2","ensureSlash","replace","openKeys","setOpenKeys","renderChildren","useCallback","_ref3","_excluded2","_createElement","parentId","indexOf","core","newOpenKeys","slice","splice","computedIsPass","permissions","some","usePermissions","global","useGlobalContext","permissionsPath","usePreset","get","usePermissionsPass","tagName","message","isPass","Result","status","subTitle","Tooltip","title","createElement"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[9096],{2885(){},17448(){},26304(e,n,i){var
|
|
2
|
-
//# sourceMappingURL=9096.
|
|
1
|
+
(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[9096],{2885(){},17448(){},26304(e,n,i){var s=i(53871),t=i(99140);e.exports=function(e,n,i){var r=null==e?0:e.length;return r?(n=i||void 0===n?1:t(n),s(e,0,(n=r-n)<0?0:n)):[]}},39825(){},48731(e,n,i){"use strict";i.r(n),i.d(n,{default:()=>t.a});var s=i(98919),t=i.n(s),r=i(22717),a=i.n(r);(0,s.preset)({base:a()([["commonStatus",()=>[{value:"open",description:"\u5f00\u542f",type:"success"},{value:"close",description:"\u5173\u95ed",type:"danger"}]],["gender",()=>[{value:"M",description:"\u7537"},{value:"F",description:"\u5973"}]],["marital",()=>[{description:"\u5df2\u5a5a",value:"Y"},{description:"\u672a\u5a5a",value:"N"}]],["confirm",()=>[{description:"\u662f",value:"Y"},{description:"\u5426",value:"N"}]],["political",()=>[{description:"\u4e2d\u5171\u515a\u5458",value:"\u4e2d\u5171\u515a\u5458"},{description:"\u5171\u9752\u56e2\u5458",value:"\u5171\u9752\u56e2\u5458"},{description:"\u7fa4\u4f17",value:"\u7fa4\u4f17"},{description:"\u5176\u4ed6\u515a\u6d3e",value:"\u5176\u4ed6\u515a\u6d3e"}]],["phoneStateEnum",()=>[{value:0,description:"\u7a7a\u53f7"},{value:1,description:"\u5b9e\u53f7"},{value:2,description:"\u505c\u673a"},{value:3,description:"\u5e93\u65e0"},{value:4,description:"\u6c89\u9ed8\u53f7"},{value:5,description:"\u98ce\u9669\u53f7"}]],["degreeEnum",()=>[{description:"\u521d\u4e2d",value:10},{description:"\u4e2d\u4e13",value:20},{description:"\u9ad8\u4e2d",value:30},{description:"\u5927\u4e13",value:40},{description:"\u672c\u79d1",value:50},{description:"\u7855\u58eb\u7814\u7a76\u751f",value:60},{description:"\u535a\u58eb\u7814\u7a76\u751f",value:70},{description:"\u535a\u58eb\u540e",value:75},{description:"\u5b66\u5386\u4e0d\u9650",value:999}]]],(e,n)=>{e[n[0]]=n[1]},{})})},64674(){},65176(){},75363(e,n,i){"use strict";i.r(n),i.d(n,{default:()=>m});const s=e=>({"en-US":()=>i.e(9431).then(i.bind(i,9431)),"zh-CN":()=>i.e(1065).then(i.bind(i,81065))}[e]());var t=i(47458),r=i(64671),a=i(55199),l=i(83136),o=i.n(l);const c="style_helper-guide__K5xFw__2jD5x",u="style_inner__bMKeU__2jD5x",d="style_content__xTfWZ__2jD5x",p="style_link__93j7O__2jD5x";var v=i(48731),_=i(70579);const m=e=>{let{name:n,className:i}=e;return(0,_.jsx)(t.IntlProvider,{importMessages:s,moduleName:"HelperGuide",children:(0,_.jsx)(v.default,{moduleName:"helperGuide",name:n,children:e=>e&&e.value&&(0,_.jsx)("div",{className:o()(c,i),children:(0,_.jsxs)(a.Space,{className:u,children:[(0,_.jsx)(r.default,{colorful:!0,type:"icon-color-bangzhuyindao"}),(0,_.jsx)("span",{className:d,children:e.content}),e.url&&(0,_.jsxs)(a.Typography.Link,{className:p,href:e.url,target:"_blank",children:["\u67e5\u770b\u5e2e\u52a9",(0,_.jsx)(r.default,{type:"icon-shuangjiantou-right"})]})]})})})})}},99140(e,n,i){var s=i(37303);e.exports=function(e){var n=s(e),i=n%1;return n===n?i?n-i:n:0}}}]);
|
|
2
|
+
//# sourceMappingURL=9096.f0020023.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/9096.
|
|
1
|
+
{"version":3,"file":"static/js/9096.f0020023.chunk.js","mappings":"sJAAA,IAAIA,EAAYC,EAAQ,OACpBC,EAAYD,EAAQ,OAqCxBE,EAAOC,QAVP,SAAmBC,EAAOC,EAAGC,GAC3B,IAAIC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACvC,OAAKA,GAGLF,EAAKC,QAAeE,IAANH,EAAmB,EAAIJ,EAAUI,GAExCN,EAAUK,EAAO,GADxBC,EAAIE,EAASF,GACkB,EAAI,EAAIA,IAJ9B,EAKX,C,mHCWAI,EAAAA,EAAAA,QAAO,CACHC,KAAMC,IA7CU,CAAC,CAAC,eAAgB,IAAM,CAAC,CAACC,MAAO,OAAQC,YAAa,eAAMC,KAAM,WAAa,CAC/FF,MAAO,QAASC,YAAa,eAAMC,KAAM,YACxC,CAAC,SAAU,IAAM,CAAC,CAACF,MAAO,IAAKC,YAAa,UAAM,CACnDD,MAAO,IAAKC,YAAa,YACtB,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UACpEJ,EAAAA,EAAAA,KAACK,EAAAA,QAAI,CAACF,WAAW,cAAcL,KAAMA,EAAKM,SACtCE,GAEEA,GACAA,EAAKhB,QACHU,EAAAA,EAAAA,KAAA,OAAKD,UAAWQ,IAAWC,EAAuBT,GAAWK,UAC3DK,EAAAA,EAAAA,MAACC,EAAAA,MAAK,CAACX,UAAWS,EAAeJ,SAAA,EAC/BJ,EAAAA,EAAAA,KAACW,EAAAA,QAAI,CAACC,UAAQ,EAACpB,KAAK,8BACpBQ,EAAAA,EAAAA,KAAA,QAAMD,UAAWS,EAAiBJ,SAAEE,EAAKO,UACxCP,EAAKQ,MACJL,EAAAA,EAAAA,MAACM,EAAAA,WAAWC,KAAI,CACdjB,UAAWS,EACXS,KAAMX,EAAKQ,IACXI,OAAO,SAAQd,SAAA,CAChB,4BAECJ,EAAAA,EAAAA,KAACW,EAAAA,QAAI,CAACnB,KAAK,yC,eC3BjC,IAAI2B,EAAWzC,EAAQ,OAmCvBE,EAAOC,QAPP,SAAmBS,GACjB,IAAIG,EAAS0B,EAAS7B,GAClB8B,EAAY3B,EAAS,EAEzB,OAAOA,IAAWA,EAAU2B,EAAY3B,EAAS2B,EAAY3B,EAAU,CACzE,C","sources":["../node_modules/lodash/dropRight.js","components/Enum/index.js","components/HelperGuide/locale/index.js","webpack://@kne-components/components-core/./src/components/HelperGuide/style.module.scss?bc31","components/HelperGuide/index.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["var baseSlice = require('./_baseSlice'),\n toInteger = require('./toInteger');\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nmodule.exports = dropRight;\n","import {preset} from \"@kne/react-enum\";\nimport transform from \"lodash/transform\";\n\nconst baseLoaders = [['commonStatus', () => [{value: 'open', description: '开启', type: 'success',}, {\n value: 'close', description: '关闭', type: 'danger'\n}]], [\"gender\", () => [{value: \"M\", description: \"男\"}, {\n value: \"F\", description: \"女\",\n},],], [\"marital\", () => [{description: \"已婚\", value: \"Y\"}, {\n description: \"未婚\", value: \"N\",\n},],], [\"confirm\", () => [{description: \"是\", value: \"Y\"}, {\n description: \"否\", value: \"N\",\n},],], [\"political\", () => [{description: \"中共党员\", value: \"中共党员\"}, {\n description: \"共青团员\", value: \"共青团员\",\n}, {description: \"群众\", value: \"群众\"}, {\n description: \"其他党派\", value: \"其他党派\",\n},],], [\"phoneStateEnum\", () => [{\n value: 0, description: \"空号\",\n}, {\n value: 1, description: \"实号\",\n}, {\n value: 2, description: \"停机\",\n}, {\n value: 3, description: \"库无\",\n}, {\n value: 4, description: \"沉默号\",\n}, {\n value: 5, description: \"风险号\",\n},],], [\"degreeEnum\", () => [{\n description: \"初中\", value: 10,\n}, {\n description: \"中专\", value: 20,\n}, {\n description: \"高中\", value: 30,\n}, {\n description: \"大专\", value: 40,\n}, {\n description: \"本科\", value: 50,\n}, {\n description: \"硕士研究生\", value: 60,\n}, {\n description: \"博士研究生\", value: 70,\n}, {\n description: \"博士后\", value: 75,\n}, {\n description: \"学历不限\", value: 999,\n},],],];\n\npreset({\n base: transform(baseLoaders, (result, value) => {\n result[value[0]] = value[1];\n }, {}),\n});\n\nexport {default} from \"@kne/react-enum\";\n","const importMessages = (locale) => {\n return {\n \"en-US\": () => import(\"./en-US\"),\n \"zh-CN\": () => import(\"./zh-CN\"),\n }[locale]();\n};\n\nexport default importMessages;\n","// extracted by mini-css-extract-plugin\nexport default {\"helper-guide\":\"style_helper-guide__K5xFw__2jD5x\",\"inner\":\"style_inner__bMKeU__2jD5x\",\"content\":\"style_content__xTfWZ__2jD5x\",\"link\":\"style_link__93j7O__2jD5x\"};","import importMessages from \"./locale\";\nimport { IntlProvider } from \"@components/Intl\";\nimport Icon from \"@components/Icon\";\nimport { Space, Typography } from \"antd\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport Enum from \"@components/Enum\";\n\nconst HelperGuide = ({ name, className }) => {\n return (\n <IntlProvider importMessages={importMessages} moduleName=\"HelperGuide\">\n <Enum moduleName=\"helperGuide\" name={name}>\n {(data) => {\n return (\n data &&\n data.value && (\n <div className={classnames(style[\"helper-guide\"], className)}>\n <Space className={style[\"inner\"]}>\n <Icon colorful type=\"icon-color-bangzhuyindao\" />\n <span className={style[\"content\"]}>{data.content}</span>\n {data.url && (\n <Typography.Link\n className={style[\"link\"]}\n href={data.url}\n target=\"_blank\"\n >\n 查看帮助\n <Icon type=\"icon-shuangjiantou-right\" />\n </Typography.Link>\n )}\n </Space>\n </div>\n )\n );\n }}\n </Enum>\n </IntlProvider>\n );\n};\n\nexport default HelperGuide;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n"],"names":["baseSlice","require","toInteger","module","exports","array","n","guard","length","undefined","preset","base","transform","value","description","type","result","locale","en-US","zh-CN","_ref","name","className","_jsx","IntlProvider","importMessages","moduleName","children","Enum","data","classnames","style","_jsxs","Space","Icon","colorful","content","url","Typography","Link","href","target","toFinite","remainder"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[9414],{1904(e,t,n){"use strict";n.d(t,{A:()=>i,N:()=>c});var a=n(98434),r=n(43856);const{useOnChange:s,useDecorator:l}=a.hooks,o=e=>s(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(r.AddressSelectField);o.Field=r.AddressSelectField,o.AddressEnum=r.AddressSelectField.AddressEnum,o.createAddressApi=r.AddressSelectField.createAddressApi,o.withAddressApi=r.AddressSelectField.withAddressApi;const i=o,c=e=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label,inputPlaceholder:"\u8bf7\u8f93\u5165"+e.label},e))(r.AddressInputField);c.Field=r.AddressInputField},2842(e,t,n){"use strict";n.d(t,{default:()=>r.a});n(2885);var a=n(77339),r=n.n(a);n.o(a,"PHONE_NUMBER_INPUT")&&n.d(t,{PHONE_NUMBER_INPUT:function(){return a.PHONE_NUMBER_INPUT}})},2885(){},5089(e,t,n){"use strict";n.d(t,{A:()=>xe,E:()=>fe});var a=n(89379),r=n(53986),s=n(98434),l=n(30096),o=n(34643),i=n(1904),c=n(83230),d=n(55199),u=n(70579);const{useOnChange:p}=s.hooks,m=e=>(0,u.jsx)(d.ColorPicker,(0,a.A)((0,a.A)({},e),{},{onChange:t=>e.onChange(t.toHexString())})),h=e=>p(Object.assign({},e))(m);h.Field=h;const g=h;var x=n(81026),f=n(78756),A=n(92328),v=n(2842);const _=["checked","children"],{useOnChange:j,useCheckedToValue:y}=s.hooks,{withChecked:b}=s.hoc,S=b(e=>{let{checked:t,children:n=null}=e,s=(0,r.A)(e,_);return(0,u.jsxs)(d.Space,{children:[(0,u.jsx)(d.Switch,(0,a.A)({checked:t},s)),"function"===typeof n?n({checked:t}):n]})}),N=e=>{e=Object.assign({},{fieldName:"switch"},e);const t=y(e);return j(t)(S)};N.Field=d.Switch;const C=N;var F=n(89099),w=n(96339),I=n(36972),P=n(20454),D=n(80071),T=(n(65176),n(17508)),M=n(10986),k=n.n(M),O=n(40438),R=n(70188),E=n(52526);const L=["render","placeholder","title","width","height","mask","onUpload"],{useOnChange:z}=s.hooks,U=(0,R.A)(e=>{const{formatMessage:t}=(0,E.useIntl)(),{render:n,placeholder:s=t({id:"ClickSign"}),title:l=t({id:"Sign"}),width:o,height:i,mask:c,onUpload:p}=e,m=(0,r.A)(e,L),[h,g]=k()(e),{onFileSelected:x}=(0,T.lN)({onUpload:p,maxLength:1,value:h?[h]:[],onChange:e=>{g(e[0])}}),f=(0,D.useSignature)();return"function"===typeof n?n({modal:f,value:h,placeholder:s}):(0,u.jsx)(d.Button,(0,a.A)((0,a.A)({},m),{},{style:{height:"62px",overflow:"hidden"},onClick:()=>{f({title:l,width:o,height:i,mask:c,onSuccess:async e=>{await x([e])}})},children:h&&h.id?(0,u.jsx)(O.default,{id:h.id,style:{height:"60px"}}):s}))}),B=e=>{let t=Object.assign({},((0,P.A)(e),e));return z(t)(U)};B.Field=U;const V=B;var W=n(15209),G=n(74529),H=n.n(G),q=n(73884),Q=n(33097),Y=n.n(Q),$=n(65317),X=n(46237),Z=n(56259),J=n(29556),K=n(64671),ee=n(83136),te=n.n(ee),ne=n(47094);const ae=["forwardedRef","label","placeholder","labelRender"],re=["placeholder","label"],se=["placeholder","label"],le=["placeholder","label","soFarText"],oe=e=>t=>{const n=H()(...e)(e=>{let{forwardedRef:n,label:s,placeholder:l,labelRender:o}=e,i=(0,r.A)(e,ae);return(0,u.jsx)(t,(0,a.A)((0,a.A)({},i),{},{label:s,placeholder:l,labelRender:function(){const e="function"===typeof o?o(...arguments):s;return i.tips?(0,u.jsxs)(d.Space,{children:[e,(0,u.jsx)(J.default,{content:i.tips,children:(0,u.jsx)("span",{className:te()(ne.A["field-tips"],{[ne.A["label-hidden"]]:i.labelHidden}),children:(0,u.jsx)(K.default,{type:"icon-xinxi-miaobian"})})})]}):e},ref:n}))}),s=(0,q.forwardRef)((e,t)=>(0,u.jsx)(n,(0,a.A)((0,a.A)({},e),{},{forwardedRef:t})));return Object.keys(t).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(e=>{s[e]=t[e]}),s},ie=e=>(0,R.A)(t=>{let{placeholder:n,label:s}=t,l=(0,r.A)(t,re);const{formatMessage:o}=(0,E.useIntl)();return(0,u.jsx)(e,(0,a.A)((0,a.A)({},l),{},{label:s,placeholder:n||o({id:"defaultInputPlaceholder"},{label:s})}))}),ce=e=>(0,R.A)(t=>{let{placeholder:n,label:s}=t,l=(0,r.A)(t,se);const{formatMessage:o}=(0,E.useIntl)();return(0,u.jsx)(e,(0,a.A)((0,a.A)({},l),{},{label:s,placeholder:n||o({id:"defaultSelectPlaceholder"},{label:s})}))}),de=e=>t=>{const n=(0,s.useGroup)(),r=Y()(n,"name"),l=(0,$.get)(n,"index"),o=(0,X.oc)();return o&&Array.isArray(o)&&o.length>0?o.map(n=>{if("string"===typeof n)return(0,q.createElement)(e,(0,a.A)((0,a.A)({},t),{},{key:n}));const{name:s,label:o,options:i}=n,c=Y()(i,"ignore",[]),d=Y()(i,"disabled",[]),u=Y()(i,"fields",[]),p=e=>t.name===e.name&&!(e.hasOwnProperty("groupName")&&e.groupName!==r)&&!(e.hasOwnProperty("groupIndex")&&e.groupIndex!==l);if(c.length>0&&c.find(p))return null;if(u.length>0&&!u.find(p))return null;let m=Object.assign({},t,{name:Y()(i,"nameTransform",(e,t)=>"".concat(e).concat(t))(t.name,s),label:Y()(i,"labelTransform",(e,t)=>e&&"".concat(e).concat(t))(t.label,o)});return d.length>0&&d.find(p)&&(m.disabled=!0,m.rule=""),(0,q.createElement)(e,(0,a.A)((0,a.A)({},m),{},{key:s}))}):(0,u.jsx)(e,(0,a.A)({},t))},ue=oe([de,ie])(s.Input),pe=oe([de,ie])(s.InputNumber);ue.Password=oe([de,ie])(s.Input.Password);const me=oe([de,ce])(s.DatePicker);me.MonthPicker=oe([de,ce])(s.DatePicker.MonthPicker),me.RangePicker=oe([de,ce])(s.DatePicker.RangePicker),me.WeekPicker=oe([de,ce])(s.DatePicker.WeekPicker);const he=oe([de,ce])(s.TimePicker);he.RangePicker=oe([de,ce])(s.TimePicker.RangePicker);const ge=oe([de])(e=>{let{placeholder:t,label:n,soFarText:l}=e,o=(0,r.A)(e,le);const{formatMessage:i}=(0,E.useIntl)({moduleName:"FormInfo"});return(0,u.jsx)(s.DatePickerToday,(0,a.A)((0,a.A)({},o),{},{label:n,placeholder:[i({id:"startDate"}),i({id:"endDate"})],soFarText:l||i({id:"soFarText"})}))}),xe={Signature:V,Input:ue,Checkbox:s.Checkbox,Password:ue.Password,InputNumber:pe,DatePicker:me,MonthPicker:me.MonthPicker,WeekPicker:me.WeekPicker,DateRangePicker:me.RangePicker,TimeRangePicker:he.RangePicker,TimePicker:he,DatePickerToday:ge,RadioGroup:oe([de])(s.RadioGroup),CheckboxGroup:oe([de])(s.CheckboxGroup),Rate:oe([de])(s.Rate),Switch:oe([de])(C),Slider:oe([de])(s.Slider),SalaryInput:oe([de,ie])(I.A),TypeDateRangePicker:oe([de])(Z.A),MoneyInput:oe([de,ie])(A.A),PhoneNumber:oe([de,ie])(v.default),Upload:oe([de])(F.A),Avatar:oe([de])(w.A),FunctionSelect:oe([de,ce])(x.A),IndustrySelect:oe([de,ce])(f.A),Cascader:oe([de,ce])(c.A),ColorPicker:oe([de,ce])(g),AddressSelect:oe([de,ce])(i.A),AddressInput:oe([de,ce])(i.N),TreeSelect:oe([de,ce])(s.TreeSelect),ReactInputNumber:oe([de,ie])(s.InputNumber),InputUpperCase:oe([de,ie])(W.A),Select:oe([de,ce])(s.Select),TextArea:oe([de,ie])(s.TextArea),AdvancedSelect:oe([de,ce])(l.Ay),SuperSelect:oe([de,ce])(o.Ay),SuperSelectTableList:oe([de,ce])(o.eM),SuperSelectUser:oe([de,ce])(o.Pg),SuperSelectTree:oe([de,ce])(o.kx)},fe={createWithFieldDecorator:oe,withInputDefaultPlaceholder:ie,withSelectDefaultPlaceholder:ce,withLang:de}},5995(e,t,n){"use strict";n.d(t,{Ay:()=>m,Vl:()=>h,W6:()=>g});var a=n(53986),r=n(89379),s=n(3382),l=n(73025),o=n(55199),i=n(76995),c=n(47094),d=n(70579);const u=["classNames"],p=["modalProps"],m=e=>(0,d.jsx)(s.default,(0,r.A)({},(0,i.A)(Object.assign({},e,{className:c.A["form-modal"]})))),h=()=>{const e=(0,s.useModal)();return t=>e((0,i.A)(Object.assign({},t,{className:c.A["form-modal"]})))},g=e=>{let{classNames:t}=e,n=(0,a.A)(e,u);const s=h();if(!n.api){const{modalProps:e}=n,t=(0,a.A)(n,p);return(0,d.jsx)(o.Button,(0,r.A)((0,r.A)({},t),{},{onClick:()=>{s(e)}}))}return(0,d.jsx)(l.A,(0,r.A)((0,r.A)({},n),{},{modalFunc:s}))}},15209(e,t,n){"use strict";n.d(t,{A:()=>h});var a=n(53986),r=n(89379),s=n(20454),l=n(55199),o=n(10986),i=n.n(o),c=n(13050),d=n(70579);const u=["remoteModules"],p=e=>{let t=Object.assign({},((0,s.A)(e),e));const[n,a]=i()(t);return(0,d.jsx)(l.Input,(0,r.A)((0,r.A)({},t),{},{value:n,onChange:e=>{a(e.target.value?e.target.value.toUpperCase():e.target.value,e)}}))},m=(0,c.createWithRemoteLoader)({modules:["FormInfo@formModule"]})(e=>{let{remoteModules:t}=e,n=(0,a.A)(e,u);const[r]=t,{hooks:s}=r,{useDecorator:l}=s;return l(Object.assign({placeholder:"\u8bf7\u8f93\u5165".concat(n.label||"")},n))(p)});m.field=p;const h=m},17448(){},18936(e,t,n){"use strict";n.d(t,{A:()=>U});var a=n(89379),r=n(53986);const s={"ant-tag":"style_ant-tag__7ct2q__2jD5x",overlay:"style_overlay__CXfU5__2jD5x",input:"style_input__+OpvV__2jD5x","is-disabled":"style_is-disabled__uX4qq__2jD5x","input-icon":"style_input-icon__E3NjK__2jD5x",large:"style_large__vMozz__2jD5x",small:"style_small__ubqQ+__2jD5x","input-inner":"style_input-inner__sY-6k__2jD5x","input-custom":"style_input-custom__Kxq3n__2jD5x","display-content":"style_display-content__qA1jn__2jD5x","overlay-footer-extra":"style_overlay-footer-extra__yCzWX__2jD5x","selected-tag":"style_selected-tag__BZsMM__2jD5x","selected-tag-list":"style_selected-tag-list__As0ho__2jD5x","selected-tag-inner":"style_selected-tag-inner__2NH59__2jD5x","text-inner":"style_text-inner__Bq2Ji__2jD5x",placeholder:"style_placeholder__odotY__2jD5x","is-modal":"style_is-modal__4cj8L__2jD5x","overlay-content":"style_overlay-content__kpGRn__2jD5x"};var l=n(74981);const{context:o,useContext:i,Provider:c,Consumer:d}=(0,l.A)();var u=n(73884),p=n(10986),m=n.n(p),h=n(87558),g=n(33097),x=n.n(g),f=n(55199),A=n(83136),v=n.n(A),_=n(3382),j=n(64671),y=n(79686),b=n.n(y),S=n(41740),N=n.n(S),C=n(74065),F=n.n(C),w=n(17342),I=n(70579);const P=["value","onChange","extra","showSelectedTag","renderSelectedContent","children"],D=["value","setValue","children","renderSelectedContent","showSelectedTag","placement","inputContent","single","extra","overlayWidth","wrapClassName"],T=["setFetchApi","wrapClassName"],M=["api","className","displayItems","wrapClassName"],k=e=>{let{maxLength:t,single:n,setValue:a,value:r,message:s}=e;return e=>a(!n&&Number.isInteger(t)&&t>0&&e.length>t?(s("\u6700\u591a\u9009\u62e9".concat(t,"\u4e2a")),r):e)},O=e=>{let{single:t,value:n,mapping:a,onClose:r}=e;return n&&Array.isArray(n)&&0!==n.length?t?(0,I.jsx)("span",{className:s["text-inner"],children:x()(a.get(n[0]),"label")||n[0]}):n.map(e=>{const t=a.get(e);return(0,I.jsx)(f.Tag,{className:s["display-tag"],closable:!0,onClose:n=>{n.preventDefault(),r(e,t)},children:(0,I.jsx)("span",{className:s["tag-inner"],children:x()(t,"label")||e})},e)}):null},R=(0,u.forwardRef)((e,t)=>{let{value:n,onChange:l,extra:o,showSelectedTag:i,renderSelectedContent:c,children:d}=e,p=(0,r.A)(e,P);const[m,h]=(0,u.useState)(n),g=(0,u.useRef)(n);g.current=n;const[x,A]=(0,u.useState)(!1),{message:v}=f.App.useApp(),j=k({maxLength:p.maxLength,single:p.single,setValue:h,value:m,message:v.error});return(0,u.useEffect)(()=>{x&&h(g.current)},[x]),(0,u.useImperativeHandle)(t,()=>({modalOpen:()=>{A(!0)},close:()=>{A(!1)}})),(0,I.jsx)(_.default,(0,a.A)((0,a.A)({},p),{},{open:x,onConfirm:()=>{l(m)},onClose:()=>{A(!1)},footer:(i||o)&&(0,I.jsxs)(f.Space,{direction:"vertical",className:s["overlay-footer"],children:[o&&(0,I.jsx)("div",{className:s["overlay-footer-extra"],children:o}),i&&c({value:m,setValue:j})]}),children:"function"===typeof d?d({value:m,setValue:j}):d}))}),E=(0,u.forwardRef)((e,t)=>{let{value:n,setValue:l,children:o,renderSelectedContent:i,showSelectedTag:c,placement:d,inputContent:p,single:m,extra:h,overlayWidth:g,wrapClassName:x}=e,A=(0,r.A)(e,D);const[v,_]=(0,u.useState)(!1);return(0,u.useImperativeHandle)(t,()=>({close:()=>{_(!1)}}),[]),(0,I.jsx)(f.Popover,(0,a.A)((0,a.A)({},A),{},{open:v,onOpenChange:_,overlayClassName:s.overlay,arrow:!1,content:(0,I.jsxs)("div",{style:g?{"--overlay-width":g}:{},className:s["overlay-content"],onClick:e=>{e.stopPropagation()},children:[(0,I.jsx)("div",{className:s["overlay-inner"],children:"function"===typeof o?o({value:n,setValue:e=>{(!m||n[0]!==e[0])&&l(e),m&&_(!1)}}):o}),(c||h)&&(0,I.jsxs)("div",{className:s["overlay-footer"],children:[h&&(0,I.jsx)("div",{className:s["overlay-footer-extra"],children:h}),c&&i({value:n,setValue:l})]})]}),trigger:"click",placement:d,children:(0,I.jsx)("div",{className:s["input-inner"],children:p})}))}),L=(0,h.withFetch)(e=>{let{setFetchApi:t,wrapClassName:n}=e,a=(0,r.A)(e,T);const[l,o]=(0,u.useState)(!1),c=(0,u.useRef)(null),d=(0,u.useRef)(null),p=i(),{valueState:m,mapping:h,props:g}=p,[x,A]=m,{single:_,placement:y,getPopupContainer:b,placeholder:S,isPopup:N,disabled:C,showSelectedTag:F,extra:P,inputContent:D}=g,M=(0,u.useRef)(a);M.current=a,(0,u.useEffect)(()=>{t(Object.assign({},M.current,{data:a.data,isComplete:a.isComplete}))},[a.data,t,a.isComplete]);const k=O({single:_,value:x,mapping:h,onClose:e=>{A(t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n})}}),L=e=>{let{value:t,setValue:n}=e;return(0,I.jsxs)(f.Space,{className:s["selected-tag"],align:"center",wrap:!0,children:[(0,I.jsxs)("div",{children:["\u5df2\u9009",!g.single&&Number.isInteger(g.maxLength)&&g.maxLength>0?"(".concat(t.length,"/").concat(g.maxLength,")"):"",":"]}),(0,I.jsx)(w.A,{className:s["selected-tag-list"],children:(0,I.jsx)("div",{className:s["selected-tag-inner"],children:O({value:t,mapping:h,onClose:e=>{n(t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n})}})})})]})},z=D?D(p):(0,I.jsxs)(f.Space,{className:s["display-content"],onMouseOver:()=>{o(!0)},onMouseOut:()=>{o(!1)},children:[(0,I.jsx)("div",{children:k||(0,I.jsx)("span",{className:s.placeholder,children:S})}),l&&x&&x.length>0&&!C?(0,I.jsx)(j.default,{className:v()(s.close,s["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),A([])}}):(0,I.jsx)(j.default,{className:v()(s["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return N?(0,I.jsx)(E,{ref:d,overlayWidth:g.overlayWidth,value:x,setValue:A,single:_,inputContent:z,extra:"function"===typeof P?P({close:()=>d.current.close(),context:p}):P,renderSelectedContent:L,showSelectedTag:F,trigger:"click",placement:y,getPopupContainer:b,children:g.children}):(0,I.jsxs)("div",{className:s["input-inner"],onClick:()=>{c.current.modalOpen()},children:[(0,I.jsx)(R,{size:g.modalSize,ref:c,single:g.single,maxLength:g.maxLength,disabledScroller:!0,wrapClassName:v()(s.overlay,s["is-modal"],n),title:g.placeholder,value:x,onChange:A,extra:"function"===typeof P?P({close:()=>c.current.close(),context:p}):P,showSelectedTag:F,renderSelectedContent:L,children:g.children}),z]})}),z=e=>{let{api:t,className:n,displayItems:l,wrapClassName:o}=e,i=(0,r.A)(e,M);const[d,p]=(0,u.useState)(""),[h,g]=(0,u.useState)(new Map(l.map(e=>[e.value,e]))),[A,_]=(0,u.useState)({}),{message:j}=f.App.useApp(),y=e=>{const t=e.filter(e=>h.get(e.value)!==e);0!==t.length&&g(e=>{const n=N()(e);return t.forEach(e=>{n.set(e.value,e)}),n})},S=e=>((e,t,n)=>"all"!==n?e:(t(e),e.map(e=>e.value)))(i.single?b()(e)?[]:[e]:e||[],y,i.valueType),[C,w]=m()(Object.assign({},i,{onChange:e=>{const t=((e,t,n)=>"all"!==n?e:e.map(e=>t.get(e)))(e,h,i.valueType);i.onChange&&i.onChange(i.single?F()(t):t)}},"value"in i?{value:S(i.value)}:{defaultValue:S(i.defaultValue)})),P=k({maxLength:i.maxLength,single:i.single,setValue:w,value:C,message:j.error});return(0,I.jsx)(c,{value:{mapping:h,searchText:d,setSearchText:p,appendMapping:y,setItems:e=>{A.setData(e),y(x()(i.dataFormat(e),"list",[]))},fetchApi:A,valueState:[C,P],props:i},children:(0,I.jsx)("div",{className:v()(s["input".concat(i.inputContent&&"function"===typeof i.inputContent?"-custom":"")],n),children:(0,I.jsx)(L,(0,a.A)((0,a.A)({},t),{},{wrapClassName:o,loading:null,setFetchApi:_,onRequestSuccess:e=>{y(x()(i.dataFormat(e),"list",[])),t.onRequestSuccess&&t.onRequestSuccess(e)}}))})})};z.defaultProps={placeholder:"\u8bf7\u9009\u62e9",displayItems:[],extra:null,api:{loader:()=>[]},dataFormat:e=>({list:e}),placement:"bottomLeft",getPopupContainer:null,showSelectedTag:!0},z.useContext=i;const U=z},21649(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});const a={addText:"Add",addSomeThing:"Add {label}",delText:"Delete",selectedTextAdvanced:"Selected",delConfirm:"Are you sure you want to delete this {name}?",defaultInputPlaceholder:"Please enter {label}",defaultSelectPlaceholder:"Please select {label}",startDate:"Start Date",endDate:"End Date",soFarText:"Hitherto",uploadButtonText:"Click Upload",uploadTips:"Support extension {extensionNames}, single file size does not exceed {fileSize} M, upload up to {maxLength} attachments",yuan:"yuan",thousand:"ten thousand yuan",salaryType:"Salary type",Cancel:"Cancel",Save:"Save",Next:"Next",Complete:"Complete",Crop:"Crop",Preview:"Preview",PictureFormat:"Picture Format: ",ImageSize:"Image Size: ",ReUpload:"Re-upload",UploadFailed:"Upload Failed{msg}",NotExceeding:"Not exceeding {size}M",FileNotExceeding:"File {name} not exceeding {size}MB\uff01",Rotate:"Rotate",ImageFull:"Image Full",Size:"Image Size",Sign:"Sign",ClickSign:"Click Sign"}},26304(e,t,n){var a=n(53871),r=n(99140);e.exports=function(e,t,n){var s=null==e?0:e.length;return s?(t=n||void 0===t?1:r(t),a(e,0,(t=s-t)<0?0:t)):[]}},29556(e,t,n){"use strict";n.r(t),n.d(t,{TooltipFetch:()=>D,TooltipInfoLabel:()=>F,default:()=>N});var a=n(89379),r=n(53986),s=n(55199),l=n(83136),o=n.n(l);const i="style_tooltip__zHGMI__2jD5x",c="style_large__lvmsm__2jD5x",d="style_small__nUt0r__2jD5x",u="style_popup-content__-rKQN__2jD5x",p="style_title__1EQPq__2jD5x",m="style_important-info__qTSZY__2jD5x",h="style_error__yTTq3__2jD5x",g="style_warning__CMJxz__2jD5x",x="style_success__AvJVx__2jD5x",f="style_sub-title__uD8CH__2jD5x",A="style_content__lzgUz__2jD5x",v="style_alone__q6q82__2jD5x",_="style_fetch-content__tEOEV__2jD5x",j="style_fetch-loading__tN-WB__2jD5x",y="style_title-info-icon__iY8Q+__2jD5x";var b=n(70579);const S=["overlayClassName","title","size","subtitle","content","importantInfo","importantInfoType","moreInfo"],N=e=>{let{overlayClassName:t,title:n,size:l,subtitle:_,content:j,importantInfo:y,importantInfoType:N,moreInfo:C}=e,F=(0,r.A)(e,S);return(0,b.jsx)(s.Tooltip,(0,a.A)((0,a.A)({},F),{},{rootClassName:o()(t,i,{[d]:"small"===l,[c]:"large"===l}),title:(0,b.jsxs)(s.Space,{direction:"vertical",className:u,children:[n&&(0,b.jsx)("div",{className:p,children:n}),y&&(0,b.jsx)("div",{className:o()(m,{[x]:"success"===N,[g]:"warning"===N,[h]:"error"===N}),children:y}),_&&(0,b.jsx)("div",{className:f,children:_}),j&&(0,b.jsx)("div",{className:o()(A,{[v]:[n,_,y,C].every(e=>!e)}),children:j}),C&&(0,b.jsx)("div",{children:C})]})}))};var C=n(64671);const F=e=>{let{title:t,tooltipTitle:n}=e;return(0,b.jsxs)("div",{children:[t,n?(0,b.jsx)(N,(0,a.A)((0,a.A)({},n),{},{children:(0,b.jsx)("span",{children:(0,b.jsx)(C.default,{type:"icon-xinxi-miaobian",className:y,size:14})})})):null]})};var w=n(73884),I=n(87558);const P=["api","children","fetchContent","showLoading","loadingClassName","force"],D=e=>{let{api:t,children:n,fetchContent:l,showLoading:i=!0,loadingClassName:c,force:d}=e,u=(0,r.A)(e,P);const[p,m]=(0,w.useState)(!1),h=(0,I.useFetch)(Object.assign({},t,{auto:!1})),{isComplete:g,isLoading:x,data:f,send:A}=h;return(0,b.jsx)(N,(0,a.A)((0,a.A)({},Object.assign({},u,g?l(f,h):{})),{},{open:p,onOpenChange:async e=>{!e||g&&!d||await A({type:"refresh"}),m(e)},children:(0,b.jsxs)("span",{className:_,children:[n,i&&x?(0,b.jsx)(s.Spin,{size:"small",className:o()(c,j)}):null]})}))}},30096(e,t,n){"use strict";n.d(t,{Ay:()=>d});var a=n(98434),r=n(43856);const{useOnChange:s}=a.hooks,l=e=>{const t=t=>s(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+t.label},t))(e);return t.field=t.Field=e,t},o=l(r.UserField),i=l(r.TableField),c=l(r.AdvancedSelectField);c.createdList=e=>{let{renderList:t,defaultProps:n}=e;return l((0,r.createListField)({renderList:t,defaultProps:n}))},c.User=o,c.Table=i;const d=c},30891(e,t,n){"use strict";n.d(t,{A:()=>s});var a=n(89379),r=n(98434);const s=e=>{let{children:t}=e;const{openApi:n,formData:s}=(0,r.useFormContext)();return t((0,a.A)((0,a.A)({},n),{},{formData:s}))}},34643(e,t,n){"use strict";n.d(t,{Ay:()=>p,Pg:()=>c,eM:()=>d,kx:()=>u});var a=n(98434),r=n(43856),s=n(60586);const{useOnChange:l}=a.hooks,o=e=>{const t=t=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+t.label},t))(e);return t.field=t.Field=e,t},i=o(r.SuperSelectField),c=o(s.$9),d=o(r.SuperSelectTableListField),u=o(r.SuperSelectTreeField),p=i},34699(e,t,n){"use strict";n.r(t),n.d(t,{Download:()=>m,FileButton:()=>I,FileLink:()=>P,List:()=>C,OptionButtons:()=>N,PrintButton:()=>o.PrintButton,default:()=>i(),download:()=>o.download,downloadBlobFile:()=>o.downloadBlobFile,useDownload:()=>o.useDownload,useFileModal:()=>D});var a=n(89379),r=n(53986),s=(n(64674),n(96418)),l=n.n(s),o=n(92455),i=n.n(o),c=n(3382),d=n(83136),u=n.n(d),p=n(70579);o.Download.useDownload=o.useDownload,o.Download.downloadBlobFile=o.downloadBlobFile;const m=o.Download;var h=n(26304),g=n.n(h),x=n(74065),f=n.n(x),A=n(96252);const v=e=>({"en-US":()=>n.e(5645).then(n.bind(n,75645)),"zh-CN":()=>n.e(6707).then(n.bind(n,26707))}[e]());var _=n(47458);const j=["apis"],y=["onCancel"],b=["onCancel"],S=e=>{let{apis:t}=e;const n=(0,A.useFormModal)();return"function"===typeof(null===t||void 0===t?void 0:t.onEditModalShow)?t.onEditModalShow:(e,t)=>{const a=n({size:"small",title:(0,p.jsx)(_.IntlProvider,{importMessages:v,moduleName:"File",children:(0,p.jsx)(_.FormattedMessage,{id:"editDocumentName",moduleName:"File"})}),formProps:{data:{name:g()(e.filename.split(".")).join(".")},onSubmit:async n=>{!1!==((null===t||void 0===t?void 0:t.onEdit)&&await(null===t||void 0===t?void 0:t.onEdit({formData:Object.assign({},n,{name:"".concat(n.name,".").concat(f()(e.filename.split(".")))}),item:e})))&&a.close()}},children:(0,p.jsx)(A.default,{column:1,list:[(0,p.jsx)(A.Input,{name:"name",label:(0,p.jsx)(_.IntlProvider,{importMessages:v,moduleName:"File",children:(0,p.jsx)(_.FormattedMessage,{id:"documentName",moduleName:"File"})}),rule:"REQ LEN-0-100"})]})})}},N=e=>{var t;const n=S({apis:e.apis});return(0,p.jsx)(o.FileListOptionButtons,(0,a.A)((0,a.A)({},e),{},{onEdit:t=>n(t,e.apis),onDelete:null===(t=e.apis)||void 0===t?void 0:t.onDelete,renderModal:"function"===typeof e.renderModal?e.renderModal:e=>{let{onCancel:t}=e,n=(0,r.A)(e,b);return(0,p.jsx)(c.default,(0,a.A)((0,a.A)({},Object.assign({},n)),{},{onClose:t}))}}))},C=e=>{let{apis:t}=e,n=(0,r.A)(e,j);const s=S({apis:t});return(0,p.jsx)(o.FileList,(0,a.A)((0,a.A)({},n),{},{apis:t,onEdit:e=>s(e,t),onDelete:null===t||void 0===t?void 0:t.onDelete,renderModal:"function"===typeof n.renderModal?n.renderModal:e=>{let{onCancel:t}=e,n=(0,r.A)(e,y);return(0,p.jsx)(c.default,(0,a.A)((0,a.A)({},Object.assign({},n)),{},{onClose:t}))}}))},F=["onCancel"],w=["className"],I=e=>(0,p.jsx)(o.FileButton,(0,a.A)({},Object.assign({},e,{modalProps:{renderModal:e=>{let{onCancel:t}=e,n=(0,r.A)(e,F);return(0,p.jsx)(c.default,(0,a.A)((0,a.A)({},Object.assign({},n)),{},{onClose:t}))}}}))),P=e=>{const t=Object.assign({},e),{className:n}=t,s=(0,r.A)(t,w);return(0,p.jsx)(I,(0,a.A)((0,a.A)({},s),{},{className:u()(n,"btn-no-padding"),type:"link",children:s.children||s.filename||s.originName}))},D=e=>{const{title:t,children:n,footer:a}=(0,o.useFileModalProps)(Object.assign({},e)),r=(0,c.useModal)();return l()(()=>r({title:t,children:n,footer:a}))}},35774(e,t,n){"use strict";n.d(t,{A:()=>c});var a=n(89379),r=n(53986),s=n(98434),l=n(81014),o=n(70579);const i=["onClick"],c=e=>{let{onClick:t}=e,n=(0,r.A)(e,i);const c=(0,s.useFormContext)();return(0,o.jsx)(l.default,(0,a.A)((0,a.A)({},n),{},{onClick:e=>t(c,e)}))}},36972(e,t,n){"use strict";n.d(t,{A:()=>E});var a=n(89379),r=n(53986),s=n(73884),l=n(87558),o=n(98434),i=n(78491),c=n.n(i),d=n(55199);const u="style_salary__sUOtT__2jD5x",p="style_salary-type__Sl1LC__2jD5x",m="style_input-number__eoEZr__2jD5x",h="style_full__NPqJm__2jD5x",g="style_input-group__toLB7__2jD5x",x="style_input-group-no-mb__C4nzh__2jD5x";var f=n(47458),A=n(55431),v=n(48731),_=n(10986),j=n.n(_),y=n(65317),b=n(70579);const S=["data"],N=["getPopupContainer","onBlur","api","isRange","placeholder","disabled","showMonth","remindUnit","req"],C=["api","defaultValue"],F=(0,l.withFetch)(e=>{let{data:t}=e,n=(0,r.A)(e,S);return(0,b.jsx)(d.Select,(0,a.A)((0,a.A)({},n),{},{options:t}))}),{useDecorator:w,useUIDecorator:I}=o.hooks,P=e=>{if(!e)return"";const t=isNaN(Number(e))?e:Math.abs(Number(e));return e.split(".")[1]&&e.split(".")[1].length>2?t.toFixed(2):t},D=e=>{let{children:t,isError:n}=e;return(0,b.jsx)("div",{style:{marginBottom:0},className:"react-form__field ".concat(n?"is-error":""),children:(0,b.jsx)("div",{className:"react-form__field-main",children:(0,b.jsx)("div",{className:"react-form__field-input",children:(0,s.cloneElement)(t,{className:"react-form__field-component"})})})})},T=e=>{let{getPopupContainer:t,onBlur:n,api:s,isRange:l=!0,placeholder:o,disabled:i,showMonth:A,remindUnit:_,req:S}=e,C=(0,r.A)(e,N);const[w,I]=j()(C),{formatMessage:T}=(0,f.useIntl)({moduleName:"FormInfo"}),M=T({id:"defaultSelectPlaceholder"},{label:""}),k=T({id:"defaultInputPlaceholder"},{label:""}),O=[6].indexOf((0,y.get)(w,"type"))>-1,R=1===(0,y.get)(w,"type"),E=7===(0,y.get)(w,"type"),L=e=>{if(e)return O?e/1e4:e},z=c()(n||(()=>{}));return(0,b.jsx)("div",{ref:z,className:u,children:(0,b.jsxs)(d.Row,{wrap:!1,gutter:10,children:[(0,b.jsx)(d.Col,{children:(0,b.jsx)(F,(0,a.A)((0,a.A)({className:p},s),{},{value:(0,y.get)(w,"type"),onChange:e=>{I&&I(Object.assign({},R?{}:w,{type:e,min:"",max:""}))},placeholder:o||M,getPopupContainer:t,disabled:i}))}),R?null:(0,b.jsxs)(d.Col,{flex:1,children:[l&&(0,b.jsxs)(d.Row,{className:_&&[5,6].includes(null===w||void 0===w?void 0:w.type)?g:x,wrap:!1,children:[(0,b.jsx)(d.Col,{flex:1,children:(0,b.jsx)(D,{isError:!(0,y.get)(w,"min")&&S,children:(0,b.jsx)(d.InputNumber,{disabled:i,placeholder:k,formatter:P,value:L((0,y.get)(w,"min")),style:{textAlign:"center"},onChange:e=>{I(Object.assign({},w,{min:O?1e4*e:e}))},description:_&&[5,6].includes(null===w||void 0===w?void 0:w.type)?(0,b.jsxs)("span",{style:{color:"#fc3333"},children:["\u6ce8\u610f\uff1a",(0,b.jsx)(v.default,{name:null===w||void 0===w?void 0:w.type,moduleName:"salaryTypeEnum"}),"\u7684\u5355\u4f4d\u4e3a",O?T({id:"thousand"}):E?"":T({id:"yuan"})]}):null})})}),(0,b.jsx)(d.Col,{children:(0,b.jsx)(d.Input,{style:{width:30,borderLeft:0,borderRight:0,pointerEvents:"none"},placeholder:"~",disabled:!0})}),(0,b.jsx)(d.Col,{flex:1,children:(0,b.jsx)(D,{isError:!(0,y.get)(w,"max")&&S,children:(0,b.jsx)(d.InputNumber,{disabled:i,placeholder:k,formatter:P,value:L((0,y.get)(w,"max")),style:{textAlign:"center"},addonAfter:O?T({id:"thousand"}):E?"":T({id:"yuan"}),onChange:e=>{I(Object.assign({},w,{max:O?1e4*e:e}))}})})}),5===(0,y.get)(w,"type")&&A&&(0,b.jsx)(d.Col,{children:(0,b.jsxs)("span",{className:(0,y.get)(w,"max")&&(0,y.get)(w,"min")&&!(0,y.get)(w,"month")&&S?"error":"",children:[(0,b.jsx)("span",{className:m,children:"X"}),(0,b.jsx)(d.InputNumber,{min:12,disabled:i,value:(0,y.get)(w,"month"),onChange:e=>{I(Object.assign({},w,{month:e}))},style:{width:100,textAlign:"center"},placeholder:"\u6570\u91cf",addonAfter:"\u6708"})]})})]}),!l&&!E&&(0,b.jsx)(d.InputNumber,{disabled:i,min:0,max:1e8,placeholder:k,className:h,formatter:P,value:L((0,y.get)(w,"max")),style:{textAlign:"center"},addonAfter:O?T({id:"thousand"}):E?"":T({id:"yuan"}),onChange:e=>{I(Object.assign({},w,{max:O?1e4*e:e}))}}),!l&&E&&(0,b.jsx)(d.Input,{disabled:i,placeholder:k,className:h,onChange:e=>{I(Object.assign({},w,{max:e.target.value}))},value:(0,y.get)(w,"max"),style:{textAlign:"center"}})]})]})})},M={loader:()=>[{value:1,label:"\u9762\u8bae"},{value:2,label:"\u65f6\u85aa"},{value:3,label:"\u65e5\u85aa"},{value:4,label:"\u5468\u85aa"},{value:5,label:"\u6708\u85aa"},{value:6,label:"\u5e74\u85aa"}]},k={type:5,min:"",max:"",month:12},O=e=>{let{api:t=M,defaultValue:n=k}=e,s=(0,r.A)(e,C);return(0,b.jsx)(f.IntlProvider,{moduleName:"FormInfo",importMessages:A.A,children:(0,b.jsx)(T,(0,a.A)((0,a.A)({},s),{},{api:t,defaultValue:n}))})},R=e=>{var t;return w((0,a.A)((0,a.A)({},e),{},{req:(null===e||void 0===e||null===(t=e.rule)||void 0===t?void 0:t.indexOf("REQ"))>-1}))(O)};R.Field=O;const E=R},39825(){},45053(e,t,n){"use strict";n.d(t,{A:()=>p});var a=n(98434),r=n(55199),s=n(73884),l=n(83136),o=n.n(l),i=n(70720),c=n.n(i),d=n(47094),u=n(70579);const p=e=>{let{name:t,groupName:n,overlayClassName:l,errorRender:i=()=>null,groupIndex:p,children:m}=e;const h=(e=>{let{name:t,groupName:n,groupIndex:r}=e;const{emitter:l,formState:o}=(0,a.useFormContext)(),i=(0,s.useRef)({name:t,groupName:n,groupIndex:r});i.current={name:t,groupName:n,groupIndex:r};const c=(0,s.useRef)(o);c.current=o;const[d,u]=(0,s.useState)(null);return(0,s.useEffect)(()=>{const e=l.addListener("form-field-validate-complete",e=>{let{id:t,validate:n}=e;const r=c.current[t];if(!r)return;const s=i.current;r.name!==s.name||s.groupName&&(r.groupName!==s.groupName||r.groupIndex!==s.groupIndex)||u(2===n.status?Object.assign({},n,{label:r.label,errMsg:a.util.compileErrMsg(n.msg,r.label)}):null)});return()=>{e&&e.remove()}},[l]),d})({name:t,groupName:n,groupIndex:p}),[g,x]=(0,s.useState)(!1),f=h&&g&&i(Object.assign({},h,{closeHover:()=>x(!1)})),A=(0,s.useRef)(null),v=(0,s.useRef)(null);c()(()=>{x(!1)}).current={contains:e=>A.current.contains(e)||v.current&&v.current.contains(e)};const[_,j]=(0,s.useState)(0);return(0,s.useLayoutEffect)(()=>{const e=()=>{const e=A.current.querySelector(".react-form__field-component");e&&j(e.clientWidth)};e();const t=new ResizeObserver(e);t.observe(A.current);const n=new MutationObserver(e);return n.observe(A.current,{subtree:!0,childList:!0}),()=>{n.disconnect(),t.disconnect()}},[]),(0,u.jsx)(r.Popover,{open:!!f,rootClassName:o()(l,d.A["error-tip-overlay"]),content:f&&(0,u.jsx)("div",{ref:v,style:{width:_},className:o()(d.A["error-tip-overlay-content"]),children:f}),placement:"bottom",transitionName:"ant-slide-up",arrow:!1,children:(0,u.jsx)("div",{className:o()("error-tip"),ref:A,onMouseEnter:()=>{x(!0)},children:m})})}},46237(e,t,n){"use strict";n.d(t,{Ay:()=>i,oc:()=>o});var a=n(73884);const r=(0,a.createContext)([]),{Provider:s,Consumer:l}=r,o=()=>(0,a.useContext)(r),i=s},46732(e,t,n){"use strict";n.d(t,{A:()=>d,K:()=>c});var a=n(75363),r=n(73884),s=n(98434),l=n(47094),o=n(70579);const i=(0,r.createContext)(""),{Provider:c}=i,d=e=>{let{name:t}=e;const n=(0,r.useContext)(i),c=(0,s.useGroup)();return n&&(0,o.jsx)(a.default,{className:l.A["helper-guide-field"],name:n+"-"+(c.name?c.name+"-":"")+t})}},47094(e,t,n){"use strict";n.d(t,{A:()=>a});const a={}},48221(e,t,n){"use strict";n.d(t,{Ay:()=>c,WJ:()=>u,Xy:()=>d});var a=n(89379),r=n(25963),s=n(73025),l=n(47094),o=n(76995),i=n(70579);const c=e=>(0,i.jsx)(r.default,(0,a.A)({},(0,o.A)(Object.assign({},e,{className:l.A["form-drawer"]})))),d=()=>{const e=(0,r.useDrawer)();return t=>e((0,o.A)(Object.assign({},t,{className:l.A["form-drawer"]})))},u=e=>{const t=d();return(0,i.jsx)(s.A,(0,a.A)((0,a.A)({},e),{},{modalFunc:t}))}},48731(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.a});var a=n(98919),r=n.n(a),s=n(22717),l=n.n(s);(0,a.preset)({base:l()([["commonStatus",()=>[{value:"open",description:"\u5f00\u542f",type:"success"},{value:"close",description:"\u5173\u95ed",type:"danger"}]],["gender",()=>[{value:"M",description:"\u7537"},{value:"F",description:"\u5973"}]],["marital",()=>[{description:"\u5df2\u5a5a",value:"Y"},{description:"\u672a\u5a5a",value:"N"}]],["confirm",()=>[{description:"\u662f",value:"Y"},{description:"\u5426",value:"N"}]],["political",()=>[{description:"\u4e2d\u5171\u515a\u5458",value:"\u4e2d\u5171\u515a\u5458"},{description:"\u5171\u9752\u56e2\u5458",value:"\u5171\u9752\u56e2\u5458"},{description:"\u7fa4\u4f17",value:"\u7fa4\u4f17"},{description:"\u5176\u4ed6\u515a\u6d3e",value:"\u5176\u4ed6\u515a\u6d3e"}]],["phoneStateEnum",()=>[{value:0,description:"\u7a7a\u53f7"},{value:1,description:"\u5b9e\u53f7"},{value:2,description:"\u505c\u673a"},{value:3,description:"\u5e93\u65e0"},{value:4,description:"\u6c89\u9ed8\u53f7"},{value:5,description:"\u98ce\u9669\u53f7"}]],["degreeEnum",()=>[{description:"\u521d\u4e2d",value:10},{description:"\u4e2d\u4e13",value:20},{description:"\u9ad8\u4e2d",value:30},{description:"\u5927\u4e13",value:40},{description:"\u672c\u79d1",value:50},{description:"\u7855\u58eb\u7814\u7a76\u751f",value:60},{description:"\u535a\u58eb\u7814\u7a76\u751f",value:70},{description:"\u535a\u58eb\u540e",value:75},{description:"\u5b66\u5386\u4e0d\u9650",value:999}]]],(e,t)=>{e[t[0]]=t[1]},{})})},55431(e,t,n){"use strict";n.d(t,{A:()=>a});const a=e=>({"en-US":()=>Promise.resolve().then(n.bind(n,21649)),"zh-CN":()=>Promise.resolve().then(n.bind(n,80711))}[e]())},56259(e,t,n){"use strict";n.d(t,{A:()=>o});var a=n(89319),r=n(98434);const{useOnChange:s}=r.hooks,l=e=>s(Object.assign({},{},e))(a.A);l.Field=a.A;const o=l},64261(e,t,n){"use strict";n.d(t,{A:()=>_});var a=n(89379),r=n(98434),s=n(57469),l=n.n(s),o=n(34677),i=n.n(o),c=n(33097),d=n.n(c),u=n(22717),p=n.n(u),m=(n(17448),n(2842)),h=n(46732),g=n(37881),x=n(13050),f=n(70579);const A=r.RULES.REQ,v=r.RULES.LEN,_=async(e,t)=>{const{locale:n}=Object.assign({},t);r.interceptors.input.use("photo-string",e=>{if(e&&"string"===typeof e){const[t,n]=e.split("?"),a=new URLSearchParams(n);return Object.assign({},{id:t},p()(Array.from(a.entries()),(e,t)=>{e[t[0]]=t[1]},{}))}return e}),r.interceptors.output.use("photo-string",e=>e&&"string"!==typeof e?"".concat(null===e||void 0===e?void 0:e.id).concat(null!==e&&void 0!==e&&e.filename?"?filename=".concat(null===e||void 0===e?void 0:e.filename):""):e),r.interceptors.input.use("photo-string-list",e=>e&&Array.isArray(e)&&e.length>0?e.map(e=>{const[t,n]=e.split("?"),a=new URLSearchParams(n);return Object.assign({},{id:t},p()(Array.from(a.entries()),(e,t)=>{e[t[0]]=t[1]},{}))}):e),r.interceptors.output.use("photo-string-list",e=>e&&Array.isArray(e)&&e.length>0?e.map(e=>"".concat(null===e||void 0===e?void 0:e.id).concat(null!==e&&void 0!==e&&e.filename?"?filename=".concat(null===e||void 0===e?void 0:e.filename):"")):e),r.interceptors.input.use("to-array",e=>Array.isArray(e)?e[0]:e),r.interceptors.output.use("to-array",e=>[e]),r.interceptors.input.use("array-single",e=>e?[e]:[]),r.interceptors.output.use("array-single",e=>e?e[0]:null),r.interceptors.input.use("boolean-number",e=>1===e||"1"===e),r.interceptors.output.use("boolean-number",e=>e?1:0),r.interceptors.input.use("un-boolean",e=>!e),r.interceptors.output.use("un-boolean",e=>!e),r.interceptors.output.use("object-output-value",e=>e?e.value||e.id:e),r.interceptors.output.use("array-output-value",e=>Array.isArray(e)&&e.length>0?e.map(e=>e.value||e.id):[]),r.interceptors.input.use("date-string",e=>e?l()(e):null),r.interceptors.output.use("date-string",e=>e?new Date(e.valueOf()).toISOString():""),r.interceptors.input.use("date-range-string",e=>{if(!Array.isArray(e))return[];const t=[];return e[0]&&t.push(l()(e[0])),e[0]&&e[1]&&"sofar"===e[1]&&t.push("\u81f3\u4eca"),e[0]&&e[1]&&"\u81f3\u4eca"!==e[1]&&t.push(l()(e[1])),t}),r.interceptors.output.use("date-range-string",e=>{if(!Array.isArray(e))return[];const t=[];return e[0]&&t.push(new Date(e[0].valueOf()).toISOString()),e[0]&&e[1]&&"\u81f3\u4eca"===e[1]&&t.push("sofar"),e[0]&&e[1]&&"\u81f3\u4eca"!==e[1]&&t.push(new Date(e[1].valueOf()).toISOString()),t}),r.interceptors.output.use("file-format",e=>Array.isArray(e)?e.map(e=>Object.assign({},e,{id:e.id||e.ossId,originalName:e.filename})):[]),r.interceptors.input.use("file-format",e=>Array.isArray(e)?e.map(e=>({id:e.id||e.ossId,ossId:e.id||e.ossId,filename:e.originalName||e.filename})):[]);const{default:s}=await(0,x.loadModule)("components-iconfont:CountyFlag@load"),o=await s(),c=new Map(o.map(e=>{let{ab:t,country_code:n}=e;return[t,n]})),u=new Map(o.map(e=>{let{ab:t,country_code:n}=e;return[n,t]}));r.interceptors.output.use("phone-number-string",e=>null!==e&&void 0!==e&&e.code&&null!==e&&void 0!==e&&e.value?"+".concat(c.get(e.code)," ").concat(e.value.replace(/\s+/g,"")):""),r.interceptors.input.use("phone-number-string",e=>{if(!e)return{};const t=e.match(/^\+(\d+)\s(.*)/);return t&&t.length>=3?{code:u.get(Number(t[1])),value:t[2]}:{code:u.get(86),value:e}});const _=(e,t)=>{t=Object.assign({},t);const a={REQ:{"zh-CN":"%s\u4e0d\u80fd\u4e3a\u7a7a","en-US":"%s cannot be empty "},EMAIL:{"zh-CN":"\u8bf7\u8f93\u5165\u6709\u6548\u7684%s","en-US":"Please enter a valid %s"},LENGTH_EQUAL:{"zh-CN":"%s\u5fc5\u987b\u7b49\u4e8e".concat(t.end),"en-US":"%s must be equal to ".concat(t.end)},LENGTH_MORE:{"zh-CN":"%s\u5fc5\u987b\u5927\u4e8e".concat(t.start),"en-US":"%s must be greater than ".concat(t.start)},LENGTH_LESS:{"zh-CN":"%s\u5fc5\u987b\u5c0f\u4e8e".concat(t.end),"en-US":"%s must be less than ".concat(t.end)},ID_CARD_INVALID:{"zh-CN":"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u8eab\u4efd\u8bc1\u53f7\u7801","en-US":"Please enter a valid ID card number"}},r=d()(a,"".concat(e,".").concat(n));return r||d()(a,"".concat(e,".zh-CN"))};(0,r.preset)(i()({},{type:"inner",rules:{REQ:function(){return Object.assign({},A(...arguments),{errMsg:_("REQ")})},LEN:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[a,r,s]=t;let l="";return s===r&&a.length!==Number(s)&&(l="LENGTH_EQUAL"),a.length<r&&(l="LENGTH_MORE"),s&&a.length>s&&(l="LENGTH_LESS"),Object.assign({},v(...t),{errMsg:_(l,{start:r,end:s})})},EMAIL:function(e){return{result:/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e),errMsg:_("EMAIL")}},PHONE_NUMBER_INPUT:m.PHONE_NUMBER_INPUT,ARRAY_LENGTH:(e,t,n)=>n===t&&e.length!==Number(n)?{result:!1,errMsg:_("LENGTH_EQUAL",{start:t,end:n})}:e.length<t?{result:!1,errMsg:_("LENGTH_MORE",{start:t,end:n})}:n&&e.length>n?{result:!1,errMsg:_("LENGTH_LESS",{start:t,end:n})}:{result:!0},ID_CARD:e=>(0,g.A)(e).isValid?{result:!0}:{result:!1,errMsg:_("ID_CARD_INVALID")}},field:{datePicker:{defaultProps:{interceptor:"date-string"}},rangeDatePicker:{defaultProps:{interceptor:"date-range-string"}},inputNumber:{defaultProps:{changeOnWheel:!1}},textArea:{defaultProps:{autoSize:{minRows:2,maxRows:6}}}},globalProps:{labelTips:e=>(0,f.jsx)(h.A,(0,a.A)({},e))}},"function"===typeof e?e({interceptors:r.interceptors,RULES:r.RULES}):e))}},64674(){},65176(){},70188(e,t,n){"use strict";n.d(t,{A:()=>l});var a=n(52526),r=n(80711),s=n(21649);const l=(0,a.createWithIntlProvider)({defaultLocale:"zh-CN",messages:{"zh-CN":r.default,"en-US":s.default},namespace:"form-info"})},75363(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});const a=e=>({"en-US":()=>n.e(9431).then(n.bind(n,9431)),"zh-CN":()=>n.e(1065).then(n.bind(n,81065))}[e]());var r=n(47458),s=n(64671),l=n(55199),o=n(83136),i=n.n(o);const c="style_helper-guide__K5xFw__2jD5x",d="style_inner__bMKeU__2jD5x",u="style_content__xTfWZ__2jD5x",p="style_link__93j7O__2jD5x";var m=n(48731),h=n(70579);const g=e=>{let{name:t,className:n}=e;return(0,h.jsx)(r.IntlProvider,{importMessages:a,moduleName:"HelperGuide",children:(0,h.jsx)(m.default,{moduleName:"helperGuide",name:t,children:e=>e&&e.value&&(0,h.jsx)("div",{className:i()(c,n),children:(0,h.jsxs)(l.Space,{className:d,children:[(0,h.jsx)(s.default,{colorful:!0,type:"icon-color-bangzhuyindao"}),(0,h.jsx)("span",{className:u,children:e.content}),e.url&&(0,h.jsxs)(l.Typography.Link,{className:p,href:e.url,target:"_blank",children:["\u67e5\u770b\u5e2e\u52a9",(0,h.jsx)(s.default,{type:"icon-shuangjiantou-right"})]})]})})})})}},76995(e,t,n){"use strict";n.d(t,{A:()=>h});var a=n(89379),r=n(53986),s=n(98434),l=n(52526),o=n(83799),i=n(83136),c=n.n(i),d=n(47094),u=n(70579);const p=["className","withDecorator","footerButtons","formProps","cancelText","saveText","autoClose"],m=["onSubmit","key"],h=e=>{let{className:t,withDecorator:n,footerButtons:i,formProps:h,cancelText:g,saveText:x,autoClose:f=!0}=e,A=(0,r.A)(e,p);return(0,a.A)((0,a.A)({},A),{},{footerButtons:i||[{children:g||(0,u.jsx)(l.FormattedMessage,{id:"Cancel"}),ButtonComponent:s.CancelButton},{type:"primary",children:x||(0,u.jsx)(l.FormattedMessage,{id:"Save"}),ButtonComponent:s.SubmitButton,autoClose:!1}],withDecorator:(e,t)=>{const s=t=>{const n=Object.assign({},"function"===typeof h?h(t):h),{onSubmit:s,key:l}=n,i=(0,r.A)(n,m);return(0,u.jsx)(o.lV,(0,a.A)((0,a.A)({},i),{},{onSubmit:async function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];!1!==(s&&await s(e,Object.assign({},t),...a))&&f&&t.close()},children:e(t)}))};return"function"===typeof n?n(s,t):s(t)},className:c()(t,d.A["form-outer"])})}},78756(e,t,n){"use strict";n.d(t,{A:()=>o});var a=n(43856),r=n(98434);const{useOnChange:s}=r.hooks,l=e=>s(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(a.IndustrySelectField);l.Field=a.IndustrySelectField,l.Enum=a.IndustrySelectField.Enum;const o=l},80711(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});const a={addText:"\u6dfb\u52a0",addSomeThing:"\u6dfb\u52a0{label}",delText:"\u5220\u9664",selectedTextAdvanced:"\u5df2\u9009",delConfirm:"\u786e\u5b9a\u8981\u5220\u9664\u8fd9\u6761{name}\u5417?",defaultInputPlaceholder:"\u8bf7\u8f93\u5165{label}",defaultSelectPlaceholder:"\u8bf7\u9009\u62e9{label}",startDate:"\u5f00\u59cb\u65e5\u671f",endDate:"\u7ed3\u675f\u65e5\u671f",soFarText:"\u81f3\u4eca",uploadButtonText:"\u70b9\u51fb\u4e0a\u4f20",uploadTips:"\u652f\u6301\u6269\u5c55\u540d{extensionNames},\u5355\u4e2a\u6587\u4ef6\u5927\u5c0f\u4e0d\u8d85\u8fc7{fileSize}M\uff0c\u6700\u591a\u4e0a\u4f20{maxLength}\u4e2a\u9644\u4ef6",yuan:"\u5143",thousand:"\u4e07\u5143",salaryType:"\u85aa\u8d44\u7c7b\u578b",Cancel:"\u53d6\u6d88",Save:"\u4fdd\u5b58",Next:"\u4e0b\u4e00\u6b65",Complete:"\u5b8c\u6210",Crop:"\u88c1\u526a",Preview:"\u9884\u89c8",PictureFormat:"\u56fe\u7247\u683c\u5f0f\uff1a",ImageSize:"\u56fe\u7247\u5c3a\u5bf8\uff1a",ReUpload:"\u91cd\u65b0\u4e0a\u4f20",UploadFailed:"\u4e0a\u4f20\u5931\u8d25{msg}",NotExceeding:"\u4e0d\u8d85\u8fc7{size}M",FileNotExceeding:"\u6587\u4ef6{name}\u4e0d\u80fd\u8d85\u8fc7{size}MB!",Rotate:"\u65cb\u8f6c",ImageFull:"\u5145\u6ee1",Size:"\u5927\u5c0f",Sign:"\u7b7e\u540d",ClickSign:"\u70b9\u51fb\u7b7e\u540d"}},81026(e,t,n){"use strict";n.d(t,{A:()=>o});var a=n(43856),r=n(98434);const{useOnChange:s}=r.hooks,l=e=>s(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(a.FunctionSelectField);l.Field=a.FunctionSelectField,l.Enum=a.FunctionSelectField.Enum;const o=l},83230(e,t,n){"use strict";n.d(t,{A:()=>o});var a=n(98434),r=n(43856);const{useOnChange:s}=a.hooks,l=e=>s(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(r.CascaderField);l.Field=r.CascaderField,l.createTreeUtils=r.createTreeUtils;const o=l},83799(e,t,n){"use strict";n.d(t,{NI:()=>q,TQ:()=>m.A,JL:()=>B,eu:()=>_.A,vx:()=>h.A,lr:()=>te,s3:()=>ne,lV:()=>l.A,d4:()=>g.A,ZN:()=>x.A,pd:()=>Y,YI:()=>J,h2:()=>Q,F0:()=>f.A,go:()=>A.default,tt:()=>s.Rate,lu:()=>j.A,l6:()=>Z,Ap:()=>s.Slider,wD:()=>V,eM:()=>W,kx:()=>H,Pg:()=>G,dO:()=>s.Switch,EY:()=>T,fs:()=>$,AG:()=>ee,f7:()=>K,w5:()=>b.A,_O:()=>v.A,nk:()=>ae});var a=n(89379),r=n(53986),s=n(98434),l=n(85696),o=n(52526),i=n(73884),c=n(30891),d=n(47094),u=n(30096),p=n(34643),m=n(1904),h=n(83230),g=n(81026),x=n(78756),f=n(92328),A=n(2842),v=n(89099),_=n(96339),j=n(36972),y=n(15209),b=n(56259),S=n(55199),N=n(10986),C=n.n(N),F=n(70579);const w=["children"],{useDecorator:I}=s.hooks,P=e=>{let{children:t}=e,n=(0,r.A)(e,w);const[s]=C()(n);return(0,F.jsxs)(S.Typography.Text,(0,a.A)((0,a.A)({},n),{},{children:[(0,F.jsx)("div",{style:{height:0,width:0,overflow:"hidden"},children:(0,F.jsx)(S.Input,{value:s})}),t||s]}))},D=e=>I(e)(P);D.Field=P;const T=D;var M=n(45053),k=n(70188);const O=["placeholder","label"],R=["placeholder","label","className"],E=["placeholder","label"],L=["placeholder","label","soFarText"],z=e=>{const t=(0,k.A)((0,i.forwardRef)((t,n)=>{let{placeholder:s,label:l}=t,i=(0,r.A)(t,O);const{formatMessage:c}=(0,o.useIntl)();return(0,F.jsx)(e,(0,a.A)((0,a.A)({},i),{},{ref:n,label:l,placeholder:s||c({id:"defaultInputPlaceholder"},{label:l})}))}));return Object.keys(e).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(n=>{t[n]=e[n]}),t},U=e=>{const t=(0,k.A)((0,i.forwardRef)((t,n)=>{let{placeholder:s,label:l}=t,i=(0,r.A)(t,E);const{formatMessage:c}=(0,o.useIntl)();return(0,F.jsx)(e,(0,a.A)((0,a.A)({},i),{},{ref:n,label:l,placeholder:s||c({id:"defaultSelectPlaceholder"},{label:l})}))}));return Object.keys(e).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(n=>{t[n]=e[n]}),t},B=U(u.Ay),V=U(p.Ay),W=U(p.eM),G=U(p.Pg),H=U(p.kx),q=U(m.N),Q=z(y.A),Y=z(s.Input);Y.Password=z(s.Input.Password);const $=(X=s.TextArea,(0,k.A)(e=>{let{placeholder:t,label:n,className:s}=e,l=(0,r.A)(e,R);const{formatMessage:i}=(0,o.useIntl)();return(0,F.jsx)("div",{className:d.A["textarea-wrapped-component"],children:(0,F.jsx)(X,(0,a.A)((0,a.A)({},l),{},{label:n,placeholder:t||i({id:"defaultInputPlaceholder"},{label:n})}))})}));var X;const Z=U(s.Select),J=z(s.InputNumber),K=U(s.TreeSelect),ee=U(s.TimePicker);ee.RangePicker=U(s.TimePicker.RangePicker);const te=U(s.DatePicker);te.MonthPicker=U(s.DatePicker.MonthPicker),te.RangePicker=U(s.DatePicker.RangePicker),te.WeekPicker=U(s.DatePicker.WeekPicker);const ne=e=>{let{placeholder:t,label:n,soFarText:l}=e,i=(0,r.A)(e,L);const{formatMessage:c}=(0,o.useIntl)({moduleName:"FormInfo"});return(0,F.jsx)(s.DatePickerToday,(0,a.A)((0,a.A)({},i),{},{label:n,placeholder:[c({id:"startDate"}),c({id:"endDate"})],soFarText:l||c({id:"soFarText"})}))},ae=Object.assign({},s,{Input:Y,InputUpperCase:Q,TextArea:$,Select:Z,InputNumber:J,TreeSelect:K,TimePicker:ee,DatePicker:te,DatePickerToday:ne,Form:l.A,FormItem:c.A,AdvancedSelect:B,SuperSelect:V,SuperSelectTableList:W,SuperSelectUser:G,SuperSelectTree:H,AddressSelect:m.A,AddressInput:q,MoneyInput:f.A,PhoneNumber:A.default,Cascader:h.A,FunctionSelect:g.A,IndustrySelect:x.A,TypeDateRangePicker:b.A,Upload:v.A,Avatar:_.A,SalaryInput:j.A,Text:T,Rate:s.Rate,Switch:s.Switch,Slider:s.Slider,ErrorTip:M.A})},85696(e,t,n){"use strict";n.d(t,{A:()=>f});var a=n(89379),r=n(53986),s=n(73884),l=n(72752),o=n(33097),i=n.n(o),c=n(64261),d=n(46237),u=n(27315),p=n(46732),m=(n(39825),n(70188)),h=n(70579);const g=["helperGuideName","lang"],x=e=>{let{children:t}=e;const[n,a]=(0,s.useState)(!1),r=(0,l.usePreset)(),o=(0,l.useGlobalValue)("locale"),d=i()(r,"formInfo",{});return(0,s.useEffect)(()=>{Promise.resolve((0,c.A)(d,{locale:o})).then(()=>{a(!0)})},[d,o]),n?(0,h.jsx)(s.Fragment,{children:t},o):null},f=(0,m.A)((0,s.forwardRef)((e,t)=>{let{helperGuideName:n,lang:s}=e,l=(0,r.A)(e,g);return(0,h.jsx)(d.Ay,{value:s,children:(0,h.jsx)(p.K,{value:n,children:(0,h.jsx)(x,{children:(0,h.jsx)(u.Form,(0,a.A)((0,a.A)({},l),{},{ref:t}))})})})}))},89099(e,t,n){"use strict";n.d(t,{A:()=>C});var a=n(89379),r=n(53986),s=n(55199),l=n(83136),o=n.n(l),i=n(10986),c=n.n(i);const d="style_upload__t422Q__2jD5x",u="style_upload-list__Q9HDc__2jD5x",p="style_tips__3Gpnu__2jD5x";var m=n(34699),h=n(98434),g=n(47458),x=n(1488),f=n.n(x),A=n(17508),v=n(55431),_=n(70579);const j=["className","fileSize","maxLength","multiple","size","accept","children","renderTips","showUploadList","onSave","ossUpload","onUpload","getPermission","concurrentCount"],y=["interceptor"],{useOnChange:b}=h.hooks,S=(0,g.createWithIntl)({importMessages:v.A,moduleName:"FormInfo"})(e=>{const{formatMessage:t}=(0,g.useIntl)({moduleName:"FormInfo"}),n=Object.assign({},{defaultValue:[],children:t({id:"uploadButtonText"}),accept:[".pdf",".jpg",".png",".jpeg",".doc",".docx",".xls",".xlsx",".html",".msg",".eml",".zip"],renderTips:e=>e,multiple:!0,showUploadList:!0,maxLength:10,fileSize:30,concurrentCount:10},e),{className:l,fileSize:i,maxLength:h,multiple:x,size:v,accept:y,children:b,renderTips:S,showUploadList:N,onSave:C,ossUpload:F,onUpload:w,getPermission:I,concurrentCount:P}=n,D=(0,r.A)(n,j),[T,M]=c()(D),k=T||[],{fileList:O,onFileSelected:R}=(0,A.lN)({multiple:x,onSave:C,onUpload:F||w,fileSize:i,maxLength:h,value:k,onChange:M,concurrentCount:P}),E=[...O,...k],L=S(t({id:"uploadTips"},{extensionNames:y.map(e=>e.replace(/^\./,"")).join(","),maxLength:h,fileSize:i}),{fileSize:i,maxLength:h,accept:y});return(0,_.jsxs)(s.Space,{direction:"vertical",children:[(0,_.jsxs)(s.Flex,{align:"start",gap:8,vertical:!0,children:[(0,_.jsx)(A.Zi,(0,a.A)((0,a.A)({},f()(D,["value","onChange"])),{},{size:v,multiple:x,accept:y,className:o()(d,l),onChange:R,children:b})),L&&(0,_.jsx)("div",{className:p,children:L})]}),N&&E.length>0&&(0,_.jsx)(m.List,{className:u,dataSource:E,infoItemRenders:[],getPermission:I||(e=>"delete"===e),apis:{onDelete:e=>{const t=k.slice(0),n=t.indexOf(e);n>-1&&t.splice(n,1),M(t)}}})]})}),N=e=>{let{interceptor:t="file-format"}=e,n=(0,r.A)(e,y);return b((0,a.A)({interceptor:t},n))(S)};N.Field=S;const C=N},92328(e,t,n){"use strict";n.d(t,{A:()=>b});var a=n(89379),r=n(53986),s=n(10986),l=n.n(s),o=n(98434),i=n(55199),c=n(69484);const d="style_money-input__Pyur7__2jD5x",u="style_money-description__9pFk4__2jD5x";var p=n(83136),m=n.n(p),h=n(34677),g=n.n(h),x=n(73884),f=n(70579);const A=["chineseEmpty","className","showError","errorDesc","transformMoneyToChinese","onBlur","moneyFormat"],{isNotEmpty:v}=o.util||o.formUtils,{useOnChange:_}=o.hooks,j=e=>{let{chineseEmpty:t,className:n,showError:s,errorDesc:o,transformMoneyToChinese:p,onBlur:h,moneyFormat:_}=e,j=(0,r.A)(e,A);const[y,b]=(0,x.useState)(""),[S,N]=l()(j),C=g()({controls:!1,precision:2,addonAfter:"\u5143"},j,{max:v(j.max)?j.max>c.e?c.e:j.max:c.e});return(0,f.jsxs)("div",{className:m()(n,"money-input",d),children:[(0,f.jsx)(i.InputNumber,(0,a.A)((0,a.A)({},C),{},{status:y,formatter:_?e=>"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):null,parser:e=>{const t=_?null===e||void 0===e?void 0:e.replace(/\$\s?|(,*)/g,""):e;return v(t)?(Number(t)>Number(C.max)||v(C.min)&&Number(t)<Number(C.min))&&b("error"):b(""),v(t)?Number(t):null},onChange:e=>{N(e)},onBlur:e=>{h&&h(e,b)}})),(0,f.jsx)("div",{className:m()(u),children:"error"===y&&s?o:v(S)?(0,c.A)(p?p(S):S):t})]})},y=e=>_(Object.assign({placeholder:"\u8bf7\u8f93\u5165".concat(e.label||"")},e))(j);y.Field=j,y.toChineseCharacter=c.A;const b=y},94005(e,t,n){"use strict";n.d(t,{$X:()=>N,Ay:()=>S,Wp:()=>C});var a=n(89379),r=n(53986),s=n(3382),l=n(73884),o=n(98434),i=n(73025),c=n(47458),d=n(47094),u=n(55431),p=n(55199),m=n(76995),h=n(70579);const g=["footerButtons","cancelText","completeText","nextText","items","withDecorator","autoClose"],x=["formProps","title"],f=["onSubmit"],A=["formProps"],v=["children","stepSection"],_=["modalProps"],j="FormInfo",y=e=>{let{items:t,children:n}=e;const[a,r]=(0,l.useState)(0);return n({currentIndex:a,setCurrentIndex:r,stepCacheRef:(0,l.useRef)({}),isLastStep:a===t.length-1,currentProps:Object.assign({},t[a])})},b=e=>{let{footerButtons:t,cancelText:n,completeText:a,nextText:s,items:l,withDecorator:i,autoClose:_=!0}=e,b=(0,r.A)(e,g);return(0,m.A)(Object.assign({},b,{footerButtons:e=>{let{currentIndex:t,isLastStep:r}=e;const{footerButtons:i}=Object.assign({},l[t]);return i||[{children:(0,h.jsx)(c.IntlProvider,{importMessages:u.A,moduleName:j,children:n||(0,h.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:j})}),ButtonComponent:o.CancelButton},{type:"primary",children:(0,h.jsx)(c.IntlProvider,{importMessages:u.A,moduleName:j,children:r?a||(0,h.jsx)(c.FormattedMessage,{id:"Complete",moduleName:j}):s||(0,h.jsx)(c.FormattedMessage,{id:"Next",moduleName:j})}),ButtonComponent:o.SubmitButton,autoClose:!1}]},withDecorator:(e,t)=>{const n=t=>(0,h.jsx)(y,{items:l,children:n=>{var a;let{currentIndex:s,isLastStep:o,setCurrentIndex:i,currentProps:c,stepCacheRef:u}=n;const{formProps:m,title:g}=c,A=(0,r.A)(c,x),v="function"===typeof m?m(t):m,{onSubmit:j}=v,y=(0,r.A)(v,f),b=Object.assign({},y.data,null===(a=u.current[s])||void 0===a?void 0:a.data);return e(Object.assign({},t,A,{currentIndex:s,isLastStep:o,setCurrentIndex:i,stepCacheRef:u,stepSection:(0,h.jsx)(p.Steps,{className:d.A["form-step-section"],current:s,items:l.map(e=>{let{title:t}=e;return{title:t}})}),formProps:Object.assign({},y,{key:s,data:b,onSubmit:async function(e){u.current[s]={data:e};for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];const l=j&&await j(e,Object.assign({},t,{currentIndex:s,isLastStep:o,setCurrentIndex:i,currentProps:c,stepCacheRef:u}),...a);return u.current[s]=Object.assign({},u.current[s],{output:l}),_&&!o&&!1!==l&&i(e=>e+1),!!o&&l}})}))}});return"function"===typeof i?i(n,t):n(t)},formProps:e=>{let{formProps:t}=e,n=(0,r.A)(e,A);return Object.assign({},n,t)},children:e=>{let{children:t,stepSection:n}=e,a=(0,r.A)(e,v);return(0,h.jsxs)(p.Flex,{vertical:!0,gap:24,children:[(0,h.jsx)(p.Flex,{justify:"center",children:n}),"function"===typeof t?t(a):t]})}}))},S=e=>(0,h.jsx)(s.default,(0,a.A)({},b(Object.assign({},e,{className:d.A["form-modal"]})))),N=()=>{const e=(0,s.useModal)();return t=>e(b(Object.assign({},t,{className:d.A["form-modal"]})))},C=e=>{const t=N();if(!e.api){const{modalProps:n}=e,s=(0,r.A)(e,_);return(0,h.jsx)(p.Button,(0,a.A)((0,a.A)({},s),{},{onClick:()=>{t(n)}}))}return(0,h.jsx)(i.A,(0,a.A)((0,a.A)({},e),{},{modalFunc:t}))}},96252(e,t,n){"use strict";n.r(t),n.d(t,{AddressInput:()=>x.NI,AddressSelect:()=>x.TQ,AdvancedSelect:()=>x.JL,Avatar:()=>x.eu,Cascader:()=>x.vx,DatePicker:()=>x.lr,DatePickerToday:()=>x.s3,ErrorTip:()=>m.A,Form:()=>u.A,FormApiButton:()=>o.A,FormDrawer:()=>d.Ay,FormDrawerButton:()=>d.WJ,FormItem:()=>p.A,FormModal:()=>i.Ay,FormModalButton:()=>i.W6,FormStepModal:()=>c.Ay,FormStepModalButton:()=>c.Wp,FormSteps:()=>s.FormSteps,FunctionSelect:()=>x.d4,IndustrySelect:()=>x.ZN,Input:()=>x.pd,InputNumber:()=>x.YI,InputUpperCase:()=>x.h2,List:()=>s.List,MoneyInput:()=>x.F0,MultiField:()=>s.MultiField,PhoneNumber:()=>x.go,Rate:()=>x.tt,SalaryInput:()=>x.lu,Select:()=>x.l6,SelectInnerInput:()=>f.A,Slider:()=>x.Ap,SuperSelect:()=>x.wD,SuperSelectTableList:()=>x.eM,SuperSelectTree:()=>x.kx,SuperSelectUser:()=>x.Pg,Switch:()=>x.dO,TableList:()=>s.TableList,Text:()=>x.EY,TextArea:()=>x.fs,TimePicker:()=>x.AG,TreeSelect:()=>x.f7,TypeDateRangePicker:()=>x.w5,Upload:()=>x._O,default:()=>A,fieldDecorator:()=>r.E,fields:()=>r.A,formModule:()=>x.nk,useFormDrawer:()=>d.Xy,useFormModal:()=>i.Vl,useFormStepModal:()=>c.$X});var a=n(64261),r=n(5089),s=n(27315),l=n.n(s),o=n(35774),i=n(5995),c=n(94005),d=n(48221),u=n(85696),p=n(30891),m=n(45053),h=n(98434),g={};for(const v in h)["default","SelectInnerInput","Form","FormItem","ErrorTip","fields","fieldDecorator","List","TableList","FormApiButton","FormModal","useFormModal","FormModalButton","FormStepModal","FormSteps","useFormStepModal","FormStepModalButton","FormDrawer","useFormDrawer","FormDrawerButton","MultiField"].indexOf(v)<0&&(g[v]=()=>h[v]);n.d(t,g);var x=n(83799),f=n(18936);(0,a.A)(),l().fields=r.A,l().List=s.List,l().TableList=s.TableList,l().FormApiButton=o.A,l().FormModal=i.Ay,l().FormSteps=s.FormSteps,l().useFormModal=i.Vl,l().FormModalButton=i.W6,l().FormStepModal=c.Ay,l().useFormStepModal=c.$X,l().FormStepModalButton=c.Wp,l().FormDrawer=d.Ay,l().useFormDrawer=d.Xy,l().FormDrawerButton=d.WJ,l().Form=u.A,l().FormItem=p.A,l().ErrorTip=m.A,l().SubmitButton=h.SubmitButton,l().CancelButton=h.CancelButton,l().fieldDecorator=r.E,l().MultiField=s.MultiField,l().useFormContext=h.useFormContext,l().hooks=h.hooks,l().widget=h.widget,l().utils=h.utils,l().formUtils=h.formUtils;const A=l()},96339(e,t,n){"use strict";n.d(t,{A:()=>W});var a=n(53986),r=n(89379),s=n(73884),l=n(17508),o=n(40438),i=n(72752),c=n(3382),d=n(64671),u=n(55199),p=n(53202),m=n.n(p),h=n(33097),g=n.n(h),x=n(83136),f=n.n(x),A=n(51941),v=n(98434),_=n(34677),j=n.n(_);const y="style_upload-btn__-6XtP__2jD5x",b="style_square__UPkfA__2jD5x",S="style_is-loading__wx6Pd__2jD5x",N="style_upload-btn-tips__YtxWz__2jD5x",C="style_drop-tips__N-v59__2jD5x",F="style_preview-area__aV3SN__2jD5x";var w=n(18411),I=n(47458),P=n(55431),D=n(70579);const T=["image","width","height","borderRadius","preview","fileSize","accept","renderTips","getApi","shape","border"],M=["image","width","height","borderRadius","getApi","preview","fileSize","accept","renderTips","border","dropModalSize"],{useOnChange:k}=v.hooks,O=o.default.Avatar,R="FormInfo",E=(0,l.Ay)(e=>{let{className:t,icon:n,loading:a,value:s,gender:l,width:o,height:i,children:c,shape:p,defaultAvatar:m,displayAvatar:h,apis:x}=e;const A=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(O,(0,r.A)((0,r.A)({},Object.assign({},"function"===typeof h?h(s):{id:g()(s,"id")})),{},{gender:l,width:64*o/i,height:64,shape:p,defaultAvatar:m,apis:x})),(0,D.jsx)("div",{className:N,children:n||(0,D.jsx)(d.default,{type:"icon-chuanzhaopian",size:16})}),c]});return(0,D.jsx)("div",{className:f()(t,y,{[S]:a,[b]:"square"===p||!(o&&o===i)}),style:{width:64*o/i},children:a?(0,D.jsx)(u.Spin,{children:A}):A})}),L=e=>{let t=e.split(","),n=t[1].substring(0,t[1].length-2),a=t[0].match(/:(.*?);/)[1],r=atob(n),s=r.length,l=new Uint8Array(s);for(;s--;)l[s]=r.charCodeAt(s);return new Blob([l],{type:a})},z=(0,s.forwardRef)((e,t)=>{let{image:n,width:o,height:i,borderRadius:c,preview:p,fileSize:h,accept:g,renderTips:x,getApi:f,shape:v,border:_=1}=e,j=(0,a.A)(e,T);const y=(0,I.useIntl)({moduleName:R}),[b,S]=(0,s.useState)(0),N=(0,s.useRef)(null),[w,P]=(0,s.useState)(n),[M,k]=(0,s.useState)(1),[O,E]=(0,s.useState)(0),[z,U]=(0,s.useState)(""),B=(0,s.useRef)(null);(0,s.useLayoutEffect)(()=>{S(2*N.current.clientWidth/3)},[]),f({getImage:()=>{const e=B.current.getImage(),t=document.createElement("canvas"),n=t.getContext("2d");return t.width=o,t.height=i,n.drawImage(e,0,0,t.width,t.height),new window.File([L(t.toDataURL())],w.name,{type:w.type})}});const V=()=>{U(B.current.getImage().toDataURL())},W=(0,A.useDebouncedCallback)(V,500);return(0,D.jsx)("div",{ref:N,children:(0,D.jsxs)(u.Row,{wrap:!1,align:"middle",children:[(0,D.jsx)(u.Col,{span:p?16:24,children:b&&(0,D.jsxs)(u.Space,{direction:"vertical",children:[(0,D.jsx)(m(),(0,r.A)((0,r.A)({},j),{},{ref:B,image:w,scale:M,rotate:O,width:b-2*_,height:i*b/o-2*_*i/o,border:_,color:[0,0,0,.6],borderRadius:c*b/o,onImageReady:V,onImageChange:W})),(0,D.jsx)("div",{className:C,children:x("".concat(y.formatMessage({id:"PictureFormat"})).concat(g.map(e=>e.replace(/^\./,"")).join(" ")," ").concat(y.formatMessage({id:"ImageSize"})).concat(y.formatMessage({id:"NotExceeding"},{size:h})),{accept:g,fileSize:h})}),(0,D.jsxs)(u.Row,{gutter:14,align:"middle",children:[(0,D.jsx)(u.Col,{children:(0,D.jsx)(u.Tooltip,{title:y.formatMessage({id:"Rotate"}),placement:"bottom",children:(0,D.jsx)(d.default,{type:"icon-xuanzhuan",onClick:()=>{E(e=>(e-90)%360)}})})}),(0,D.jsx)(u.Col,{children:(0,D.jsx)(u.Tooltip,{title:y.formatMessage({id:"ImageFull"}),placement:"bottom",children:(0,D.jsx)(d.default,{type:"icon-chongman",onClick:()=>{k(1)}})})}),(0,D.jsx)(u.Col,{flex:1,children:(0,D.jsx)(u.Slider,{tooltip:{placement:"bottom",formatter:()=>y.formatMessage({id:"Size"})},value:M,step:.05,min:.2,max:3,onChange:k})}),(0,D.jsx)(u.Col,{children:(0,D.jsx)(l.FI,{accept:g,onChange:e=>{e[0].size>1024*h*1024?u.message.error(y.formatMessage({id:"FileNotExceeding"},{name:e[0].name,size:h})):(E(0),k(1),P(e[0]))},children:y.formatMessage({id:"ReUpload"})})})]})]})}),p&&(0,D.jsx)(u.Col,{span:8,children:(0,D.jsx)("div",{className:F,children:(0,D.jsxs)(u.Space,{direction:"vertical",children:[(0,D.jsx)(u.Avatar,{src:z,shape:v,style:{width:b/2-36,height:(b/2-36)*i/o}}),(0,D.jsx)("div",{style:{textAlign:"center"},children:y.formatMessage({id:"Preview"})})]})})})]})})}),U=()=>{const e=(0,c.useModal)();return t=>{const n=Object.assign({},{title:"\u7f16\u8f91\u5934\u50cf",width:200,height:200,borderRadius:"circle"===t.shape&&t.width&&t.width===t.height?t.width/2:2,preview:!0},t),{image:s,width:l,height:o,borderRadius:i,getApi:c,preview:d,fileSize:u,accept:p,renderTips:m,border:h,dropModalSize:g}=n,x=(0,a.A)(n,M);return e((0,r.A)((0,r.A)({},x),{},{size:g,children:(0,D.jsx)(z,{preview:d,fileSize:u,accept:p,getApi:c,renderTips:m,width:l,height:o,shape:"circle"===t.shape&&t.width&&t.width===t.height?"circle":"square",borderRadius:i,image:s,border:h,scale:1,rotate:0})}))}},B=(0,I.createWithIntl)({importMessages:P.A,moduleName:"FormInfo"})(e=>{var t;let{value:n,gender:a,fileSize:r=2,accept:l=[".jpg",".png",".jpeg"],openEditor:o=!0,apis:c,renderTips:d=e=>e,onChange:p,shape:m="circle",width:h=200,height:g=200,title:x=(0,D.jsx)(I.IntlProvider,{importMessages:P.A,moduleName:"FormInfo",children:(0,D.jsx)(I.FormattedMessage,{id:"Crop",moduleName:"FormInfo"})}),border:f=1,icon:A,dropModalSize:v="small",defaultAvatar:_=w.A,displayAvatar:y}=e;const[b,S]=(0,s.useState)(!1),{apis:N}=(0,i.usePreset)(),C=j()({},N,c),F=C.ossUpload||C.upload||(null===(t=C.file)||void 0===t?void 0:t.upload),T=(0,s.useRef)(null),M=U(),k=(0,I.useIntl)({moduleName:R});return(0,D.jsx)(E,{value:n,gender:a,accept:l,width:h,height:g,shape:m,icon:A,loading:b,defaultAvatar:_,displayAvatar:y,apis:C,onChange:e=>{if(e[0].size>1024*r*1024)return void u.message.error(k.formatMessage({id:"FileNotExceeding"},{name:e[0].name,size:r}));const t=e=>(S(!0),F({file:e}).then(e=>{let{data:t}=e;0===t.code?p(t.data):u.message.error(k.formatMessage({id:"UploadFailed"},{msg:t.msg?":"+t.msg:""}))}).finally(()=>{S(!1)}));o?M({image:e[0],width:h,height:g,title:x,shape:m,border:f,dropModalSize:v,getApi:e=>T.current=e,fileSize:r,accept:l,renderTips:d,onConfirm:()=>{t(T.current.getImage())}}):t(e[0])}})}),V=e=>k(e)(B);V.Field=B,V.useDropModal=U;const W=V},99140(e,t,n){var a=n(37303);e.exports=function(e){var t=a(e),n=t%1;return t===t?n?t-n:t:0}}}]);
|
|
2
|
+
//# sourceMappingURL=9414.ad7c0c83.chunk.js.map
|