@kne-components/components-core 0.4.22 → 0.4.24
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 +89 -89
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/{1996.2f2fbea2.chunk.css → 1996.422855a0.chunk.css} +2 -2
- package/build/static/css/{1996.2f2fbea2.chunk.css.map → 1996.422855a0.chunk.css.map} +1 -1
- package/build/static/css/2004.a1a1be7f.chunk.css +2 -0
- package/build/static/css/{2004.0f210950.chunk.css.map → 2004.a1a1be7f.chunk.css.map} +1 -1
- package/build/static/css/206.93c69157.chunk.css +2 -0
- package/build/static/css/{206.af8cfe29.chunk.css.map → 206.93c69157.chunk.css.map} +1 -1
- package/build/static/css/254.a2f9b6b9.chunk.css +2 -0
- package/build/static/css/{254.e2c8944d.chunk.css.map → 254.a2f9b6b9.chunk.css.map} +1 -1
- package/build/static/css/2628.20f04289.chunk.css +2 -0
- package/build/static/css/{2628.dd5cbc65.chunk.css.map → 2628.20f04289.chunk.css.map} +1 -1
- package/build/static/css/3404.d66cfab4.chunk.css +2 -0
- package/build/static/css/{3404.b7a4f15d.chunk.css.map → 3404.d66cfab4.chunk.css.map} +1 -1
- package/build/static/css/3652.0e098e73.chunk.css +2 -0
- package/build/static/css/{3652.ab33b380.chunk.css.map → 3652.0e098e73.chunk.css.map} +1 -1
- package/build/static/css/{3771.e5e1ce39.chunk.css → 3771.1fe138fd.chunk.css} +2 -2
- package/build/static/css/{3771.e5e1ce39.chunk.css.map → 3771.1fe138fd.chunk.css.map} +1 -1
- package/build/static/css/{3790.3ba5ef7b.chunk.css → 3790.4dbfc1ca.chunk.css} +2 -2
- package/build/static/css/{3790.3ba5ef7b.chunk.css.map → 3790.4dbfc1ca.chunk.css.map} +1 -1
- package/build/static/css/4244.6c2a3d31.chunk.css +2 -0
- package/build/static/css/{4244.ae7d31b6.chunk.css.map → 4244.6c2a3d31.chunk.css.map} +1 -1
- package/build/static/css/{4277.e5b9697b.chunk.css → 4277.e829a541.chunk.css} +2 -2
- package/build/static/css/{4277.e5b9697b.chunk.css.map → 4277.e829a541.chunk.css.map} +1 -1
- package/build/static/css/{4741.0f43ac70.chunk.css → 4741.9c9214df.chunk.css} +2 -2
- package/build/static/css/{4741.0f43ac70.chunk.css.map → 4741.9c9214df.chunk.css.map} +1 -1
- package/build/static/css/5195.059495e0.chunk.css +2 -0
- package/build/static/css/{5195.cea77eec.chunk.css.map → 5195.059495e0.chunk.css.map} +1 -1
- package/build/static/css/{6763.a52b459a.chunk.css → 6763.8bb6c20d.chunk.css} +2 -2
- package/build/static/css/{6763.a52b459a.chunk.css.map → 6763.8bb6c20d.chunk.css.map} +1 -1
- package/build/static/css/6980.05915171.chunk.css +12 -0
- package/build/static/css/{6980.f825e058.chunk.css.map → 6980.05915171.chunk.css.map} +1 -1
- package/build/static/css/7227.73bafc7f.chunk.css +2 -0
- package/build/static/css/{7227.826403e5.chunk.css.map → 7227.73bafc7f.chunk.css.map} +1 -1
- package/build/static/css/{760.1727f4a1.chunk.css → 760.80d2aeab.chunk.css} +2 -2
- package/build/static/css/{760.1727f4a1.chunk.css.map → 760.80d2aeab.chunk.css.map} +1 -1
- package/build/static/css/{8593.4c75de6f.chunk.css → 8593.d7743a78.chunk.css} +2 -2
- package/build/static/css/{8593.4c75de6f.chunk.css.map → 8593.d7743a78.chunk.css.map} +1 -1
- package/build/static/css/9556.d105a0cc.chunk.css +2 -0
- package/build/static/css/{9556.7a0499e8.chunk.css.map → 9556.d105a0cc.chunk.css.map} +1 -1
- package/build/static/css/9772.68f293c5.chunk.css +2 -0
- package/build/static/css/{9772.806a63cb.chunk.css.map → 9772.68f293c5.chunk.css.map} +1 -1
- package/build/static/js/{1353.b48f2b94.chunk.js → 1353.55725dc0.chunk.js} +3 -3
- package/build/static/js/1353.55725dc0.chunk.js.map +1 -0
- package/build/static/js/{196.5a15891f.chunk.js → 196.e26406d2.chunk.js} +1 -1
- package/build/static/js/1996.3abe5364.chunk.js +2 -0
- package/build/static/js/{1996.e4b4b038.chunk.js.map → 1996.3abe5364.chunk.js.map} +1 -1
- package/build/static/js/{2004.2b4cc68b.chunk.js → 2004.40e3f90a.chunk.js} +3 -3
- package/build/static/js/{2004.2b4cc68b.chunk.js.map → 2004.40e3f90a.chunk.js.map} +1 -1
- package/build/static/js/206.25b3a621.chunk.js +2 -0
- package/build/static/js/{206.3eb7453f.chunk.js.map → 206.25b3a621.chunk.js.map} +1 -1
- package/build/static/js/254.a81b8bfe.chunk.js +2 -0
- package/build/static/js/254.a81b8bfe.chunk.js.map +1 -0
- package/build/static/js/2628.2ec700e3.chunk.js +2 -0
- package/build/static/js/{2628.b4314a15.chunk.js.map → 2628.2ec700e3.chunk.js.map} +1 -1
- package/build/static/js/{3404.866eaec9.chunk.js → 3404.28259902.chunk.js} +3 -3
- package/build/static/js/{3404.866eaec9.chunk.js.map → 3404.28259902.chunk.js.map} +1 -1
- package/build/static/js/{3652.c477ee6f.chunk.js → 3652.b60ffac0.chunk.js} +2 -2
- package/build/static/js/{3652.c477ee6f.chunk.js.map → 3652.b60ffac0.chunk.js.map} +1 -1
- package/build/static/js/3771.a15cb60c.chunk.js +2 -0
- package/build/static/js/{3771.4028e0af.chunk.js.map → 3771.a15cb60c.chunk.js.map} +1 -1
- package/build/static/js/{3790.61445add.chunk.js → 3790.10e5c8e8.chunk.js} +2 -2
- package/build/static/js/{3790.61445add.chunk.js.map → 3790.10e5c8e8.chunk.js.map} +1 -1
- package/build/static/js/{3856.63e94062.chunk.js → 3856.5331ced2.chunk.js} +2 -2
- package/build/static/js/{3856.63e94062.chunk.js.map → 3856.5331ced2.chunk.js.map} +1 -1
- package/build/static/js/4244.c688530f.chunk.js +2 -0
- package/build/static/js/{4244.65a942be.chunk.js.map → 4244.c688530f.chunk.js.map} +1 -1
- package/build/static/js/4277.a9f3379e.chunk.js +2 -0
- package/build/static/js/{4277.dfa8352d.chunk.js.map → 4277.a9f3379e.chunk.js.map} +1 -1
- package/build/static/js/4474.b7eb9857.chunk.js +2 -0
- package/build/static/js/4474.b7eb9857.chunk.js.map +1 -0
- package/build/static/js/5195.c69df3e8.chunk.js +2 -0
- package/build/static/js/{5195.c07262c7.chunk.js.map → 5195.c69df3e8.chunk.js.map} +1 -1
- package/build/static/js/6763.c50bb0e8.chunk.js +2 -0
- package/build/static/js/{6763.45bd29ac.chunk.js.map → 6763.c50bb0e8.chunk.js.map} +1 -1
- package/build/static/js/{6980.bb2e9f1b.chunk.js → 6980.0549a5db.chunk.js} +2 -2
- package/build/static/js/{6980.bb2e9f1b.chunk.js.map → 6980.0549a5db.chunk.js.map} +1 -1
- package/build/static/js/{7227.1d97ec81.chunk.js → 7227.4c6d5b84.chunk.js} +3 -3
- package/build/static/js/{7227.1d97ec81.chunk.js.map → 7227.4c6d5b84.chunk.js.map} +1 -1
- package/build/static/js/{760.1cbe172b.chunk.js → 760.2bd71e6c.chunk.js} +2 -2
- package/build/static/js/{760.1cbe172b.chunk.js.map → 760.2bd71e6c.chunk.js.map} +1 -1
- package/build/static/js/{8593.bf3982c4.chunk.js → 8593.956c6697.chunk.js} +2 -2
- package/build/static/js/{8593.bf3982c4.chunk.js.map → 8593.956c6697.chunk.js.map} +1 -1
- package/build/static/js/{9556.64b40a95.chunk.js → 9556.78850762.chunk.js} +3 -3
- package/build/static/js/{9556.64b40a95.chunk.js.map → 9556.78850762.chunk.js.map} +1 -1
- package/build/static/js/{9772.3a3f03d3.chunk.js → 9772.03135f7d.chunk.js} +2 -2
- package/build/static/js/{9772.3a3f03d3.chunk.js.map → 9772.03135f7d.chunk.js.map} +1 -1
- package/build/static/js/{main.d57d2b8b.js → main.41d5ae94.js} +2 -2
- package/build/static/js/{main.d57d2b8b.js.map → main.41d5ae94.js.map} +1 -1
- package/package.json +2 -2
- package/build/static/css/2004.0f210950.chunk.css +0 -2
- package/build/static/css/206.af8cfe29.chunk.css +0 -2
- package/build/static/css/254.e2c8944d.chunk.css +0 -2
- package/build/static/css/2628.dd5cbc65.chunk.css +0 -2
- package/build/static/css/3404.b7a4f15d.chunk.css +0 -2
- package/build/static/css/3652.ab33b380.chunk.css +0 -2
- package/build/static/css/4244.ae7d31b6.chunk.css +0 -2
- package/build/static/css/5195.cea77eec.chunk.css +0 -2
- package/build/static/css/6980.f825e058.chunk.css +0 -12
- package/build/static/css/7227.826403e5.chunk.css +0 -2
- package/build/static/css/9556.7a0499e8.chunk.css +0 -2
- package/build/static/css/9772.806a63cb.chunk.css +0 -2
- package/build/static/js/1353.b48f2b94.chunk.js.map +0 -1
- package/build/static/js/1996.e4b4b038.chunk.js +0 -2
- package/build/static/js/206.3eb7453f.chunk.js +0 -2
- package/build/static/js/254.9234ac66.chunk.js +0 -2
- package/build/static/js/254.9234ac66.chunk.js.map +0 -1
- package/build/static/js/2628.b4314a15.chunk.js +0 -2
- package/build/static/js/3771.4028e0af.chunk.js +0 -2
- package/build/static/js/4244.65a942be.chunk.js +0 -2
- package/build/static/js/4277.dfa8352d.chunk.js +0 -2
- package/build/static/js/4474.26f92ce2.chunk.js +0 -2
- package/build/static/js/4474.26f92ce2.chunk.js.map +0 -1
- package/build/static/js/5195.c07262c7.chunk.js +0 -2
- package/build/static/js/6763.45bd29ac.chunk.js +0 -2
- /package/build/static/js/{1353.b48f2b94.chunk.js.LICENSE.txt → 1353.55725dc0.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2004.2b4cc68b.chunk.js.LICENSE.txt → 2004.40e3f90a.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{3404.866eaec9.chunk.js.LICENSE.txt → 3404.28259902.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.1d97ec81.chunk.js.LICENSE.txt → 7227.4c6d5b84.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9556.64b40a95.chunk.js.LICENSE.txt → 9556.78850762.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2723,2908,4277],{17342:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(34581),s=i.n(n);i(46733);const l=s()},19449:(e,t,i)=>{var n=i(94710),s=i(32952),l=i(9096),a=i(54052);e.exports=function(e,t){return function(i,o){var r=a(i)?n:s,c=t?t():{};return r(i,e,l(o,2),c)}}},32520:(e,t,i)=>{var n=i(75816),s=i(9096),l=i(99140),a=Math.max;e.exports=function(e,t,i){var o=null==e?0:e.length;if(!o)return-1;var r=null==i?0:l(i);return r<0&&(r=a(o+r,0)),n(e,s(t,3),r)}},32952:(e,t,i)=>{var n=i(45652);e.exports=function(e,t,i,s){return n(e,function(e,n,l){t(s,e,i(e),l)}),s}},39835:(e,t,i)=>{var n=i(71775),s=i(19449),l=Object.prototype.hasOwnProperty,a=s(function(e,t,i){l.call(e,i)?e[i].push(t):n(e,i,[t])});e.exports=a},45652:(e,t,i)=>{var n=i(94664),s=i(76516)(n);e.exports=s},46733:()=>{},75816:e=>{e.exports=function(e,t,i,n){for(var s=e.length,l=i+(n?1:-1);n?l--:++l<s;)if(t(e[l],l,e))return l;return-1}},76516:(e,t,i)=>{var n=i(6571);e.exports=function(e,t){return function(i,s){if(null==i)return i;if(!n(i))return e(i,s);for(var l=i.length,a=t?l:-1,o=Object(i);(t?a--:++a<l)&&!1!==s(o[a],a,o););return i}}},82723:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n.Content});var n=i(93813)},85855:(e,t,i)=>{e.exports=i(96483)},89384:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>C});var n=i(89379),s=i(55199),l=i(53984),a=i.n(l),o=i(83136),r=i.n(o),c=i(17342),d=i(63743),_=i(64671),u=i(82723);const f={notification:"style_notification__Vv-MM__sfb0Z",list:"style_list__l8KOo__sfb0Z",header:"style_header__3dcv8__sfb0Z",item:"style_item__d92RS__sfb0Z","item-box":"style_item-box__dd-Lk__sfb0Z","index-1":"style_index-1__f97L0__sfb0Z","index-2":"style_index-2__04vAw__sfb0Z","item-box-main":"style_item-box-main__lnSak__sfb0Z","item-title":"style_item-title__mArMd__sfb0Z","level-high":"style_level-high__Uys7Y__sfb0Z","level-middle":"style_level-middle__EewyC__sfb0Z","level-low":"style_level-low__8kVyL__sfb0Z","title-icon":"style_title-icon__1EoAG__sfb0Z","item-subtitle":"style_item-subtitle__xeFJs__sfb0Z","close-btn":"style_close-btn__7qpG3__sfb0Z","is-loading":"style_is-loading__upVL+__sfb0Z","item-content":"style_item-content__8MlsG__sfb0Z","link-outer":"style_link-outer__kegyZ__sfb0Z",link:"style_link__F2CO-__sfb0Z","is-last-item":"style_is-last-item__MytRl__sfb0Z"};var v=i(73884),h=i(39835),m=i.n(h),x=i(85855),b=i.n(x),p=i(96604),g=i.n(p),y=i(81014),j=i(32520),k=i.n(j),Z=i(70579);const w=["high","middle","low"],N=e=>{let{level:t="low",title:i,groupLength:n,subtitle:l,content:a,link:o,id:c,children:v,className:h}=e;const{setGlobal:m}=(0,d.useGlobalContext)("notification"),{apis:x,ajax:b}=(0,d.usePreset)(),{isLoading:p,callback:j}=(0,y.useLoading)(async()=>{var e;const{data:t}=null!==x&&void 0!==x&&null!==(e=x.notification)&&void 0!==e&&e.read?await b(Object.assign({},x.notification.read,{data:{ids:[c]}})):{data:{code:0}};0===t.code&&m(e=>{const t=((null===e||void 0===e?void 0:e.list)||[]).slice(0),i=k()(t,e=>c===e.id);return i>-1&&t.splice(i,1),Object.assign({},e,{list:t})})});return(0,Z.jsxs)("div",{className:r()(f.item,h),style:{"--group-length":Math.min(n,3)||1},children:[n&&n>1&&g()(1,Math.min(n,3)).reverse().map(e=>(0,Z.jsx)("div",{className:r()(f["item-box"],f["index-".concat(e)])},e)),(0,Z.jsxs)("div",{className:r()(f["item-box"],f["item-box-main"]),children:[(0,Z.jsxs)("div",{className:r()(f["item-title"],f["level-".concat(t)]),children:[(0,Z.jsx)(_.default,{className:f["title-icon"],type:"high"===t?"icon-tishi":"icon-daiwochuli"}),(0,Z.jsx)(s.Typography.Text,{ellipsis:!0,children:i})]}),(0,Z.jsxs)("div",{className:f["item-content"],children:[(0,Z.jsxs)("div",{className:f["item-subtitle"],children:[(0,Z.jsx)(s.Typography.Text,{ellipsis:!0,children:l||""}),(0,Z.jsx)(_.default,{className:r()(f["close-btn"],{[f["is-loading"]]:p}),type:"icon-close-thin",onClick:()=>{p||c&&j()}})]}),Array.isArray(a)?(0,Z.jsx)(u.default,{list:a,labelAlign:"auto",size:"small"}):v]}),o&&(0,Z.jsx)("div",{className:f["link-outer"],children:(0,Z.jsx)(y.default,{className:f.link,size:"small",onClick:async()=>{var e;const{data:t}=null!==x&&void 0!==x&&null!==(e=x.notification)&&void 0!==e&&e.read?await b(Object.assign({},x.notification.read,{data:{ids:[c]}})):{data:{code:0}};0===t.code&&window.open(o)},children:"\u67e5\u770b\u8be6\u60c5"})})]})]})},C=e=>{let{itemClassName:t}=e;const{global:i,setGlobal:l}=(0,d.useGlobalContext)("notification"),o=(0,v.useRef)(),{apis:_,ajax:u}=(0,d.usePreset)(),[h,x]=(0,v.useState)(32);(0,v.useEffect)(()=>{var e;o.current&&x(null===(e=o.current)||void 0===e?void 0:e.clientHeight)},[]);const{list:p,expand:g}=Object.assign({},{expand:!1,list:[]},i),j=(0,v.useMemo)(()=>{const e=m()(p,e=>e.level||"low");return w.map(t=>e[t]||[])},[p]);return 0===p.length?null:(0,Z.jsxs)("div",{className:r()({},f.notification,"notification"),style:{"--head-option-height":"".concat(h,"px")},children:[(0,Z.jsx)("div",{ref:o,children:(0,Z.jsxs)(s.Row,{justify:"end",wrap:!1,className:f.header,gutter:8,children:[j.some(e=>e.length>1)&&(0,Z.jsx)(s.Col,{children:(0,Z.jsx)(s.Button,{size:"small",onClick:()=>{l(Object.assign({},i,{expand:!g}))},children:g?"\u5168\u90e8\u6298\u53e0":"\u5168\u90e8\u5c55\u5f00"})}),(0,Z.jsx)(s.Col,{children:(0,Z.jsx)(y.default,{type:"primary",size:"small",onClick:async()=>{var e;const{data:t}=null!==_&&void 0!==_&&null!==(e=_.notification)&&void 0!==e&&e.read?await u(Object.assign({},_.notification.read,{data:{ids:p.map(e=>e.id).filter(e=>!!e)}})):{data:{code:0}};0===t.code&&l(Object.assign({},i,{list:[]}))},children:"\u5168\u90e8\u6e05\u9664"})})]})}),(0,Z.jsx)(c.A,{className:f.list,children:(0,Z.jsx)(a(),{leaveReverse:!0,duration:200,interval:20,children:j.filter(e=>e&&e.length>0).map((e,i)=>{var s;if(g)return e.map((t,s)=>{var l;return t&&(0,Z.jsx)("div",{children:(0,Z.jsx)(N,(0,n.A)((0,n.A)({},Object.assign({},t)),{},{className:r()({[f["is-last-item"]]:+i+1===Math.min(null===(l=j.filter(e=>e&&e.length))||void 0===l?void 0:l.length,3)&&s===(null===e||void 0===e?void 0:e.length)-1})}))},"group-".concat(i,"-").concat(s))});const l=b()(e);return(0,Z.jsx)("div",{children:(0,Z.jsx)(N,(0,n.A)((0,n.A)({},Object.assign({},l)),{},{groupLength:e.length,className:r()({[f["is-last-item"]]:(null===j||void 0===j?void 0:j.length)&&+i+1===Math.min(null===(s=j.filter(e=>e&&e.length))||void 0===s?void 0:s.length,3)},t)}))},"group-".concat(i,"-0"))})})})]})}},94710:e=>{e.exports=function(e,t,i,n){for(var s=-1,l=null==e?0:e.length;++s<l;){var a=e[s];t(n,a,i(a),e)}return n}},96483:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},99140:(e,t,i)=>{var n=i(37303);e.exports=function(e){var t=n(e),i=t%1;return t===t?i?t-i:t:0}}}]);
|
|
2
|
+
//# sourceMappingURL=4277.a9f3379e.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/4277.dfa8352d.chunk.js","mappings":"+MAGA,QAAeA,G,kBCHf,IAAIC,EAAkBC,EAAQ,OAC1BC,EAAiBD,EAAQ,OACzBE,EAAeF,EAAQ,M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,OAAO,CAAC,EAAGoE,IAAU,IAChCzF,YAAa4B,EAAKrD,OAClB+B,UAAWyB,IAAW,CAClB,CAACC,EAAM,kBAA2B,OAATmC,QAAS,IAATA,OAAS,EAATA,EAAW5F,UAAW8G,EAAW,IAAMnH,KAAK+D,IAAmD,QAAhDqD,EAACnB,EAAUa,OAAQpD,GAASA,GAAQA,EAAKrD,eAAO,IAAA+G,OAAA,EAA/CA,EAAiD/G,OAAQ,IACnIgF,OACL,SAAAhB,OAPqB8C,EAAQ,gB,YC9J3D9H,EAAOC,QAXP,SAAyBY,EAAOX,EAAQG,EAAUE,GAIhD,IAHA,IAAIU,GAAS,EACTD,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,SAE9BC,EAAQD,GAAQ,CACvB,IAAIG,EAAQN,EAAMI,GAClBf,EAAOK,EAAaY,EAAOd,EAASc,GAAQN,EAC9C,CACA,OAAON,CACT,C,YCGAP,EAAOC,QAJP,SAAcY,GACZ,OAAQA,GAASA,EAAMG,OAAUH,EAAM,QAAKuH,CAC9C,C,kBCpBA,IAAIC,EAAWzI,EAAQ,OAmCvBI,EAAOC,QAPP,SAAmBkB,GACjB,IAAIQ,EAAS0G,EAASlH,GAClBmH,EAAY3G,EAAS,EAEzB,OAAOA,IAAWA,EAAU2G,EAAY3G,EAAS2G,EAAY3G,EAAU,CACzE,C","sources":["common/components/SimpleBar.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/findIndex.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/first.js","webpack://@kne-components/components-core/./src/components/Notification/style.module.scss?659e","components/Notification/index.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/head.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","module.exports = require('./head');\n","// extracted by mini-css-extract-plugin\nexport default {\"notification\":\"style_notification__Vv-MM__Pqx9x\",\"list\":\"style_list__l8KOo__Pqx9x\",\"header\":\"style_header__3dcv8__Pqx9x\",\"item\":\"style_item__d92RS__Pqx9x\",\"item-box\":\"style_item-box__dd-Lk__Pqx9x\",\"index-1\":\"style_index-1__f97L0__Pqx9x\",\"index-2\":\"style_index-2__04vAw__Pqx9x\",\"item-box-main\":\"style_item-box-main__lnSak__Pqx9x\",\"item-title\":\"style_item-title__mArMd__Pqx9x\",\"level-high\":\"style_level-high__Uys7Y__Pqx9x\",\"level-middle\":\"style_level-middle__EewyC__Pqx9x\",\"level-low\":\"style_level-low__8kVyL__Pqx9x\",\"title-icon\":\"style_title-icon__1EoAG__Pqx9x\",\"item-subtitle\":\"style_item-subtitle__xeFJs__Pqx9x\",\"close-btn\":\"style_close-btn__7qpG3__Pqx9x\",\"is-loading\":\"style_is-loading__upVL+__Pqx9x\",\"item-content\":\"style_item-content__8MlsG__Pqx9x\",\"link-outer\":\"style_link-outer__kegyZ__Pqx9x\",\"link\":\"style_link__F2CO-__Pqx9x\",\"is-last-item\":\"style_is-last-item__MytRl__Pqx9x\"};","import {Row, Col, Button, Typography} from \"antd\";\nimport QueueAnim from \"rc-queue-anim\";\nimport classnames from \"classnames\";\nimport SimpleBar from \"@common/components/SimpleBar\";\nimport {useGlobalContext, usePreset} from \"@components/Global\";\nimport Icon from \"@components/Icon\";\nimport Content from \"@components/Content\";\nimport style from \"./style.module.scss\";\nimport {useMemo, useRef, useState, useEffect} from \"react\";\nimport groupBy from \"lodash/groupBy\";\nimport first from \"lodash/first\";\nimport range from \"lodash/range\";\nimport LoadingButton, {useLoading} from \"@components/LoadingButton\";\nimport findIndex from \"lodash/findIndex\";\n\nconst LEVEL = [\"high\", \"middle\", \"low\"];\n\nconst NotificationItem = ({\n level = \"low\", title, groupLength, subtitle, content, link, id, children, className,\n }) => {\n const {setGlobal} = useGlobalContext(\"notification\");\n const {apis, ajax} = usePreset();\n const {isLoading, callback} = useLoading(async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n\n if (resData.code === 0) {\n setGlobal((notification) => {\n const newList = (notification?.list || []).slice(0);\n const index = findIndex(newList, (item) => id === item.id);\n if (index > -1) {\n newList.splice(index, 1);\n }\n return Object.assign({}, notification, {list: newList});\n });\n }\n });\n return (<div\n className={classnames(style[\"item\"], className)}\n style={{\"--group-length\": Math.min(groupLength, 3) || 1}}\n >\n {groupLength && groupLength > 1 && range(1, Math.min(groupLength, 3))\n .reverse()\n .map((number) => (<div\n className={classnames(style[\"item-box\"], style[`index-${number}`])}\n key={number}\n />))}\n <div className={classnames(style[\"item-box\"], style[\"item-box-main\"])}>\n <div\n className={classnames(style[\"item-title\"], style[`level-${level}`])}\n >\n <Icon\n className={style[\"title-icon\"]}\n type={level === \"high\" ? \"icon-tishi\" : \"icon-daiwochuli\"}\n />\n <Typography.Text ellipsis>{title}</Typography.Text>\n </div>\n <div className={style[\"item-content\"]}>\n <div className={style[\"item-subtitle\"]}>\n <Typography.Text ellipsis>{subtitle || \"\"}</Typography.Text>\n <Icon\n className={classnames(style[\"close-btn\"], {\n [style[\"is-loading\"]]: isLoading,\n })}\n type=\"icon-close-thin\"\n onClick={() => {\n if (isLoading) {\n return;\n }\n\n if (!id) {\n return;\n }\n\n callback();\n }}\n />\n </div>\n {Array.isArray(content) ? (<Content list={content} labelAlign=\"auto\" size=\"small\"/>) : (children)}\n </div>\n {link && (<div className={style[\"link-outer\"]}>\n <LoadingButton\n className={style[\"link\"]}\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n window.open(link);\n }\n }}\n >\n 查看详情\n </LoadingButton>\n </div>)}\n </div>\n </div>);\n};\n\nconst Notification = ({itemClassName}) => {\n const {global: notification, setGlobal} = useGlobalContext(\"notification\");\n const headOptionRef = useRef();\n const {apis, ajax} = usePreset();\n const [headOptionHeight, setHeadOptionHeight] = useState(32);\n\n useEffect(() => {\n headOptionRef.current && setHeadOptionHeight(headOptionRef.current?.clientHeight);\n }, []);\n\n const {list, expand} = Object.assign({}, {\n expand: false, list: [],\n }, notification);\n\n const groupList = useMemo(() => {\n const group = groupBy(list, (item) => item.level || \"low\");\n return LEVEL.map((name) => group[name] || []);\n }, [list]);\n\n if (list.length === 0) {\n return null;\n }\n\n return (<div\n className={classnames({}, style[\"notification\"], \"notification\")}\n style={{\n \"--head-option-height\": `${headOptionHeight}px`,\n }}\n >\n <div ref={headOptionRef}>\n <Row justify=\"end\" wrap={false} className={style[\"header\"]} gutter={8}>\n {groupList.some((item) => item.length > 1) && (<Col>\n <Button\n size=\"small\"\n onClick={() => {\n setGlobal(Object.assign({}, notification, {expand: !expand}));\n }}\n >\n {expand ? \"全部折叠\" : \"全部展开\"}\n </Button>\n </Col>)}\n <Col>\n <LoadingButton\n type=\"primary\"\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {\n ids: list.map((item) => item.id).filter((id) => !!id),\n },\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n setGlobal(Object.assign({}, notification, {list: []}));\n }\n }}\n >\n 全部清除\n </LoadingButton>\n </Col>\n </Row>\n </div>\n <SimpleBar className={style[\"list\"]}>\n <QueueAnim leaveReverse duration={200} interval={20}>\n {groupList\n .filter((item) => item && item.length > 0)\n .map((item, groupKey) => {\n if (expand) {\n return item.map((notification, index) => notification && (\n <div key={`group-${groupKey}-${index}`}>\n <NotificationItem\n {...Object.assign({}, notification)}\n className={classnames({\n [style[\"is-last-item\"]]: +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3) && index === item?.length - 1,\n })}\n />\n </div>));\n }\n const firstItem = first(item);\n return (<div key={`group-${groupKey}-0`}>\n <NotificationItem\n {...Object.assign({}, firstItem)}\n groupLength={item.length}\n className={classnames({\n [style[\"is-last-item\"]]: groupList?.length && +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3),\n }, itemClassName)}\n />\n </div>);\n })}\n </QueueAnim>\n </SimpleBar>\n </div>);\n};\n\nexport default Notification;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\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":["SimpleBar","arrayAggregator","require","baseAggregator","baseIteratee","isArray","module","exports","setter","initializer","collection","iteratee","func","accumulator","baseFindIndex","toInteger","nativeMax","Math","max","array","predicate","fromIndex","length","index","baseEach","value","key","baseAssignValue","createAggregator","hasOwnProperty","Object","prototype","groupBy","result","call","push","baseForOwn","createBaseEach","fromRight","isArrayLike","eachFunc","iterable","LEVEL","NotificationItem","_ref","level","title","groupLength","subtitle","content","link","id","children","className","setGlobal","useGlobalContext","apis","ajax","usePreset","isLoading","callback","useLoading","async","_apis$notification","data","resData","notification","read","assign","ids","code","newList","list","slice","findIndex","item","splice","_jsxs","classnames","style","min","range","reverse","map","number","_jsx","concat","Icon","type","Typography","Text","ellipsis","onClick","Array","Content","labelAlign","size","LoadingButton","_apis$notification2","window","open","_ref2","itemClassName","global","headOptionRef","useRef","headOptionHeight","setHeadOptionHeight","useState","useEffect","_headOptionRef$curren","current","clientHeight","expand","groupList","useMemo","group","name","ref","Row","justify","wrap","gutter","some","Col","Button","_apis$notification3","filter","QueueAnim","leaveReverse","duration","interval","groupKey","_groupList$filter2","_groupList$filter","_objectSpread","firstItem","first","undefined","toFinite","remainder"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/4277.a9f3379e.chunk.js","mappings":"+MAGA,QAAeA,G,kBCHf,IAAIC,EAAkBC,EAAQ,OAC1BC,EAAiBD,EAAQ,OACzBE,EAAeF,EAAQ,MACvBG,EAAUH,EAAQ,OAmBtBI,EAAOC,QATP,SAA0BC,EAAQC,GAChC,OAAO,SAASC,EAAYC,GAC1B,IAAIC,EAAOP,EAAQK,GAAcT,EAAkBE,EAC/CU,EAAcJ,EAAcA,IAAgB,CAAC,EAEjD,OAAOG,EAAKF,EAAYF,EAAQJ,EAAaO,EAAU,GAAIE,EAC7D,CACF,C,kBCpBA,IAAIC,EAAgBZ,EAAQ,OACxBE,EAAeF,EAAQ,MACvBa,EAAYb,EAAQ,OAGpBc,EAAYC,KAAKC,IAiDrBZ,EAAOC,QAZP,SAAmBY,EAAOC,EAAWC,GACnC,IAAIC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACvC,IAAKA,EACH,OAAQ,EAEV,IAAIC,EAAqB,MAAbF,EAAoB,EAAIN,EAAUM,GAI9C,OAHIE,EAAQ,IACVA,EAAQP,EAAUM,EAASC,EAAO,IAE7BT,EAAcK,EAAOf,EAAagB,EAAW,GAAIG,EAC1D,C,kBCpDA,IAAIC,EAAWtB,EAAQ,OAoBvBI,EAAOC,QAPP,SAAwBG,EAAYF,EA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BI,EAAOC,QAPP,SAAmBkB,GACjB,IAAIQ,EAAS0G,EAASlH,GAClBmH,EAAY3G,EAAS,EAEzB,OAAOA,IAAWA,EAAU2G,EAAY3G,EAAS2G,EAAY3G,EAAU,CACzE,C","sources":["common/components/SimpleBar.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/findIndex.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/first.js","webpack://@kne-components/components-core/./src/components/Notification/style.module.scss?659e","components/Notification/index.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/head.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","module.exports = require('./head');\n","// extracted by mini-css-extract-plugin\nexport default {\"notification\":\"style_notification__Vv-MM__sfb0Z\",\"list\":\"style_list__l8KOo__sfb0Z\",\"header\":\"style_header__3dcv8__sfb0Z\",\"item\":\"style_item__d92RS__sfb0Z\",\"item-box\":\"style_item-box__dd-Lk__sfb0Z\",\"index-1\":\"style_index-1__f97L0__sfb0Z\",\"index-2\":\"style_index-2__04vAw__sfb0Z\",\"item-box-main\":\"style_item-box-main__lnSak__sfb0Z\",\"item-title\":\"style_item-title__mArMd__sfb0Z\",\"level-high\":\"style_level-high__Uys7Y__sfb0Z\",\"level-middle\":\"style_level-middle__EewyC__sfb0Z\",\"level-low\":\"style_level-low__8kVyL__sfb0Z\",\"title-icon\":\"style_title-icon__1EoAG__sfb0Z\",\"item-subtitle\":\"style_item-subtitle__xeFJs__sfb0Z\",\"close-btn\":\"style_close-btn__7qpG3__sfb0Z\",\"is-loading\":\"style_is-loading__upVL+__sfb0Z\",\"item-content\":\"style_item-content__8MlsG__sfb0Z\",\"link-outer\":\"style_link-outer__kegyZ__sfb0Z\",\"link\":\"style_link__F2CO-__sfb0Z\",\"is-last-item\":\"style_is-last-item__MytRl__sfb0Z\"};","import {Row, Col, Button, Typography} from \"antd\";\nimport QueueAnim from \"rc-queue-anim\";\nimport classnames from \"classnames\";\nimport SimpleBar from \"@common/components/SimpleBar\";\nimport {useGlobalContext, usePreset} from \"@components/Global\";\nimport Icon from \"@components/Icon\";\nimport Content from \"@components/Content\";\nimport style from \"./style.module.scss\";\nimport {useMemo, useRef, useState, useEffect} from \"react\";\nimport groupBy from \"lodash/groupBy\";\nimport first from \"lodash/first\";\nimport range from \"lodash/range\";\nimport LoadingButton, {useLoading} from \"@components/LoadingButton\";\nimport findIndex from \"lodash/findIndex\";\n\nconst LEVEL = [\"high\", \"middle\", \"low\"];\n\nconst NotificationItem = ({\n level = \"low\", title, groupLength, subtitle, content, link, id, children, className,\n }) => {\n const {setGlobal} = useGlobalContext(\"notification\");\n const {apis, ajax} = usePreset();\n const {isLoading, callback} = useLoading(async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n\n if (resData.code === 0) {\n setGlobal((notification) => {\n const newList = (notification?.list || []).slice(0);\n const index = findIndex(newList, (item) => id === item.id);\n if (index > -1) {\n newList.splice(index, 1);\n }\n return Object.assign({}, notification, {list: newList});\n });\n }\n });\n return (<div\n className={classnames(style[\"item\"], className)}\n style={{\"--group-length\": Math.min(groupLength, 3) || 1}}\n >\n {groupLength && groupLength > 1 && range(1, Math.min(groupLength, 3))\n .reverse()\n .map((number) => (<div\n className={classnames(style[\"item-box\"], style[`index-${number}`])}\n key={number}\n />))}\n <div className={classnames(style[\"item-box\"], style[\"item-box-main\"])}>\n <div\n className={classnames(style[\"item-title\"], style[`level-${level}`])}\n >\n <Icon\n className={style[\"title-icon\"]}\n type={level === \"high\" ? \"icon-tishi\" : \"icon-daiwochuli\"}\n />\n <Typography.Text ellipsis>{title}</Typography.Text>\n </div>\n <div className={style[\"item-content\"]}>\n <div className={style[\"item-subtitle\"]}>\n <Typography.Text ellipsis>{subtitle || \"\"}</Typography.Text>\n <Icon\n className={classnames(style[\"close-btn\"], {\n [style[\"is-loading\"]]: isLoading,\n })}\n type=\"icon-close-thin\"\n onClick={() => {\n if (isLoading) {\n return;\n }\n\n if (!id) {\n return;\n }\n\n callback();\n }}\n />\n </div>\n {Array.isArray(content) ? (<Content list={content} labelAlign=\"auto\" size=\"small\"/>) : (children)}\n </div>\n {link && (<div className={style[\"link-outer\"]}>\n <LoadingButton\n className={style[\"link\"]}\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {ids: [id]},\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n window.open(link);\n }\n }}\n >\n 查看详情\n </LoadingButton>\n </div>)}\n </div>\n </div>);\n};\n\nconst Notification = ({itemClassName}) => {\n const {global: notification, setGlobal} = useGlobalContext(\"notification\");\n const headOptionRef = useRef();\n const {apis, ajax} = usePreset();\n const [headOptionHeight, setHeadOptionHeight] = useState(32);\n\n useEffect(() => {\n headOptionRef.current && setHeadOptionHeight(headOptionRef.current?.clientHeight);\n }, []);\n\n const {list, expand} = Object.assign({}, {\n expand: false, list: [],\n }, notification);\n\n const groupList = useMemo(() => {\n const group = groupBy(list, (item) => item.level || \"low\");\n return LEVEL.map((name) => group[name] || []);\n }, [list]);\n\n if (list.length === 0) {\n return null;\n }\n\n return (<div\n className={classnames({}, style[\"notification\"], \"notification\")}\n style={{\n \"--head-option-height\": `${headOptionHeight}px`,\n }}\n >\n <div ref={headOptionRef}>\n <Row justify=\"end\" wrap={false} className={style[\"header\"]} gutter={8}>\n {groupList.some((item) => item.length > 1) && (<Col>\n <Button\n size=\"small\"\n onClick={() => {\n setGlobal(Object.assign({}, notification, {expand: !expand}));\n }}\n >\n {expand ? \"全部折叠\" : \"全部展开\"}\n </Button>\n </Col>)}\n <Col>\n <LoadingButton\n type=\"primary\"\n size=\"small\"\n onClick={async () => {\n const {data: resData} = apis?.notification?.read ? await ajax(Object.assign({}, apis.notification.read, {\n data: {\n ids: list.map((item) => item.id).filter((id) => !!id),\n },\n })) : {data: {code: 0}};\n if (resData.code === 0) {\n setGlobal(Object.assign({}, notification, {list: []}));\n }\n }}\n >\n 全部清除\n </LoadingButton>\n </Col>\n </Row>\n </div>\n <SimpleBar className={style[\"list\"]}>\n <QueueAnim leaveReverse duration={200} interval={20}>\n {groupList\n .filter((item) => item && item.length > 0)\n .map((item, groupKey) => {\n if (expand) {\n return item.map((notification, index) => notification && (\n <div key={`group-${groupKey}-${index}`}>\n <NotificationItem\n {...Object.assign({}, notification)}\n className={classnames({\n [style[\"is-last-item\"]]: +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3) && index === item?.length - 1,\n })}\n />\n </div>));\n }\n const firstItem = first(item);\n return (<div key={`group-${groupKey}-0`}>\n <NotificationItem\n {...Object.assign({}, firstItem)}\n groupLength={item.length}\n className={classnames({\n [style[\"is-last-item\"]]: groupList?.length && +groupKey + 1 === Math.min(groupList.filter((item) => item && item.length)?.length, 3),\n }, itemClassName)}\n />\n </div>);\n })}\n </QueueAnim>\n </SimpleBar>\n </div>);\n};\n\nexport default Notification;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\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":["SimpleBar","arrayAggregator","require","baseAggregator","baseIteratee","isArray","module","exports","setter","initializer","collection","iteratee","func","accumulator","baseFindIndex","toInteger","nativeMax","Math","max","array","predicate","fromIndex","length","index","baseEach","value","key","baseAssignValue","createAggregator","hasOwnProperty","Object","prototype","groupBy","result","call","push","baseForOwn","createBaseEach","fromRight","isArrayLike","eachFunc","iterable","LEVEL","NotificationItem","_ref","level","title","groupLength","subtitle","content","link","id","children","className","setGlobal","useGlobalContext","apis","ajax","usePreset","isLoading","callback","useLoading","async","_apis$notification","data","resData","notification","read","assign","ids","code","newList","list","slice","findIndex","item","splice","_jsxs","classnames","style","min","range","reverse","map","number","_jsx","concat","Icon","type","Typography","Text","ellipsis","onClick","Array","Content","labelAlign","size","LoadingButton","_apis$notification2","window","open","_ref2","itemClassName","global","headOptionRef","useRef","headOptionHeight","setHeadOptionHeight","useState","useEffect","_headOptionRef$curren","current","clientHeight","expand","groupList","useMemo","group","name","ref","Row","justify","wrap","gutter","some","Col","Button","_apis$notification3","filter","QueueAnim","leaveReverse","duration","interval","groupKey","_groupList$filter2","_groupList$filter","_objectSpread","firstItem","first","undefined","toFinite","remainder"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[330,4474],{330:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r});var n=s(29871),a=s.n(n),l={};for(const o in n)"default"!==o&&(l[o]=()=>n[o]);s.d(t,l),a().Fetch=n.FlexBoxFetch;const r=a()},1904:(e,t,s)=>{s.d(t,{A:()=>i,N:()=>c});var n=s(98434),a=s(43856);const{useOnChange:l,useDecorator:r}=n.hooks,o=e=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(a.AddressSelectField);o.Field=a.AddressSelectField,o.AddressEnum=a.AddressSelectField.AddressEnum,o.createAddressApi=a.AddressSelectField.createAddressApi,o.withAddressApi=a.AddressSelectField.withAddressApi;const i=o,c=e=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label,inputPlaceholder:"\u8bf7\u8f93\u5165"+e.label},e))(a.AddressInputField);c.Field=a.AddressInputField},2196:(e,t,s)=>{s.d(t,{A:()=>h});var n=s(53986),a=s(55199),l=s(73884),r=s(41381),o=s(330),i=s(68532),c=s(47094),d=s(83136),u=s.n(d),m=s(70579);const p=["list","groupArgs","itemRender","column","gap","className","outer","children"],h=e=>{let{list:t=[],groupArgs:s,itemRender:d,column:h=2,gap:f,className:g,outer:x=(0,m.jsx)(r.default.Part,{}),children:_}=e,A=(0,n.A)(e,p);const v=!(Number.isInteger(h)&&h>0),{ref:b,column:j}=(0,o.useFlexBox)(v?h:{}),y=(e,n)=>(0,m.jsx)(i.FormInfo,{list:t,column:e,groupArgs:s,itemRender:(e,t)=>"function"===typeof d?d(e,t):(0,m.jsx)(a.Col,{span:t.span,children:e}),children:(e,t)=>(0,m.jsx)(a.Row,{gutter:[f||24,0],className:u()({[c.A["column-not-layout"]]:n}),children:"function"===typeof _?_(e,t):e})});return(0,l.cloneElement)(x,Object.assign({},A,{className:u()(g,c.A["form-info"])}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{ref:b}),v?j?y(j.col):y(2,!0):y(h)]}))}},2842:(e,t,s)=>{s.d(t,{default:()=>a.a});s(2885);var n=s(22986),a=s.n(n);s.o(n,"PHONE_NUMBER_INPUT")&&s.d(t,{PHONE_NUMBER_INPUT:function(){return n.PHONE_NUMBER_INPUT}})},5995:(e,t,s)=>{s.d(t,{Ay:()=>p,Vl:()=>h,W6:()=>f});var n=s(53986),a=s(89379),l=s(3382),r=s(73025),o=s(55199),i=s(76995),c=s(47094),d=s(70579);const u=["classNames"],m=["modalProps"],p=e=>(0,d.jsx)(l.default,(0,a.A)({},(0,i.A)(Object.assign({},e,{className:c.A["form-modal"]})))),h=()=>{const e=(0,l.useModal)();return t=>e((0,i.A)(Object.assign({},t,{className:c.A["form-modal"]})))},f=e=>{let{classNames:t}=e,s=(0,n.A)(e,u);const l=h();if(!s.api){const{modalProps:e}=s,t=(0,n.A)(s,m);return(0,d.jsx)(o.Button,(0,a.A)((0,a.A)({},t),{},{onClick:()=>{l(e)}}))}return(0,d.jsx)(r.A,(0,a.A)((0,a.A)({},s),{},{modalFunc:l}))}},15209:(e,t,s)=>{s.d(t,{A:()=>h});var n=s(53986),a=s(89379),l=s(20454),r=s(55199),o=s(10986),i=s.n(o),c=s(13050),d=s(70579);const u=["remoteModules"],m=e=>{let t=Object.assign({},((0,l.A)(e),e));const[s,n]=i()(t);return(0,d.jsx)(r.Input,(0,a.A)((0,a.A)({},t),{},{value:s,onChange:e=>{n(e.target.value?e.target.value.toUpperCase():e.target.value,e)}}))},p=(0,c.createWithRemoteLoader)({modules:["FormInfo@formModule"]})(e=>{let{remoteModules:t}=e,s=(0,n.A)(e,u);const[a]=t,{hooks:l}=a,{useDecorator:r}=l;return r(Object.assign({placeholder:"\u8bf7\u8f93\u5165".concat(s.label||"")},s))(m)});p.field=m;const h=p},15445:(e,t,s)=>{s.d(t,{A:()=>ae,E:()=>le});var n=s(89379),a=s(53986),l=s(98434),r=s(30096),o=s(34643),i=s(1904),c=s(83230),d=s(55199),u=s(70579);const{useOnChange:m}=l.hooks,p=e=>(0,u.jsx)(d.ColorPicker,(0,n.A)((0,n.A)({},e),{},{onChange:t=>e.onChange(t.toHexString())})),h=e=>m(Object.assign({},e))(p);h.Field=h;const f=h;var g=s(81026),x=s(78756),_=s(92328),A=s(2842);const v=["checked","children"],{useOnChange:b,useCheckedToValue:j}=l.hooks,{withChecked:y}=l.hoc,N=y(e=>{let{checked:t,children:s=null}=e,l=(0,a.A)(e,v);return(0,u.jsxs)(d.Space,{children:[(0,u.jsx)(d.Switch,(0,n.A)({checked:t},l)),"function"===typeof s?s({checked:t}):s]})}),S=e=>{e=Object.assign({},{fieldName:"switch"},e);const t=j(e);return b(t)(N)};S.Field=d.Switch;const w=S;var C=s(89099),F=s(96339),P=s(36972),I=s(15209),T=s(74529),M=s.n(T),k=s(73884),O=s(47458),L=s(33097),R=s.n(L),E=s(21079),D=s(46237),Z=s(56259),z=s(29556),U=s(64671),B=s(83136),W=s.n(B),V=s(47094);const q=["forwardedRef","label","placeholder"],H=["placeholder","label"],G=["placeholder","label"],Q=["placeholder","label","soFarText"],X=e=>t=>{const s=M()(...e)(e=>{let{forwardedRef:s,label:l,placeholder:r}=e,o=(0,a.A)(e,q);return(0,u.jsx)(t,(0,n.A)((0,n.A)({},o),{},{label:l,placeholder:r,labelRender:()=>o.tips?(0,u.jsxs)(d.Space,{children:[l,(0,u.jsx)(z.default,{content:o.tips,children:(0,u.jsx)("span",{className:W()(V.A["field-tips"],{[V.A["label-hidden"]]:o.labelHidden}),children:(0,u.jsx)(U.default,{type:"icon-xinxi-miaobian"})})})]}):l,ref:s}))}),l=(0,k.forwardRef)((e,t)=>(0,u.jsx)(s,(0,n.A)((0,n.A)({},e),{},{forwardedRef:t})));return Object.keys(t).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(e=>{l[e]=t[e]}),l},Y=e=>t=>{let{placeholder:s,label:l}=t,r=(0,a.A)(t,H);return(0,u.jsx)(O.FormattedMessage,{id:"defaultInputPlaceholder",moduleName:"FormInfo",values:{label:l},children:t=>(0,u.jsx)(e,(0,n.A)((0,n.A)({},r),{},{label:l,placeholder:s||t}))})},J=e=>t=>{let{placeholder:s,label:l}=t,r=(0,a.A)(t,G);return(0,u.jsx)(O.FormattedMessage,{id:"defaultSelectPlaceholder",moduleName:"FormInfo",values:{label:l},children:t=>(0,u.jsx)(e,(0,n.A)((0,n.A)({},r),{},{label:l,placeholder:s||t}))})},K=e=>t=>{const s=(0,l.useGroup)(),a=R()(s,"name"),r=(0,E.get)(s,"index"),o=(0,D.oc)();return o&&Array.isArray(o)&&o.length>0?o.map(s=>{if("string"===typeof s)return(0,k.createElement)(e,(0,n.A)((0,n.A)({},t),{},{key:s}));const{name:l,label:o,options:i}=s,c=R()(i,"ignore",[]),d=R()(i,"disabled",[]),u=R()(i,"fields",[]),m=e=>t.name===e.name&&!(e.hasOwnProperty("groupName")&&e.groupName!==a)&&!(e.hasOwnProperty("groupIndex")&&e.groupIndex!==r);if(c.length>0&&c.find(m))return null;if(u.length>0&&!u.find(m))return null;let p=Object.assign({},t,{name:R()(i,"nameTransform",(e,t)=>"".concat(e).concat(t))(t.name,l),label:R()(i,"labelTransform",(e,t)=>e&&"".concat(e).concat(t))(t.label,o)});return d.length>0&&d.find(m)&&(p.disabled=!0,p.rule=""),(0,k.createElement)(e,(0,n.A)((0,n.A)({},p),{},{key:l}))}):(0,u.jsx)(e,(0,n.A)({},t))},$=X([K,Y])(l.Input),ee=X([K,Y])(l.InputNumber);$.Password=X([K,Y])(l.Input.Password);const te=X([K,J])(l.DatePicker);te.MonthPicker=X([K,J])(l.DatePicker.MonthPicker),te.RangePicker=X([K,J])(l.DatePicker.RangePicker),te.WeekPicker=X([K,J])(l.DatePicker.WeekPicker);const se=X([K,J])(l.TimePicker);se.RangePicker=X([K,J])(l.TimePicker.RangePicker);const ne=X([K])(e=>{let{placeholder:t,label:s,soFarText:r}=e,o=(0,a.A)(e,Q);const{formatMessage:i}=(0,O.useIntl)({moduleName:"FormInfo"});return(0,u.jsx)(l.DatePickerToday,(0,n.A)((0,n.A)({},o),{},{label:s,placeholder:[i({id:"startDate"}),i({id:"endDate"})],soFarText:r||i({id:"soFarText"})}))}),ae={Input:$,Checkbox:l.Checkbox,Password:$.Password,InputNumber:ee,DatePicker:te,MonthPicker:te.MonthPicker,WeekPicker:te.WeekPicker,DateRangePicker:te.RangePicker,TimeRangePicker:se.RangePicker,TimePicker:se,DatePickerToday:ne,RadioGroup:X([K])(l.RadioGroup),CheckboxGroup:X([K])(l.CheckboxGroup),Rate:X([K])(l.Rate),Switch:X([K])(w),Slider:X([K])(l.Slider),SalaryInput:X([K,Y])(P.A),TypeDateRangePicker:X([K])(Z.A),MoneyInput:X([K,Y])(_.A),PhoneNumber:X([K,Y])(A.default),Upload:X([K])(C.A),Avatar:X([K])(F.A),FunctionSelect:X([K,J])(g.A),IndustrySelect:X([K,J])(x.A),Cascader:X([K,J])(c.A),ColorPicker:X([K,J])(f),AddressSelect:X([K,J])(i.A),AddressInput:X([K,J])(i.N),TreeSelect:X([K,J])(l.TreeSelect),ReactInputNumber:X([K,Y])(l.InputNumber),InputUpperCase:X([K,Y])(I.A),Select:X([K,J])(l.Select),TextArea:X([K,Y])(l.TextArea),AdvancedSelect:X([K,J])(r.Ay),SuperSelect:X([K,J])(o.Ay),SuperSelectTableList:X([K,J])(o.eM),SuperSelectUser:X([K,J])(o.Pg),SuperSelectTree:X([K,J])(o.kx)},le={createWithFieldDecorator:X,withInputDefaultPlaceholder:Y,withSelectDefaultPlaceholder:J,withLang:K}},18936:(e,t,s)=>{s.d(t,{A:()=>z});var n=s(89379),a=s(53986);const l={"ant-tag":"style_ant-tag__7ct2q__sfb0Z",overlay:"style_overlay__CXfU5__sfb0Z",input:"style_input__+OpvV__sfb0Z","is-disabled":"style_is-disabled__uX4qq__sfb0Z","input-icon":"style_input-icon__E3NjK__sfb0Z",large:"style_large__vMozz__sfb0Z",small:"style_small__ubqQ+__sfb0Z","input-inner":"style_input-inner__sY-6k__sfb0Z","input-custom":"style_input-custom__Kxq3n__sfb0Z","display-content":"style_display-content__qA1jn__sfb0Z","overlay-footer-extra":"style_overlay-footer-extra__yCzWX__sfb0Z","selected-tag":"style_selected-tag__BZsMM__sfb0Z","selected-tag-list":"style_selected-tag-list__As0ho__sfb0Z","selected-tag-inner":"style_selected-tag-inner__2NH59__sfb0Z","text-inner":"style_text-inner__Bq2Ji__sfb0Z",placeholder:"style_placeholder__odotY__sfb0Z","is-modal":"style_is-modal__4cj8L__sfb0Z","overlay-content":"style_overlay-content__kpGRn__sfb0Z"};var r=s(74981);const{context:o,useContext:i,Provider:c,Consumer:d}=(0,r.A)();var u=s(73884),m=s(10986),p=s.n(m),h=s(87558),f=s(33097),g=s.n(f),x=s(55199),_=s(83136),A=s.n(_),v=s(3382),b=s(64671),j=s(79686),y=s.n(j),N=s(41740),S=s.n(N),w=s(74065),C=s.n(w),F=s(17342),P=s(70579);const I=["value","onChange","extra","showSelectedTag","renderSelectedContent","children"],T=["value","setValue","children","renderSelectedContent","showSelectedTag","placement","inputContent","single","extra","overlayWidth","wrapClassName"],M=["setFetchApi","wrapClassName"],k=["api","className","displayItems","wrapClassName"],O=e=>{let{maxLength:t,single:s,setValue:n,value:a,message:l}=e;return e=>n(!s&&Number.isInteger(t)&&t>0&&e.length>t?(l("\u6700\u591a\u9009\u62e9".concat(t,"\u4e2a")),a):e)},L=e=>{let{single:t,value:s,mapping:n,onClose:a}=e;return s&&Array.isArray(s)&&0!==s.length?t?(0,P.jsx)("span",{className:l["text-inner"],children:g()(n.get(s[0]),"label")||s[0]}):s.map(e=>{const t=n.get(e);return(0,P.jsx)(x.Tag,{className:l["display-tag"],closable:!0,onClose:s=>{s.preventDefault(),a(e,t)},children:(0,P.jsx)("span",{className:l["tag-inner"],children:g()(t,"label")||e})},e)}):null},R=(0,u.forwardRef)((e,t)=>{let{value:s,onChange:r,extra:o,showSelectedTag:i,renderSelectedContent:c,children:d}=e,m=(0,a.A)(e,I);const[p,h]=(0,u.useState)(s),f=(0,u.useRef)(s);f.current=s;const[g,_]=(0,u.useState)(!1),{message:A}=x.App.useApp(),b=O({maxLength:m.maxLength,single:m.single,setValue:h,value:p,message:A.error});return(0,u.useEffect)(()=>{g&&h(f.current)},[g]),(0,u.useImperativeHandle)(t,()=>({modalOpen:()=>{_(!0)},close:()=>{_(!1)}})),(0,P.jsx)(v.default,(0,n.A)((0,n.A)({},m),{},{open:g,onConfirm:()=>{r(p)},onClose:()=>{_(!1)},footer:(i||o)&&(0,P.jsxs)(x.Space,{direction:"vertical",className:l["overlay-footer"],children:[o&&(0,P.jsx)("div",{className:l["overlay-footer-extra"],children:o}),i&&c({value:p,setValue:b})]}),children:"function"===typeof d?d({value:p,setValue:b}):d}))}),E=(0,u.forwardRef)((e,t)=>{let{value:s,setValue:r,children:o,renderSelectedContent:i,showSelectedTag:c,placement:d,inputContent:m,single:p,extra:h,overlayWidth:f,wrapClassName:g}=e,_=(0,a.A)(e,T);const[A,v]=(0,u.useState)(!1);return(0,u.useImperativeHandle)(t,()=>({close:()=>{v(!1)}}),[]),(0,P.jsx)(x.Popover,(0,n.A)((0,n.A)({},_),{},{open:A,onOpenChange:v,overlayClassName:l.overlay,arrow:!1,content:(0,P.jsxs)("div",{style:f?{"--overlay-width":f}:{},className:l["overlay-content"],onClick:e=>{e.stopPropagation()},children:[(0,P.jsx)("div",{className:l["overlay-inner"],children:"function"===typeof o?o({value:s,setValue:e=>{(!p||s[0]!==e[0])&&r(e),p&&v(!1)}}):o}),(c||h)&&(0,P.jsxs)("div",{className:l["overlay-footer"],children:[h&&(0,P.jsx)("div",{className:l["overlay-footer-extra"],children:h}),c&&i({value:s,setValue:r})]})]}),trigger:"click",placement:d,children:(0,P.jsx)("div",{className:l["input-inner"],children:m})}))}),D=(0,h.withFetch)(e=>{let{setFetchApi:t,wrapClassName:s}=e,n=(0,a.A)(e,M);const[r,o]=(0,u.useState)(!1),c=(0,u.useRef)(null),d=(0,u.useRef)(null),m=i(),{valueState:p,mapping:h,props:f}=m,[g,_]=p,{single:v,placement:j,getPopupContainer:y,placeholder:N,isPopup:S,disabled:w,showSelectedTag:C,extra:I,inputContent:T}=f,k=(0,u.useRef)(n);k.current=n,(0,u.useEffect)(()=>{t(Object.assign({},k.current,{data:n.data,isComplete:n.isComplete}))},[n.data,t,n.isComplete]);const O=L({single:v,value:g,mapping:h,onClose:e=>{_(t=>{const s=t.slice(0),n=t.indexOf(e);return n>-1&&s.splice(n,1),s})}}),D=e=>{let{value:t,setValue:s}=e;return(0,P.jsxs)(x.Space,{className:l["selected-tag"],align:"center",wrap:!0,children:[(0,P.jsxs)("div",{children:["\u5df2\u9009",!f.single&&Number.isInteger(f.maxLength)&&f.maxLength>0?"(".concat(t.length,"/").concat(f.maxLength,")"):"",":"]}),(0,P.jsx)(F.A,{className:l["selected-tag-list"],children:(0,P.jsx)("div",{className:l["selected-tag-inner"],children:L({value:t,mapping:h,onClose:e=>{s(t=>{const s=t.slice(0),n=t.indexOf(e);return n>-1&&s.splice(n,1),s})}})})})]})},Z=T?T(m):(0,P.jsxs)(x.Space,{className:l["display-content"],onMouseOver:()=>{o(!0)},onMouseOut:()=>{o(!1)},children:[(0,P.jsx)("div",{children:O||(0,P.jsx)("span",{className:l.placeholder,children:N})}),r&&g&&g.length>0&&!w?(0,P.jsx)(b.default,{className:A()(l.close,l["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),_([])}}):(0,P.jsx)(b.default,{className:A()(l["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return S?(0,P.jsx)(E,{ref:d,overlayWidth:f.overlayWidth,value:g,setValue:_,single:v,inputContent:Z,extra:"function"===typeof I?I({close:()=>d.current.close(),context:m}):I,renderSelectedContent:D,showSelectedTag:C,trigger:"click",placement:j,getPopupContainer:y,children:f.children}):(0,P.jsxs)("div",{className:l["input-inner"],onClick:()=>{c.current.modalOpen()},children:[(0,P.jsx)(R,{size:f.modalSize,ref:c,single:f.single,maxLength:f.maxLength,disabledScroller:!0,wrapClassName:A()(l.overlay,l["is-modal"],s),title:f.placeholder,value:g,onChange:_,extra:"function"===typeof I?I({close:()=>c.current.close(),context:m}):I,showSelectedTag:C,renderSelectedContent:D,children:f.children}),Z]})}),Z=e=>{let{api:t,className:s,displayItems:r,wrapClassName:o}=e,i=(0,a.A)(e,k);const[d,m]=(0,u.useState)(""),[h,f]=(0,u.useState)(new Map(r.map(e=>[e.value,e]))),[_,v]=(0,u.useState)({}),{message:b}=x.App.useApp(),j=e=>{const t=e.filter(e=>h.get(e.value)!==e);0!==t.length&&f(e=>{const s=S()(e);return t.forEach(e=>{s.set(e.value,e)}),s})},N=e=>((e,t,s)=>"all"!==s?e:(t(e),e.map(e=>e.value)))(i.single?y()(e)?[]:[e]:e||[],j,i.valueType),[w,F]=p()(Object.assign({},i,{onChange:e=>{const t=((e,t,s)=>"all"!==s?e:e.map(e=>t.get(e)))(e,h,i.valueType);i.onChange&&i.onChange(i.single?C()(t):t)}},"value"in i?{value:N(i.value)}:{defaultValue:N(i.defaultValue)})),I=O({maxLength:i.maxLength,single:i.single,setValue:F,value:w,message:b.error});return(0,P.jsx)(c,{value:{mapping:h,searchText:d,setSearchText:m,appendMapping:j,setItems:e=>{_.setData(e),j(g()(i.dataFormat(e),"list",[]))},fetchApi:_,valueState:[w,I],props:i},children:(0,P.jsx)("div",{className:A()(l["input".concat(i.inputContent&&"function"===typeof i.inputContent?"-custom":"")],s),children:(0,P.jsx)(D,(0,n.A)((0,n.A)({},t),{},{wrapClassName:o,loading:null,setFetchApi:v,onRequestSuccess:e=>{j(g()(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 z=Z},19343:(e,t,s)=>{s.r(t),s.d(t,{Download:()=>p,FileButton:()=>C,FileLink:()=>F,List:()=>N,OptionButtons:()=>y,PrintButton:()=>o.PrintButton,default:()=>i(),download:()=>o.download,downloadBlobFile:()=>o.downloadBlobFile,useDownload:()=>o.useDownload,useFileModal:()=>P});var n=s(89379),a=s(53986),l=(s(64674),s(96418)),r=s.n(l),o=s(36125),i=s.n(o),c=s(3382),d=s(83136),u=s.n(d),m=s(70579);o.Download.useDownload=o.useDownload,o.Download.downloadBlobFile=o.downloadBlobFile;const p=o.Download;var h=s(26304),f=s.n(h),g=s(74065),x=s.n(g),_=s(96252);const A=["apis"],v=["onCancel"],b=["onCancel"],j=e=>{let{apis:t}=e;const s=(0,_.useFormModal)();return"function"===typeof(null===t||void 0===t?void 0:t.onEditModalShow)?t.onEditModalShow:(e,t)=>{const n=s({size:"small",title:"\u4fee\u6539\u6587\u4ef6\u540d\u79f0",formProps:{data:{name:f()(e.filename.split(".")).join(".")},onSubmit:async s=>{!1!==((null===t||void 0===t?void 0:t.onEdit)&&await(null===t||void 0===t?void 0:t.onEdit({formData:Object.assign({},s,{name:"".concat(s.name,".").concat(x()(e.filename.split(".")))}),item:e})))&&n.close()}},children:(0,m.jsx)(_.default,{column:1,list:[(0,m.jsx)(_.Input,{name:"name",label:"\u6587\u4ef6\u540d\u79f0",rule:"REQ LEN-0-100"})]})})}},y=e=>{var t;const s=j({apis:e.apis});return(0,m.jsx)(o.FileListOptionButtons,(0,n.A)((0,n.A)({},e),{},{onEdit:t=>s(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,s=(0,a.A)(e,b);return(0,m.jsx)(c.default,(0,n.A)((0,n.A)({},Object.assign({},s)),{},{onClose:t}))}}))},N=e=>{let{apis:t}=e,s=(0,a.A)(e,A);const l=j({apis:t});return(0,m.jsx)(o.FileList,(0,n.A)((0,n.A)({},s),{},{apis:t,onEdit:e=>l(e,t),onDelete:null===t||void 0===t?void 0:t.onDelete,renderModal:"function"===typeof s.renderModal?s.renderModal:e=>{let{onCancel:t}=e,s=(0,a.A)(e,v);return(0,m.jsx)(c.default,(0,n.A)((0,n.A)({},Object.assign({},s)),{},{onClose:t}))}}))},S=["onCancel"],w=["className"],C=e=>(0,m.jsx)(o.FileButton,(0,n.A)({},Object.assign({},e,{modalProps:{renderModal:e=>{let{onCancel:t}=e,s=(0,a.A)(e,S);return(0,m.jsx)(c.default,(0,n.A)((0,n.A)({},Object.assign({},s)),{},{onClose:t}))}}}))),F=e=>{const t=Object.assign({},e),{className:s}=t,l=(0,a.A)(t,w);return(0,m.jsx)(C,(0,n.A)((0,n.A)({},l),{},{className:u()(s,"btn-no-padding"),type:"link",children:l.children||l.filename||l.originName}))},P=e=>{const{title:t,children:s,footer:n}=(0,o.useFileModalProps)(Object.assign({},e)),a=(0,c.useModal)();return r()(()=>a({title:t,children:s,footer:n}))}},24474:(e,t,s)=>{s.r(t),s.d(t,{DragArea:()=>$,DragAreaOuter:()=>J,DragButton:()=>X,FileUpload:()=>oe,Title:()=>D,UploadButton:()=>Y,UploadTips:()=>K,default:()=>ne});var n=s(89379),a=s(73884),l=s(33097),r=s.n(l),o=s(55199);const i="style_file-list-outer__wPhbb__sfb0Z",c="style_file-list-title__zXM5r__sfb0Z",d="style_container__P4RaF__sfb0Z",u="style_file-preview-inner__cvE72__sfb0Z",m="style_file-preview__M-Asq__sfb0Z",p="style_drag-area__Q+lm7__sfb0Z",h="style_upload-drag-close__u5o8W__sfb0Z",f="style_upload-drag-tips__z7puZ__sfb0Z",g="style_upload-drag-icon__sGGoS__sfb0Z",x="style_upload-drag-title__9Afmb__sfb0Z",_="style_upload-drag-text__o38vS__sfb0Z",A="style_title-group__8IJkS__sfb0Z",v="style_upload-btn__Q+Jxn__sfb0Z",b="style_total-count__z1fyd__sfb0Z",j="style_file-select__mHqyI__sfb0Z",y="style_file-name__QkvMn__sfb0Z",N="style_file-select-info__fOLiM__sfb0Z",S="style_file-select-option__AbDrD__sfb0Z";var w=s(75087),C=s.n(w),F=s(74065),P=s.n(F),I=s(57469),T=s.n(I),M=s(64671),k=s(19343),O=s(47458),L=s(83136),R=s.n(L),E=s(70579);const D=e=>{let{currentTab:t,setCurrentTab:s,previewMap:n,previewList:a,getPermission:l,currentPreviewFileId:r,setCurrentPreviewFileId:i,itemApis:d,children:u,maxWidth:m=260,getPopupContainer:p}=e;return(0,E.jsx)("div",{className:c,children:(0,E.jsxs)(o.Row,{align:"middle",justify:"space-between",wrap:!1,children:[(0,E.jsx)(o.Col,{children:(0,E.jsxs)(o.Space,{className:R()(A,"core-file-list-title-group"),size:4,children:[(0,E.jsx)(o.Segmented,{value:t,onChange:s,options:[{label:(0,E.jsxs)(o.Space,{size:4,children:[(0,E.jsx)(M.default,{type:"icon-shitu-liebiao"}),(0,E.jsx)(O.FormattedMessage,{id:"listText",moduleName:"FileList"})]}),value:"list"},{label:(0,E.jsxs)(o.Space,{size:4,children:[(0,E.jsx)(M.default,{type:"icon-shitu-yulan"}),(0,E.jsx)(O.FormattedMessage,{id:"previewText",moduleName:"FileList"})]}),value:"preview"}]}),"preview"===t&&r&&n.get(r)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o.Select,{className:j,variant:"borderless",popupMatchSelectWidth:!1,value:r,onChange:i,getPopupContainer:p,children:a.map(e=>{let{filename:t,userName:s,date:n,id:a}=e;return(0,E.jsx)(o.Select.Option,{className:S,value:a,children:(0,E.jsxs)(o.Space,{direction:"vertical",children:[(0,E.jsxs)(o.Space,{size:4,align:"start",children:[(0,E.jsx)(C(),{type:P()(t.split(".")),size:14}),(0,E.jsx)(o.Typography.Text,{className:y,ellipsis:!0,style:{"--max-width":"".concat(m,"px")},children:t})]}),s||n?(0,E.jsxs)(o.Space,{className:N,size:24,children:[(0,E.jsxs)("div",{children:[(0,E.jsx)(O.FormattedMessage,{id:"uploadUser",moduleName:"FileList"}),":",s]}),(0,E.jsxs)("div",{children:[(0,E.jsx)(O.FormattedMessage,{id:"uploadTime",moduleName:"FileList"}),":",n&&T()(n).format("YYYY-MM-DD HH:mm:ss")]})]}):null]})},a)})}),(0,E.jsx)(k.OptionButtons,{hasPreview:!1,getPermission:l,item:n.get(r),apis:d}),(0,E.jsx)("div",{className:b,children:(0,E.jsx)(O.FormattedMessage,{id:"totalCount",values:{count:a.length},moduleName:"FileList"})})]})]})}),(0,E.jsx)(o.Col,{children:u})]})})};var Z=s(53986);const z=e=>({"en-US":()=>s.e(3333).then(s.bind(s,63333)),"zh-CN":()=>s.e(8795).then(s.bind(s,48795))}[e]());var U=s(70720),B=s.n(U);const W=(0,a.createContext)({}),{Provider:V}=W,q=()=>(0,a.useContext)(W);var H=s(36125),G=s(81348);const Q=["children"],X=e=>{let{children:t}=e;const{onOpenChange:s,getDragButtonEl:n}=q();return(0,E.jsx)("div",{ref:n,className:v,onClick:()=>{s(e=>!e)},children:(0,E.jsxs)(o.Typography.Text,{className:"ant-btn",children:[(0,E.jsx)(M.default,{type:"icon-tuozhuaishangchuan"}),t||(0,E.jsx)(O.FormattedMessage,{id:"dragText",moduleName:"FileList"})]})})},Y=e=>{let{children:t}=e;const{accept:s,onFileSelected:a}=q();return(0,E.jsx)(H.FileInput,{className:R()(v,"btn-no-padding"),accept:s,multiple:!0,onChange:a,children:e=>{let{children:s}=e,a=(0,Z.A)(e,Q);return(0,E.jsxs)(o.Button,(0,n.A)((0,n.A)({},a),{},{type:"text",children:[(0,E.jsx)(M.default,{type:"icon-tianjia"}),t,s]}))}})},J=e=>{let{title:t,accept:s=[".png",".jpg",".pdf",".docx",".doc"],fileSize:n=20,maxLength:l,onFileSelected:r,children:c,className:u,defaultOpen:m=!1}=e;const[p,h]=(0,a.useState)(m),f=(0,a.useRef)(null),g=B()(e=>{f.current&&(f.current.contains(e.target)||e.target===f.current||h(!1))});return(0,E.jsx)(O.IntlProvider,{importMessages:z,moduleName:"FileList",children:(0,E.jsx)(V,{value:{open:p,onOpenChange:h,accept:s,fileSize:n,maxLength:l,onFileSelected:r,getDragButtonEl:e=>{f.current=e}},children:(0,E.jsxs)(o.Space,{className:i,direction:"vertical",children:[t,(0,E.jsx)("div",{className:R()(d,u),ref:g,onDragEnter:()=>{h(!0)},children:c})]})})})},K=e=>{let{icon:t,title:s,renderTips:n=e=>e}=e;const{accept:a,fileSize:l,maxLength:r}=q(),o=n((0,O.useIntl)({moduleName:"FileList"}).formatMessage({id:"dragTips"},{accept:a.map(e=>e.replace(/^\./,"")).join("\u3001"),size:l}),{fileSize:l,maxLength:r,accept:a});return(0,E.jsxs)("div",{className:R()(f,"upload-drag-tips"),children:[(0,E.jsx)("div",{className:g,children:t||(0,E.jsx)(M.default,{type:"icon-shangchuan",size:64})}),(0,E.jsx)("div",{className:x,children:s||(0,E.jsx)(O.FormattedMessage,{id:"dragTitle",moduleName:"FileList"})}),(0,E.jsx)("div",{className:_,children:o})]})},$=e=>{let{children:t=(0,E.jsx)(K,{}),className:s}=e;const{open:n,accept:a,onOpenChange:l,onFileSelected:r}=q();return n?(0,E.jsxs)("div",{className:R()(p,s),onDragOver:e=>{e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDrop:e=>{if(e.stopPropagation(),e.preventDefault(),0===e.dataTransfer.files.length)return;l(!1);const t=Array.from(e.dataTransfer.files).filter(e=>(0,G.A)(e,a));r(t)},onDragEnd:()=>{l(!1)},children:[(0,E.jsx)(o.Button,{className:h,type:"text",shape:"circle",size:"small",icon:(0,E.jsx)(M.default,{type:"icon-close-bold"}),onClick:()=>{l(!1)}}),t]}):null};var ee=s(50196),te=s(63743);const se=e=>{var t,s;let{className:l,maxLength:i=Number.MAX_VALUE,list:c,setList:d,infoItemRenders:p,defaultTab:h="list",defaultPreviewFileId:f,apis:g,getPermission:x=()=>!0,titleExtra:_=null,fileSize:A=20,accept:v=[".png",".jpg",".pdf",".docx",".doc"],getPopupContainer:b}=e;const{apis:j}=(0,te.usePreset)(),y=Object.assign({},j,g),N=(c||[]).map(e=>Object.assign({},{id:e.ossId},e)),{fileList:S,onFileSelected:w}=(0,H.useFileUpload)({maxLength:i,multiple:!0,value:N,onChange:d,concurrentCount:1,onAdd:()=>{F("list")},onSave:async function(e){if("function"===typeof y.onSave){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];const a=await y.onSave(e,...s);return Object.assign({},{id:null===a||void 0===a?void 0:a.ossId},a)}return r()(e,"data")||{}},onUpload:y.onUpload||y.ossUpload}),[C,F]=(0,a.useState)(h),{formatMessage:P}=(0,O.useIntl)({moduleName:"FileList"}),{message:I}=o.App.useApp(),T=(0,a.useMemo)(()=>new Map(N.map(e=>[e.id,e])),[N]),[M,L]=(0,a.useState)(f||r()(N,"[0].id",null));(0,a.useEffect)(()=>{M&&T.get(M)||L(r()(N,"[0].id",null))},[N,T,M]);const R=(0,n.A)((0,n.A)({},y),{},{onPreview:e=>{L(e.id),F("preview")},onDelete:async e=>{y.onDelete&&!1===await y.onDelete(e)||(d(t=>{const s=t.slice(0),n=t.findIndex(t=>{let{id:s}=t;return s===e.id});return n>-1&&s.splice(n,1),s}),I.success(P({id:"successDelete"},{name:e.filename})))},onEdit:async e=>{let{formData:t,item:s}=e;const n=y.onEdit&&await y.onEdit({formData:t,item:s});return!1!==n&&(d(e=>{const n=e.slice(0),a=e.findIndex(e=>{let{id:t}=e;return t===s.id});return a>-1&&n.splice(a,1,Object.assign({},s,{filename:t.name})),n}),I.success(P({id:"successEditFileName"},{name:s.filename}))),n}}),Z="function"===typeof _?_({currentPreviewFileId:M,currentTab:C}):_;return(0,E.jsx)("div",{className:l,children:(0,E.jsxs)(J,{title:(0,E.jsx)(D,{currentTab:C,setCurrentTab:F,previewMap:T,previewList:N,getPermission:x,currentPreviewFileId:M,setCurrentPreviewFileId:L,itemApis:R,getPopupContainer:b,children:(0,E.jsxs)(o.Space,{split:(0,E.jsx)(o.Divider,{type:"vertical"}),children:[Z,x("add",{})?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(X,{children:P({id:"dragText"})}),(0,E.jsx)(Y,{children:P({id:"uploadFile"})})]}):null]})}),fileSize:A,maxLength:i,onFileSelected:w,accept:v,defaultOpen:0===N.length,children:["list"===C?(0,E.jsx)(k.List,{dataSource:[...N,...S],getPermission:x,apis:R,infoItemRenders:p}):null,"preview"===C?M?(0,E.jsx)("div",{className:u,children:(0,E.jsx)(ee.default,{className:m,src:null===(t=T.get(M))||void 0===t?void 0:t.src,id:M,apis:y,filename:null===(s=T.get(M))||void 0===s?void 0:s.filename})}):(0,E.jsx)(o.Empty,{image:o.Empty.PRESENTED_IMAGE_SIMPLE,className:"ant-empty-normal"}):null,(0,E.jsx)($,{})]})})},ne=e=>(0,E.jsx)(O.IntlProvider,{importMessages:z,moduleName:"FileList",children:(0,E.jsx)(se,(0,n.A)({},e))});var ae=s(10986),le=s.n(ae);const re=["maxLength","apis","getPermission","fileSize","accept","defaultList"],oe=e=>{let{maxLength:t=Number.MAX_VALUE,apis:s,getPermission:a=()=>!0,fileSize:l=20,accept:i=[".png",".jpg",".pdf",".docx",".doc"],defaultList:c=[]}=e,d=(0,Z.A)(e,re);const{apis:u}=(0,te.usePreset)(),m=Object.assign({},u,s),[p,h]=le()((0,n.A)({defaultList:c},d),{defaultValue:"defaultList",value:"list",onChange:"setList"}),{fileList:f,onFileSelected:g}=(0,H.useFileUpload)({maxLength:t,multiple:!0,value:p,onChange:h,concurrentCount:1,onSave:async function(e){if("function"===typeof m.onSave){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];const a=await m.onSave(e,...s);return Object.assign({},{id:null===a||void 0===a?void 0:a.ossId},a)}return r()(e,"data")||{}},onUpload:m.ossUpload});return(0,E.jsxs)(J,{title:(0,E.jsxs)(o.Row,{children:[(0,E.jsx)(o.Col,{flex:1}),(0,E.jsx)(o.Col,{children:(0,E.jsxs)(o.Space,{split:(0,E.jsx)(o.Divider,{type:"vertical"}),children:[(0,E.jsx)(X,{}),(0,E.jsx)(Y,{children:"\u4e0a\u4f20"})]})})]}),fileSize:l,maxLength:t,onFileSelected:g,accept:i,children:[(0,E.jsx)(k.List,{dataSource:[...f,...p],getPermission:a,apis:m}),(0,E.jsx)($,{})]})}},29556:(e,t,s)=>{s.r(t),s.d(t,{TooltipFetch:()=>T,TooltipInfoLabel:()=>C,default:()=>S});var n=s(89379),a=s(53986),l=s(55199),r=s(83136),o=s.n(r);const i="style_tooltip__zHGMI__sfb0Z",c="style_large__lvmsm__sfb0Z",d="style_small__nUt0r__sfb0Z",u="style_popup-content__-rKQN__sfb0Z",m="style_title__1EQPq__sfb0Z",p="style_important-info__qTSZY__sfb0Z",h="style_error__yTTq3__sfb0Z",f="style_warning__CMJxz__sfb0Z",g="style_success__AvJVx__sfb0Z",x="style_sub-title__uD8CH__sfb0Z",_="style_content__lzgUz__sfb0Z",A="style_alone__q6q82__sfb0Z",v="style_fetch-content__tEOEV__sfb0Z",b="style_fetch-loading__tN-WB__sfb0Z",j="style_title-info-icon__iY8Q+__sfb0Z";var y=s(70579);const N=["overlayClassName","title","size","subtitle","content","importantInfo","importantInfoType","moreInfo"],S=e=>{let{overlayClassName:t,title:s,size:r,subtitle:v,content:b,importantInfo:j,importantInfoType:S,moreInfo:w}=e,C=(0,a.A)(e,N);return(0,y.jsx)(l.Tooltip,(0,n.A)((0,n.A)({},C),{},{rootClassName:o()(t,i,{[d]:"small"===r,[c]:"large"===r}),title:(0,y.jsxs)(l.Space,{direction:"vertical",className:u,children:[s&&(0,y.jsx)("div",{className:m,children:s}),j&&(0,y.jsx)("div",{className:o()(p,{[g]:"success"===S,[f]:"warning"===S,[h]:"error"===S}),children:j}),v&&(0,y.jsx)("div",{className:x,children:v}),b&&(0,y.jsx)("div",{className:o()(_,{[A]:[s,v,j,w].every(e=>!e)}),children:b}),w&&(0,y.jsx)("div",{children:w})]})}))};var w=s(64671);const C=e=>{let{title:t,tooltipTitle:s}=e;return(0,y.jsxs)("div",{children:[t,s?(0,y.jsx)(S,(0,n.A)((0,n.A)({},s),{},{children:(0,y.jsx)("span",{children:(0,y.jsx)(w.default,{type:"icon-xinxi-miaobian",className:j,size:14})})})):null]})};var F=s(73884),P=s(87558);const I=["api","children","fetchContent","showLoading","loadingClassName","force"],T=e=>{let{api:t,children:s,fetchContent:r,showLoading:i=!0,loadingClassName:c,force:d}=e,u=(0,a.A)(e,I);const[m,p]=(0,F.useState)(!1),h=(0,P.useFetch)(Object.assign({},t,{auto:!1})),{isComplete:f,isLoading:g,data:x,send:_}=h;return(0,y.jsx)(S,(0,n.A)((0,n.A)({},Object.assign({},u,f?r(x,h):{})),{},{open:m,onOpenChange:async e=>{!e||f&&!d||await _({type:"refresh"}),p(e)},children:(0,y.jsxs)("span",{className:v,children:[s,i&&g?(0,y.jsx)(l.Spin,{size:"small",className:o()(c,b)}):null]})}))}},30096:(e,t,s)=>{s.d(t,{Ay:()=>d});var n=s(98434),a=s(43856);const{useOnChange:l}=n.hooks,r=e=>{const t=t=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+t.label},t))(e);return t.field=t.Field=e,t},o=r(a.UserField),i=r(a.TableField),c=r(a.AdvancedSelectField);c.createdList=e=>{let{renderList:t,defaultProps:s}=e;return r((0,a.createListField)({renderList:t,defaultProps:s}))},c.User=o,c.Table=i;const d=c},30891:(e,t,s)=>{s.d(t,{A:()=>l});var n=s(89379),a=s(98434);const l=e=>{let{children:t}=e;const{openApi:s,formData:l}=(0,a.useFormContext)();return t((0,n.A)((0,n.A)({},s),{},{formData:l}))}},34643:(e,t,s)=>{s.d(t,{Ay:()=>m,Pg:()=>c,eM:()=>d,kx:()=>u});var n=s(98434),a=s(43856),l=s(60586);const{useOnChange:r}=n.hooks,o=e=>{const t=t=>r(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+t.label},t))(e);return t.field=t.Field=e,t},i=o(a.SuperSelectField),c=o(l.$9),d=o(a.SuperSelectTableListField),u=o(a.SuperSelectTreeField),m=i},35774:(e,t,s)=>{s.d(t,{A:()=>c});var n=s(89379),a=s(53986),l=s(98434),r=s(81014),o=s(70579);const i=["onClick"],c=e=>{let{onClick:t}=e,s=(0,a.A)(e,i);const c=(0,l.useFormContext)();return(0,o.jsx)(r.default,(0,n.A)((0,n.A)({},s),{},{onClick:e=>t(c,e)}))}},36972:(e,t,s)=>{s.d(t,{A:()=>E});var n=s(89379),a=s(53986),l=s(73884),r=s(87558),o=s(98434),i=s(78491),c=s.n(i),d=s(55199);const u="style_salary__sUOtT__sfb0Z",m="style_salary-type__Sl1LC__sfb0Z",p="style_input-number__eoEZr__sfb0Z",h="style_full__NPqJm__sfb0Z",f="style_input-group__toLB7__sfb0Z",g="style_input-group-no-mb__C4nzh__sfb0Z";var x=s(47458),_=s(55431),A=s(48731),v=s(10986),b=s.n(v),j=s(21079),y=s(70579);const N=["data"],S=["getPopupContainer","onBlur","api","isRange","placeholder","disabled","showMonth","remindUnit","req"],w=["api","defaultValue"],C=(0,r.withFetch)(e=>{let{data:t}=e,s=(0,a.A)(e,N);return(0,y.jsx)(d.Select,(0,n.A)((0,n.A)({},s),{},{options:t}))}),{useDecorator:F,useUIDecorator:P}=o.hooks,I=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},T=e=>{let{children:t,isError:s}=e;return(0,y.jsx)("div",{style:{marginBottom:0},className:"react-form__field ".concat(s?"is-error":""),children:(0,y.jsx)("div",{className:"react-form__field-main",children:(0,y.jsx)("div",{className:"react-form__field-input",children:(0,l.cloneElement)(t,{className:"react-form__field-component"})})})})},M=e=>{let{getPopupContainer:t,onBlur:s,api:l,isRange:r=!0,placeholder:o,disabled:i,showMonth:_,remindUnit:v,req:N}=e,w=(0,a.A)(e,S);const[F,P]=b()(w),{formatMessage:M}=(0,x.useIntl)({moduleName:"FormInfo"}),k=M({id:"defaultSelectPlaceholder"},{label:""}),O=M({id:"defaultInputPlaceholder"},{label:""}),L=[6].indexOf((0,j.get)(F,"type"))>-1,R=1===(0,j.get)(F,"type"),E=7===(0,j.get)(F,"type"),D=e=>{if(e)return L?e/1e4:e},Z=c()(s||(()=>{}));return(0,y.jsx)("div",{ref:Z,className:u,children:(0,y.jsxs)(d.Row,{wrap:!1,gutter:10,children:[(0,y.jsx)(d.Col,{children:(0,y.jsx)(C,(0,n.A)((0,n.A)({className:m},l),{},{value:(0,j.get)(F,"type"),onChange:e=>{P&&P(Object.assign({},R?{}:F,{type:e,min:"",max:""}))},placeholder:o||k,getPopupContainer:t,disabled:i}))}),R?null:(0,y.jsxs)(d.Col,{flex:1,children:[r&&(0,y.jsxs)(d.Row,{className:v&&[5,6].includes(null===F||void 0===F?void 0:F.type)?f:g,wrap:!1,children:[(0,y.jsx)(d.Col,{flex:1,children:(0,y.jsx)(T,{isError:!(0,j.get)(F,"min")&&N,children:(0,y.jsx)(d.InputNumber,{disabled:i,placeholder:O,formatter:I,value:D((0,j.get)(F,"min")),style:{textAlign:"center"},onChange:e=>{P(Object.assign({},F,{min:L?1e4*e:e}))},description:v&&[5,6].includes(null===F||void 0===F?void 0:F.type)?(0,y.jsxs)("span",{style:{color:"#fc3333"},children:["\u6ce8\u610f\uff1a",(0,y.jsx)(A.default,{name:null===F||void 0===F?void 0:F.type,moduleName:"salaryTypeEnum"}),"\u7684\u5355\u4f4d\u4e3a",L?M({id:"thousand"}):E?"":M({id:"yuan"})]}):null})})}),(0,y.jsx)(d.Col,{children:(0,y.jsx)(d.Input,{style:{width:30,borderLeft:0,borderRight:0,pointerEvents:"none"},placeholder:"~",disabled:!0})}),(0,y.jsx)(d.Col,{flex:1,children:(0,y.jsx)(T,{isError:!(0,j.get)(F,"max")&&N,children:(0,y.jsx)(d.InputNumber,{disabled:i,placeholder:O,formatter:I,value:D((0,j.get)(F,"max")),style:{textAlign:"center"},addonAfter:L?M({id:"thousand"}):E?"":M({id:"yuan"}),onChange:e=>{P(Object.assign({},F,{max:L?1e4*e:e}))}})})}),5===(0,j.get)(F,"type")&&_&&(0,y.jsx)(d.Col,{children:(0,y.jsxs)("span",{className:(0,j.get)(F,"max")&&(0,j.get)(F,"min")&&!(0,j.get)(F,"month")&&N?"error":"",children:[(0,y.jsx)("span",{className:p,children:"X"}),(0,y.jsx)(d.InputNumber,{min:12,disabled:i,value:(0,j.get)(F,"month"),onChange:e=>{P(Object.assign({},F,{month:e}))},style:{width:100,textAlign:"center"},placeholder:"\u6570\u91cf",addonAfter:"\u6708"})]})})]}),!r&&!E&&(0,y.jsx)(d.InputNumber,{disabled:i,min:0,max:1e8,placeholder:O,className:h,formatter:I,value:D((0,j.get)(F,"max")),style:{textAlign:"center"},addonAfter:L?M({id:"thousand"}):E?"":M({id:"yuan"}),onChange:e=>{P(Object.assign({},F,{max:L?1e4*e:e}))}}),!r&&E&&(0,y.jsx)(d.Input,{disabled:i,placeholder:O,className:h,onChange:e=>{P(Object.assign({},F,{max:e.target.value}))},value:(0,j.get)(F,"max"),style:{textAlign:"center"}})]})]})})},k={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"}]},O={type:5,min:"",max:"",month:12},L=e=>{let{api:t=k,defaultValue:s=O}=e,l=(0,a.A)(e,w);return(0,y.jsx)(x.IntlProvider,{moduleName:"FormInfo",importMessages:_.A,children:(0,y.jsx)(M,(0,n.A)((0,n.A)({},l),{},{api:t,defaultValue:s}))})},R=e=>{var t;return F((0,n.A)((0,n.A)({},e),{},{req:(null===e||void 0===e||null===(t=e.rule)||void 0===t?void 0:t.indexOf("REQ"))>-1}))(L)};R.Field=L;const E=R},41381:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a.a});s(55664);var n=s(93813),a=s.n(n),l={};for(const r in n)"default"!==r&&(l[r]=()=>n[r]);s.d(t,l)},45053:(e,t,s)=>{s.d(t,{A:()=>m});var n=s(98434),a=s(55199),l=s(73884),r=s(83136),o=s.n(r),i=s(70720),c=s.n(i),d=s(47094),u=s(70579);const m=e=>{let{name:t,groupName:s,overlayClassName:r,errorRender:i=()=>null,groupIndex:m,children:p}=e;const h=(e=>{let{name:t,groupName:s,groupIndex:a}=e;const{emitter:r,formState:o}=(0,n.useFormContext)(),i=(0,l.useRef)({name:t,groupName:s,groupIndex:a});i.current={name:t,groupName:s,groupIndex:a};const c=(0,l.useRef)(o);c.current=o;const[d,u]=(0,l.useState)(null);return(0,l.useEffect)(()=>{const e=r.addListener("form-field-validate-complete",e=>{let{id:t,validate:s}=e;const a=c.current[t];if(!a)return;const l=i.current;a.name!==l.name||l.groupName&&(a.groupName!==l.groupName||a.groupIndex!==l.groupIndex)||u(2===s.status?Object.assign({},s,{label:a.label,errMsg:n.util.compileErrMsg(s.msg,a.label)}):null)});return()=>{e&&e.remove()}},[r]),d})({name:t,groupName:s,groupIndex:m}),[f,g]=(0,l.useState)(!1),x=h&&f&&i(Object.assign({},h,{closeHover:()=>g(!1)})),_=(0,l.useRef)(null),A=(0,l.useRef)(null);c()(()=>{g(!1)}).current={contains:e=>_.current.contains(e)||A.current&&A.current.contains(e)};const[v,b]=(0,l.useState)(0);return(0,l.useLayoutEffect)(()=>{const e=()=>{const e=_.current.querySelector(".react-form__field-component");e&&b(e.clientWidth)};e();const t=new ResizeObserver(e);t.observe(_.current);const s=new MutationObserver(e);return s.observe(_.current,{subtree:!0,childList:!0}),()=>{s.disconnect(),t.disconnect()}},[]),(0,u.jsx)(a.Popover,{open:!!x,rootClassName:o()(r,d.A["error-tip-overlay"]),content:x&&(0,u.jsx)("div",{ref:A,style:{width:v},className:o()(d.A["error-tip-overlay-content"]),children:x}),placement:"bottom",transitionName:"ant-slide-up",arrow:!1,children:(0,u.jsx)("div",{className:o()("error-tip"),ref:_,onMouseEnter:()=>{g(!0)},children:p})})}},46237:(e,t,s)=>{s.d(t,{Ay:()=>i,oc:()=>o});var n=s(73884);const a=(0,n.createContext)([]),{Provider:l,Consumer:r}=a,o=()=>(0,n.useContext)(a),i=l},46732:(e,t,s)=>{s.d(t,{A:()=>d,K:()=>c});var n=s(75363),a=s(73884),l=s(98434),r=s(47094),o=s(70579);const i=(0,a.createContext)(""),{Provider:c}=i,d=e=>{let{name:t}=e;const s=(0,a.useContext)(i),c=(0,l.useGroup)();return s&&(0,o.jsx)(n.default,{className:r.A["helper-guide-field"],name:s+"-"+(c.name?c.name+"-":"")+t})}},47094:(e,t,s)=>{s.d(t,{A:()=>n});const n={"form-outer":"style_form-outer__IWUs0__sfb0Z","form-drawer":"style_form-drawer__uYDXS__sfb0Z","table-list":"style_table-list__6lp-A__sfb0Z","list-item":"style_list-item__hVzQa__sfb0Z","table-list-inner":"style_table-list-inner__uc8DK__sfb0Z","table-list-field":"style_table-list-field__JSJfB__sfb0Z","table-list-header":"style_table-list-header__KXvKa__sfb0Z","is-req":"style_is-req__LfXQf__sfb0Z","table-list-extra":"style_table-list-extra__faYTK__sfb0Z","list-btn":"style_list-btn__WKYkm__sfb0Z","form-info":"style_form-info__B8bAP__sfb0Z","list-part":"style_list-part__Ld0GA__sfb0Z","is-important":"style_is-important__vaBk1__sfb0Z","list-item-part":"style_list-item-part__MzKP7__sfb0Z","money-input":"style_money-input__J86Pb__sfb0Z","money-description":"style_money-description__Gz3p7__sfb0Z","components-upload-wrapper":"style_components-upload-wrapper__Ir0gz__sfb0Z","textarea-wrapped-component":"style_textarea-wrapped-component__r1oKc__sfb0Z","helper-guide-field":"style_helper-guide-field__Wke3w__sfb0Z","error-tip-overlay":"style_error-tip-overlay__aNCGc__sfb0Z","error-tip-overlay-content":"style_error-tip-overlay-content__kDOoQ__sfb0Z","column-not-layout":"style_column-not-layout__+SXC+__sfb0Z","mult-field-item":"style_mult-field-item__eS0nJ__sfb0Z","react-form__field-label":"style_react-form__field-label__2U91E__sfb0Z","mult-field-add-btn":"style_mult-field-add-btn__5Baxz__sfb0Z","form-step-section":"style_form-step-section__RvkHy__sfb0Z"}},47338:(e,t,s)=>{s.r(t),s.d(t,{ConfirmButton:()=>n.ConfirmButton,ConfirmLink:()=>n.ConfirmLink,ConfirmText:()=>n.ConfirmText,default:()=>a,withConfirm:()=>n.withConfirm});s(9056);var n=s(38885);const a=n.ConfirmButton},48221:(e,t,s)=>{s.d(t,{Ay:()=>c,WJ:()=>u,Xy:()=>d});var n=s(89379),a=s(25963),l=s(73025),r=s(47094),o=s(76995),i=s(70579);const c=e=>(0,i.jsx)(a.default,(0,n.A)({},(0,o.A)(Object.assign({},e,{className:r.A["form-drawer"]})))),d=()=>{const e=(0,a.useDrawer)();return t=>e((0,o.A)(Object.assign({},t,{className:r.A["form-drawer"]})))},u=e=>{const t=d();return(0,i.jsx)(l.A,(0,n.A)((0,n.A)({},e),{},{modalFunc:t}))}},50196:(e,t,s)=>{s.r(t),s.d(t,{AudioPreview:()=>n.AudioPreview,HtmlPreview:()=>n.HtmlPreview,ImagePreview:()=>n.ImagePreview,OSSFilePreview:()=>n.OSSFilePreview,OfficePreview:()=>n.OfficePreview,PdfPreview:()=>n.PdfPreview,TextPreview:()=>n.TextPreview,UnknownPreview:()=>n.UnknownPreview,VideoPreview:()=>n.VideoPreview,default:()=>n.FilePreview});s(64674);var n=s(36125)},55431:(e,t,s)=>{s.d(t,{A:()=>n});const n=e=>({"en-US":()=>s.e(1649).then(s.bind(s,21649)),"zh-CN":()=>s.e(711).then(s.bind(s,80711))}[e]())},56259:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(89319),a=s(98434);const{useOnChange:l}=a.hooks,r=e=>l(Object.assign({},{},e))(n.A);r.Field=n.A;const o=r},64261:(e,t,s)=>{s.d(t,{A:()=>A});var n=s(89379),a=s(98434),l=s(57469),r=s.n(l),o=s(34677),i=s.n(o),c=s(33097),d=s.n(c),u=s(22717),m=s.n(u),p=(s(17448),s(2842)),h=s(46732),f=s(13050),g=s(70579);const x=a.RULES.REQ,_=a.RULES.LEN,A=async(e,t)=>{const{locale:s}=Object.assign({},t);a.interceptors.input.use("photo-string",e=>{if(e&&"string"===typeof e){const[t,s]=e.split("?"),n=new URLSearchParams(s);return Object.assign({},{id:t},m()(Array.from(n.entries()),(e,t)=>{e[t[0]]=t[1]},{}))}return e}),a.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),a.interceptors.input.use("photo-string-list",e=>e&&Array.isArray(e)&&e.length>0?e.map(e=>{const[t,s]=e.split("?"),n=new URLSearchParams(s);return Object.assign({},{id:t},m()(Array.from(n.entries()),(e,t)=>{e[t[0]]=t[1]},{}))}):e),a.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),a.interceptors.input.use("to-array",e=>Array.isArray(e)?e[0]:e),a.interceptors.output.use("to-array",e=>[e]),a.interceptors.input.use("array-single",e=>e?[e]:[]),a.interceptors.output.use("array-single",e=>e?e[0]:null),a.interceptors.input.use("boolean-number",e=>1===e||"1"===e),a.interceptors.output.use("boolean-number",e=>e?1:0),a.interceptors.input.use("un-boolean",e=>!e),a.interceptors.output.use("un-boolean",e=>!e),a.interceptors.output.use("object-output-value",e=>e?e.value||e.id:e),a.interceptors.input.use("date-string",e=>e?r()(e):null),a.interceptors.output.use("date-string",e=>e?new Date(e.valueOf()).toISOString():""),a.interceptors.input.use("date-range-string",e=>{if(!Array.isArray(e))return[];const t=[];return e[0]&&t.push(r()(e[0])),e[0]&&e[1]&&"sofar"===e[1]&&t.push("\u81f3\u4eca"),e[0]&&e[1]&&"\u81f3\u4eca"!==e[1]&&t.push(r()(e[1])),t}),a.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}),a.interceptors.output.use("file-format",e=>Array.isArray(e)?e.map(e=>Object.assign({},e,{id:e.id||e.ossId,originalName:e.filename})):[]),a.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:l}=await(0,f.loadModule)("components-iconfont:CountyFlag@load"),o=await l(),c=new Map(o.map(e=>{let{ab:t,country_code:s}=e;return[t,s]})),u=new Map(o.map(e=>{let{ab:t,country_code:s}=e;return[s,t]}));a.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,"")):""),a.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 A=(e,t)=>{t=Object.assign({},t);const n={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)}},a=d()(n,"".concat(e,".").concat(s));return a||d()(n,"".concat(e,".zh-CN"))};(0,a.preset)(i()({},{type:"inner",rules:{REQ:function(){return Object.assign({},x(...arguments),{errMsg:A("REQ")})},LEN:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const[n,a,l]=t;let r="";return l===a&&n.length!==Number(l)&&(r="LENGTH_EQUAL"),n.length<a&&(r="LENGTH_MORE"),l&&n.length>l&&(r="LENGTH_LESS"),Object.assign({},_(...t),{errMsg:A(r,{start:a,end:l})})},EMAIL:function(e){return{result:/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e),errMsg:A("EMAIL")}},PHONE_NUMBER_INPUT:p.PHONE_NUMBER_INPUT,ARRAY_LENGTH:(e,t,s)=>s===t&&e.length!==Number(s)?{result:!1,errMsg:A("LENGTH_EQUAL",{start:t,end:s})}:e.length<t?{result:!1,errMsg:A("LENGTH_MORE",{start:t,end:s})}:s&&e.length>s?{result:!1,errMsg:A("LENGTH_LESS",{start:t,end:s})}:{result:!0}},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,g.jsx)(h.A,(0,n.A)({},e))}},"function"===typeof e?e({interceptors:a.interceptors,RULES:a.RULES}):e))}},76995:(e,t,s)=>{s.d(t,{A:()=>g});var n=s(89379),a=s(53986),l=s(55431),r=s(98434),o=s(47458),i=s(83799),c=s(83136),d=s.n(c),u=s(47094),m=s(70579);const p=["className","withDecorator","footerButtons","formProps","cancelText","saveText","autoClose"],h=["onSubmit","key"],f="FormInfo",g=e=>{let{className:t,withDecorator:s,footerButtons:c,formProps:g,cancelText:x,saveText:_,autoClose:A=!0}=e,v=(0,a.A)(e,p);return(0,n.A)((0,n.A)({},v),{},{footerButtons:c||[{children:(0,m.jsx)(o.IntlProvider,{importMessages:l.A,moduleName:f,children:x||(0,m.jsx)(o.FormattedMessage,{id:"Cancel",moduleName:f})}),ButtonComponent:r.CancelButton},{type:"primary",children:(0,m.jsx)(o.IntlProvider,{importMessages:l.A,moduleName:f,children:_||(0,m.jsx)(o.FormattedMessage,{id:"Save",moduleName:f})}),ButtonComponent:r.SubmitButton,autoClose:!1}],withDecorator:(e,t)=>{const r=t=>{const s=Object.assign({},"function"===typeof g?g(t):g),{onSubmit:r,key:c}=s,d=(0,a.A)(s,h);return(0,m.jsx)(i.lV,(0,n.A)((0,n.A)({},d),{},{onSubmit:async function(e){for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];!1!==(r&&await r(e,Object.assign({},t),...n))&&A&&t.close()},children:(0,m.jsx)(o.IntlProvider,{importMessages:l.A,moduleName:"FormInfo",children:e(t)})}))};return"function"===typeof s?s(r,t):r(t)},className:d()(t,u.A["form-outer"])})}},78756:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(43856),a=s(98434);const{useOnChange:l}=a.hooks,r=e=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(n.IndustrySelectField);r.Field=n.IndustrySelectField,r.Enum=n.IndustrySelectField.Enum;const o=r},81026:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(43856),a=s(98434);const{useOnChange:l}=a.hooks,r=e=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(n.FunctionSelectField);r.Field=n.FunctionSelectField,r.Enum=n.FunctionSelectField.Enum;const o=r},83230:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(98434),a=s(43856);const{useOnChange:l}=n.hooks,r=e=>l(Object.assign({},{placeholder:"\u8bf7\u9009\u62e9"+e.label},e))(a.CascaderField);r.Field=a.CascaderField,r.createTreeUtils=a.createTreeUtils;const o=r},83799:(e,t,s)=>{s.d(t,{NI:()=>q,TQ:()=>p.A,JL:()=>z,eu:()=>v.A,vx:()=>h.A,lr:()=>ee,s3:()=>te,lV:()=>r.A,d4:()=>f.A,ZN:()=>g.A,pd:()=>G,YI:()=>J,h2:()=>H,F0:()=>x.A,go:()=>_.default,tt:()=>l.Rate,lu:()=>b.A,l6:()=>Y,Ap:()=>l.Slider,wD:()=>U,eM:()=>B,kx:()=>V,Pg:()=>W,dO:()=>l.Switch,EY:()=>M,fs:()=>Q,AG:()=>$,f7:()=>K,w5:()=>y.A,_O:()=>A.A,nk:()=>se});var n=s(89379),a=s(53986),l=s(98434),r=s(85696),o=s(47458),i=s(73884),c=s(30891),d=s(47094),u=s(30096),m=s(34643),p=s(1904),h=s(83230),f=s(81026),g=s(78756),x=s(92328),_=s(2842),A=s(89099),v=s(96339),b=s(36972),j=s(15209),y=s(56259),N=s(55199),S=s(10986),w=s.n(S),C=s(70579);const F=["children"],{useDecorator:P}=l.hooks,I=e=>{let{children:t}=e,s=(0,a.A)(e,F);const[l]=w()(s);return(0,C.jsxs)(N.Typography.Text,(0,n.A)((0,n.A)({},s),{},{children:[(0,C.jsx)("div",{style:{height:0,width:0,overflow:"hidden"},children:(0,C.jsx)(N.Input,{value:l})}),t||l]}))},T=e=>P(e)(I);T.Field=I;const M=T;var k=s(45053);const O=["placeholder","label"],L=["placeholder","label","className"],R=["placeholder","label"],E=["placeholder","label","soFarText"],D=e=>{const t=(0,i.forwardRef)((t,s)=>{let{placeholder:l,label:r}=t,i=(0,a.A)(t,O);return(0,C.jsx)(o.FormattedMessage,{id:"defaultInputPlaceholder",moduleName:"FormInfo",values:{label:r},children:t=>(0,C.jsx)(e,(0,n.A)((0,n.A)({},i),{},{ref:s,label:r,placeholder:l||t}))})});return Object.keys(e).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(s=>{t[s]=e[s]}),t},Z=e=>{const t=(0,i.forwardRef)((t,s)=>{let{placeholder:l,label:r}=t,i=(0,a.A)(t,R);return(0,C.jsx)(o.FormattedMessage,{id:"defaultSelectPlaceholder",moduleName:"FormInfo",values:{label:r},children:t=>(0,C.jsx)(e,(0,n.A)((0,n.A)({},i),{},{ref:s,label:r,placeholder:l||t}))})});return Object.keys(e).filter(e=>-1===["$$typeof","render","field"].indexOf(e)).forEach(s=>{t[s]=e[s]}),t},z=Z(u.Ay),U=Z(m.Ay),B=Z(m.eM),W=Z(m.Pg),V=Z(m.kx),q=Z(p.N),H=D(j.A),G=D(l.Input);G.Password=D(l.Input.Password);const Q=(X=l.TextArea,e=>{let{placeholder:t,label:s,className:l}=e,r=(0,a.A)(e,L);return(0,C.jsx)(o.FormattedMessage,{id:"defaultInputPlaceholder",moduleName:"FormInfo",values:{label:s},children:e=>(0,C.jsx)("div",{className:d.A["textarea-wrapped-component"],children:(0,C.jsx)(X,(0,n.A)((0,n.A)({},r),{},{label:s,placeholder:t||e}))})})});var X;const Y=Z(l.Select),J=D(l.InputNumber),K=Z(l.TreeSelect),$=Z(l.TimePicker);$.RangePicker=Z(l.TimePicker.RangePicker);const ee=Z(l.DatePicker);ee.MonthPicker=Z(l.DatePicker.MonthPicker),ee.RangePicker=Z(l.DatePicker.RangePicker),ee.WeekPicker=Z(l.DatePicker.WeekPicker);const te=e=>{let{placeholder:t,label:s,soFarText:r}=e,i=(0,a.A)(e,E);const{formatMessage:c}=(0,o.useIntl)({moduleName:"FormInfo"});return(0,C.jsx)(l.DatePickerToday,(0,n.A)((0,n.A)({},i),{},{label:s,placeholder:[c({id:"startDate"}),c({id:"endDate"})],soFarText:r||c({id:"soFarText"})}))},se=Object.assign({},l,{Input:G,InputUpperCase:H,TextArea:Q,Select:Y,InputNumber:J,TreeSelect:K,TimePicker:$,DatePicker:ee,DatePickerToday:te,Form:r.A,FormItem:c.A,AdvancedSelect:z,SuperSelect:U,SuperSelectTableList:B,SuperSelectUser:W,SuperSelectTree:V,AddressSelect:p.A,AddressInput:q,MoneyInput:x.A,PhoneNumber:_.default,Cascader:h.A,FunctionSelect:f.A,IndustrySelect:g.A,TypeDateRangePicker:y.A,Upload:A.A,Avatar:v.A,SalaryInput:b.A,Text:M,Rate:l.Rate,Switch:l.Switch,Slider:l.Slider,ErrorTip:k.A})},85696:(e,t,s)=>{s.d(t,{A:()=>j});var n=s(89379),a=s(53986),l=s(73884),r=s(63743),o=s(33097),i=s.n(o),c=s(64261),d=s(47458),u=s(55431),m=s(46237),p=s(41381),h=s(46732),f=s(98434),g=s(83136),x=s.n(g),_=s(47094),A=s(70579);const v=["className","helperGuideName","children","lang"],b=e=>{let{children:t}=e;const[s,n]=(0,l.useState)(!1),a=(0,r.usePreset)(),o=i()(a,"formInfo",{}),d=i()(a,"locale");return(0,l.useEffect)(()=>{Promise.resolve((0,c.A)(o,{locale:d})).then(()=>{n(!0)})},[o,d]),s?t:null},j=(0,l.forwardRef)((e,t)=>{let{className:s,helperGuideName:l,children:r,lang:o}=e,i=(0,a.A)(e,v);return(0,A.jsx)(d.IntlProvider,{importMessages:u.A,moduleName:"FormInfo",children:(0,A.jsx)(m.Ay,{value:o,children:(0,A.jsx)(h.K,{value:l,children:(0,A.jsx)(b,{children:(0,A.jsx)(f.FormAntd,(0,n.A)((0,n.A)({},i),{},{ref:t,className:x()(s,_.A["form-outer"]),children:(0,A.jsx)(p.default,{children:r})}))})})})})})},85846:(e,t,s)=>{s.d(t,{A:()=>y});var n=s(89379),a=s(53986),l=s(73884),r=s(68532),o=s(55199),i=s(64671),c=s(41381),d=s(47338),u=s(2196),m=s(83136),p=s.n(m),h=s(55431),f=s(47458),g=s(47094),x=s(70579);const _=["addText","className","important","outer","renderChildren","deleteButtonProps","title"],A=["list","title","id","allowRemove","onRemove"],v=["add","addText","className","allowAdd"],b=(0,f.createWithIntl)({moduleName:"FormInfo",importMessages:h.A})(e=>{let{addText:t,className:s,important:c,outer:m=(0,x.jsx)(j,{}),renderChildren:h=e=>e,deleteButtonProps:v,title:b}=e,y=(0,a.A)(e,_);const{formatMessage:N}=(0,f.useIntl)({moduleName:"FormInfo"});return(0,x.jsx)(r.SubList,(0,n.A)((0,n.A)({},y),{},{listRender:e=>{let{list:t,title:s,id:l,allowRemove:r,onRemove:m}=e,h=(0,a.A)(e,A);return(0,x.jsxs)("div",{className:p()(g.A["list-item"],{[g.A["is-important"]]:c}),children:[(0,x.jsx)(u.A,(0,n.A)((0,n.A)({},h),{},{title:s,list:t,className:g.A["list-item-part"],gap:16,extra:(0,x.jsx)(f.FormattedMessage,{id:"delText",moduleName:"FormInfo",children:e=>r?(0,x.jsx)(d.default,(0,n.A)((0,n.A)({danger:!0,className:"btn-no-padding",message:N({id:"delConfirm"},{name:s}),type:"link",onClick:()=>{m(l)}},Object.assign({},v)),{},{children:null!==v&&void 0!==v&&v.children?null===v||void 0===v?void 0:v.children:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.default,{type:"icon-shanchu"}),e]})})):null})})),(0,x.jsx)(o.Divider,{})]},l)},children:(e,n)=>{let{allowAdd:a,onAdd:r}=n;return(0,l.cloneElement)(m,{title:b,addText:t,className:p()(s,g.A["list-part"]),allowAdd:a,add:()=>r({isUnshift:!1})},h(e))}}))}),j=e=>{let{add:t,addText:s,className:l,allowAdd:r}=e,d=(0,a.A)(e,v);return(0,x.jsx)(c.default.Part,(0,n.A)((0,n.A)({},d),{},{className:l,extra:r&&(0,x.jsx)(f.FormattedMessage,{id:"addText",moduleName:"FormInfo",children:e=>(0,x.jsxs)(o.Typography.Text,{className:g.A["list-btn"],onClick:t,children:[(0,x.jsx)(i.default,{type:"icon-tianjia"}),s||e]})})}))},y=b},89099:(e,t,s)=>{s.d(t,{A:()=>w});var n=s(89379),a=s(53986),l=s(55199),r=s(83136),o=s.n(r),i=s(10986),c=s.n(i);const d="style_upload__t422Q__sfb0Z",u="style_upload-list__Q9HDc__sfb0Z",m="style_tips__3Gpnu__sfb0Z";var p=s(19343),h=s(98434),f=s(47458),g=s(1488),x=s.n(g),_=s(17508),A=s(55431),v=s(70579);const b=["className","fileSize","maxLength","multiple","size","accept","children","renderTips","showUploadList","onSave","ossUpload","onUpload","getPermission","concurrentCount"],j=["interceptor"],{useOnChange:y}=h.hooks,N=(0,f.createWithIntl)({importMessages:A.A,moduleName:"FormInfo"})(e=>{const{formatMessage:t}=(0,f.useIntl)({moduleName:"FormInfo"}),s=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:r,fileSize:i,maxLength:h,multiple:g,size:A,accept:j,children:y,renderTips:N,showUploadList:S,onSave:w,ossUpload:C,onUpload:F,getPermission:P,concurrentCount:I}=s,T=(0,a.A)(s,b),[M,k]=c()(T),O=M||[],{fileList:L,onFileSelected:R}=(0,_.lN)({multiple:g,onSave:w,onUpload:C||F,fileSize:i,maxLength:h,value:O,onChange:k,concurrentCount:I}),E=[...L,...O],D=N(t({id:"uploadTips"},{extensionNames:j.map(e=>e.replace(/^\./,"")).join(","),maxLength:h,fileSize:i}),{fileSize:i,maxLength:h,accept:j});return(0,v.jsxs)(l.Space,{direction:"vertical",children:[(0,v.jsxs)(l.Flex,{align:"start",gap:8,vertical:!0,children:[(0,v.jsx)(_.Zi,(0,n.A)((0,n.A)({},x()(T,["value","onChange"])),{},{size:A,multiple:g,accept:j,className:o()(d,r),onChange:R,children:y})),D&&(0,v.jsx)("div",{className:m,children:D})]}),S&&E.length>0&&(0,v.jsx)(p.List,{className:u,dataSource:E,infoItemRenders:[],getPermission:P||(e=>"delete"===e),apis:{onDelete:e=>{const t=O.slice(0),s=t.indexOf(e);s>-1&&t.splice(s,1),k(t)}}})]})}),S=e=>{let{interceptor:t="file-format"}=e,s=(0,a.A)(e,j);return y((0,n.A)({interceptor:t},s))(N)};S.Field=N;const w=S},92328:(e,t,s)=>{s.d(t,{A:()=>y});var n=s(89379),a=s(53986),l=s(10986),r=s.n(l),o=s(98434),i=s(55199),c=s(69484);const d="style_money-input__Pyur7__sfb0Z",u="style_money-description__9pFk4__sfb0Z";var m=s(83136),p=s.n(m),h=s(34677),f=s.n(h),g=s(73884),x=s(70579);const _=["chineseEmpty","className","showError","errorDesc","transformMoneyToChinese","onBlur","moneyFormat"],{isNotEmpty:A}=o.util||o.formUtils,{useOnChange:v}=o.hooks,b=e=>{let{chineseEmpty:t,className:s,showError:l,errorDesc:o,transformMoneyToChinese:m,onBlur:h,moneyFormat:v}=e,b=(0,a.A)(e,_);const[j,y]=(0,g.useState)(""),[N,S]=r()(b),w=f()({controls:!1,precision:2,addonAfter:"\u5143"},b,{max:A(b.max)?b.max>c.e?c.e:b.max:c.e});return(0,x.jsxs)("div",{className:p()(s,"money-input",d),children:[(0,x.jsx)(i.InputNumber,(0,n.A)((0,n.A)({},w),{},{status:j,formatter:v?e=>"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):null,parser:e=>{const t=v?null===e||void 0===e?void 0:e.replace(/\$\s?|(,*)/g,""):e;return A(t)?(Number(t)>Number(w.max)||A(w.min)&&Number(t)<Number(w.min))&&y("error"):y(""),A(t)?Number(t):null},onChange:e=>{S(e)},onBlur:e=>{h&&h(e,y)}})),(0,x.jsx)("div",{className:p()(u),children:"error"===j&&l?o:A(N)?(0,c.A)(m?m(N):N):t})]})},j=e=>v(Object.assign({placeholder:"\u8bf7\u8f93\u5165".concat(e.label||"")},e))(b);j.Field=b,j.toChineseCharacter=c.A;const y=j},94005:(e,t,s)=>{s.d(t,{$X:()=>S,Ay:()=>N,Wp:()=>w});var n=s(89379),a=s(53986),l=s(3382),r=s(73884),o=s(98434),i=s(73025),c=s(47458),d=s(47094),u=s(55431),m=s(55199),p=s(76995),h=s(70579);const f=["footerButtons","cancelText","completeText","nextText","items","withDecorator","autoClose"],g=["formProps","title"],x=["onSubmit"],_=["formProps"],A=["children","stepSection"],v=["modalProps"],b="FormInfo",j=e=>{let{items:t,children:s}=e;const[n,a]=(0,r.useState)(0);return s({currentIndex:n,setCurrentIndex:a,stepCacheRef:(0,r.useRef)({}),isLastStep:n===t.length-1,currentProps:Object.assign({},t[n])})},y=e=>{let{footerButtons:t,cancelText:s,completeText:n,nextText:l,items:r,withDecorator:i,autoClose:v=!0}=e,y=(0,a.A)(e,f);return(0,p.A)(Object.assign({},y,{footerButtons:e=>{let{currentIndex:t,isLastStep:a}=e;const{footerButtons:i}=Object.assign({},r[t]);return i||[{children:(0,h.jsx)(c.IntlProvider,{importMessages:u.A,moduleName:b,children:s||(0,h.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:b})}),ButtonComponent:o.CancelButton},{type:"primary",children:(0,h.jsx)(c.IntlProvider,{importMessages:u.A,moduleName:b,children:a?n||(0,h.jsx)(c.FormattedMessage,{id:"Complete",moduleName:b}):l||(0,h.jsx)(c.FormattedMessage,{id:"Next",moduleName:b})}),ButtonComponent:o.SubmitButton,autoClose:!1}]},withDecorator:(e,t)=>{const s=t=>(0,h.jsx)(j,{items:r,children:s=>{var n;let{currentIndex:l,isLastStep:o,setCurrentIndex:i,currentProps:c,stepCacheRef:u}=s;const{formProps:p,title:f}=c,_=(0,a.A)(c,g),A="function"===typeof p?p(t):p,{onSubmit:b}=A,j=(0,a.A)(A,x),y=Object.assign({},j.data,null===(n=u.current[l])||void 0===n?void 0:n.data);return e(Object.assign({},t,_,{currentIndex:l,isLastStep:o,setCurrentIndex:i,stepCacheRef:u,stepSection:(0,h.jsx)(m.Steps,{className:d.A["form-step-section"],current:l,items:r.map(e=>{let{title:t}=e;return{title:t}})}),formProps:Object.assign({},j,{key:l,data:y,onSubmit:async function(e){u.current[l]={data:e};for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];const r=b&&await b(e,Object.assign({},t,{currentIndex:l,isLastStep:o,setCurrentIndex:i,currentProps:c,stepCacheRef:u}),...n);return u.current[l]=Object.assign({},u.current[l],{output:r}),v&&!o&&!1!==r&&i(e=>e+1),!!o&&r}})}))}});return"function"===typeof i?i(s,t):s(t)},formProps:e=>{let{formProps:t}=e,s=(0,a.A)(e,_);return Object.assign({},s,t)},children:e=>{let{children:t,stepSection:s}=e,n=(0,a.A)(e,A);return(0,h.jsxs)(m.Flex,{vertical:!0,gap:24,children:[(0,h.jsx)(m.Flex,{justify:"center",children:s}),"function"===typeof t?t(n):t]})}}))},N=e=>(0,h.jsx)(l.default,(0,n.A)({},y(Object.assign({},e,{className:d.A["form-modal"]})))),S=()=>{const e=(0,l.useModal)();return t=>e(y(Object.assign({},t,{className:d.A["form-modal"]})))},w=e=>{const t=S();if(!e.api){const{modalProps:s}=e,l=(0,a.A)(e,v);return(0,h.jsx)(m.Button,(0,n.A)((0,n.A)({},l),{},{onClick:()=>{t(s)}}))}return(0,h.jsx)(i.A,(0,n.A)((0,n.A)({},e),{},{modalFunc:t}))}},96252:(e,t,s)=>{s.r(t),s.d(t,{AddressInput:()=>_.NI,AddressSelect:()=>_.TQ,AdvancedSelect:()=>_.JL,Avatar:()=>_.eu,Cascader:()=>_.vx,DatePicker:()=>_.lr,DatePickerToday:()=>_.s3,ErrorTip:()=>h.A,Form:()=>m.A,FormApiButton:()=>i.A,FormDrawer:()=>u.Ay,FormDrawerButton:()=>u.WJ,FormItem:()=>p.A,FormModal:()=>c.Ay,FormModalButton:()=>c.W6,FormStepModal:()=>d.Ay,FormStepModalButton:()=>d.Wp,FunctionSelect:()=>_.d4,IndustrySelect:()=>_.ZN,Input:()=>_.pd,InputNumber:()=>_.YI,InputUpperCase:()=>_.h2,List:()=>r.A,MoneyInput:()=>_.F0,MultiField:()=>f.A,PhoneNumber:()=>_.go,Rate:()=>_.tt,SalaryInput:()=>_.lu,Select:()=>_.l6,SelectInnerInput:()=>A.A,Slider:()=>_.Ap,SuperSelect:()=>_.wD,SuperSelectTableList:()=>_.eM,SuperSelectTree:()=>_.kx,SuperSelectUser:()=>_.Pg,Switch:()=>_.dO,TableList:()=>o.A,Text:()=>_.EY,TextArea:()=>_.fs,TimePicker:()=>_.AG,TreeSelect:()=>_.f7,TypeDateRangePicker:()=>_.w5,Upload:()=>_._O,default:()=>v,fieldDecorator:()=>l.E,fields:()=>l.A,formModule:()=>_.nk,useFormDrawer:()=>u.Xy,useFormModal:()=>c.Vl,useFormStepModal:()=>d.$X});var n=s(64261),a=s(2196),l=s(15445),r=s(85846),o=s(97056),i=s(35774),c=s(5995),d=s(94005),u=s(48221),m=s(85696),p=s(30891),h=s(45053),f=s(97949),g=s(98434),x={};for(const b in g)["default","SelectInnerInput","Form","FormItem","ErrorTip","fields","fieldDecorator","List","TableList","FormApiButton","FormModal","useFormModal","FormModalButton","FormStepModal","useFormStepModal","FormStepModalButton","FormDrawer","useFormDrawer","FormDrawerButton","MultiField"].indexOf(b)<0&&(x[b]=()=>g[b]);s.d(t,x);var _=s(83799),A=s(18936);(0,n.A)(),a.A.fields=l.A,a.A.List=r.A,a.A.TableList=o.A,a.A.FormApiButton=i.A,a.A.FormModal=c.Ay,a.A.useFormModal=c.Vl,a.A.FormModalButton=c.W6,a.A.FormStepModal=d.Ay,a.A.useFormStepModal=d.$X,a.A.FormStepModalButton=d.Wp,a.A.FormDrawer=u.Ay,a.A.useFormDrawer=u.Xy,a.A.FormDrawerButton=u.WJ,a.A.Form=m.A,a.A.FormItem=p.A,a.A.ErrorTip=h.A,a.A.SubmitButton=g.SubmitButton,a.A.CancelButton=g.CancelButton,a.A.fieldDecorator=l.E,a.A.MultiField=f.A,a.A.useFormContext=g.useFormContext,a.A.hooks=g.hooks,a.A.widget=g.widget,a.A.utils=g.utils,a.A.formUtils=g.formUtils;const v=a.A},96339:(e,t,s)=>{s.d(t,{A:()=>W});var n=s(53986),a=s(89379),l=s(73884),r=s(17508),o=s(40438),i=s(63743),c=s(3382),d=s(64671),u=s(55199),m=s(53202),p=s.n(m),h=s(33097),f=s.n(h),g=s(83136),x=s.n(g),_=s(51941),A=s(98434),v=s(34677),b=s.n(v);const j="style_upload-btn__-6XtP__sfb0Z",y="style_square__UPkfA__sfb0Z",N="style_is-loading__wx6Pd__sfb0Z",S="style_upload-btn-tips__YtxWz__sfb0Z",w="style_drop-tips__N-v59__sfb0Z",C="style_preview-area__aV3SN__sfb0Z";var F=s(18411),P=s(47458),I=s(55431),T=s(70579);const M=["image","width","height","borderRadius","preview","fileSize","accept","renderTips","getApi","shape","border"],k=["image","width","height","borderRadius","getApi","preview","fileSize","accept","renderTips","border","dropModalSize"],{useOnChange:O}=A.hooks,L=o.default.Avatar,R="FormInfo",E=(0,r.Ay)(e=>{let{className:t,icon:s,loading:n,value:l,gender:r,width:o,height:i,children:c,shape:m,defaultAvatar:p,displayAvatar:h,apis:g}=e;const _=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(L,(0,a.A)((0,a.A)({},Object.assign({},"function"===typeof h?h(l):{id:f()(l,"id")})),{},{gender:r,width:64*o/i,height:64,shape:m,defaultAvatar:p,apis:g})),(0,T.jsx)("div",{className:S,children:s||(0,T.jsx)(d.default,{type:"icon-chuanzhaopian",size:16})}),c]});return(0,T.jsx)("div",{className:x()(t,j,{[N]:n,[y]:"square"===m||!(o&&o===i)}),style:{width:64*o/i},children:n?(0,T.jsx)(u.Spin,{children:_}):_})}),D=e=>{let t=e.split(","),s=t[1].substring(0,t[1].length-2),n=t[0].match(/:(.*?);/)[1],a=atob(s),l=a.length,r=new Uint8Array(l);for(;l--;)r[l]=a.charCodeAt(l);return new Blob([r],{type:n})},Z=(0,l.forwardRef)((e,t)=>{let{image:s,width:o,height:i,borderRadius:c,preview:m,fileSize:h,accept:f,renderTips:g,getApi:x,shape:A,border:v=1}=e,b=(0,n.A)(e,M);const j=(0,P.useIntl)({moduleName:R}),[y,N]=(0,l.useState)(0),S=(0,l.useRef)(null),[F,I]=(0,l.useState)(s),[k,O]=(0,l.useState)(1),[L,E]=(0,l.useState)(0),[Z,z]=(0,l.useState)(""),U=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{N(2*S.current.clientWidth/3)},[]),x({getImage:()=>{const e=U.current.getImage(),t=document.createElement("canvas"),s=t.getContext("2d");return t.width=o,t.height=i,s.drawImage(e,0,0,t.width,t.height),new window.File([D(t.toDataURL())],F.name,{type:F.type})}});const B=()=>{z(U.current.getImage().toDataURL())},W=(0,_.useDebouncedCallback)(B,500);return(0,T.jsx)("div",{ref:S,children:(0,T.jsxs)(u.Row,{wrap:!1,align:"middle",children:[(0,T.jsx)(u.Col,{span:m?16:24,children:y&&(0,T.jsxs)(u.Space,{direction:"vertical",children:[(0,T.jsx)(p(),(0,a.A)((0,a.A)({},b),{},{ref:U,image:F,scale:k,rotate:L,width:y-2*v,height:i*y/o-2*v*i/o,border:v,color:[0,0,0,.6],borderRadius:c*y/o,onImageReady:B,onImageChange:W})),(0,T.jsx)("div",{className:w,children:g("".concat(j.formatMessage({id:"PictureFormat"})).concat(f.map(e=>e.replace(/^\./,"")).join(" ")," ").concat(j.formatMessage({id:"ImageSize"})).concat(j.formatMessage({id:"NotExceeding"},{size:h})),{accept:f,fileSize:h})}),(0,T.jsxs)(u.Row,{gutter:14,align:"middle",children:[(0,T.jsx)(u.Col,{children:(0,T.jsx)(u.Tooltip,{title:j.formatMessage({id:"Rotate"}),placement:"bottom",children:(0,T.jsx)(d.default,{type:"icon-xuanzhuan",onClick:()=>{E(e=>(e-90)%360)}})})}),(0,T.jsx)(u.Col,{children:(0,T.jsx)(u.Tooltip,{title:j.formatMessage({id:"ImageFull"}),placement:"bottom",children:(0,T.jsx)(d.default,{type:"icon-chongman",onClick:()=>{O(1)}})})}),(0,T.jsx)(u.Col,{flex:1,children:(0,T.jsx)(u.Slider,{tooltip:{placement:"bottom",formatter:()=>j.formatMessage({id:"Size"})},value:k,step:.05,min:.2,max:3,onChange:O})}),(0,T.jsx)(u.Col,{children:(0,T.jsx)(r.FI,{accept:f,onChange:e=>{e[0].size>1024*h*1024?u.message.error(j.formatMessage({id:"FileNotExceeding"},{name:e[0].name,size:h})):(E(0),O(1),I(e[0]))},children:j.formatMessage({id:"ReUpload"})})})]})]})}),m&&(0,T.jsx)(u.Col,{span:8,children:(0,T.jsx)("div",{className:C,children:(0,T.jsxs)(u.Space,{direction:"vertical",children:[(0,T.jsx)(u.Avatar,{src:Z,shape:A,style:{width:y/2-36,height:(y/2-36)*i/o}}),(0,T.jsx)("div",{style:{textAlign:"center"},children:j.formatMessage({id:"Preview"})})]})})})]})})}),z=()=>{const e=(0,c.useModal)();return t=>{const s=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:l,width:r,height:o,borderRadius:i,getApi:c,preview:d,fileSize:u,accept:m,renderTips:p,border:h,dropModalSize:f}=s,g=(0,n.A)(s,k);return e((0,a.A)((0,a.A)({},g),{},{size:f,children:(0,T.jsx)(Z,{preview:d,fileSize:u,accept:m,getApi:c,renderTips:p,width:r,height:o,shape:"circle"===t.shape&&t.width&&t.width===t.height?"circle":"square",borderRadius:i,image:l,border:h,scale:1,rotate:0})}))}},U=(0,P.createWithIntl)({importMessages:I.A,moduleName:"FormInfo"})(e=>{var t;let{value:s,gender:n,fileSize:a=2,accept:r=[".jpg",".png",".jpeg"],openEditor:o=!0,apis:c,renderTips:d=e=>e,onChange:m,shape:p="circle",width:h=200,height:f=200,title:g=(0,T.jsx)(P.IntlProvider,{importMessages:I.A,moduleName:"FormInfo",children:(0,T.jsx)(P.FormattedMessage,{id:"Crop",moduleName:"FormInfo"})}),border:x=1,icon:_,dropModalSize:A="small",defaultAvatar:v=F.A,displayAvatar:j}=e;const[y,N]=(0,l.useState)(!1),{apis:S}=(0,i.usePreset)(),w=b()({},S,c),C=w.ossUpload||w.upload||(null===(t=w.file)||void 0===t?void 0:t.upload),M=(0,l.useRef)(null),k=z(),O=(0,P.useIntl)({moduleName:R});return(0,T.jsx)(E,{value:s,gender:n,accept:r,width:h,height:f,shape:p,icon:_,loading:y,defaultAvatar:v,displayAvatar:j,apis:w,onChange:e=>{if(e[0].size>1024*a*1024)return void u.message.error(O.formatMessage({id:"FileNotExceeding"},{name:e[0].name,size:a}));const t=e=>(N(!0),C({file:e}).then(e=>{let{data:t}=e;0===t.code?m(t.data):u.message.error(O.formatMessage({id:"UploadFailed"},{msg:t.msg?":"+t.msg:""}))}).finally(()=>{N(!1)}));o?k({image:e[0],width:h,height:f,title:g,shape:p,border:x,dropModalSize:A,getApi:e=>M.current=e,fileSize:a,accept:r,renderTips:d,onConfirm:()=>{t(M.current.getImage())}}):t(e[0])}})}),B=e=>O(e)(U);B.Field=U,B.useDropModal=z;const W=B},97056:(e,t,s)=>{s.d(t,{A:()=>g});var n=s(89379),a=s(53986),l=s(55199),r=s(64671),o=s(83136),i=s.n(o),c=s(47094),d=s(68532),u=s(41381),m=s(47458),p=s(55431),h=s(70579);const f=["className"],g=(0,m.createWithIntl)({moduleName:"FormInfo",importMessages:p.A})(e=>{let{className:t}=e,s=(0,a.A)(e,f);const{formatMessage:o}=(0,m.useIntl)({moduleName:"FormInfo"});return(0,h.jsx)("div",{className:i()(t,c.A["table-list"]),children:(0,h.jsx)(d.TableList,(0,n.A)((0,n.A)({},s),{},{className:i()(t,c.A["table-list"]),headerRender:(e,t)=>{let{width:s}=t;return(0,h.jsxs)(l.Row,{wrap:!1,className:c.A["table-list-header"],style:{"--col-width":s},children:[e,(0,h.jsx)(l.Col,{className:c.A["table-list-extra"]})]})},headerItemRender:(e,t)=>{let{id:s,isReq:n}=t;return(0,h.jsx)(l.Col,{className:i()({[c.A["is-req"]]:n}),children:e},s)},listRender:(e,t)=>{let{id:s,width:n,onRemove:a,allowRemove:i}=t;return(0,h.jsxs)(l.Row,{wrap:!1,style:{"--col-width":n},children:[e,(0,h.jsx)(l.Col,{className:c.A["table-list-extra"],children:(0,h.jsx)(l.Button,{type:"link",onClick:a,danger:!0,disabled:!i,children:(0,h.jsxs)("span",{children:[(0,h.jsx)(r.default,{type:"shanchu"}),o({id:"delText"})]})})})]},s)},itemRender:e=>(0,h.jsx)(l.Col,{className:c.A["table-list-field"],flex:1,children:e}),children:(e,t)=>{let{title:s,allowAdd:n,onAdd:a}=t;return(0,h.jsx)(u.default.Part,{title:s,className:i()(c.A["table-list-inner"]),extra:n&&(0,h.jsxs)(l.Typography.Link,{className:c.A["list-btn"],onClick:()=>a({isUnshift:!1}),children:[(0,h.jsx)(r.default,{type:"tianjia"}),o({id:"addText"})]}),children:e})}}))})})},97949:(e,t,s)=>{s.d(t,{A:()=>p});var n=s(89379),a=s(55199),l=s(47458),r=s(64671),o=s(47094),i=s(83136),c=s.n(i),d=s(55431),u=s(68532),m=s(70579);const p=(0,l.createWithIntl)({moduleName:"FormInfo",importMessages:d.A})(e=>{const{formatMessage:t}=(0,l.useIntl)({moduleName:"FormInfo"});return(0,m.jsx)(u.MultiField,(0,n.A)((0,n.A)({},e),{},{itemRender:(e,t)=>{let{id:s,index:n,allowRemove:l,onRemove:i}=t;return(0,m.jsxs)("div",{className:c()(o.A["mult-field-item"],"mult-field-item",{[o.A["first-item"]]:0===n}),children:[e,(0,m.jsxs)("div",{className:c()("form-info-mult-option"),children:[(0,m.jsx)("div",{className:c()(o.A["react-form__field-label"],"react-form__field-label","mult-field-delete--label")}),(0,m.jsx)(a.Button,{icon:(0,m.jsx)(r.default,{type:"shanchu"}),onClick:i,disabled:!l})]})]},s)},children:(s,n)=>{let{allowAdd:l,onAdd:i}=n;return(0,m.jsxs)("div",{className:c()(o.A["mult-field"],"mult-field"),children:[s,l&&(0,m.jsx)("div",{className:c()("form-info-mult-add-btn"),children:(0,m.jsxs)(a.Button,{className:o.A["mult-field-add-btn"],type:"dashed",onClick:()=>i({isUnshift:!1}),children:[(0,m.jsx)(r.default,{type:"tianjia"}),t({id:"addSomeThing"},{label:e.label})]})})]})}}))})}}]);
|
|
2
|
+
//# sourceMappingURL=4474.b7eb9857.chunk.js.map
|