@kne-components/components-core 0.1.19 → 0.1.21
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 +130 -130
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/1151.9c9e2a72.chunk.css +2 -0
- package/build/static/css/{1151.c10c7f57.chunk.css.map → 1151.9c9e2a72.chunk.css.map} +1 -1
- package/build/static/css/1153.b51569b8.chunk.css +2 -0
- package/build/static/css/{1153.84696dbf.chunk.css.map → 1153.b51569b8.chunk.css.map} +1 -1
- package/build/static/css/1454.61280de0.chunk.css +2 -0
- package/build/static/css/{1454.275f78ae.chunk.css.map → 1454.61280de0.chunk.css.map} +1 -1
- package/build/static/css/1554.4f9c7bb4.chunk.css +2 -0
- package/build/static/css/{1554.6301e499.chunk.css.map → 1554.4f9c7bb4.chunk.css.map} +1 -1
- package/build/static/css/1932.35470b32.chunk.css +2 -0
- package/build/static/css/{1932.eeb7fc58.chunk.css.map → 1932.35470b32.chunk.css.map} +1 -1
- package/build/static/css/{2503.fd36a1c9.chunk.css → 2503.a6539020.chunk.css} +2 -2
- package/build/static/css/{2503.fd36a1c9.chunk.css.map → 2503.a6539020.chunk.css.map} +1 -1
- package/build/static/css/{2517.7c1c5eb7.chunk.css → 2517.507e583e.chunk.css} +2 -2
- package/build/static/css/{2517.7c1c5eb7.chunk.css.map → 2517.507e583e.chunk.css.map} +1 -1
- package/build/static/css/2526.150d63dc.chunk.css +2 -0
- package/build/static/css/{2526.b39124a5.chunk.css.map → 2526.150d63dc.chunk.css.map} +1 -1
- package/build/static/css/2716.8d85e7b1.chunk.css +2 -0
- package/build/static/css/{2716.556b0f0b.chunk.css.map → 2716.8d85e7b1.chunk.css.map} +1 -1
- package/build/static/css/{2730.925e8c70.chunk.css → 2730.731ef5b2.chunk.css} +2 -2
- package/build/static/css/{2730.925e8c70.chunk.css.map → 2730.731ef5b2.chunk.css.map} +1 -1
- package/build/static/css/2999.9693d5ac.chunk.css +2 -0
- package/build/static/css/{2999.194e40fc.chunk.css.map → 2999.9693d5ac.chunk.css.map} +1 -1
- package/build/static/css/3333.845d0858.chunk.css +2 -0
- package/build/static/css/{3333.67de8c46.chunk.css.map → 3333.845d0858.chunk.css.map} +1 -1
- package/build/static/css/{3843.3da16825.chunk.css → 3843.0c610b17.chunk.css} +2 -2
- package/build/static/css/{3843.3da16825.chunk.css.map → 3843.0c610b17.chunk.css.map} +1 -1
- package/build/static/css/4666.dad81e9f.chunk.css +2 -0
- package/build/static/css/{4666.e1905a4b.chunk.css.map → 4666.dad81e9f.chunk.css.map} +1 -1
- package/build/static/css/5362.6f1b9688.chunk.css +2 -0
- package/build/static/css/{5362.8abedb18.chunk.css.map → 5362.6f1b9688.chunk.css.map} +1 -1
- package/build/static/css/5600.6aee992a.chunk.css +2 -0
- package/build/static/css/{5600.ec68396b.chunk.css.map → 5600.6aee992a.chunk.css.map} +1 -1
- package/build/static/css/{5654.db97c108.chunk.css → 5654.d0f67cc7.chunk.css} +2 -2
- package/build/static/css/{5654.db97c108.chunk.css.map → 5654.d0f67cc7.chunk.css.map} +1 -1
- package/build/static/css/5846.e86e3c6e.chunk.css +2 -0
- package/build/static/css/{5846.032adcd1.chunk.css.map → 5846.e86e3c6e.chunk.css.map} +1 -1
- package/build/static/css/5868.7d59bee4.chunk.css +2 -0
- package/build/static/css/{5868.87c6e2ce.chunk.css.map → 5868.7d59bee4.chunk.css.map} +1 -1
- package/build/static/css/{5996.ede56d8e.chunk.css → 5996.d6ba27b1.chunk.css} +2 -2
- package/build/static/css/{5996.ede56d8e.chunk.css.map → 5996.d6ba27b1.chunk.css.map} +1 -1
- package/build/static/css/6779.d7fe5a00.chunk.css +2 -0
- package/build/static/css/{6779.42bcf5ec.chunk.css.map → 6779.d7fe5a00.chunk.css.map} +1 -1
- package/build/static/css/7227.4123d00b.chunk.css +2 -0
- package/build/static/css/{7227.60fcc712.chunk.css.map → 7227.4123d00b.chunk.css.map} +1 -1
- package/build/static/css/8072.8c8806ba.chunk.css +2 -0
- package/build/static/css/{8072.4991a8f2.chunk.css.map → 8072.8c8806ba.chunk.css.map} +1 -1
- package/build/static/css/8148.ec26c81e.chunk.css +2 -0
- package/build/static/css/{8148.358a052a.chunk.css.map → 8148.ec26c81e.chunk.css.map} +1 -1
- package/build/static/css/{8725.4cbefdef.chunk.css → 8725.ceb337ad.chunk.css} +2 -2
- package/build/static/css/{8725.4cbefdef.chunk.css.map → 8725.ceb337ad.chunk.css.map} +1 -1
- package/build/static/css/9053.71dc14f6.chunk.css +2 -0
- package/build/static/css/{9053.bdab0e99.chunk.css.map → 9053.71dc14f6.chunk.css.map} +1 -1
- package/build/static/css/931.17c4874f.chunk.css +2 -0
- package/build/static/css/{931.e2e58c12.chunk.css.map → 931.17c4874f.chunk.css.map} +1 -1
- package/build/static/css/9390.977507bc.chunk.css +2 -0
- package/build/static/css/{9390.33b28962.chunk.css.map → 9390.977507bc.chunk.css.map} +1 -1
- package/build/static/css/{9449.b60e9faf.chunk.css → 9449.c6cdd4a9.chunk.css} +2 -2
- package/build/static/css/{9449.b60e9faf.chunk.css.map → 9449.c6cdd4a9.chunk.css.map} +1 -1
- package/build/static/css/9689.1145e4a1.chunk.css +2 -0
- package/build/static/css/{9689.4167d93c.chunk.css.map → 9689.1145e4a1.chunk.css.map} +1 -1
- package/build/static/js/{1153.3e87e6da.chunk.js → 1153.e28eba1e.chunk.js} +3 -3
- package/build/static/js/{1153.3e87e6da.chunk.js.map → 1153.e28eba1e.chunk.js.map} +1 -1
- package/build/static/js/1454.54a6ba93.chunk.js +3 -0
- package/build/static/js/{1454.de3a0370.chunk.js.map → 1454.54a6ba93.chunk.js.map} +1 -1
- package/build/static/js/1554.a5ac35aa.chunk.js +3 -0
- package/build/static/js/{1554.c802226a.chunk.js.map → 1554.a5ac35aa.chunk.js.map} +1 -1
- package/build/static/js/{1664.ee87498f.chunk.js → 1664.8b1a7e8a.chunk.js} +2 -2
- package/build/static/js/{1664.ee87498f.chunk.js.map → 1664.8b1a7e8a.chunk.js.map} +1 -1
- package/build/static/js/1932.439db4af.chunk.js +2 -0
- package/build/static/js/{1932.66c5f7d5.chunk.js.map → 1932.439db4af.chunk.js.map} +1 -1
- package/build/static/js/2503.cb05f351.chunk.js +2 -0
- package/build/static/js/{2503.cfe5b99e.chunk.js.map → 2503.cb05f351.chunk.js.map} +1 -1
- package/build/static/js/2517.35f66254.chunk.js +2 -0
- package/build/static/js/{2517.8a7a0f97.chunk.js.map → 2517.35f66254.chunk.js.map} +1 -1
- package/build/static/js/{2526.ec65d3de.chunk.js → 2526.a3e2c8c3.chunk.js} +2 -2
- package/build/static/js/{2526.ec65d3de.chunk.js.map → 2526.a3e2c8c3.chunk.js.map} +1 -1
- package/build/static/js/2716.5edebbcf.chunk.js +3 -0
- package/build/static/js/{2716.f69a6615.chunk.js.map → 2716.5edebbcf.chunk.js.map} +1 -1
- package/build/static/js/2730.8883fa89.chunk.js +2 -0
- package/build/static/js/{2730.987af832.chunk.js.map → 2730.8883fa89.chunk.js.map} +1 -1
- package/build/static/js/2999.fa844ce6.chunk.js +2 -0
- package/build/static/js/{2999.b996cbd1.chunk.js.map → 2999.fa844ce6.chunk.js.map} +1 -1
- package/build/static/js/{3333.de6663be.chunk.js → 3333.fefcc4b8.chunk.js} +2 -2
- package/build/static/js/{3333.de6663be.chunk.js.map → 3333.fefcc4b8.chunk.js.map} +1 -1
- package/build/static/js/36.91c85a3d.chunk.js +2 -0
- package/build/static/js/{36.2c33e1d4.chunk.js.map → 36.91c85a3d.chunk.js.map} +1 -1
- package/build/static/js/{3843.ab8109ca.chunk.js → 3843.73f83506.chunk.js} +2 -2
- package/build/static/js/{3843.ab8109ca.chunk.js.map → 3843.73f83506.chunk.js.map} +1 -1
- package/build/static/js/4666.243aacaf.chunk.js +2 -0
- package/build/static/js/{4666.30857d3d.chunk.js.map → 4666.243aacaf.chunk.js.map} +1 -1
- package/build/static/js/5362.dca69f87.chunk.js +3 -0
- package/build/static/js/{5362.067b0c29.chunk.js.map → 5362.dca69f87.chunk.js.map} +1 -1
- package/build/static/js/5600.f3d2d6ed.chunk.js +2 -0
- package/build/static/js/{5600.2df6df08.chunk.js.map → 5600.f3d2d6ed.chunk.js.map} +1 -1
- package/build/static/js/{5654.b070327f.chunk.js → 5654.e8a32350.chunk.js} +2 -2
- package/build/static/js/{5654.b070327f.chunk.js.map → 5654.e8a32350.chunk.js.map} +1 -1
- package/build/static/js/5846.3e2c3d73.chunk.js +2 -0
- package/build/static/js/5846.3e2c3d73.chunk.js.map +1 -0
- package/build/static/js/{5868.0968e0cc.chunk.js → 5868.4dfd67db.chunk.js} +2 -2
- package/build/static/js/{5868.0968e0cc.chunk.js.map → 5868.4dfd67db.chunk.js.map} +1 -1
- package/build/static/js/{5996.3d6ca31d.chunk.js → 5996.57c96287.chunk.js} +2 -2
- package/build/static/js/{5996.3d6ca31d.chunk.js.map → 5996.57c96287.chunk.js.map} +1 -1
- package/build/static/js/6779.c35a2000.chunk.js +2 -0
- package/build/static/js/{6779.ee56f6ec.chunk.js.map → 6779.c35a2000.chunk.js.map} +1 -1
- package/build/static/js/7227.ec0bec00.chunk.js +3 -0
- package/build/static/js/{7227.19f11c3f.chunk.js.map → 7227.ec0bec00.chunk.js.map} +1 -1
- package/build/static/js/7777.4660e5c5.chunk.js +2 -0
- package/build/static/js/{7777.2548125f.chunk.js.map → 7777.4660e5c5.chunk.js.map} +1 -1
- package/build/static/js/{7967.6154742f.chunk.js → 7967.5581b805.chunk.js} +2 -2
- package/build/static/js/{7967.6154742f.chunk.js.map → 7967.5581b805.chunk.js.map} +1 -1
- package/build/static/js/{8072.fc4b1c4e.chunk.js → 8072.dd431964.chunk.js} +2 -2
- package/build/static/js/8072.dd431964.chunk.js.map +1 -0
- package/build/static/js/{8148.4814d85a.chunk.js → 8148.03a8206b.chunk.js} +3 -3
- package/build/static/js/{8148.4814d85a.chunk.js.map → 8148.03a8206b.chunk.js.map} +1 -1
- package/build/static/js/{8151.8594140c.chunk.js → 8151.50e6bb94.chunk.js} +2 -2
- package/build/static/js/{8151.8594140c.chunk.js.map → 8151.50e6bb94.chunk.js.map} +1 -1
- package/build/static/js/{8725.36d5b554.chunk.js → 8725.9b7795f5.chunk.js} +2 -2
- package/build/static/js/{8725.36d5b554.chunk.js.map → 8725.9b7795f5.chunk.js.map} +1 -1
- package/build/static/js/{9053.baaff242.chunk.js → 9053.5b3f4807.chunk.js} +3 -3
- package/build/static/js/{9053.baaff242.chunk.js.map → 9053.5b3f4807.chunk.js.map} +1 -1
- package/build/static/js/{931.7e6351cf.chunk.js → 931.e843a121.chunk.js} +2 -2
- package/build/static/js/{931.7e6351cf.chunk.js.map → 931.e843a121.chunk.js.map} +1 -1
- package/build/static/js/{9390.b3a4ce73.chunk.js → 9390.eb4ab7b2.chunk.js} +2 -2
- package/build/static/js/{9390.b3a4ce73.chunk.js.map → 9390.eb4ab7b2.chunk.js.map} +1 -1
- package/build/static/js/9449.b24d6b3e.chunk.js +2 -0
- package/build/static/js/{9449.111e1196.chunk.js.map → 9449.b24d6b3e.chunk.js.map} +1 -1
- package/build/static/js/{main.19c7e4b3.js → main.f1119ab2.js} +2 -2
- package/build/static/js/{main.19c7e4b3.js.map → main.f1119ab2.js.map} +1 -1
- package/package.json +1 -1
- package/build/static/css/1151.c10c7f57.chunk.css +0 -2
- package/build/static/css/1153.84696dbf.chunk.css +0 -2
- package/build/static/css/1454.275f78ae.chunk.css +0 -2
- package/build/static/css/1554.6301e499.chunk.css +0 -2
- package/build/static/css/1932.eeb7fc58.chunk.css +0 -2
- package/build/static/css/2526.b39124a5.chunk.css +0 -2
- package/build/static/css/2716.556b0f0b.chunk.css +0 -2
- package/build/static/css/2999.194e40fc.chunk.css +0 -2
- package/build/static/css/3333.67de8c46.chunk.css +0 -2
- package/build/static/css/4666.e1905a4b.chunk.css +0 -2
- package/build/static/css/5362.8abedb18.chunk.css +0 -2
- package/build/static/css/5600.ec68396b.chunk.css +0 -2
- package/build/static/css/5846.032adcd1.chunk.css +0 -2
- package/build/static/css/5868.87c6e2ce.chunk.css +0 -2
- package/build/static/css/6779.42bcf5ec.chunk.css +0 -2
- package/build/static/css/7227.60fcc712.chunk.css +0 -2
- package/build/static/css/8072.4991a8f2.chunk.css +0 -2
- package/build/static/css/8148.358a052a.chunk.css +0 -2
- package/build/static/css/9053.bdab0e99.chunk.css +0 -2
- package/build/static/css/931.e2e58c12.chunk.css +0 -2
- package/build/static/css/9390.33b28962.chunk.css +0 -2
- package/build/static/css/9689.4167d93c.chunk.css +0 -2
- package/build/static/js/1454.de3a0370.chunk.js +0 -3
- package/build/static/js/1554.c802226a.chunk.js +0 -3
- package/build/static/js/1932.66c5f7d5.chunk.js +0 -2
- package/build/static/js/2503.cfe5b99e.chunk.js +0 -2
- package/build/static/js/2517.8a7a0f97.chunk.js +0 -2
- package/build/static/js/2716.f69a6615.chunk.js +0 -3
- package/build/static/js/2730.987af832.chunk.js +0 -2
- package/build/static/js/2999.b996cbd1.chunk.js +0 -2
- package/build/static/js/36.2c33e1d4.chunk.js +0 -2
- package/build/static/js/4666.30857d3d.chunk.js +0 -2
- package/build/static/js/5362.067b0c29.chunk.js +0 -3
- package/build/static/js/5600.2df6df08.chunk.js +0 -2
- package/build/static/js/5846.57d836a4.chunk.js +0 -2
- package/build/static/js/5846.57d836a4.chunk.js.map +0 -1
- package/build/static/js/6779.ee56f6ec.chunk.js +0 -2
- package/build/static/js/7227.19f11c3f.chunk.js +0 -3
- package/build/static/js/7777.2548125f.chunk.js +0 -2
- package/build/static/js/8072.fc4b1c4e.chunk.js.map +0 -1
- package/build/static/js/9449.111e1196.chunk.js +0 -2
- /package/build/static/js/{1153.3e87e6da.chunk.js.LICENSE.txt → 1153.e28eba1e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1454.de3a0370.chunk.js.LICENSE.txt → 1454.54a6ba93.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1554.c802226a.chunk.js.LICENSE.txt → 1554.a5ac35aa.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2716.f69a6615.chunk.js.LICENSE.txt → 2716.5edebbcf.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5362.067b0c29.chunk.js.LICENSE.txt → 5362.dca69f87.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.19f11c3f.chunk.js.LICENSE.txt → 7227.ec0bec00.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8148.4814d85a.chunk.js.LICENSE.txt → 8148.03a8206b.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9053.baaff242.chunk.js.LICENSE.txt → 9053.5b3f4807.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[3333,1151,9034],{10419:(e,t,s)=>{s.r(t),s.d(t,{HtmlPreview:()=>f,ImagePreview:()=>L,OSSFilePreview:()=>
|
|
2
|
-
//# sourceMappingURL=3333.
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[3333,1151,9034],{10419:(e,t,s)=>{s.r(t),s.d(t,{HtmlPreview:()=>f,ImagePreview:()=>L,OSSFilePreview:()=>C,OfficePreview:()=>g,PdfPreview:()=>S,TextPreview:()=>b,UnknownPreview:()=>F,default:()=>R});var r=s(63114),a=s.n(r),n=s(73884),c=s(13050),o=s(83136),l=s.n(o);const i="style_container__9Fu-3__B7O0d",d="style_loading__r3aiE__B7O0d",m="style_text-outer__TzhuG__B7O0d",u="style_error__wSaxt__B7O0d";var h=s(87558),p=s(70579);const x=(0,h.createWithFetch)({transformResponse:e=>{let{data:t}=e;return{data:{code:200,results:t}}}})((e=>{let{data:t}=e;const s=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const e=(new DOMParser).parseFromString(t,"text/html");e.querySelectorAll("script").forEach((e=>{e.parentElement.removeChild(e)}));const r=(0,c.getPublicPath)("components-core")+"/iframeResizer.contentWindow.js",a=document.createElement("script");a.src=r,e.head.appendChild(a);const n=document.createElement("style");n.innerText="html,body{height:auto!important;}body{pointer-events: none;background: #FFFFFF;}",e.head.appendChild(n),s.current.srcdoc=e.documentElement.outerHTML}),[t]),(0,n.useEffect)((()=>{a().iframeResize({checkOrigin:!1},s.current)}),[]),(0,p.jsx)("iframe",{title:"\u7b80\u5386\u9884\u89c8",frameBorder:"0",width:"100%",ref:s})})),f=e=>{let{className:t,url:s,maxWidth:r}=e;return(0,p.jsx)("div",{className:l()(t,i),style:{maxWidth:r},children:(0,p.jsx)(x,{url:s})})};var j=s(76329);const v=(0,h.createWithFetch)({cache:"office-preview"})((e=>{let{data:t,className:s,...r}=e;const{data:a}=t;return a.map((e=>{let{url:t}=e;const a=T(t);return(0,n.createElement)(a,{...r,url:t,key:t,className:s})}))})),g=e=>{let{id:t,apis:s,className:r,...a}=e;const{apis:n}=(0,j.usePreset)(),c=Object.assign({},n,s);return(0,p.jsx)(v,{...a,...c.previewOffice,data:{id:t},className:r})};var _=s(55199),N=s(39165),w=(s(71975),s(36));const P=(0,n.memo)((e=>{let{url:t,maxWidth:s,scale:r,rotate:a,className:o}=e;const[m,u]=(0,n.useState)(0);N.pdfjs.GlobalWorkerOptions.workerSrc=(0,c.getPublicPath)("components-core")+"/pdfjs/build/pdf.worker.js";const[h,x]=(0,n.useState)(s),f=(0,w.useResize)((()=>{f.current.clientWidth&&x(Math.min(f.current.clientWidth,s))}));return(0,p.jsx)("div",{ref:f,className:l()(o,i),style:{maxWidth:s},children:(0,p.jsx)(N.Document,{file:{url:t},options:{standardFontDataUrl:(0,c.getPublicPath)("components-core")+"/pdfjs/standard_fonts/",cMapUrl:(0,c.getPublicPath)("components-core")+"/pdfjs/cmaps/",cMapPacked:!0},error:"PDF\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25",loading:(0,p.jsx)("div",{className:d,children:(0,p.jsx)(_.Spin,{})}),noData:"\u672a\u6307\u5b9aPDF\u6587\u4ef6",onLoadSuccess:e=>{let{numPages:t}=e;u(t),console.log("onLoadSuccess")},onLoadError:e=>{console.log("onLoadError",e)},onSourceError:e=>{console.log("onSourceError",e)},children:(0,p.jsx)(_.Space,{direction:"vertical",children:m>=1&&Array.from(new Array(m),((e,t)=>(0,p.jsx)(N.Page,{className:"preview-item",scale:r/100,rotate:a,pageNumber:t+1,width:h,loading:null,renderAnnotationLayer:!1,renderTextLayer:!0,noData:"\u672a\u6307\u5b9a\u9875\u9762"},"page_".concat(t))))})})})}));P.defaultProps={autoSize:!0,renderTextLayer:!1,scale:100,rotate:0,maxWidth:1200};const S=P;var y=s(91409),E=s.n(y),W=s(89946),k=s.n(W);const b=e=>{let{url:t,className:s,maxWidth:r}=e;const[a,c]=(0,n.useState)(""),[o,h]=(0,n.useState)(!0),[x,f]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{k().get(t).then((e=>{let{data:t}=e;c(t),h(!1)}),(()=>{h(!1),f(!0)}))}),[t]),(0,p.jsxs)("div",{className:l()(s,i),style:{maxWidth:r},children:[o?(0,p.jsx)("div",{className:d,children:(0,p.jsx)(_.Spin,{})}):null,(0,p.jsx)("div",{className:m,children:x?(0,p.jsx)("div",{className:u,children:"\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25"}):(0,p.jsx)(E(),{text:a})})]})},F=e=>{let{maxWidth:t}=e;return(0,p.jsx)("div",{className:i,style:{maxWidth:t},children:(0,p.jsx)("div",{className:m,children:(0,p.jsx)(_.Result,{status:"500",title:"\u4e0d\u652f\u6301\u7684\u6587\u4ef6\u7c7b\u578b",subTitle:"\u7cfb\u7edf\u4e0d\u652f\u6301\u8be5\u6587\u4ef6\u7c7b\u578b\u9884\u89c8\uff0c\u8bf7\u4e0b\u8f7d\u5230\u672c\u5730\u540e\u8fdb\u884c\u9884\u89c8"})})})},L=e=>{let{url:t,scale:s,rotate:r,className:a,maxWidth:c}=e;const[o,m]=(0,n.useState)(!0),[h,x]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const e=new Image;e.src=t;const s=()=>{m(!1)},r=()=>{m(!1),x(!0)};return e.addEventListener("load",s),e.addEventListener("error",r),()=>{e.removeEventListener("load",s),e.removeEventListener("error",r)}}),[t,s,r]),(0,p.jsxs)("div",{className:l()(a,i),style:{maxWidth:c},children:[o?(0,p.jsx)("div",{className:d,children:(0,p.jsx)(_.Spin,{})}):null,h?(0,p.jsx)("div",{className:u,children:"\u56fe\u7247\u52a0\u8f7d\u5931\u8d25"}):(0,p.jsx)("img",{src:t,alt:"\u7b80\u5386\u9884\u89c8"})]})},O=e=>{const t=(e||"").split("?")[0].toLowerCase();return/.txt$/.test(t)?"txt":/.pdf$/.test(t)?"pdf":/.(png|jpg|jpeg)$/.test(t)?"image":/.(html|htm)$/.test(t)?"html":/.(doc|docx|xls|xlsx|ppt|pptx)$/.test(t)?"office":"unknown"},D=O,T=e=>({txt:b,pdf:S,image:L,html:f,office:g,unknown:F}[O(e)]);const C=(0,s(97211).A)((e=>{let{data:t,id:s,className:r,...a}=e;const n=T(t);return"office"===D(t)?(0,p.jsx)(g,{...a,id:s,className:r}):(0,p.jsx)(n,{...a,className:r,url:t})})),R=e=>{let{id:t,originName:s,...r}=e;return"office"===D(s)?(0,p.jsx)(g,{...r,id:t,originName:s}):(0,p.jsx)(C,{...r,id:t,originName:s})}},71975:()=>{}}]);
|
|
2
|
+
//# sourceMappingURL=3333.fefcc4b8.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/3333.de6663be.chunk.js","mappings":"mYACA,QAA4B,gCAA5B,EAA0K,8BAA1K,EAAie,iCAAje,EAA0gB,4B,0BCM1gB,MAAMA,GAAmBC,EAAAA,EAAAA,iBAAgB,CACvCC,kBAAmBC,IAAe,IAAd,KAAEC,GAAMD,EAC1B,MAAO,CACLC,KAAM,CACJC,KAAM,IACNC,QAASF,GAEZ,GAPoBH,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,EAAAA,KAAA,OAAKX,IAAKiB,EAAKgF,IAAI,+BAEjB,ECrCJC,EAAcjF,IAClB,MACMkF,GADQlF,GAAO,IAAImF,MAAM,KAAK,GACjBC,cACnB,MAAI,QAAQC,KAAKH,GACR,MAEL,QAAQG,KAAKH,GACR,MAEL,mBAAmBG,KAAKH,GACnB,QAEL,eAAeG,KAAKH,GACf,OAEL,iCAAiCG,KAAKH,GACjC,SAEF,SAAS,EAGlB,IAEaxE,EAAuBV,IAClB,CACdsF,IAAKC,EACLC,IAAKnE,EACLqD,MAAOe,EACPC,KAAMC,EACNC,OAAQC,EACRC,QAASC,GAGId,EAAWjF,KCpC5B,MAQA,GARuBgG,E,SAAAA,IAAYtI,IAAwC,IAAvC,KAAEC,EAAI,GAAEkD,EAAE,UAAEd,KAAcO,GAAO5C,EACnE,MAAM+C,EAAmBC,EAAoB/C,GAC7C,MAAyB,WAArBsH,EAAWtH,IACN+B,EAAAA,EAAAA,KAACmG,EAAa,IAAKvF,EAAOO,GAAIA,EAAId,UAAWA,KAE/CL,EAAAA,EAAAA,KAACe,EAAgB,IAAKH,EAAOP,UAAWA,EAAWC,IAAKrC,GAAQ,ICEzE,EAPoBD,IAAmC,IAAlC,GAAEmD,EAAE,WAAEoF,KAAe3F,GAAO5C,EAC/C,MAA+B,WAA3BuH,EAAWgB,IACNvG,EAAAA,EAAAA,KAACmG,EAAa,IAAKvF,EAAOO,GAAIA,EAAIoF,WAAYA,KAEhDvG,EAAAA,EAAAA,KAACwG,EAAc,IAAK5F,EAAOO,GAAIA,EAAIoF,WAAYA,GAAc,C","sources":["webpack://@kne-components/components-core/./src/components/FilePreview/style.module.scss?a805","components/FilePreview/HtmlPreview.js","components/FilePreview/OfficePreview.js","components/FilePreview/PdfPreview.js","components/FilePreview/TextPreview.js","components/FilePreview/UnknownPreview.js","components/FilePreview/ImagePreview.js","components/FilePreview/typeFormat.js","components/FilePreview/OSSFilePreview.js","components/FilePreview/FilePreview.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"style_container__9Fu-3__oRl6h\",\"container-html\":\"style_container-html__IsNVq__oRl6h\",\"html-inner\":\"style_html-inner__S05cI__oRl6h\",\"loading\":\"style_loading__r3aiE__oRl6h\",\"control-bar\":\"style_control-bar__kTKau__oRl6h\",\"scroller\":\"style_scroller__HOq7b__oRl6h\",\"outer\":\"style_outer__ntu--__oRl6h\",\"file-name\":\"style_file-name__UPbbe__oRl6h\",\"file-options\":\"style_file-options__5TE5l__oRl6h\",\"scale-input\":\"style_scale-input__JdF1K__oRl6h\",\"text-outer\":\"style_text-outer__TzhuG__oRl6h\",\"error\":\"style_error__wSaxt__oRl6h\",\"text-inner\":\"style_text-inner__jdi-A__oRl6h\",\"image-inner\":\"style_image-inner__zTiFU__oRl6h\"};","import iFrameResize from \"iframe-resizer\";\nimport { useEffect, useRef } from \"react\";\nimport { getPublicPath } from \"@kne/remote-loader\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport { createWithFetch } from \"@kne/react-fetch\";\n\nconst HtmlInnerPreview = createWithFetch({\n transformResponse: ({ data }) => {\n return {\n data: {\n code: 200,\n results: data,\n },\n };\n },\n})(({ data }) => {\n const ref = useRef(null);\n useEffect(() => {\n const parser = new DOMParser();\n const domDocument = parser.parseFromString(data, \"text/html\");\n domDocument.querySelectorAll(\"script\").forEach((el) => {\n el.parentElement.removeChild(el);\n });\n const scriptPath =\n getPublicPath(\"components-core\") + \"/iframeResizer.contentWindow.js\";\n const script = document.createElement(\"script\");\n script.src = scriptPath;\n domDocument.head.appendChild(script);\n const style = document.createElement(\"style\");\n style.innerText =\n \"html,body{height:auto!important;}body{pointer-events: none;background: #FFFFFF;}\";\n domDocument.head.appendChild(style);\n ref.current.srcdoc = domDocument.documentElement.outerHTML;\n }, [data]);\n useEffect(() => {\n iFrameResize.iframeResize({ checkOrigin: false }, ref.current);\n }, []);\n return <iframe title=\"简历预览\" frameBorder=\"0\" width=\"100%\" ref={ref} />;\n});\n\nconst HtmlPreview = ({ className, url, maxWidth }) => {\n return (\n <div\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth,\n }}\n >\n <HtmlInnerPreview url={url} />\n {/*<iframe\n title=\"简历预览\"\n src={url}\n frameBorder=\"0\"\n width=\"100%\"\n ref={ref}\n onLoad={() => {\n const scriptPath =\n getPublicPath(\"components-core\") +\n \"/iframeResizer.contentWindow.js\";\n if (!ref.current.contentDocument) {\n console.warn(\n `跨域情况无法开启自动高度计算,请将${scriptPath}脚本加入目标页面`\n );\n return;\n }\n const script = document.createElement(\"script\");\n script.src = scriptPath;\n ref.current.contentDocument.head.appendChild(script);\n ref.current.contentDocument.body.style = \"pointer-events: none;\";\n }}\n />*/}\n </div>\n );\n};\n\nexport default HtmlPreview;\n","import { usePreset } from \"@components/Global\";\nimport { createWithFetch } from \"@kne/react-fetch\";\nimport { typeFormatComponent } from \"./typeFormat\";\n\nconst OfficePreviewInner = createWithFetch({\n cache: \"office-preview\",\n})(({ data, className, ...props }) => {\n const { data: fileList } = data;\n return fileList.map(({ url }) => {\n const PreviewComponent = typeFormatComponent(url);\n return (\n <PreviewComponent {...props} url={url} key={url} className={className} />\n );\n });\n});\n\nconst OfficePreview = ({ id, apis: propsApis, className, ...props }) => {\n const { apis: baseApis } = usePreset();\n const apis = Object.assign({}, baseApis, propsApis);\n return (\n <OfficePreviewInner\n {...props}\n {...apis.previewOffice}\n data={{ id }}\n className={className}\n />\n );\n};\n\nexport default OfficePreview;\n","import { memo, useState } from \"react\";\nimport { Space, Spin } from \"antd\";\nimport { Document, Page, pdfjs } from \"react-pdf\";\nimport \"react-pdf/dist/esm/Page/TextLayer.css\";\nimport style from \"./style.module.scss\";\nimport { useResize } from \"@components/Common\";\nimport { getPublicPath } from \"@kne/remote-loader\";\nimport classnames from \"classnames\";\n\nconst PdfPreview = memo(({ url, maxWidth, scale, rotate, className }) => {\n const [numPages, setNumPages] = useState(0);\n pdfjs.GlobalWorkerOptions.workerSrc =\n getPublicPath(\"components-core\") + \"/pdfjs/build/pdf.worker.js\";\n const [width, setWidth] = useState(maxWidth);\n const ref = useResize(() => {\n if (ref.current.clientWidth) {\n setWidth(Math.min(ref.current.clientWidth, maxWidth));\n }\n });\n\n return (\n <div\n ref={ref}\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth: maxWidth,\n }}\n >\n <Document\n file={{ url }}\n options={{\n standardFontDataUrl:\n getPublicPath(\"components-core\") + \"/pdfjs/standard_fonts/\",\n cMapUrl: getPublicPath(\"components-core\") + \"/pdfjs/cmaps/\",\n cMapPacked: true,\n }}\n error=\"PDF文件加载失败\"\n loading={\n <div className={style[\"loading\"]}>\n <Spin />\n </div>\n }\n noData=\"未指定PDF文件\"\n onLoadSuccess={({ numPages }) => {\n setNumPages(numPages);\n console.log(\"onLoadSuccess\");\n }}\n onLoadError={(props) => {\n console.log(\"onLoadError\", props);\n }}\n onSourceError={(props) => {\n console.log(\"onSourceError\", props);\n }}\n >\n <Space direction=\"vertical\">\n {numPages >= 1 &&\n Array.from(new Array(numPages), (el, index) => (\n <Page\n key={`page_${index}`}\n className=\"preview-item\"\n scale={scale / 100}\n rotate={rotate}\n pageNumber={index + 1}\n width={width}\n loading={null}\n renderAnnotationLayer={false}\n renderTextLayer={true}\n noData=\"未指定页面\"\n />\n ))}\n </Space>\n </Document>\n </div>\n );\n});\n\nPdfPreview.defaultProps = {\n autoSize: true,\n renderTextLayer: false,\n scale: 100,\n rotate: 0,\n maxWidth: 1200,\n};\n\nexport default PdfPreview;\n","import { useState, useEffect } from \"react\";\nimport TextEscape from \"@kne/react-text-escape\";\nimport axios from \"axios\";\nimport style from \"./style.module.scss\";\nimport { Spin } from \"antd\";\nimport classnames from \"classnames\";\n\nconst TextPreview = ({ url, className, maxWidth }) => {\n const [text, setText] = useState(\"\");\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n useEffect(() => {\n axios.get(url).then(\n ({ data }) => {\n setText(data);\n setLoading(false);\n },\n () => {\n setLoading(false);\n setError(true);\n }\n );\n }, [url]);\n\n return (\n <div\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth,\n }}\n >\n {loading ? (\n <div className={style[\"loading\"]}>\n <Spin />\n </div>\n ) : null}\n <div className={style[\"text-outer\"]}>\n {error ? (\n <div className={style[\"error\"]}>文件加载失败</div>\n ) : (\n <TextEscape text={text} />\n )}\n </div>\n </div>\n );\n};\n\nexport default TextPreview;\n","import { Result } from \"antd\";\nimport style from \"./style.module.scss\";\n\nconst UnknownPreview = ({ maxWidth }) => {\n return (\n <div\n className={style[\"container\"]}\n style={{\n maxWidth,\n }}\n >\n <div className={style[\"text-outer\"]}>\n <Result\n status=\"500\"\n title=\"不支持的文件类型\"\n subTitle=\"系统不支持该文件类型预览,请下载到本地后进行预览\"\n />\n </div>\n </div>\n );\n};\n\nexport default UnknownPreview;\n","import { useEffect, useState } from \"react\";\nimport style from \"./style.module.scss\";\nimport { Spin } from \"antd\";\nimport classnames from \"classnames\";\n\nconst ImagePreview = ({ url, scale, rotate, className, maxWidth }) => {\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n useEffect(() => {\n const image = new Image();\n image.src = url;\n const handlerLoad = () => {\n setLoading(false);\n };\n\n const handlerError = () => {\n setLoading(false);\n setError(true);\n };\n\n image.addEventListener(\"load\", handlerLoad);\n image.addEventListener(\"error\", handlerError);\n return () => {\n image.removeEventListener(\"load\", handlerLoad);\n image.removeEventListener(\"error\", handlerError);\n };\n }, [url, scale, rotate]);\n return (\n <div\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth,\n }}\n >\n {loading ? (\n <div className={style[\"loading\"]}>\n <Spin />\n </div>\n ) : null}\n {error ? (\n <div className={style[\"error\"]}>图片加载失败</div>\n ) : (\n <img src={url} alt=\"简历预览\" />\n )}\n </div>\n );\n};\n\nexport default ImagePreview;\n","import HtmlPreview from \"./HtmlPreview\";\nimport OfficePreview from \"./OfficePreview\";\nimport PdfPreview from \"./PdfPreview\";\nimport TextPreview from \"./TextPreview\";\nimport UnknownPreview from \"./UnknownPreview\";\nimport ImagePreview from \"./ImagePreview\";\n\nconst typeFormat = (url) => {\n const path = (url || \"\").split(\"?\")[0];\n const _path = path.toLowerCase();\n if (/.txt$/.test(_path)) {\n return \"txt\";\n }\n if (/.pdf$/.test(_path)) {\n return \"pdf\";\n }\n if (/.(png|jpg|jpeg)$/.test(_path)) {\n return \"image\";\n }\n if (/.(html|htm)$/.test(_path)) {\n return \"html\";\n }\n if (/.(doc|docx|xls|xlsx|ppt|pptx)$/.test(_path)) {\n return \"office\";\n }\n return \"unknown\";\n};\n\nexport default typeFormat;\n\nexport const typeFormatComponent = (url) => {\n const mapping = {\n txt: TextPreview,\n pdf: PdfPreview,\n image: ImagePreview,\n html: HtmlPreview,\n office: OfficePreview,\n unknown: UnknownPreview,\n };\n\n return mapping[typeFormat(url)];\n};\n","import withOSSFile from \"@common/hocs/withOSSFile\";\nimport typeFormat, { typeFormatComponent } from \"./typeFormat\";\nimport OfficePreview from \"./OfficePreview\";\n\nconst OSSFilePreview = withOSSFile(({ data, id, className, ...props }) => {\n const PreviewComponent = typeFormatComponent(data);\n if (typeFormat(data) === \"office\") {\n return <OfficePreview {...props} id={id} className={className} />;\n }\n return <PreviewComponent {...props} className={className} url={data} />;\n});\n\nexport default OSSFilePreview;\n","import typeFormat from \"./typeFormat\";\nimport OfficePreview from \"./OfficePreview\";\nimport OSSFilePreview from \"./OSSFilePreview\";\n\nconst FilePreview = ({ id, originName, ...props }) => {\n if (typeFormat(originName) === \"office\") {\n return <OfficePreview {...props} id={id} originName={originName} />;\n }\n return <OSSFilePreview {...props} id={id} originName={originName} />;\n};\n\nexport default FilePreview;\n"],"names":["HtmlInnerPreview","createWithFetch","transformResponse","_ref","data","code","results","_ref2","ref","useRef","useEffect","domDocument","DOMParser","parseFromString","querySelectorAll","forEach","el","parentElement","removeChild","scriptPath","getPublicPath","script","document","createElement","src","head","appendChild","style","innerText","current","srcdoc","documentElement","outerHTML","iFrameResize","checkOrigin","_jsx","title","frameBorder","width","_ref3","className","url","maxWidth","classnames","children","OfficePreviewInner","cache","props","fileList","map","PreviewComponent","typeFormatComponent","_createElement","key","id","apis","propsApis","baseApis","usePreset","Object","assign","previewOffice","PdfPreview","memo","scale","rotate","numPages","setNumPages","useState","pdfjs","GlobalWorkerOptions","workerSrc","setWidth","useResize","clientWidth","Math","min","Document","file","options","standardFontDataUrl","cMapUrl","cMapPacked","error","loading","Spin","noData","onLoadSuccess","console","log","onLoadError","onSourceError","Space","direction","Array","from","index","Page","pageNumber","renderAnnotationLayer","renderTextLayer","concat","defaultProps","autoSize","text","setText","setLoading","setError","axios","then","_jsxs","TextEscape","Result","status","subTitle","image","Image","handlerLoad","handlerError","addEventListener","removeEventListener","alt","typeFormat","_path","split","toLowerCase","test","txt","TextPreview","pdf","ImagePreview","html","HtmlPreview","office","OfficePreview","unknown","UnknownPreview","withOSSFile","originName","OSSFilePreview"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/3333.fefcc4b8.chunk.js","mappings":"mYACA,QAA4B,gCAA5B,EAA0K,8BAA1K,EAAie,iCAAje,EAA0gB,4B,0BCM1gB,MAAMA,GAAmBC,EAAAA,EAAAA,iBAAgB,CACvCC,kBAAmBC,IAAe,IAAd,KAAEC,GAAMD,EAC1B,MAAO,CACLC,KAAM,CACJC,KAAM,IACNC,QAASF,GAEZ,GAPoBH,EAStBM,IAAe,IAAd,KAAEH,GAAMG,EACV,MAAMC,GAAMC,EAAAA,EAAAA,QAAO,MAqBnB,OApBAC,EAAAA,EAAAA,YAAU,KACR,MACMC,GADS,IAAIC,WACQC,gBAAgBT,EAAM,aACjDO,EAAYG,iBAAiB,UAAUC,SAASC,IAC9CA,EAAGC,cAAcC,YAAYF,EAAG,IAElC,MAAMG,GACJC,EAAAA,EAAAA,eAAc,mBAAqB,kCAC/BC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbR,EAAYc,KAAKC,YAAYL,GAC7B,MAAMM,EAAQL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QC,EACRC,QAASC,GAGId,EAAWjF,KCpC5B,MAQA,GARuBgG,E,SAAAA,IAAYtI,IAAwC,IAAvC,KAAEC,EAAI,GAAEkD,EAAE,UAAEd,KAAcO,GAAO5C,EACnE,MAAM+C,EAAmBC,EAAoB/C,GAC7C,MAAyB,WAArBsH,EAAWtH,IACN+B,EAAAA,EAAAA,KAACmG,EAAa,IAAKvF,EAAOO,GAAIA,EAAId,UAAWA,KAE/CL,EAAAA,EAAAA,KAACe,EAAgB,IAAKH,EAAOP,UAAWA,EAAWC,IAAKrC,GAAQ,ICEzE,EAPoBD,IAAmC,IAAlC,GAAEmD,EAAE,WAAEoF,KAAe3F,GAAO5C,EAC/C,MAA+B,WAA3BuH,EAAWgB,IACNvG,EAAAA,EAAAA,KAACmG,EAAa,IAAKvF,EAAOO,GAAIA,EAAIoF,WAAYA,KAEhDvG,EAAAA,EAAAA,KAACwG,EAAc,IAAK5F,EAAOO,GAAIA,EAAIoF,WAAYA,GAAc,C","sources":["webpack://@kne-components/components-core/./src/components/FilePreview/style.module.scss?a805","components/FilePreview/HtmlPreview.js","components/FilePreview/OfficePreview.js","components/FilePreview/PdfPreview.js","components/FilePreview/TextPreview.js","components/FilePreview/UnknownPreview.js","components/FilePreview/ImagePreview.js","components/FilePreview/typeFormat.js","components/FilePreview/OSSFilePreview.js","components/FilePreview/FilePreview.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"style_container__9Fu-3__B7O0d\",\"container-html\":\"style_container-html__IsNVq__B7O0d\",\"html-inner\":\"style_html-inner__S05cI__B7O0d\",\"loading\":\"style_loading__r3aiE__B7O0d\",\"control-bar\":\"style_control-bar__kTKau__B7O0d\",\"scroller\":\"style_scroller__HOq7b__B7O0d\",\"outer\":\"style_outer__ntu--__B7O0d\",\"file-name\":\"style_file-name__UPbbe__B7O0d\",\"file-options\":\"style_file-options__5TE5l__B7O0d\",\"scale-input\":\"style_scale-input__JdF1K__B7O0d\",\"text-outer\":\"style_text-outer__TzhuG__B7O0d\",\"error\":\"style_error__wSaxt__B7O0d\",\"text-inner\":\"style_text-inner__jdi-A__B7O0d\",\"image-inner\":\"style_image-inner__zTiFU__B7O0d\"};","import iFrameResize from \"iframe-resizer\";\nimport { useEffect, useRef } from \"react\";\nimport { getPublicPath } from \"@kne/remote-loader\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport { createWithFetch } from \"@kne/react-fetch\";\n\nconst HtmlInnerPreview = createWithFetch({\n transformResponse: ({ data }) => {\n return {\n data: {\n code: 200,\n results: data,\n },\n };\n },\n})(({ data }) => {\n const ref = useRef(null);\n useEffect(() => {\n const parser = new DOMParser();\n const domDocument = parser.parseFromString(data, \"text/html\");\n domDocument.querySelectorAll(\"script\").forEach((el) => {\n el.parentElement.removeChild(el);\n });\n const scriptPath =\n getPublicPath(\"components-core\") + \"/iframeResizer.contentWindow.js\";\n const script = document.createElement(\"script\");\n script.src = scriptPath;\n domDocument.head.appendChild(script);\n const style = document.createElement(\"style\");\n style.innerText =\n \"html,body{height:auto!important;}body{pointer-events: none;background: #FFFFFF;}\";\n domDocument.head.appendChild(style);\n ref.current.srcdoc = domDocument.documentElement.outerHTML;\n }, [data]);\n useEffect(() => {\n iFrameResize.iframeResize({ checkOrigin: false }, ref.current);\n }, []);\n return <iframe title=\"简历预览\" frameBorder=\"0\" width=\"100%\" ref={ref} />;\n});\n\nconst HtmlPreview = ({ className, url, maxWidth }) => {\n return (\n <div\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth,\n }}\n >\n <HtmlInnerPreview url={url} />\n {/*<iframe\n title=\"简历预览\"\n src={url}\n frameBorder=\"0\"\n width=\"100%\"\n ref={ref}\n onLoad={() => {\n const scriptPath =\n getPublicPath(\"components-core\") +\n \"/iframeResizer.contentWindow.js\";\n if (!ref.current.contentDocument) {\n console.warn(\n `跨域情况无法开启自动高度计算,请将${scriptPath}脚本加入目标页面`\n );\n return;\n }\n const script = document.createElement(\"script\");\n script.src = scriptPath;\n ref.current.contentDocument.head.appendChild(script);\n ref.current.contentDocument.body.style = \"pointer-events: none;\";\n }}\n />*/}\n </div>\n );\n};\n\nexport default HtmlPreview;\n","import { usePreset } from \"@components/Global\";\nimport { createWithFetch } from \"@kne/react-fetch\";\nimport { typeFormatComponent } from \"./typeFormat\";\n\nconst OfficePreviewInner = createWithFetch({\n cache: \"office-preview\",\n})(({ data, className, ...props }) => {\n const { data: fileList } = data;\n return fileList.map(({ url }) => {\n const PreviewComponent = typeFormatComponent(url);\n return (\n <PreviewComponent {...props} url={url} key={url} className={className} />\n );\n });\n});\n\nconst OfficePreview = ({ id, apis: propsApis, className, ...props }) => {\n const { apis: baseApis } = usePreset();\n const apis = Object.assign({}, baseApis, propsApis);\n return (\n <OfficePreviewInner\n {...props}\n {...apis.previewOffice}\n data={{ id }}\n className={className}\n />\n );\n};\n\nexport default OfficePreview;\n","import { memo, useState } from \"react\";\nimport { Space, Spin } from \"antd\";\nimport { Document, Page, pdfjs } from \"react-pdf\";\nimport \"react-pdf/dist/esm/Page/TextLayer.css\";\nimport style from \"./style.module.scss\";\nimport { useResize } from \"@components/Common\";\nimport { getPublicPath } from \"@kne/remote-loader\";\nimport classnames from \"classnames\";\n\nconst PdfPreview = memo(({ url, maxWidth, scale, rotate, className }) => {\n const [numPages, setNumPages] = useState(0);\n pdfjs.GlobalWorkerOptions.workerSrc =\n getPublicPath(\"components-core\") + \"/pdfjs/build/pdf.worker.js\";\n const [width, setWidth] = useState(maxWidth);\n const ref = useResize(() => {\n if (ref.current.clientWidth) {\n setWidth(Math.min(ref.current.clientWidth, maxWidth));\n }\n });\n\n return (\n <div\n ref={ref}\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth: maxWidth,\n }}\n >\n <Document\n file={{ url }}\n options={{\n standardFontDataUrl:\n getPublicPath(\"components-core\") + \"/pdfjs/standard_fonts/\",\n cMapUrl: getPublicPath(\"components-core\") + \"/pdfjs/cmaps/\",\n cMapPacked: true,\n }}\n error=\"PDF文件加载失败\"\n loading={\n <div className={style[\"loading\"]}>\n <Spin />\n </div>\n }\n noData=\"未指定PDF文件\"\n onLoadSuccess={({ numPages }) => {\n setNumPages(numPages);\n console.log(\"onLoadSuccess\");\n }}\n onLoadError={(props) => {\n console.log(\"onLoadError\", props);\n }}\n onSourceError={(props) => {\n console.log(\"onSourceError\", props);\n }}\n >\n <Space direction=\"vertical\">\n {numPages >= 1 &&\n Array.from(new Array(numPages), (el, index) => (\n <Page\n key={`page_${index}`}\n className=\"preview-item\"\n scale={scale / 100}\n rotate={rotate}\n pageNumber={index + 1}\n width={width}\n loading={null}\n renderAnnotationLayer={false}\n renderTextLayer={true}\n noData=\"未指定页面\"\n />\n ))}\n </Space>\n </Document>\n </div>\n );\n});\n\nPdfPreview.defaultProps = {\n autoSize: true,\n renderTextLayer: false,\n scale: 100,\n rotate: 0,\n maxWidth: 1200,\n};\n\nexport default PdfPreview;\n","import { useState, useEffect } from \"react\";\nimport TextEscape from \"@kne/react-text-escape\";\nimport axios from \"axios\";\nimport style from \"./style.module.scss\";\nimport { Spin } from \"antd\";\nimport classnames from \"classnames\";\n\nconst TextPreview = ({ url, className, maxWidth }) => {\n const [text, setText] = useState(\"\");\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n useEffect(() => {\n axios.get(url).then(\n ({ data }) => {\n setText(data);\n setLoading(false);\n },\n () => {\n setLoading(false);\n setError(true);\n }\n );\n }, [url]);\n\n return (\n <div\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth,\n }}\n >\n {loading ? (\n <div className={style[\"loading\"]}>\n <Spin />\n </div>\n ) : null}\n <div className={style[\"text-outer\"]}>\n {error ? (\n <div className={style[\"error\"]}>文件加载失败</div>\n ) : (\n <TextEscape text={text} />\n )}\n </div>\n </div>\n );\n};\n\nexport default TextPreview;\n","import { Result } from \"antd\";\nimport style from \"./style.module.scss\";\n\nconst UnknownPreview = ({ maxWidth }) => {\n return (\n <div\n className={style[\"container\"]}\n style={{\n maxWidth,\n }}\n >\n <div className={style[\"text-outer\"]}>\n <Result\n status=\"500\"\n title=\"不支持的文件类型\"\n subTitle=\"系统不支持该文件类型预览,请下载到本地后进行预览\"\n />\n </div>\n </div>\n );\n};\n\nexport default UnknownPreview;\n","import { useEffect, useState } from \"react\";\nimport style from \"./style.module.scss\";\nimport { Spin } from \"antd\";\nimport classnames from \"classnames\";\n\nconst ImagePreview = ({ url, scale, rotate, className, maxWidth }) => {\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n useEffect(() => {\n const image = new Image();\n image.src = url;\n const handlerLoad = () => {\n setLoading(false);\n };\n\n const handlerError = () => {\n setLoading(false);\n setError(true);\n };\n\n image.addEventListener(\"load\", handlerLoad);\n image.addEventListener(\"error\", handlerError);\n return () => {\n image.removeEventListener(\"load\", handlerLoad);\n image.removeEventListener(\"error\", handlerError);\n };\n }, [url, scale, rotate]);\n return (\n <div\n className={classnames(className, style[\"container\"])}\n style={{\n maxWidth,\n }}\n >\n {loading ? (\n <div className={style[\"loading\"]}>\n <Spin />\n </div>\n ) : null}\n {error ? (\n <div className={style[\"error\"]}>图片加载失败</div>\n ) : (\n <img src={url} alt=\"简历预览\" />\n )}\n </div>\n );\n};\n\nexport default ImagePreview;\n","import HtmlPreview from \"./HtmlPreview\";\nimport OfficePreview from \"./OfficePreview\";\nimport PdfPreview from \"./PdfPreview\";\nimport TextPreview from \"./TextPreview\";\nimport UnknownPreview from \"./UnknownPreview\";\nimport ImagePreview from \"./ImagePreview\";\n\nconst typeFormat = (url) => {\n const path = (url || \"\").split(\"?\")[0];\n const _path = path.toLowerCase();\n if (/.txt$/.test(_path)) {\n return \"txt\";\n }\n if (/.pdf$/.test(_path)) {\n return \"pdf\";\n }\n if (/.(png|jpg|jpeg)$/.test(_path)) {\n return \"image\";\n }\n if (/.(html|htm)$/.test(_path)) {\n return \"html\";\n }\n if (/.(doc|docx|xls|xlsx|ppt|pptx)$/.test(_path)) {\n return \"office\";\n }\n return \"unknown\";\n};\n\nexport default typeFormat;\n\nexport const typeFormatComponent = (url) => {\n const mapping = {\n txt: TextPreview,\n pdf: PdfPreview,\n image: ImagePreview,\n html: HtmlPreview,\n office: OfficePreview,\n unknown: UnknownPreview,\n };\n\n return mapping[typeFormat(url)];\n};\n","import withOSSFile from \"@common/hocs/withOSSFile\";\nimport typeFormat, { typeFormatComponent } from \"./typeFormat\";\nimport OfficePreview from \"./OfficePreview\";\n\nconst OSSFilePreview = withOSSFile(({ data, id, className, ...props }) => {\n const PreviewComponent = typeFormatComponent(data);\n if (typeFormat(data) === \"office\") {\n return <OfficePreview {...props} id={id} className={className} />;\n }\n return <PreviewComponent {...props} className={className} url={data} />;\n});\n\nexport default OSSFilePreview;\n","import typeFormat from \"./typeFormat\";\nimport OfficePreview from \"./OfficePreview\";\nimport OSSFilePreview from \"./OSSFilePreview\";\n\nconst FilePreview = ({ id, originName, ...props }) => {\n if (typeFormat(originName) === \"office\") {\n return <OfficePreview {...props} id={id} originName={originName} />;\n }\n return <OSSFilePreview {...props} id={id} originName={originName} />;\n};\n\nexport default FilePreview;\n"],"names":["HtmlInnerPreview","createWithFetch","transformResponse","_ref","data","code","results","_ref2","ref","useRef","useEffect","domDocument","DOMParser","parseFromString","querySelectorAll","forEach","el","parentElement","removeChild","scriptPath","getPublicPath","script","document","createElement","src","head","appendChild","style","innerText","current","srcdoc","documentElement","outerHTML","iFrameResize","checkOrigin","_jsx","title","frameBorder","width","_ref3","className","url","maxWidth","classnames","children","OfficePreviewInner","cache","props","fileList","map","PreviewComponent","typeFormatComponent","_createElement","key","id","apis","propsApis","baseApis","usePreset","Object","assign","previewOffice","PdfPreview","memo","scale","rotate","numPages","setNumPages","useState","pdfjs","GlobalWorkerOptions","workerSrc","setWidth","useResize","clientWidth","Math","min","Document","file","options","standardFontDataUrl","cMapUrl","cMapPacked","error","loading","Spin","noData","onLoadSuccess","console","log","onLoadError","onSourceError","Space","direction","Array","from","index","Page","pageNumber","renderAnnotationLayer","renderTextLayer","concat","defaultProps","autoSize","text","setText","setLoading","setError","axios","then","_jsxs","TextEscape","Result","status","subTitle","image","Image","handlerLoad","handlerError","addEventListener","removeEventListener","alt","typeFormat","_path","split","toLowerCase","test","txt","TextPreview","pdf","ImagePreview","html","HtmlPreview","office","OfficePreview","unknown","UnknownPreview","withOSSFile","originName","OSSFilePreview"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[36],{18411:(e,t,n)=>{n.d(t,{A:()=>a});n(73884);const a=n.p+"static/media/defaultAvatar.b1f2a8046cc7bee36d9a404ce6a0a1d7.svg"},93761:(e,t,n)=>{n.d(t,{qn:()=>T,TM:()=>G,LH:()=>I,Ay:()=>E,DF:()=>D});var a=n(30509),s=n(25438),l=n(55199),r=n(27047),o=n(83136),i=n.n(o),c=n(64671),d=n(73884),u=n(21485),p=n(56434),m=n.n(p),h=n(15797),_=n.n(h),g=n(33097),f=n.n(g);const x="style_address__DIuRX__B7O0d",v="style_is-popup__tqVvp__B7O0d",y="style_title__FAe12__B7O0d",C="style_scroll-box__JWiDl__B7O0d",j="style_scroll-plus-box__lidEW__B7O0d",A="style_content__lAARZ__B7O0d",b="style_col-left__WPfeS__B7O0d",N="style_col-right__z0e9-__B7O0d";var O=n(87558);const S=e=>({"en-US":()=>n.e(3691).then(n.bind(n,83691)),"zh-CN":()=>n.e(2253).then(n.bind(n,32253))}[e]());var w=n(58609),B=n(70579);const P=a.A.useContext,I=e=>{let{city:t,province:n,country:a}=e;const s=_()((()=>{const e=[];return["gangaotai","municipality"].forEach((n=>{e.push(...t.relations[n])})),["provinces","continents"].forEach((n=>{t.relations[n].forEach((n=>{e.push(n),e.push(...t.relations[n])}))})),e.map((e=>t.list[e]))}));return{getCity:_()((e=>{const n=t.list[e];return n?{city:n,parent:n.parentCode?t.list[n.parentCode]:null}:{city:null,parent:null}})),getChinaHotCities:_()((()=>t.relations[2].map((e=>t.list[e])))),getChinaCities:_()((()=>["2",...n.relations.municipality,...n.relations.provinces,"gangaotai"].map((e=>Object.assign({id:e},t.list[e]))))),getCountries:_()((()=>["1",...a.relations.continents].map((e=>Object.assign({id:e},a.list[e]))))),getList:_()(((e,s)=>{const{showChinaQuan:l,showForeignQuan:r}=Object.assign({},s);if("gangaotai"===e)return n.relations.gangaotai.map((e=>t.list[e]));const o=Object.assign({},t.list[e]);if(n.relations.municipality.indexOf(e)>-1)return o.name="".concat(l?"\u5168":"")+o.name,[o];const i=t.relations[e].map((e=>t.list[e]));return n.relations.provinces.indexOf(e)>-1&&l&&(o.name="\u5168"+o.name,i.splice(0,0,o)),a.relations.continents.indexOf(e)>-1&&r&&(o.name="\u5168"+o.name,i.splice(0,0,o)),i})),getNationalityList:_()((e=>{let n=m()(t);return"1"===e&&n.relations[1].unshift("410"),"350"===e&&n.relations[350].unshift("410"),n.relations[e].filter((e=>n.list[e])).map((e=>n.list[e]))})),getCityByName:_()((e=>{const t=s();let n;return[t=>t.name===e,t=>t.name===e.replace(/(\u7701|\u5e02)$/,""),t=>0===e.indexOf(t.name)].find((e=>(n=t.find(e),n))),n})),combineCities:_()(((e,n)=>[...n.filter((n=>t.list[n].parentCode!==e&&t.list[e].parentCode!==n&&e!==n)),e])),searchCities:_()((e=>{if(!e)return[];return s().filter((t=>["pinyin","name","enName","spelling"].some((n=>t[n].toUpperCase().indexOf(e.toUpperCase())>-1)))).map((e=>{const n=e.parentCode?t.list[e.parentCode]:null;return{label:n?"".concat(n.name,"\xb7").concat(e.name):e.name,value:e.code}}))}))}},L=(e,t)=>"en-US"===t?f()(e,"enName"):f()(e,"name"),M={cache:"CITY_DATA",isLocal:!0,ttl:864e5,loader:()=>n.e(7820).then(n.t.bind(n,37820,19)).then((e=>e.__esModule?e.default:e))},k=e=>{let{value:t,setValue:n}=e;const{fetchApi:a,props:o}=P(),[p,m]=(0,d.useState)(""),[h,_]=(0,d.useState)("2"),{formatMessage:g}=(0,w.useIntl)({moduleName:"AddressSelect"}),{locale:f}=(0,r.A)(),{getCity:O,getChinaCities:S,getCountries:M,getList:k,searchCities:F}=(0,d.useMemo)((()=>I(a.data)),[a.data]),T=e=>{if(o.single)return void n([e]);const a=t.slice(0),s=a.indexOf(e);s>-1?a.splice(s,1):a.push(e),n(a)},D=p&&(0,B.jsx)(u.A,{className:j,children:(0,B.jsx)(l.List,{className:s.A.list,size:"small",dataSource:F(p),rowKey:"value",renderItem:e=>(0,B.jsx)(l.List.Item,{className:s.A["list-item"],onClick:()=>{T(e.value),m("")},children:(0,B.jsx)("span",{className:s.A["item-label"],children:e.label})})})});return(0,B.jsxs)("div",{className:i()(x,{[v]:o.isPopup}),children:[(0,B.jsx)(l.Input.Search,{className:i()(s.A["search-input"],{[s.A["is-popup"]]:o.isPopup}),placeholder:o.searchPlaceholder||g({id:"searchCity"}),prefix:(0,B.jsx)(c.default,{type:"icon-sousuo"}),enterButton:(0,B.jsx)(c.default,{type:"icon-sousuo"}),value:p,allowClear:!0,onChange:e=>{const t=e.target.value;m(t)},onSearch:e=>{m(e)}}),(0,B.jsx)("div",{className:A,children:D||(0,B.jsxs)(l.Row,{wrap:!1,children:[(0,B.jsx)(l.Col,{className:b,children:(0,B.jsx)(l.Tabs,{centered:!0,onChange:e=>{_(e)},items:[{key:"2",label:(0,B.jsx)(w.FormattedMessage,{id:"domestic",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5185"}),children:(0,B.jsx)(u.A,{className:C,children:(0,B.jsx)(l.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:S().map((e=>({label:L(e,f),key:e.id})))})})},{key:"1",label:(0,B.jsx)(w.FormattedMessage,{id:"abroad",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5916"}),children:(0,B.jsx)(u.A,{className:C,children:(0,B.jsx)(l.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:M().map((e=>({label:L(e,f),key:e.id})))})})}]})}),(0,B.jsxs)(l.Col,{flex:1,className:N,children:[(0,B.jsx)(l.Divider,{className:y,orientation:"left",children:L(O(h).city,f)}),(0,B.jsx)(u.A,{className:C,children:(0,B.jsx)(l.Space,{wrap:!0,children:k(h,{showChinaQuan:o.showChinaQuan,showForeignQuan:o.showForeignQuan}).map((e=>(0,B.jsx)(l.Tag.CheckableTag,{checked:t.indexOf(e.code)>-1,onChange:()=>{T(e.code)},children:L(e,f)},e.code)))})})]})]})})]})},F=e=>(0,B.jsx)(a.A,{...e,children:e=>{let{value:t,setValue:n}=e;return(0,B.jsx)(w.IntlProvider,{moduleName:"AddressSelect",importMessages:S,children:(0,B.jsx)(k,{value:t,setValue:n})})}});F.defaultProps={overlayWidth:"450px",isPopup:!0,api:M,dataFormat:(e,t)=>{let{city:n}=e;const{locale:a}=Object.assign({},t);return{list:Object.values(n.list).map((e=>Object.assign({},e,{value:e.code,label:L(e,a)})))}}};const T=(0,O.withFetch)((e=>{let{name:t,data:n,children:a,...s}=e;const{locale:l}=(0,r.A)(),{getCity:o}=(0,d.useMemo)((()=>I(n)),[n]);return a(o(t),Object.assign({},s,{locale:l}))}));T.defaultProps={...M,displayParent:!1,children:(e,t)=>{let{city:n,parent:a}=e,{displayParent:s,locale:l}=t;return s&&a?"".concat(L(a,l),"\xb7").concat(L(n,l)):L(n,l)}};const D=e=>{const t=(0,O.withFetch)((t=>{let{data:n,...a}=t;const s=(0,d.useMemo)((()=>I(n)),[n]);return(0,B.jsx)(e,{...a,addressApi:s})}));return t.defaultProps={...M},t};F.AddressEnum=T,F.createAddressApi=I,F.withAddressApi=D;const E=F;var R=n(10986),z=n.n(R),W=n(78491),V=n.n(W),U=n(20492),K=n(22616),H=n.n(K),q=n(1488),Q=n.n(q);const Z=e=>{const{isPopup:t,size:n,disabled:a,inputPlaceholder:s,onBlur:r,className:o,...i}=e,[c,d]=z()(e),u=["isPopup","searchPlaceholder","placeholder","overlayWidth","api","dataFormat"],{formatMessage:p}=(0,w.useIntl)({moduleName:"Common"}),m=V()((e=>{r&&r(e)}));return(0,B.jsx)("div",{ref:m,children:(0,B.jsxs)(l.Row,{gutter:10,children:[(0,B.jsx)(l.Col,{span:12,children:(0,B.jsx)(E,{...H()(i,u),className:o,disabled:a,single:!0,size:n,value:f()(c,"city"),onChange:e=>{d({city:e,detail:f()(c,"detail")})}})}),(0,B.jsx)(l.Col,{span:12,children:(0,B.jsx)(l.Input,{...Q()(i,u),className:o,placeholder:s||p({id:"pleaseInput"}),disabled:a,size:n,value:f()(c,"detail"),onChange:e=>{d({city:f()(c,"city"),detail:e.target.value})}})})]})})};Z.defaultProps={};const G=(0,w.createWithIntl)({importMessages:U.A,moduleName:"Common"})(Z)},12392:(e,t,n)=>{n.d(t,{Bm:()=>T,Eo:()=>k,NR:()=>C,Ay:()=>D});var a=n(55199),s=n(83136),l=n.n(s),r=n(30509),o=n(25438),i=n(26475),c=n(33097),d=n.n(c),u=n(34677),p=n.n(u);const m="create-list_scroll-loader__zoaS7__B7O0d",h="create-list_is-popup__t3d-G__B7O0d",_="create-list_is-not-full__FXtX1__B7O0d",g="create-list_search-input__tV3vf__B7O0d",f="create-list_left__EXr3i__B7O0d";var x=n(73161),v=n(70579);const y=r.A.useContext,C=e=>{let{renderList:t,defaultProps:n}=e;const s=e=>{let{value:n,setValue:s}=e;const{fetchApi:r,searchText:c,setSearchText:u,props:C,mapping:j}=y(),A=Object.assign({},{paramsType:"data",current:"currentPage",pageSizeName:"perPage",pageSize:20},C.pagination),b=d()(r.requestParams,[A.paramsType,A.current],1),N=d()(r.requestParams,[A.paramsType,A.pageSizeName])||A.pageSize,O=C.dataFormat(r.data),{right:S,leftBottom:w,leftSpan:B=24}=C;return(0,v.jsxs)(a.Row,{wrap:!1,className:S?_:"",children:[(0,v.jsxs)(a.Col,{span:B,className:l()(f,"advance-select-left"),children:[C.getSearchProps?(0,v.jsx)(x.A,{isPopup:C.isPopup,className:l()(g,o.A["search-input"],{[o.A["is-popup"]]:C.isPopup}),placeholder:C.searchPlaceholder,value:c,onSearch:e=>{r.reload(C.getSearchProps(e)),u(e)}}):null,(0,v.jsx)(i.A,{completeTips:"",isLoading:!r.isComplete,className:l()(m,{[h]:C.isPopup}),noMore:!O.total||b*N>=O.total,onLoader:async()=>{console.log("on loader"),await r.loadMore(p()({[A.paramsType]:{[A.pageSizeName]:N,[A.current]:b+1}},C.getSearchProps&&C.getSearchProps(c)),C.mergeList)},children:t({props:C,value:n,setValue:s,list:O.list,itemIsSelected:e=>n.indexOf(e.value)>-1,onSelect:e=>{if(C.single)return void s([e.value]);const t=n.slice(0),a=t.indexOf(e.value);a>-1?t.splice(a,1):t.push(e.value),s(t)}})}),w&&w({fetchApi:r,value:n,mapping:j})]}),S&&S({value:n,mapping:j,fetchApi:r})]})},c=e=>{let{extra:t,...n}=e;return(0,v.jsx)(r.A,{...n,extra:t,children:e=>{let{value:t,setValue:n}=e;return(0,v.jsx)(s,{value:t,setValue:n})}})};return c.defaultProps=Object.assign({},{isPopup:!0,searchPlaceholder:"\u641c\u7d22",pagination:{},mergeList:(e,t)=>Object.assign({},t,{pageData:e.pageData.concat(t.pageData)}),dataFormat:e=>({list:e.pageData,total:e.totalCount})},n),c},j="list_list__TGynD__B7O0d",A="list_list-item__WSswf__B7O0d",b="list_is-selected__6Wkgt__B7O0d",N="list_item-label__bYzhe__B7O0d",O="list_item-des__2nsEn__B7O0d",S="list_is-disabled__qxCvO__B7O0d";var w=n(40438),B=n(64671);const P="user_list-inner__V508e__B7O0d",I="user_list-info__y2nWo__B7O0d",L="user_selected-icon__9OQJL__B7O0d",M="user_item-des__o+7UR__B7O0d",k=C({renderList:e=>{let{list:t,onSelect:n,itemIsSelected:s}=e;return(0,v.jsx)(a.List,{size:"small",className:j,dataSource:t,renderItem:e=>{const t=s(e);return(0,v.jsx)(a.List.Item,{className:l()(A,{[b]:t}),onClick:()=>n(e),children:(0,v.jsxs)(a.Row,{wrap:!1,align:"middle",className:P,children:[(0,v.jsx)(a.Col,{children:(0,v.jsx)(w.default.Avatar,{...Object.assign({},e.avatar),size:40,gender:"M"})}),(0,v.jsx)(a.Col,{className:I,flex:1,children:(0,v.jsxs)(a.Space,{direction:"vertical",children:[(0,v.jsx)("span",{className:N,children:e.label}),e.description&&(0,v.jsx)("span",{className:M,children:e.description})]})}),(0,v.jsx)(a.Col,{children:t?(0,v.jsx)(B.default,{className:L,type:"icon-gouxuan"}):null})]})})}})}}),F={},T=C({defaultProps:{overlayWidth:"450px"},renderList:e=>{let{props:t,list:n,onSelect:s,value:r,setValue:o,itemIsSelected:i}=e;return(0,v.jsx)(a.Table,{className:F.list,size:"small",dataSource:n,columns:t.columns,rowClassName:e=>l()({"ant-table-row-selected":i(e)}),rowKey:t.rowKey||"value",pagination:!1,rowSelection:t.single?null:{selectedRowKeys:r,onChange:e=>{o(e)}},sticky:!0,onRow:e=>({onClick:()=>s(e)})})}}),D=C({renderList:e=>{let{props:t,list:n,itemIsSelected:s,onSelect:r}=e;const{listClassName:o="",selectIcon:i=null}=t||{};return(0,v.jsx)(a.List,{className:l()(j,o),size:"small",dataSource:n,renderItem:e=>{var n;const o=s(e);return(0,v.jsxs)(a.List.Item,{className:l()(A,{[b]:t.single&&o,[S]:e.disabled}),onClick:()=>{e.disabled||r(e)},children:[(0,v.jsxs)(a.Row,{wrap:!1,children:[t.single?null:(0,v.jsx)(a.Col,{children:(0,v.jsx)(a.Checkbox,{checked:o,disabled:e.disabled})}),(0,v.jsx)(a.Col,{children:(0,v.jsxs)(a.Space,{className:null!==(n=null===e||void 0===e?void 0:e.className)&&void 0!==n?n:"",children:[(0,v.jsx)("span",{className:N,children:e.label}),e.description&&(0,v.jsx)("span",{className:O,children:e.description})]})})]}),o&&i]})}})}})},45776:(e,t,n)=>{n.d(t,{yK:()=>I,ON:()=>h,Ay:()=>T});var a=n(30509),s=n(73884),l=n(96418),r=n.n(l),o=n(55199),i=n(64671),c=n(73161),d=n(33097),u=n.n(d),p=n(79686),m=n.n(p);const h=e=>{const t=Array.from(e.values()),n=t.filter((e=>null===e.parentId)),a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},s=t=>{const n=[],a=t=>{const s=e.get(t);s&&Array.isArray(s.children)&&s.children.length>0&&(n.push(...s.children),s.children.forEach((e=>{a(e.id)})))};return a(t),n},l=(t,n)=>{const a=t=>{const s=e.get(t);return s?n(s)?s:m()(s.parentId)?null:a(s.parentId):null};return a(t)},r=t=>{const a=e.get(t);if(!a)return[];const s=a.parentId;if(m()(s))return n;return e.get(s).children},o=(()=>{const e=n=>Array.isArray(n)&&n.length>0?n.map((n=>{const a=t.filter((e=>e.parentId===n.id));return Object.assign({},n,{children:e(a)})})):null;return e(n)})();return{mapping:e,getSelectedQueue:t=>{const n=e.get(t);if(!n)return[];const a=e=>{if(e.children&&e.children.length>0)return a(e.children.find((t=>t.children&&e.children.length>0))||u()(e.children,"0"));const t=s(e.parentId).find((e=>e.children&&e.children.length>0));return t?a(t):e},l=function(t){const n=[t,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]],a=e.get(t);return!a||m()(a.parentId)?n:l(a.parentId,n)},r=a(n);return l(u()(r,"id"))},getAllChildren:s,computedCheckboxStatus:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(l(t,(e=>n.indexOf(e.id)>-1)))return{checked:!0,indeterminate:!1};const a=((t,a)=>{const s=t=>{const a=e.get(t);return a?(l=a,n.indexOf(l.id)>-1?a:Array.isArray(a.children)&&a.children.length>0?a.children.find((e=>!!s(e.id))):void 0):null;var l};return!!s(t)})(t);return a?{checked:!1,indeterminate:!0}:{checked:!1,indeterminate:!1}},getSiblingNode:r,findInParents:l,setNodeChecked:function(t){const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),l=t=>{const o=e.get(t);if(!o)return;n.push(t),s(t).forEach((e=>{a(n,e.id)}));const i=r(t),c=i.every((e=>n.indexOf(e.id)>-1));o.parentId&&c&&(i.forEach((e=>{a(n,e.id)})),l(o.parentId))};return l(t),n},setNodeUnchecked:function(t){const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),s=t=>{const l=e.get(t);if(!l)return;if(n.indexOf(l.id)>-1)return void a(n,l.id);const o=r(t);l.parentId&&(o.forEach((e=>{t!==e.id&&n.push(e.id)})),s(l.parentId))};return s(t),n},treeData:o,treeMapping:new Map(o.map((e=>[e.id,e])))}};var _=n(74065),g=n.n(_),f=n(19853),x=n.n(f),v=n(17342),y=n(83136),C=n.n(y);const j={content:"style_content__Hxlt9__B7O0d",columns:"style_columns__FmtPF__B7O0d","content-item":"style_content-item__i6HCO__B7O0d","last-level-area":"style_last-level-area__2y7jQ__B7O0d","is-popup":"style_is-popup__+r3Mn__B7O0d",menu:"style_menu__WZUVE__B7O0d","scroll-plus-box":"style_scroll-plus-box__QcTst__B7O0d","menu-label":"style_menu-label__iGt0Z__B7O0d","menu-item":"style_menu-item__hXHfm__B7O0d","checkbox-hidden":"style_checkbox-hidden__Xpx7J__B7O0d",loading:"style_loading__ZwrVe__B7O0d"};var A=n(87558),b=n(58609),N=n(25438),O=n(70579),S=n(27047);const w=new Map,B=(0,A.withFetch)((e=>{let{data:t,name:n,type:a,cache:l,children:r,getLabel:o,...i}=e;const c=(0,s.useMemo)((()=>new Map(t.map((e=>[e.code,{...e,id:e.code,label:o?o(e):e.chName,parentId:e.parentCode||null}])))),[t,o]).get(n);return w.set("".concat(n,"_").concat(a),c),r(c,i)})),P=e=>{const{locale:t}=(0,S.A)(),n="".concat(t,"_").concat(e.name,"_").concat(e.type),a=w.get(n);return a&&!e.force?e.children(a):(0,O.jsx)(B,{...e})};P.defaultProps={children:e=>u()(e,"label","")};const I=P,L=a.A.useContext,M=(0,A.withFetch)((e=>{let{data:t,computedIsChecked:n,onSelect:a}=e;return(0,O.jsx)(v.A,{className:j["scroll-plus-box"],children:(0,O.jsx)(o.List,{className:N.A.list,size:"small",dataSource:t,rowKey:"value",renderItem:e=>{const t=n(e);return(0,O.jsx)(o.List.Item,{className:C()(N.A["list-item"],{[N.A["is-selected"]]:t}),onClick:()=>a(e,t),children:(0,O.jsx)("span",{className:N.A["item-label"],children:e.label})})}})})})),k=e=>{let{value:t,setValue:n,size:a}=e;const{fetchApi:l,props:d}=L(),[p,m]=(0,s.useState)(""),_=r()(d.dataFormat),{formatMessage:f}=(0,b.useIntl)({moduleName:"Common"}),y=l.data,A=(0,s.useMemo)((()=>new Map(_(y).list.map((e=>[e.value,e])))),[y,_]),S=(0,s.useMemo)((()=>h(A)),[A]),w=(0,s.useRef)({});w.current={createMergeTree:d.createMergeTree,loadMore:l.loadMore,openLoadData:d.openLoadData,parentIdKey:d.parentIdKey,treeUtils:S};const[B,P]=(0,s.useState)((()=>{const e=t.find((e=>!!A.get(e)));return S.getSelectedQueue(e||u()(l.data.find((e=>e.children&&e.children.length>0)),"id")||u()(l.data,"[0].id"),A)}));(0,s.useEffect)((()=>{const{openLoadData:e,loadMore:t,parentIdKey:n,createMergeTree:a,treeUtils:s}=w.current;if(!e)return;const l=A.get(g()(B));if(!l)return;const r=s.getSelectedQueue(l.id);x()(B,r)?l.hasOwnProperty("children")||t({data:{[n]:l.id}},a(l.id)):P(r)}),[B,A]);const I=(e,s)=>{const l=(()=>{if(d.onlyAllowLastLevel&&e){const e=t.slice(0);return e.push(s),e}if(d.onlyAllowLastLevel){const e=t.slice(0);return e.splice(t.indexOf(s),1),e}return e?S.setNodeChecked(s,t):S.setNodeUnchecked(s,t)})();l.length>a?o.message.error(f({id:"maxSelectedCount"},{count:a})):n(d.single&&l.length>0?[g()(l)]:l)},k=e=>{const t=A.get(e);return!(!d.openLoadData||t.hasOwnProperty("children"))||t.children&&t.children.length>0},F=!d.openLoadData&&"function"===typeof d.onSearch,T=F&&p&&(0,O.jsx)(M,{data:{searchText:p},loader:e=>{let{data:t}=e;return d.onSearch(t.searchText,{mapping:A})},computedIsChecked:e=>t.indexOf(e.id)>-1,onSelect:(e,t)=>{I(!t,e.id),!t&&P(S.getSelectedQueue(e.id,A)),m("")}});return(0,O.jsxs)("div",{className:C()(j.content,{[j["is-popup"]]:d.isPopup,[j["has-search"]]:F}),style:{"--menu-item-width":d.menuItemWidth},children:[F&&(0,O.jsx)(c.A,{isPopup:d.isPopup,className:C()(N.A["search-input"],{[N.A["is-popup"]]:d.isPopup}),placeholder:d.searchPlaceholder||f({id:"search"}),value:p,onSearch:e=>{m(e)}}),T||(0,O.jsx)("div",{children:(0,O.jsx)(v.A,{className:j.scroller,options:{autoHide:!1},children:(0,O.jsxs)("div",{className:j.columns,children:[B.map(((e,n)=>{const a=A.get(e),l=S.getSiblingNode(e),r=!k(null===a||void 0===a?void 0:a.id)&&n>0;return(0,O.jsx)(v.A,{className:C()(j["content-item"],{[j["last-level-area"]]:r}),children:r?(0,O.jsx)(o.Space,{wrap:!0,children:l.map((e=>(0,s.createElement)(o.Checkbox,{...S.computedCheckboxStatus(e.id,t),key:e.id,onChange:t=>I(t.target.checked,e.id)},e.label)))}):(0,O.jsx)(o.Menu,{className:C()(j.menu),onSelect:e=>{const n=A.get(e.key);if(n)if(k(n.id))P(S.getSelectedQueue(n.id,A));else{const{checked:e}=S.computedCheckboxStatus(n.id,t);I(!e,n.id)}},selectedKeys:n===B.length-1?[]:B,items:l.map((e=>({key:e.id,label:(0,O.jsxs)(o.Space,{className:C()(j["menu-item"],{[j["checkbox-hidden"]]:d.onlyAllowLastLevel&&k(e.id)}),children:[!d.onlyAllowLastLevel&&(0,O.jsx)(o.Checkbox,{...S.computedCheckboxStatus(e.id,t),onChange:t=>I(t.target.checked,e.id)}),(0,O.jsx)("div",{className:j["menu-label"],children:e.label}),k(e.id)&&(0,O.jsx)(i.default,{className:j["menu-item-icon"],type:"icon-arrow-thin-right",size:12})]})})))})},u()(l,"[0].id",n))})),l.isComplete?null:(0,O.jsx)("div",{className:j.loading,children:(0,O.jsx)(o.Spin,{size:"small"})})]})})})]})},F=e=>{let{maxLength:t,nodeFormat:n,dataFormat:s,...l}=e;return(0,O.jsx)(a.A,{...l,dataFormat:e=>s(e,n),children:e=>{let{value:n,setValue:a}=e;return(0,O.jsx)(k,{size:t,value:n,setValue:a})}})};F.defaultProps={maxLength:Number.MAX_VALUE,size:"middle",isPopup:!0,overlayWidth:"460px",menuItemWidth:"180px",openLoadData:!1,onlyAllowLastLevel:!1,parentIdKey:"id",onSearch:(e,t)=>{let{mapping:n}=t;return Array.from(n.values()).filter((t=>t.label.indexOf(e)>-1))},dataFormat:(e,t)=>{const n=(e,a)=>{const s=[];return s.push(...(e||[]).map((e=>("function"===typeof t&&Object.assign(e,t(e)),e.children&&e.children.length>0&&s.push(...n(e.children,e.id)),Object.assign({},e,{value:e.id,parentId:a}))))),s};return{list:n(e,null)}},createMergeTree:e=>(t,n)=>{const a=t=>t.map((t=>t.id===e?Object.assign({},t,{children:n&&n.map((t=>Object.assign({},t,{parentId:e})))}):Array.isArray(t.children)&&t.children.length>0?Object.assign({},t,{children:a(t.children)}):t));return a(t)}};const T=F},41654:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(45776),s=n(27047),l=n(33097),r=n.n(l),o=n(70579);const i=(e,t)=>"en-US"===t?r()(e,"enName"):r()(e,"chName"),c=()=>n.e(719).then(n.t.bind(n,10719,19)).then((e=>e.__esModule?e.default:e)),d={cache:"FUNCTION_DATA",isLocal:!0,ttl:864e5,loader:c},u=e=>{let{apis:t,...n}=e;const{apis:l,locale:r}=(0,s.A)(),c=Object.assign({},{functionData:d},null===l||void 0===l?void 0:l.staticData,t);return(0,o.jsx)(a.Ay,{...n,api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:n}=(0,a.ON)(new Map(t.map((e=>[e.code,{...e,id:e.code,label:i(e,r),parentId:e.parentCode||null}]))));return n}},c.functionData)})};u.defaultProps={overlayWidth:"640px",getSearchProps:e=>({data:{searchText:e}})},u.defaultData=c;u.Enum=e=>{let{apis:t,...n}=e;const{apis:l,locale:r}=(0,s.A)(),c=Object.assign({},{functionData:d},null===l||void 0===l?void 0:l.staticData,t);return(0,o.jsx)(a.yK,{...n,...c.functionData,type:"function",getLabel:e=>i(e,r),transformData:e=>{let{data:t}=e;return t}})};const p=u},53392:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(45776),s=n(27047),l=n(33097),r=n.n(l),o=n(70579);const i=(e,t)=>"en-US"===t?r()(e,"enName"):r()(e,"chName"),c={cache:"INDUSTRY_DATA",isLocal:!0,ttl:864e5,loader:()=>n.e(7183).then(n.t.bind(n,57183,19)).then((e=>e.__esModule?e.default:e))},d=e=>{let{apis:t,...n}=e;const{apis:l,locale:r}=(0,s.A)(),d=Object.assign({},{industryData:c},null===l||void 0===l?void 0:l.staticData,t);return(0,o.jsx)(a.Ay,{...n,api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:n}=(0,a.ON)(new Map(t.filter((e=>"000"!==e.code)).map((e=>[e.code,{...e,id:e.code,label:i(e,r),parentId:e.parentCode||null}]))));return n}},d.industryData)})};d.defaultProps={overlayWidth:"635px"};d.Enum=e=>{let{apis:t,...n}=e;const{apis:l,locale:r}=(0,s.A)(),d=Object.assign({},{industryData:c},null===l||void 0===l?void 0:l.staticData,t);return(0,o.jsx)(a.yK,{...n,...d.industryData,type:"function",getLabel:e=>i(e,r),transformData:e=>{let{data:t}=e;return t}})};const u=d},26475:(e,t,n)=>{n.d(t,{A:()=>_});var a=n(73884),s=n(55199),l=n(96418),r=n.n(l),o=n(21485),i=n(83136),c=n.n(i),d=n(51941);const u="style_scroller-no-more__EH2J+__B7O0d";var p=n(70579);const m=e=>{let{getScrollerRef:t,loadMore:n,maxFullCount:s}=e;const l=r()(n),o=r()(t);return(0,a.useEffect)((()=>{let e=s;const t=o(),n=async()=>{t.clientHeight===t.scrollHeight&&e>0&&(await l().then((()=>new Promise((e=>{setTimeout(e,500)})))),e--,await n())};n()}),[s,l,o]),null},h=(0,a.forwardRef)(((e,t)=>{let{className:n,noMore:l,onLoader:i,isLoading:h,completeTips:_,maxFullCount:g,children:f}=e;const[x,v]=(0,a.useState)(!1),y=(0,a.useRef)(),C=r()(i),j=(0,a.useRef)(!l&&!h);j.current=!l&&!h,(0,a.useImperativeHandle)(t,(()=>y.current),[]);const A=(0,d.useThrottledCallback)((e=>{const t=e.target;j.current&&t.clientHeight+t.scrollTop+20>t.scrollHeight&&C()}),100);return(0,p.jsxs)(o.A,{ref:y,onScroll:A,className:c()("load-container",n),onReady:()=>{v(!0)},children:[x&&!h&&!l&&(0,p.jsx)(m,{maxFullCount:g,getScrollerRef:()=>y.current,loadMore:C}),(0,p.jsxs)(s.Space,{direction:"vertical",children:[(0,p.jsx)("div",{children:f}),h?(0,p.jsx)("div",{className:u,children:(0,p.jsx)(s.Spin,{size:"small"})}):null,l&&_?(0,p.jsx)("div",{className:u,children:_}):null]})]})}));h.defaultProps={maxFullCount:3,completeTips:"\u52a0\u8f7d\u5b8c\u6210"};const _=h},73161:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(55199),s=n(83136),l=n.n(s);const r="style_search-input__8aH1G__B7O0d",o="style_is-popup__L0973__B7O0d";var i=n(64671),c=n(73884),d=n(51941),u=n(70579);const p=e=>{let{value:t,debounce:n,onSearch:s,isPopup:p,placeholder:m,className:h,..._}=e;const[g,f]=(0,c.useState)(t),x=(0,c.useRef)(t),v=(0,d.useDebouncedCallback)(s,n);return(0,c.useEffect)((()=>{t!==x.current&&(f(t),x.current=t)}),[t]),(0,u.jsx)(a.Input.Search,{..._,allowClear:!0,className:l()(h,r,{[o]:p}),value:g,placeholder:m,prefix:(0,u.jsx)(i.default,{type:"icon-sousuo"}),enterButton:(0,u.jsx)(i.default,{type:"icon-sousuo"}),onChange:e=>{const t=e.target.value;x.current=t,f(t),v(t)},onSearch:e=>{v(e)}})};p.defaultProps={debounce:500};const m=p},30509:(e,t,n)=>{n.d(t,{A:()=>V});const a={"ant-tag":"style_ant-tag__nNp8-__B7O0d",input:"style_input__SpJTE__B7O0d",overlay:"style_overlay__La5mO__B7O0d","is-disabled":"style_is-disabled__joxdl__B7O0d","input-icon":"style_input-icon__vVd8R__B7O0d",large:"style_large__En6mL__B7O0d",small:"style_small__DY0AQ__B7O0d","input-inner":"style_input-inner__PWy27__B7O0d","input-custom":"style_input-custom__ktsWD__B7O0d","display-content":"style_display-content__hIKo+__B7O0d","overlay-footer-extra":"style_overlay-footer-extra__Q+BiR__B7O0d","selected-tag":"style_selected-tag__zXZZO__B7O0d","selected-tag-list":"style_selected-tag-list__xUIms__B7O0d","selected-tag-inner":"style_selected-tag-inner__Z5gPL__B7O0d","text-inner":"style_text-inner__H24hY__B7O0d",placeholder:"style_placeholder__x0ccE__B7O0d","is-modal":"style_is-modal__JU+uq__B7O0d","overlay-content":"style_overlay-content__WKqp+__B7O0d"};var s=n(74981);const{context:l,useContext:r,Provider:o,Consumer:i}=(0,s.A)();var c=n(73884),d=n(10986),u=n.n(d),p=n(87558),m=n(33097),h=n.n(m),_=n(55199),g=n(83136),f=n.n(g),x=n(3382),v=n(64671),y=n(79686),C=n.n(y),j=n(41740),A=n.n(j),b=n(74065),N=n.n(b),O=n(21485),S=n(96418),w=n.n(S),B=n(77964),P=n(91176),I=n(58609),L=n(20492),M=n(27047),k=n(70579);const F=e=>{let{maxLength:t,single:n,setValue:a,value:s,message:l}=e;return e=>a(!n&&Number.isInteger(t)&&t>0&&e.length>t?(l(),s):e)},T=e=>{let{single:t,value:n,mapping:s,onClose:l}=e;return n&&Array.isArray(n)&&0!==n.length?t?(0,k.jsx)("span",{className:a["text-inner"],children:h()(s.get(n[0]),"label")||n[0]}):n.map((e=>{const t=s.get(e);return(0,k.jsx)(_.Tag,{className:a["display-tag"],closable:!0,onClose:n=>{n.preventDefault(),l(e,t)},children:(0,k.jsx)("span",{className:a["tag-inner"],children:h()(t,"label")||e})},e)})):null},D=(0,c.forwardRef)(((e,t)=>{let{value:n,onChange:s,extra:l,showSelectedTag:r,renderSelectedContent:o,children:i,...d}=e;const[u,p]=(0,c.useState)(n),m=(0,c.useRef)(n),{formatMessage:h}=(0,I.useIntl)({moduleName:"Common"});m.current=n;const[g,f]=(0,c.useState)(!1),v=e=>{var t;f(e),null===(t=d.onOpenChange)||void 0===t||t.call(d,e)},{message:y}=_.App.useApp(),C=F({maxLength:d.maxLength,single:d.single,setValue:p,value:u,message:()=>y.error(h({id:"maxSelectedCount"},{count:d.maxLength}))});return(0,c.useEffect)((()=>{g&&p(m.current)}),[g]),(0,c.useImperativeHandle)(t,(()=>({modalOpen:()=>{v(!0)},close:()=>{v(!1)}}))),(0,k.jsx)(x.default,{...d,open:g,onConfirm:()=>{s(u)},onClose:()=>{v(!1)},footer:(r||l)&&(0,k.jsxs)(_.Space,{direction:"vertical",className:a["overlay-footer"],children:[l&&(0,k.jsx)("div",{className:a["overlay-footer-extra"],children:l}),r&&o({value:u,setValue:C})]}),children:"function"===typeof i?i({value:u,setValue:C}):i})})),E=(0,c.forwardRef)(((e,t)=>{let{value:n,setValue:s,children:l,renderSelectedContent:r,showSelectedTag:o,placement:i,inputContent:d,single:u,extra:p,overlayWidth:m,wrapClassName:h,overlayClassName:g,disabled:x,...v}=e;const[y,C]=(0,c.useState)(!1),j=w()((e=>{var t;C(e),null===(t=v.onOpenChange)||void 0===t||t.call(v,e)}));return(0,c.useImperativeHandle)(t,(()=>({close:()=>{j(!1)}})),[j]),x?(0,k.jsx)("div",{className:a["input-inner"],children:d}):(0,k.jsx)(_.Popover,{...v,open:y,onOpenChange:j,transitionName:"ant-slide-up",overlayClassName:f()(a.overlay,g),arrow:!1,content:(0,k.jsxs)("div",{style:m?{"--overlay-width":m}:{},className:f()(a["overlay-content"],"over-content"),onClick:e=>{e.stopPropagation()},children:[(0,k.jsx)("div",{className:a["overlay-inner"],children:"function"===typeof l?l({value:n,setValue:e=>{(!u||n[0]!==e[0])&&s(e),u&&j(!1)}}):l}),(o||p)&&(0,k.jsxs)("div",{className:a["overlay-footer"],children:[p&&(0,k.jsx)("div",{className:a["overlay-footer-extra"],children:p}),o&&r({value:n,setValue:s})]})]}),trigger:"click",placement:i,children:(0,k.jsx)("div",{className:a["input-inner"],children:d})})})),R=(0,p.withFetch)((e=>{let{setFetchApi:t,wrapClassName:n,getContentRef:s,...l}=e;const[o,i]=(0,c.useState)(!1),d=(0,c.useRef)(null),u=(0,c.useRef)(null),p=r(),{valueState:m,mapping:h,props:g,inputWidth:x}=p,[y,C]=m,{formatMessage:j}=(0,I.useIntl)({moduleName:"Common"}),{single:A,placement:b,getPopupContainer:N,placeholder:S,isPopup:B,disabled:L,showSelectedTag:M,extra:F,inputContent:R,allowClear:z,overlayClassName:W}=g,V=(0,c.useRef)(l);V.current=l;const U=w()(s);(0,c.useEffect)((()=>{U(B?u:d)}),[B,U]),(0,c.useEffect)((()=>{t(Object.assign({},V.current,{data:l.data,isComplete:l.isComplete}))}),[l.data,t,l.isComplete]);const K=T({single:A,value:y,mapping:h,onClose:e=>{C((t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n}))}}),H=e=>{let{value:t,setValue:n}=e;return(0,k.jsxs)(_.Space,{className:a["selected-tag"],align:"center",wrap:!1,children:[(0,k.jsxs)("div",{children:[(0,k.jsx)(I.FormattedMessage,{id:"selectedTextAdvanced",moduleName:"Common",defaultMessage:"\u5df2\u9009"}),!g.single&&Number.isInteger(g.maxLength)&&g.maxLength>0?"(".concat(t.length,"/").concat(g.maxLength,")"):"",":"]}),(0,k.jsx)(O.A,{className:a["selected-tag-list"],children:(0,k.jsx)("div",{className:a["selected-tag-inner"],children:T({value:t,mapping:h,onClose:e=>{n((t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n}))}})})})]})},q=R?R(p):(0,k.jsxs)(_.Space,{className:a["display-content"],onMouseOver:()=>{i(!0)},onMouseOut:()=>{i(!1)},children:[(0,k.jsx)("div",{children:K||(0,k.jsx)("span",{className:a.placeholder,children:S||j({id:"pleaseSelect"})})}),o&&y&&y.length>0&&!L&&z?(0,k.jsx)(v.default,{className:f()(a.close,a["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),C([])}}):(0,k.jsx)(v.default,{className:f()(a["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return B?(0,k.jsx)(E,{ref:u,overlayWidth:(0,P.v)(Math.max(x,(0,P.j)(g.overlayWidth))),value:y,setValue:C,single:A,disabled:L,inputContent:q,onOpenChange:g.onOpenChange,overlayClassName:W,extra:"function"===typeof F?F({close:()=>u.current.close(),context:p}):F,renderSelectedContent:H,showSelectedTag:M,trigger:"click",placement:b,getPopupContainer:N,children:g.children}):(0,k.jsxs)("div",{className:a["input-inner"],onClick:()=>{L||d.current.modalOpen()},children:[(0,k.jsx)(D,{size:g.modalSize,ref:d,single:g.single,maxLength:g.maxLength,onOpenChange:g.onOpenChange,disabledScroller:!0,wrapClassName:f()(a.overlay,a["is-modal"],n),title:g.placeholder||j({id:"pleaseSelect"}),value:y,onChange:C,extra:"function"===typeof F?F({close:()=>d.current.close(),context:p}):F,showSelectedTag:M,renderSelectedContent:H,children:g.children}),q]})})),z=e=>{let{api:t,className:n,displayItems:s,wrapClassName:l,...r}=e;const{locale:i}=(0,M.A)(),[d,p]=(0,c.useState)(""),[m,g]=(0,c.useState)(new Map(s.map((e=>[e.value,e])))),{formatMessage:x}=(0,I.useIntl)({moduleName:"Common"}),[v,y]=(0,c.useState)(0),j=(0,B.A)((e=>{y(e.clientWidth)})),[b,O]=(0,c.useState)({}),{message:S}=_.App.useApp(),w=e=>{const t=e.filter((e=>m.get(e.value)!==e));0!==t.length&&g((e=>{const n=A()(e);return t.forEach((e=>{n.set(e.value,e)})),n}))},P=e=>((e,t)=>Array.isArray(e)&&e.every((e=>e&&e.hasOwnProperty("value")&&e.hasOwnProperty("label")))?(t(e),e.map((e=>e.value))):e)(r.single?C()(e)?[]:[e]:e||[],w,r.valueType),[L,T]=u()(Object.assign({},r,{onChange:e=>{const t=((e,t,n)=>"all"!==n?e:e.map((e=>t.get(e))).filter((e=>!!e)))(e,m,r.valueType);r.onChange&&r.onChange(r.single?N()(t):t)}},"value"in r?{value:P(r.value)}:{defaultValue:P(r.defaultValue)})),D=F({maxLength:r.maxLength,single:r.single,setValue:T,value:L,message:()=>S.error(x({id:"maxSelectedCount"},{count:r.maxLength}))}),E=(0,c.useRef)(null);return(0,k.jsx)(o,{value:{inputWidth:v,mapping:m,searchText:d,setSearchText:p,appendMapping:w,setItems:e=>{b.setData(e),w(h()(r.dataFormat(e,{locale:i}),"list",[]))},getContentApi:()=>E.current,fetchApi:b,valueState:[L,D],props:r},children:(0,k.jsx)("div",{ref:j,className:f()(a["input".concat(r.inputContent&&"function"===typeof r.inputContent?"-custom":"")],{"select-input-disabled":!!r.disabled},n),children:(0,k.jsx)(R,{...t,wrapClassName:l,loading:null,setFetchApi:O,getContentRef:e=>{e.current&&(E.current=e.current)},onRequestSuccess:e=>{w(h()(r.dataFormat(e,{locale:i}),"list",[])),t.onRequestSuccess&&t.onRequestSuccess(e)}})})})};z.defaultProps={displayItems:[],extra:null,api:{loader:()=>[]},dataFormat:e=>({list:e}),placement:"bottomLeft",showSelectedTag:!0,allowClear:!0};const W=(0,I.createWithIntl)({importMessages:L.A,moduleName:"Common"})(z);W.useContext=r;const V=W},17342:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(8762),s=n.n(a);n(46733);const l=s()},21485:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(73884),s=n(44418),l=n.n(s),r=n(96418),o=n.n(r),i=n(70579);const c=(0,a.forwardRef)(((e,t)=>{let{children:n,onScroll:s,options:r,onReady:c,...d}=e;const u=(0,a.useRef)(null),p=(0,a.useRef)(null),m=(0,a.useRef)(r),h=o()(c),_=o()(s);return(0,a.useImperativeHandle)(t,(()=>p.current)),(0,a.useEffect)((()=>{const e=new(l())(u.current,m.current);return p.current=e.getScrollElement(),p.current.addEventListener("scroll",_),h(p.current),()=>{p.current.removeEventListener("scroll",_)}}),[_,h,n]),(0,i.jsx)("div",{...d,ref:u,children:n})}))},89319:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(55199),s=n(10986),l=n.n(s),r=n(57469),o=n.n(r),i=n(20492),c=n(58609),d=n(70579);const u=(0,c.createWithIntl)({importMessages:i.A,moduleName:"Common"})((e=>{let{...t}=e;const{formatMessage:n}=(0,c.useIntl)({moduleName:"Common"}),s=new Map([["date",n({id:"customTime"})],["month",n({id:"monthly"})],["week",n({id:"weekly"})]]),[r,i]=l()(t);return(0,d.jsxs)(a.Space.Compact,{children:[(0,d.jsx)(a.Select,{style:{width:"120px"},value:(null===r||void 0===r?void 0:r.type)||"date",onChange:e=>{i((t=>{var n;return{value:null!==t&&void 0!==t&&null!==(n=t.value)&&void 0!==n&&n.length?[o()(t.value[0]).startOf(e||"date"),o()(t.value[1]).endOf(e||"date")]:null,type:e||"date"}}))},options:Array.from(s).map((e=>{let[t,n]=e;return{label:n,value:t}}))}),(0,d.jsx)(a.DatePicker.RangePicker,{...t,picker:(null===r||void 0===r?void 0:r.type)||"date",value:Array.isArray(null===r||void 0===r?void 0:r.value)&&2===r.value.length&&r.value.map((e=>e&&o()(e))),onChange:e=>{i((t=>(console.log(Object.assign({type:"date"},t,{value:e&&[e[0]&&new Date(e[0].startOf((null===t||void 0===t?void 0:t.type)||"date").valueOf()),e[1]&&new Date(e[1].endOf((null===t||void 0===t?void 0:t.type)||"date").valueOf())]})),Object.assign({type:"date"},t,{value:e&&[e[0]&&new Date(e[0].startOf((null===t||void 0===t?void 0:t.type)||"date").valueOf()),e[1]&&new Date(e[1].endOf((null===t||void 0===t?void 0:t.type)||"date").valueOf())]}))))}})]})}))},20492:(e,t,n)=>{n.d(t,{A:()=>a});const a=e=>({"en-US":()=>n.e(3086).then(n.bind(n,13086)),"zh-CN":()=>n.e(4308).then(n.bind(n,84308))}[e]())},29574:(e,t,n)=>{n.d(t,{Zi:()=>_,FI:()=>g,AG:()=>f,Ay:()=>v,lN:()=>x});const a="style_input-file__3JGm6__B7O0d",s="style_input-file-input__Fb5iw__B7O0d";var l=n(83136),r=n.n(l),o=n(73884),i=n(55199),c=n(76329),d=n(28987),u=n(80111),p=n.n(u),m=n(70579);const h=e=>t=>{let{className:n,accept:l,multiple:i,onChange:c,children:d,...u}=t;const p=(0,o.useRef)(null);return(0,m.jsxs)(e,{...u,className:r()(n,a),children:[d,!0!==u.disabled&&(0,m.jsx)("input",{ref:p,type:"file",accept:l,multiple:i,className:s,onChange:e=>{const t=[].slice.call(e.target.files,0);0!==t.length&&(p.current.setAttribute("type","text"),p.current.setAttribute("type","file"),c(t))}})]})},_=h(i.Button),g=h((e=>{let{className:t,...n}=e;return(0,m.jsx)(i.Typography.Link,{...n,className:t})})),f=h((e=>{let{className:t,...n}=e;return(0,m.jsx)(i.Typography.Text,{...n,className:r()("ant-btn",t)})})),x=e=>{const{message:t}=i.App.useApp(),{multiple:n,fileSize:a,maxLength:s,value:l,concurrentCount:r,onAdd:u,onError:m,onSave:h,onChange:_,ossUpload:g}=Object.assign({},{concurrentCount:1,value:[]},e),{apis:f}=(0,c.usePreset)(),[x,v]=(0,o.useState)([]),y=(0,o.useRef)(r),C=(0,o.useMemo)((()=>(0,d.A)(y.current)),[]);return{fileList:x,onFileSelected:async e=>{const r=s-l.length;1!==s&&!0===n&&e.length>r?t.error("\u4e0a\u4f20\u6587\u4ef6\u4e0d\u80fd\u8d85\u8fc7\u6700\u5927\u5141\u8bb8\u6570\u91cf".concat(s)):await Promise.allSettled(e.map((async e=>{if(e.size>1024*a*1024)return void t.error("\u6587\u4ef6".concat(e.name,"\u4e0d\u80fd\u8d85\u8fc7").concat(a,"MB!"));const l=p()(),r=n=>{const a=n.message||"\u6587\u4ef6".concat(e.name,"\u4e0a\u4f20\u9519\u8bef").concat(n.message?":"+n.message:"");t.error(a),m&&m({file:e,error:n,errMsg:a}),v((e=>{const t=e.slice(0),n=t.findIndex((e=>e.uuid===l));return n>-1&&t.splice(n,1),t}))};try{v(1===s||!0!==n?[{uuid:l,type:"uploading",filename:e.name}]:t=>{const n=t.slice(0);return n.unshift({uuid:l,type:"uploading",filename:e.name}),n}),u&&await Promise.resolve(u(e));const t=g||f.ossUpload,{data:a}=await C((()=>t({file:e})));if(0!==a.code)return void r(new Error("\u6587\u4ef6".concat(e.name,"\u4e0a\u4f20\u5f02\u5e38").concat(a.msg?":"+a.msg:"")));const o=h?await Promise.resolve(h(a,e,l)):{filename:a.data.originalName||e.name,id:a.data.id,ossId:a.data.id,uuid:l};v((e=>{const t=e.slice(0),n=t.findIndex((e=>e.uuid===l));return n>-1&&t.splice(n,1),t})),_(1===s||!0!==n?[o]:e=>{const t=e.slice(0);return t.push(o),t})}catch(o){r(o)}})))}}},v=h},97211:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(87558),s=n.n(a),l=n(76329),r=n(34677),o=n.n(r),i=n(70579);const c=e=>{const t=t=>{let{id:n,url:a,error:r,apis:c,loading:d,...u}=t;const{apis:p}=(0,l.usePreset)(),m=o()({},p,c);if(!n)return null;if(!m.oss)throw new Error("\u8bf7\u5728Global\u7ec4\u4ef6\u8bbe\u7f6epreset.apis.oss\u53c2\u6570");return(0,i.jsx)(s(),{...m.oss,updateType:"refresh",error:r,loading:d,params:{id:n},cache:"oss-file",ttl:6e6,render:t=>{let{data:a}=t;return(0,i.jsx)(e,{...u,id:n,data:a})}})};return t.defaultProps={loading:null},t}},27047:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(83694),s=n(33097),l=n.n(s);const r=()=>{const e=(0,a.useGlobalContext)();return l()(e,"preset",{apis:{}})}},77964:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(73884),s=n(79889),l=n.n(s),r=n(93950),o=n.n(r),i=n(96418),c=n.n(i);const d=(e,t)=>{const n=(0,a.useRef)(null);n.current=Object.assign({},{time:500,isDebounce:!1},t);const s=(0,a.useRef)(null),r=c()(e);return(0,a.useLayoutEffect)((()=>{const e=s.current,t=()=>(0,a.startTransition)((()=>{e&&r(e)}));t();const i=new ResizeObserver((n.current.isDebounce?o():l())(t,n.current.time));return e&&i.observe(e),()=>{i.disconnect()}}),[r]),s}},81348:(e,t,n)=>{n.d(t,{A:()=>a});const a=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),a=e.name||"",s=(e.type||"").toLowerCase(),l=s.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?a.toLowerCase().endsWith(t):t.endsWith("/*")?l===t.replace(/\/.*$/,""):s===t}))}return!0}},69484:(e,t,n)=>{n.d(t,{A:()=>s,e:()=>a});const a=1e15,s=e=>{let t,n,s,l=["\u96f6","\u58f9","\u8d30","\u53c1","\u8086","\u4f0d","\u9646","\u67d2","\u634c","\u7396"],r=["","\u62fe","\u4f70","\u4edf"],o=["","\u4e07","\u4ebf","\u5146"],i=["\u89d2","\u5206","\u6beb","\u5398"],c="",d="";if(""===e)return"";if((e=parseFloat(e))>=a)return c="\u8d85\u51fa\u6700\u5927\u5904\u7406\u6570\u5b57",console.error("\u8d85\u51fa\u6700\u5927\u5904\u7406\u6570\u5b57"),c;if(0===e)return c=l[0]+"\u5143\u6574",c;if(e<0&&(e=-e,d="\u8d1f "),-1===(e=e.toString()).indexOf(".")?(t=e,n=""):(s=e.split("."),t=s[0],n=s[1].substr(0,4)),parseInt(t,10)>0){let e=0,n=t.length;for(let a=0;a<n;a++){let s=t.substr(a,1),i=n-a-1,d=i/4,u=i%4;"0"===s?e++:(e>0&&(c+=l[0]),e=0,c+=l[parseInt(s)]+r[u]),0===u&&e<4&&(c+=o[d])}c+="\u5143"}if(""!==n){let e=n.length;for(let t=0;t<e;t++){let e=n.substr(t,1);"0"!==e&&(c+=l[Number(e)]+i[t])}}return""===c?c+=l[0]+"\u5143\u6574":""===n&&(c+="\u6574"),c=d+c,c}},74981:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(73884);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.createContext)(e),{Provider:n,Consumer:s}=t;return{context:t,Provider:n,Consumer:s,useContext:()=>(0,a.useContext)(t)}}},28987:(e,t,n)=>{n.d(t,{A:()=>a});const a=e=>{const t=[];let n=0;const a=()=>{if(0!==t.length){if(n<e){const e=t.shift();n+=1,e().finally((()=>{n-=1,a()}))}}else n=0};return e=>new Promise((n=>{t.push((()=>{const t=Promise.resolve().then((()=>e()));return n(t),t})),a()}))}},55490:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(12322),s=n.n(a),l=n(26727),r=n.n(l),o=n(54052),i=n.n(o);const c=e=>{if(s()(e)){const t=r()(e);return t.length>0&&t.some((e=>c(e)))}return i()(e)?e.length>0&&e.some((e=>c(e))):"number"===typeof e?!isNaN(e):!(void 0===e||null===e||""===e||0===e.length)},d=c},91176:(e,t,n)=>{n.d(t,{j:()=>s,v:()=>a});const a=e=>"number"===typeof e?"".concat(e,"px"):e,s=e=>{if(!e)return 0;const t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}},36:(e,t,n)=>{n.r(t),n.d(t,{AddressEnum:()=>h.qn,AddressInputField:()=>h.TM,AddressSelectField:()=>h.Ay,AdvancedSelectField:()=>_.Ay,CascaderField:()=>g.Ay,FetchButton:()=>i.A,FunctionSelectField:()=>f.A,IndustrySelectField:()=>x.A,InputFileButton:()=>m.Zi,InputFileLink:()=>m.FI,InputFileText:()=>m.AG,ScrollLoader:()=>o.A,SearchInput:()=>u.A,SelectInnerInput:()=>p.A,SimpleBar:()=>d.A,SimpleBarBox:()=>c.A,TableField:()=>_.Bm,TypeDateRangePickerField:()=>v.A,UserField:()=>_.Eo,accept:()=>C.A,changeMoneyToChinese:()=>a.A,createAddressApi:()=>h.LH,createDeferred:()=>j.A,createListField:()=>_.NR,createTreeUtils:()=>g.ON,getContainerBody:()=>s.c,getPopupContainer:()=>l,getScrollEl:()=>s.h,isNotEmpty:()=>A.A,numberToPx:()=>b.v,pxToNumber:()=>b.j,useFileUpload:()=>m.lN,useResize:()=>y.A,withAddressApi:()=>h.DF,withInputFile:()=>m.Ay,withOSSFile:()=>r.A});var a=n(69484),s=n(76801);const l=e=>{const t=e=>{const n=(0,s.h)();if(!e||e===n||!e.parentElement)return n;return[].slice.call(e.classList,0).find((e=>["ant-modal-body","ant-modal-content","ant-popover-content"].indexOf(e)>-1))?e:t(e.parentElement)};return t(e)};var r=n(97211),o=n(26475),i=n(73025),c=n(21485),d=n(17342),u=n(73161),p=n(30509),m=n(29574),h=n(93761),_=n(12392),g=n(45776),f=n(41654),x=n(53392),v=n(89319),y=n(77964),C=n(81348),j=n(28987),A=n(55490),b=n(91176)},40438:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var a=n(87558),s=n.n(a),l=n(97211),r=n(64671),o=n(83136),i=n.n(o),c=n(55199),d=n(73884);const u=e=>{let{params:t}=e;const{data:n}=t;return new Promise(((e,t)=>{const a=new window.Image;a.src=n,a.addEventListener("load",(()=>{e(n)})),a.addEventListener("error",(e=>{t(e)}))}))},p="style_img-outer__4QLY5__B7O0d",m="style_img__PSExq__B7O0d",h="style_loading__WCOwA__B7O0d",_="style_error__+ECgZ__B7O0d";var g=n(18411),f=n(70579);const x=e=>{let{data:t,className:n,alt:a,innerLoading:l,loading:r,error:o,innerError:c,children:d}=e;return(0,f.jsx)(s(),{loader:u,params:{data:t},error:c||o,loading:l||r,render:e=>{let{data:t}=e;return"function"===typeof d?d({alt:a,className:i()(n,m),src:t}):(0,f.jsx)("img",{alt:a,className:i()(n,m),src:t})}})},v=(0,l.A)(x),y=e=>{let{loading:t,error:n,src:a,id:s,alt:l,className:r,children:o,apis:i}=e;const c=t&&(0,d.cloneElement)(t,{className:h}),u=n&&(0,d.cloneElement)(n,{className:_});return a?(0,f.jsx)(x,{alt:l,className:r,data:a,loading:c,error:u,children:o}):s?(0,f.jsx)(v,{alt:l,className:r,id:s,loading:c,innerLoading:c,error:u,innerError:u,apis:i,children:o}):u},C=e=>{let{id:t,src:n,alt:a,loading:s,error:l,className:r,apis:o,...c}=e;return(0,f.jsx)("div",{...c,"data-testid":"components-core-image",className:i()(r,p),children:y({loading:s,error:l,src:n,id:t,alt:a,className:r,apis:o})})};C.Avatar=e=>{let{id:t,src:n,alt:a,gender:s,loading:l,error:o,className:d,gap:u,icon:m,children:h,shape:_,size:g,width:x,height:v,defaultAvatar:C,apis:j,...A}=e;const b=(()=>{const e=x&&v?{style:{width:x,height:v}}:{size:g};if(x&&x!==v&&(_="square"),t||n)return y({loading:l,error:o,src:n,defaultAvatar:C,id:t,alt:a,className:d,apis:j,children:t=>(0,f.jsx)(c.Avatar,{...t,gap:u,shape:_,...e})});if(s){const t=s&&["F","female","f"].indexOf(s)>-1?"icon-color-touxiang-nv":"icon-color-touxiang-nan";return(0,f.jsx)(c.Avatar,{...A,src:C||(0,f.jsx)(r.default,{role:"touxiang",colorful:!0,type:t}),gap:u,shape:_,...e})}return(0,f.jsx)(c.Avatar,{...A,gap:u,icon:m,shape:_,size:g,src:C,...e,children:h})})();return(0,f.jsx)("div",{...A,"data-testid":"components-core-image-avatar",className:i()(d,p),style:{width:x&&v?x:g,height:x&&v?v:g},children:b})};const j={error:(0,f.jsx)(r.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),loading:(0,f.jsx)(c.Skeleton.Avatar,{shape:"square",active:!0})};C.defaultProps=Object.assign({},j),C.Avatar.defaultProps=Object.assign({},j,{size:100,defaultAvatar:g.A});const A=C},3382:(e,t,n)=>{n.r(t),n.d(t,{ModalButton:()=>P,TabsModal:()=>O,TabsModalButton:()=>B,default:()=>b,useConfirmModal:()=>A,useModal:()=>j,useTabsModal:()=>S});var a=n(73884),s=n(55199),l=n(83136),r=n.n(l);const o={modal:"style_modal__Pm3cF__B7O0d",large:"style_large__iaqVE__B7O0d","modal-body-inner":"style_modal-body-inner__4PhpA__B7O0d","modal-title":"style_modal-title__dswaw__B7O0d","modal-outer":"style_modal-outer__r3SkX__B7O0d","modal-body":"style_modal-body__jQJSI__B7O0d","right-options-modal":"style_right-options-modal__FajDP__B7O0d","right-options-col":"style_right-options-col__3ilee__B7O0d","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__B7O0d","modal-footer":"style_modal-footer__-prbN__B7O0d","modal-close":"style_modal-close__Oa5Kl__B7O0d","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__B7O0d","is-danger":"style_is-danger__H5110__B7O0d",title:"style_title__orTym__B7O0d",content:"style_content__k6MIF__B7O0d","has-title":"style_has-title__qy0Wp__B7O0d"},i=e=>({"en-US":()=>n.e(4628).then(n.bind(n,74628)),"zh-CN":()=>n.e(7478).then(n.bind(n,87478))}[e]());var c=n(58609),d=n(64671);const u=(e,t)=>"function"===typeof e?e(t):e;var p=n(81014),m=n(17342),h=n(70579);const _="Modal",g=e=>{let{options:t,children:n}=e;return t?(0,h.jsxs)(s.Row,{wrap:!1,children:[(0,h.jsx)(s.Col,{span:18,className:o["right-options-col"],children:n}),(0,h.jsx)(s.Col,{span:6,className:o["right-options-col"],children:t})]}):n},f=e=>{let{footer:t,footerButtons:n,onConfirm:l,onCancel:r,onClose:o}=e;return(0,h.jsxs)(s.Row,{gutter:10,wrap:!1,children:[(0,h.jsx)(s.Col,{flex:1,children:t}),Array.isArray(n)&&0===n.length?null:(0,h.jsx)(s.Col,{children:(0,h.jsx)(s.Space,{children:(n||[{children:(0,h.jsx)(c.IntlProvider,{importMessages:i,moduleName:_,children:(0,h.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:_})}),onClick:r},{type:"primary",children:(0,h.jsx)(c.IntlProvider,{importMessages:i,moduleName:_,children:(0,h.jsx)(c.FormattedMessage,{id:"Confirm",moduleName:_})}),onClick:l}]).filter((e=>"function"===typeof(null===e||void 0===e?void 0:e.display)?null===e||void 0===e?void 0:e.display():!1!==(null===e||void 0===e?void 0:e.display))).map(((e,t)=>{let{ButtonComponent:n,onClick:s,autoClose:l=!0,display:r,...i}=e;const c=n||p.default;return(0,a.createElement)(c,{...i,key:t,onClick:async function(){const e=await Promise.resolve(s&&s(...arguments));return l&&!1!==e&&o&&o(),e}})}))})})]})},x=e=>{let{title:t,footer:n,disabledScroller:l,footerButtons:i,onClose:c,closable:u,onConfirm:p,onCancel:_,children:g}=e;const x=(0,a.useRef)(null);return(0,h.jsxs)("div",{className:o["modal-outer"],"data-testid":"components-core-modal",children:[!1===u?null:(0,h.jsx)(s.Button,{"data-testid":"components-core-modal-close-btn",className:o["modal-close"],type:"text",icon:(0,h.jsx)(d.default,{type:"icon-close-thin"}),onClick:e=>{e.stopPropagation(),c&&c()}}),t&&(0,h.jsx)("div",{className:o["modal-title"],children:t}),(0,h.jsx)(m.A,{className:r()(o["modal-body"],{[o["is-disabled-scroller"]]:l},"modal-body"),ref:x,children:(0,h.jsx)("div",{className:r()(o["modal-body-inner"],"modal-body-inner"),children:g})}),null!==n||i?(0,h.jsx)("div",{className:r()(o["modal-footer"],"modal-footer"),children:(0,h.jsx)(f,{footer:n,footerButtons:i,onConfirm:p,onCancel:_,onClose:c})}):null]})},v=e=>{let{withDecorator:t,footerButtons:n,title:a,closable:s,onClose:l,onConfirm:r,onCancel:o,footer:i,rightOptions:c,disabledScroller:d,children:p}=e;const m=e=>(e=Object.assign({},{title:a},e),(0,h.jsx)(x,{title:u(e.title,{...e,close:l}),closable:s,onClose:l,onConfirm:r,onCancel:o,footerButtons:u(n,{...e,close:l}),disabledScroller:d,footer:u(i,{...e,close:l}),children:(0,h.jsx)(g,{options:u(c,{...e,close:l}),children:u(p,{...e,close:l})})}));return"function"===typeof t?t(m):m({})},y=e=>{let{children:t,rightOptions:n,footer:a,footerButtons:s,className:l,size:d,title:u,onClose:p,onConfirm:m,onCancel:_,closable:g,disabledScroller:f,withDecorator:x,...y}=e;return{...y,icon:null,centered:!0,title:null,maskClosable:!!y.hasOwnProperty("maskClosable")&&y.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:r()(l,o.modal,o[d],{[o["right-options-modal"]]:n}),...(C=d,"large"===C?{width:"".concat(Math.min(window.innerWidth-64,1500),"px")}:"small"===C?{width:"600px"}:{width:"1000px"}),children:(0,h.jsx)(c.IntlProvider,{importMessages:i,moduleName:"Modal",children:v({withDecorator:x,title:u,closable:g,onClose:p,onConfirm:m,onCancel:_,footer:a,footerButtons:s,rightOptions:n,disabledScroller:f,children:t})})};var C},C=e=>(0,h.jsx)(s.Modal,{...y(e)});C.defaultProps={size:"default"};const j=()=>{const{modal:e}=s.App.useApp();return t=>{const n={},{children:a,...s}=y({onClose:()=>n.close(),...t}),{destroy:l}=e.info({...s,content:a});return n.close=l,n}},A=()=>{const{modal:e}=s.App.useApp();return t=>{const n={},{type:a,icon:l,title:i,danger:c,wrapClassName:u,message:p,iconSetting:m={},confirmType:_="info",...g}={onClose:()=>n.close(),maskClosable:!1,...t},f=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},m);if(e[a]){const{destroy:t}=e[a]({...g,icon:null,wrapClassName:r()(o["confirm-modal-wrap"],u,{[o["is-danger"]]:c}),title:(0,h.jsx)(s.Space,{direction:"vertical",onClick:e=>{e.stopPropagation()},children:i&&(0,h.jsxs)(s.Space,{size:0,align:"start",className:o.title,children:[(0,h.jsx)(d.default,{className:r()("title-icon","title-icon-".concat("confirm"===a?_:a)),type:l||f["confirm"===a?_:a]}),i]})}),content:(0,h.jsxs)(s.Space,{size:0,align:"start",className:r()(o.content,{[o["has-title"]]:i}),children:[!i&&(0,h.jsx)(d.default,{className:r()("title-icon","title-icon-".concat("confirm"===a?_:a)),type:l||f["confirm"===a?_:a]}),p]})});n.close=t}return n}},b=C,N=e=>{let{items:t,className:n,activeKey:a,withDecorator:l,defaultActiveKey:o,onChange:i,...c}=e;return{...c,className:r()(n,"tabs-modal"),withDecorator:e=>{const n=n=>(0,h.jsx)(s.Tabs,{items:t.map((t=>{let{withDecorator:a,...s}=t;return Object.assign({},s,{children:"function"===typeof a?a((t=>e(Object.assign({},n,t,{children:s.children})))):e(Object.assign({},n,{children:s.children}))})})),destroyInactiveTabPane:!0,activeKey:a,defaultActiveKey:o,onChange:i});return"function"===typeof l?l(n):n()},children:e=>{let{children:t,...n}=e;return"function"===typeof t?t(n):t}}},O=e=>(0,h.jsx)(b,{...N(e)}),S=()=>{const e=j();return t=>e(N(t))};var w=n(73025);const B=e=>{const t=S();return(0,h.jsx)(w.A,{...e,modalFunc:t})},P=e=>{const t=j();return(0,h.jsx)(w.A,{...e,modalFunc:t})}},25438:(e,t,n)=>{n.d(t,{A:()=>a});const a={"search-input":"common_search-input__P6qLg__B7O0d","is-popup":"common_is-popup__fJq+g__B7O0d",list:"common_list__TKFzS__B7O0d","list-item":"common_list-item__ASse7__B7O0d","is-selected":"common_is-selected__-PU4Y__B7O0d","item-label":"common_item-label__u+qz1__B7O0d","item-des":"common_item-des__no2z0__B7O0d"}}}]);
|
|
2
|
+
//# sourceMappingURL=36.91c85a3d.chunk.js.map
|