@kne-components/components-core 0.1.21 → 0.1.23
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.f26fc7dc.chunk.css +2 -0
- package/build/static/css/{1151.9c9e2a72.chunk.css.map → 1151.f26fc7dc.chunk.css.map} +1 -1
- package/build/static/css/1153.a76b42aa.chunk.css +2 -0
- package/build/static/css/{1153.b51569b8.chunk.css.map → 1153.a76b42aa.chunk.css.map} +1 -1
- package/build/static/css/1454.25c152a4.chunk.css +2 -0
- package/build/static/css/{1454.61280de0.chunk.css.map → 1454.25c152a4.chunk.css.map} +1 -1
- package/build/static/css/1554.131e2227.chunk.css +2 -0
- package/build/static/css/{1554.4f9c7bb4.chunk.css.map → 1554.131e2227.chunk.css.map} +1 -1
- package/build/static/css/1932.464e119e.chunk.css +2 -0
- package/build/static/css/{1932.35470b32.chunk.css.map → 1932.464e119e.chunk.css.map} +1 -1
- package/build/static/css/{2503.a6539020.chunk.css → 2503.5b8efd72.chunk.css} +2 -2
- package/build/static/css/{2503.a6539020.chunk.css.map → 2503.5b8efd72.chunk.css.map} +1 -1
- package/build/static/css/{2517.507e583e.chunk.css → 2517.28d79a60.chunk.css} +2 -2
- package/build/static/css/{2517.507e583e.chunk.css.map → 2517.28d79a60.chunk.css.map} +1 -1
- package/build/static/css/2526.a94e107f.chunk.css +2 -0
- package/build/static/css/{2526.150d63dc.chunk.css.map → 2526.a94e107f.chunk.css.map} +1 -1
- package/build/static/css/2716.51abdc9a.chunk.css +2 -0
- package/build/static/css/{2716.8d85e7b1.chunk.css.map → 2716.51abdc9a.chunk.css.map} +1 -1
- package/build/static/css/{2730.731ef5b2.chunk.css → 2730.7a35fa2d.chunk.css} +2 -2
- package/build/static/css/{2730.731ef5b2.chunk.css.map → 2730.7a35fa2d.chunk.css.map} +1 -1
- package/build/static/css/2999.a0dbc9e2.chunk.css +2 -0
- package/build/static/css/{2999.9693d5ac.chunk.css.map → 2999.a0dbc9e2.chunk.css.map} +1 -1
- package/build/static/css/3333.a286b89c.chunk.css +2 -0
- package/build/static/css/{3333.845d0858.chunk.css.map → 3333.a286b89c.chunk.css.map} +1 -1
- package/build/static/css/{3843.0c610b17.chunk.css → 3843.c475b326.chunk.css} +2 -2
- package/build/static/css/{3843.0c610b17.chunk.css.map → 3843.c475b326.chunk.css.map} +1 -1
- package/build/static/css/4666.0ed415cc.chunk.css +2 -0
- package/build/static/css/{4666.dad81e9f.chunk.css.map → 4666.0ed415cc.chunk.css.map} +1 -1
- package/build/static/css/5362.c23ae009.chunk.css +2 -0
- package/build/static/css/{5362.6f1b9688.chunk.css.map → 5362.c23ae009.chunk.css.map} +1 -1
- package/build/static/css/5600.7df0f89d.chunk.css +2 -0
- package/build/static/css/{5600.6aee992a.chunk.css.map → 5600.7df0f89d.chunk.css.map} +1 -1
- package/build/static/css/{5654.d0f67cc7.chunk.css → 5654.d074dcc7.chunk.css} +2 -2
- package/build/static/css/{5654.d0f67cc7.chunk.css.map → 5654.d074dcc7.chunk.css.map} +1 -1
- package/build/static/css/5846.1ae60225.chunk.css +2 -0
- package/build/static/css/{5846.e86e3c6e.chunk.css.map → 5846.1ae60225.chunk.css.map} +1 -1
- package/build/static/css/5868.5db78f18.chunk.css +2 -0
- package/build/static/css/{5868.7d59bee4.chunk.css.map → 5868.5db78f18.chunk.css.map} +1 -1
- package/build/static/css/{5996.d6ba27b1.chunk.css → 5996.82fa3292.chunk.css} +2 -2
- package/build/static/css/{5996.d6ba27b1.chunk.css.map → 5996.82fa3292.chunk.css.map} +1 -1
- package/build/static/css/6779.71dad610.chunk.css +2 -0
- package/build/static/css/{6779.d7fe5a00.chunk.css.map → 6779.71dad610.chunk.css.map} +1 -1
- package/build/static/css/7227.dece7f43.chunk.css +2 -0
- package/build/static/css/{7227.4123d00b.chunk.css.map → 7227.dece7f43.chunk.css.map} +1 -1
- package/build/static/css/8072.935aac0a.chunk.css +2 -0
- package/build/static/css/{8072.8c8806ba.chunk.css.map → 8072.935aac0a.chunk.css.map} +1 -1
- package/build/static/css/8148.3adb7d4b.chunk.css +2 -0
- package/build/static/css/{8148.ec26c81e.chunk.css.map → 8148.3adb7d4b.chunk.css.map} +1 -1
- package/build/static/css/{8725.ceb337ad.chunk.css → 8725.035f34f7.chunk.css} +2 -2
- package/build/static/css/{8725.ceb337ad.chunk.css.map → 8725.035f34f7.chunk.css.map} +1 -1
- package/build/static/css/9053.0353d7c5.chunk.css +2 -0
- package/build/static/css/{9053.71dc14f6.chunk.css.map → 9053.0353d7c5.chunk.css.map} +1 -1
- package/build/static/css/931.5ba021db.chunk.css +2 -0
- package/build/static/css/{931.17c4874f.chunk.css.map → 931.5ba021db.chunk.css.map} +1 -1
- package/build/static/css/9390.0fb73dc7.chunk.css +2 -0
- package/build/static/css/{9390.977507bc.chunk.css.map → 9390.0fb73dc7.chunk.css.map} +1 -1
- package/build/static/css/{9449.c6cdd4a9.chunk.css → 9449.9201922f.chunk.css} +2 -2
- package/build/static/css/{9449.c6cdd4a9.chunk.css.map → 9449.9201922f.chunk.css.map} +1 -1
- package/build/static/css/9689.89212f8b.chunk.css +2 -0
- package/build/static/css/{9689.1145e4a1.chunk.css.map → 9689.89212f8b.chunk.css.map} +1 -1
- package/build/static/js/{1153.e28eba1e.chunk.js → 1153.3c2b6b33.chunk.js} +3 -3
- package/build/static/js/{1153.e28eba1e.chunk.js.map → 1153.3c2b6b33.chunk.js.map} +1 -1
- package/build/static/js/{1454.54a6ba93.chunk.js → 1454.48d4f049.chunk.js} +3 -3
- package/build/static/js/{1454.54a6ba93.chunk.js.map → 1454.48d4f049.chunk.js.map} +1 -1
- package/build/static/js/1554.9d3c8025.chunk.js +3 -0
- package/build/static/js/{1554.a5ac35aa.chunk.js.map → 1554.9d3c8025.chunk.js.map} +1 -1
- package/build/static/js/{1664.8b1a7e8a.chunk.js → 1664.2f4ff6c4.chunk.js} +2 -2
- package/build/static/js/{1664.8b1a7e8a.chunk.js.map → 1664.2f4ff6c4.chunk.js.map} +1 -1
- package/build/static/js/1932.721e2620.chunk.js +2 -0
- package/build/static/js/{1932.439db4af.chunk.js.map → 1932.721e2620.chunk.js.map} +1 -1
- package/build/static/js/2503.3384ab19.chunk.js +2 -0
- package/build/static/js/{2503.cb05f351.chunk.js.map → 2503.3384ab19.chunk.js.map} +1 -1
- package/build/static/js/2517.3eec73e8.chunk.js +2 -0
- package/build/static/js/{2517.35f66254.chunk.js.map → 2517.3eec73e8.chunk.js.map} +1 -1
- package/build/static/js/2526.2c9ec65a.chunk.js +2 -0
- package/build/static/js/{2526.a3e2c8c3.chunk.js.map → 2526.2c9ec65a.chunk.js.map} +1 -1
- package/build/static/js/{2716.5edebbcf.chunk.js → 2716.1800c731.chunk.js} +3 -3
- package/build/static/js/{2716.5edebbcf.chunk.js.map → 2716.1800c731.chunk.js.map} +1 -1
- package/build/static/js/2730.7f4e8067.chunk.js +2 -0
- package/build/static/js/{2730.8883fa89.chunk.js.map → 2730.7f4e8067.chunk.js.map} +1 -1
- package/build/static/js/2999.d9f73449.chunk.js +2 -0
- package/build/static/js/{2999.fa844ce6.chunk.js.map → 2999.d9f73449.chunk.js.map} +1 -1
- package/build/static/js/{3333.fefcc4b8.chunk.js → 3333.19f63576.chunk.js} +2 -2
- package/build/static/js/{3333.fefcc4b8.chunk.js.map → 3333.19f63576.chunk.js.map} +1 -1
- package/build/static/js/36.72621a71.chunk.js +2 -0
- package/build/static/js/{36.91c85a3d.chunk.js.map → 36.72621a71.chunk.js.map} +1 -1
- package/build/static/js/{3843.73f83506.chunk.js → 3843.a85e3294.chunk.js} +2 -2
- package/build/static/js/{3843.73f83506.chunk.js.map → 3843.a85e3294.chunk.js.map} +1 -1
- package/build/static/js/4666.1da4743f.chunk.js +2 -0
- package/build/static/js/{4666.243aacaf.chunk.js.map → 4666.1da4743f.chunk.js.map} +1 -1
- package/build/static/js/5362.9c93a657.chunk.js +3 -0
- package/build/static/js/{5362.dca69f87.chunk.js.map → 5362.9c93a657.chunk.js.map} +1 -1
- package/build/static/js/5600.cc4be339.chunk.js +2 -0
- package/build/static/js/{5600.f3d2d6ed.chunk.js.map → 5600.cc4be339.chunk.js.map} +1 -1
- package/build/static/js/5654.d05c4854.chunk.js +2 -0
- package/build/static/js/{5654.e8a32350.chunk.js.map → 5654.d05c4854.chunk.js.map} +1 -1
- package/build/static/js/5846.0f60f4c5.chunk.js +2 -0
- package/build/static/js/5846.0f60f4c5.chunk.js.map +1 -0
- package/build/static/js/{5868.4dfd67db.chunk.js → 5868.c90414d6.chunk.js} +2 -2
- package/build/static/js/{5868.4dfd67db.chunk.js.map → 5868.c90414d6.chunk.js.map} +1 -1
- package/build/static/js/{5996.57c96287.chunk.js → 5996.495a8e21.chunk.js} +2 -2
- package/build/static/js/{5996.57c96287.chunk.js.map → 5996.495a8e21.chunk.js.map} +1 -1
- package/build/static/js/6779.47291e81.chunk.js +2 -0
- package/build/static/js/{6779.c35a2000.chunk.js.map → 6779.47291e81.chunk.js.map} +1 -1
- package/build/static/js/7227.e602d080.chunk.js +3 -0
- package/build/static/js/{7227.ec0bec00.chunk.js.map → 7227.e602d080.chunk.js.map} +1 -1
- package/build/static/js/7777.1785cbe5.chunk.js +2 -0
- package/build/static/js/{7777.4660e5c5.chunk.js.map → 7777.1785cbe5.chunk.js.map} +1 -1
- package/build/static/js/{7967.5581b805.chunk.js → 7967.319c1f48.chunk.js} +2 -2
- package/build/static/js/{7967.5581b805.chunk.js.map → 7967.319c1f48.chunk.js.map} +1 -1
- package/build/static/js/{8072.dd431964.chunk.js → 8072.b173f2e4.chunk.js} +2 -2
- package/build/static/js/8072.b173f2e4.chunk.js.map +1 -0
- package/build/static/js/{8148.03a8206b.chunk.js → 8148.e41bd16a.chunk.js} +3 -3
- package/build/static/js/{8148.03a8206b.chunk.js.map → 8148.e41bd16a.chunk.js.map} +1 -1
- package/build/static/js/{8151.50e6bb94.chunk.js → 8151.817aa2ca.chunk.js} +2 -2
- package/build/static/js/{8151.50e6bb94.chunk.js.map → 8151.817aa2ca.chunk.js.map} +1 -1
- package/build/static/js/8725.30db5902.chunk.js +2 -0
- package/build/static/js/{8725.9b7795f5.chunk.js.map → 8725.30db5902.chunk.js.map} +1 -1
- package/build/static/js/{9053.5b3f4807.chunk.js → 9053.04f596dc.chunk.js} +3 -3
- package/build/static/js/{9053.5b3f4807.chunk.js.map → 9053.04f596dc.chunk.js.map} +1 -1
- package/build/static/js/{931.e843a121.chunk.js → 931.3adc3995.chunk.js} +2 -2
- package/build/static/js/{931.e843a121.chunk.js.map → 931.3adc3995.chunk.js.map} +1 -1
- package/build/static/js/{9390.eb4ab7b2.chunk.js → 9390.cc085d3b.chunk.js} +2 -2
- package/build/static/js/{9390.eb4ab7b2.chunk.js.map → 9390.cc085d3b.chunk.js.map} +1 -1
- package/build/static/js/9449.199a5328.chunk.js +2 -0
- package/build/static/js/{9449.b24d6b3e.chunk.js.map → 9449.199a5328.chunk.js.map} +1 -1
- package/build/static/js/9673.e1f10c96.chunk.js.map +1 -1
- package/build/static/js/{main.f1119ab2.js → main.994a3b38.js} +2 -2
- package/build/static/js/{main.f1119ab2.js.map → main.994a3b38.js.map} +1 -1
- package/package.json +1 -1
- package/build/static/css/1151.9c9e2a72.chunk.css +0 -2
- package/build/static/css/1153.b51569b8.chunk.css +0 -2
- package/build/static/css/1454.61280de0.chunk.css +0 -2
- package/build/static/css/1554.4f9c7bb4.chunk.css +0 -2
- package/build/static/css/1932.35470b32.chunk.css +0 -2
- package/build/static/css/2526.150d63dc.chunk.css +0 -2
- package/build/static/css/2716.8d85e7b1.chunk.css +0 -2
- package/build/static/css/2999.9693d5ac.chunk.css +0 -2
- package/build/static/css/3333.845d0858.chunk.css +0 -2
- package/build/static/css/4666.dad81e9f.chunk.css +0 -2
- package/build/static/css/5362.6f1b9688.chunk.css +0 -2
- package/build/static/css/5600.6aee992a.chunk.css +0 -2
- package/build/static/css/5846.e86e3c6e.chunk.css +0 -2
- package/build/static/css/5868.7d59bee4.chunk.css +0 -2
- package/build/static/css/6779.d7fe5a00.chunk.css +0 -2
- package/build/static/css/7227.4123d00b.chunk.css +0 -2
- package/build/static/css/8072.8c8806ba.chunk.css +0 -2
- package/build/static/css/8148.ec26c81e.chunk.css +0 -2
- package/build/static/css/9053.71dc14f6.chunk.css +0 -2
- package/build/static/css/931.17c4874f.chunk.css +0 -2
- package/build/static/css/9390.977507bc.chunk.css +0 -2
- package/build/static/css/9689.1145e4a1.chunk.css +0 -2
- package/build/static/js/1554.a5ac35aa.chunk.js +0 -3
- package/build/static/js/1932.439db4af.chunk.js +0 -2
- package/build/static/js/2503.cb05f351.chunk.js +0 -2
- package/build/static/js/2517.35f66254.chunk.js +0 -2
- package/build/static/js/2526.a3e2c8c3.chunk.js +0 -2
- package/build/static/js/2730.8883fa89.chunk.js +0 -2
- package/build/static/js/2999.fa844ce6.chunk.js +0 -2
- package/build/static/js/36.91c85a3d.chunk.js +0 -2
- package/build/static/js/4666.243aacaf.chunk.js +0 -2
- package/build/static/js/5362.dca69f87.chunk.js +0 -3
- package/build/static/js/5600.f3d2d6ed.chunk.js +0 -2
- package/build/static/js/5654.e8a32350.chunk.js +0 -2
- package/build/static/js/5846.3e2c3d73.chunk.js +0 -2
- package/build/static/js/5846.3e2c3d73.chunk.js.map +0 -1
- package/build/static/js/6779.c35a2000.chunk.js +0 -2
- package/build/static/js/7227.ec0bec00.chunk.js +0 -3
- package/build/static/js/7777.4660e5c5.chunk.js +0 -2
- package/build/static/js/8072.dd431964.chunk.js.map +0 -1
- package/build/static/js/8725.9b7795f5.chunk.js +0 -2
- package/build/static/js/9449.b24d6b3e.chunk.js +0 -2
- /package/build/static/js/{1153.e28eba1e.chunk.js.LICENSE.txt → 1153.3c2b6b33.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1454.54a6ba93.chunk.js.LICENSE.txt → 1454.48d4f049.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1554.a5ac35aa.chunk.js.LICENSE.txt → 1554.9d3c8025.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2716.5edebbcf.chunk.js.LICENSE.txt → 2716.1800c731.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5362.dca69f87.chunk.js.LICENSE.txt → 5362.9c93a657.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.ec0bec00.chunk.js.LICENSE.txt → 7227.e602d080.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8148.03a8206b.chunk.js.LICENSE.txt → 8148.e41bd16a.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9053.5b3f4807.chunk.js.LICENSE.txt → 9053.04f596dc.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:()=>C,OfficePreview:()=>
|
|
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:()=>N,PdfPreview:()=>S,TextPreview:()=>k,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__abOpN",d="style_loading__r3aiE__abOpN",m="style_text-outer__TzhuG__abOpN",u="style_error__wSaxt__abOpN";var p=s(87558),h=s(70579);const x=(0,p.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,h.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,h.jsx)("div",{className:l()(t,i),style:{maxWidth:r},children:(0,h.jsx)(x,{url:s})})};var j=s(76329);const v=(0,p.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})}))})),N=e=>{let{id:t,apis:s,className:r,...a}=e;const{apis:n}=(0,j.usePreset)(),c=Object.assign({},n,s);return(0,h.jsx)(v,{...a,...c.previewOffice,data:{id:t},className:r})};var g=s(55199),_=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);_.pdfjs.GlobalWorkerOptions.workerSrc=(0,c.getPublicPath)("components-core")+"/pdfjs/build/pdf.worker.js";const[p,x]=(0,n.useState)(s),f=(0,w.useResize)((()=>{f.current.clientWidth&&x(Math.min(f.current.clientWidth,s))}));return(0,h.jsx)("div",{ref:f,className:l()(o,i),style:{maxWidth:s},children:(0,h.jsx)(_.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,h.jsx)("div",{className:d,children:(0,h.jsx)(g.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,h.jsx)(g.Space,{direction:"vertical",children:m>=1&&Array.from(new Array(m),((e,t)=>(0,h.jsx)(_.Page,{className:"preview-item",scale:r/100,rotate:a,pageNumber:t+1,width:p,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),b=s(89946),W=s.n(b);const k=e=>{let{url:t,className:s,maxWidth:r}=e;const[a,c]=(0,n.useState)(""),[o,p]=(0,n.useState)(!0),[x,f]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{W().get(t).then((e=>{let{data:t}=e;c(t),p(!1)}),(()=>{p(!1),f(!0)}))}),[t]),(0,h.jsxs)("div",{className:l()(s,i),style:{maxWidth:r},children:[o?(0,h.jsx)("div",{className:d,children:(0,h.jsx)(g.Spin,{})}):null,(0,h.jsx)("div",{className:m,children:x?(0,h.jsx)("div",{className:u,children:"\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25"}):(0,h.jsx)(E(),{text:a})})]})},F=e=>{let{maxWidth:t}=e;return(0,h.jsx)("div",{className:i,style:{maxWidth:t},children:(0,h.jsx)("div",{className:m,children:(0,h.jsx)(g.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),[p,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,h.jsxs)("div",{className:l()(a,i),style:{maxWidth:c},children:[o?(0,h.jsx)("div",{className:d,children:(0,h.jsx)(g.Spin,{})}):null,p?(0,h.jsx)("div",{className:u,children:"\u56fe\u7247\u52a0\u8f7d\u5931\u8d25"}):(0,h.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:k,pdf:S,image:L,html:f,office:N,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,h.jsx)(N,{...a,id:s,className:r}):(0,h.jsx)(n,{...a,className:r,url:t})})),R=e=>{let{id:t,originName:s,...r}=e;return"office"===D(s)?(0,h.jsx)(N,{...r,id:t,originName:s}):(0,h.jsx)(C,{...r,id:t,originName:s})}},71975:()=>{}}]);
|
|
2
|
+
//# sourceMappingURL=3333.19f63576.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
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,KAA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AKK,UAAWb,EAAeiB,SAAC,0CAEhCT,EAAAA,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__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":""}
|
|
1
|
+
{"version":3,"file":"static/js/3333.19f63576.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,EAA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,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__abOpN\",\"container-html\":\"style_container-html__IsNVq__abOpN\",\"html-inner\":\"style_html-inner__S05cI__abOpN\",\"loading\":\"style_loading__r3aiE__abOpN\",\"control-bar\":\"style_control-bar__kTKau__abOpN\",\"scroller\":\"style_scroller__HOq7b__abOpN\",\"outer\":\"style_outer__ntu--__abOpN\",\"file-name\":\"style_file-name__UPbbe__abOpN\",\"file-options\":\"style_file-options__5TE5l__abOpN\",\"scale-input\":\"style_scale-input__JdF1K__abOpN\",\"text-outer\":\"style_text-outer__TzhuG__abOpN\",\"error\":\"style_error__wSaxt__abOpN\",\"text-inner\":\"style_text-inner__jdi-A__abOpN\",\"image-inner\":\"style_image-inner__zTiFU__abOpN\"};","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,a)=>{a.d(t,{A:()=>n});a(73884);const n=a.p+"static/media/defaultAvatar.b1f2a8046cc7bee36d9a404ce6a0a1d7.svg"},93761:(e,t,a)=>{a.d(t,{qn:()=>D,TM:()=>G,LH:()=>L,Ay:()=>R,DF:()=>E});var n=a(30509),s=a(25438),l=a(55199),r=a(27047),o=a(83136),i=a.n(o),c=a(64671),d=a(73884),u=a(21485),p=a(56434),m=a.n(p),h=a(15797),_=a.n(h),g=a(33097),f=a.n(g);const x="style_address__DIuRX__abOpN",v="style_is-popup__tqVvp__abOpN",y="style_title__FAe12__abOpN",b="style_scroll-box__JWiDl__abOpN",N="style_scroll-plus-box__lidEW__abOpN",C="style_content__lAARZ__abOpN",j="style_col-left__WPfeS__abOpN",A="style_col-right__z0e9-__abOpN";var O=a(87558);const S=e=>({"en-US":()=>a.e(3691).then(a.bind(a,83691)),"zh-CN":()=>a.e(2253).then(a.bind(a,32253))}[e]());var w=a(58609),P=a(70579);const I=n.A.useContext,L=e=>{let{city:t,province:a,country:n}=e;const s=_()((()=>{const e=[];return["gangaotai","municipality"].forEach((a=>{e.push(...t.relations[a])})),["provinces","continents"].forEach((a=>{t.relations[a].forEach((a=>{e.push(a),e.push(...t.relations[a])}))})),e.map((e=>t.list[e]))}));return{getCity:_()((e=>{const a=t.list[e];return a?{city:a,parent:a.parentCode?t.list[a.parentCode]:null}:{city:null,parent:null}})),getChinaHotCities:_()((()=>t.relations[2].map((e=>t.list[e])))),getChinaCities:_()((()=>["2",...a.relations.municipality,...a.relations.provinces,"gangaotai"].map((e=>Object.assign({id:e},t.list[e]))))),getCountries:_()((()=>["1",...n.relations.continents].map((e=>Object.assign({id:e},n.list[e]))))),getList:_()(((e,s)=>{const{showChinaQuan:l,showForeignQuan:r}=Object.assign({},s);if("gangaotai"===e)return a.relations.gangaotai.map((e=>t.list[e]));const o=Object.assign({},t.list[e]);if(a.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 a.relations.provinces.indexOf(e)>-1&&l&&(o.name="\u5168"+o.name,i.splice(0,0,o)),n.relations.continents.indexOf(e)>-1&&r&&(o.name="\u5168"+o.name,i.splice(0,0,o)),i})),getNationalityList:_()((e=>{let a=m()(t);return"1"===e&&a.relations[1].unshift("410"),"350"===e&&a.relations[350].unshift("410"),a.relations[e].filter((e=>a.list[e])).map((e=>a.list[e]))})),getCityByName:_()((e=>{const t=s();let a;return[t=>t.name===e,t=>t.name===e.replace(/(\u7701|\u5e02)$/,""),t=>0===e.indexOf(t.name)].find((e=>(a=t.find(e),a))),a})),combineCities:_()(((e,a)=>[...a.filter((a=>t.list[a].parentCode!==e&&t.list[e].parentCode!==a&&e!==a)),e])),searchCities:_()((e=>{if(!e)return[];return s().filter((t=>["pinyin","name","enName","spelling"].some((a=>t[a].toUpperCase().indexOf(e.toUpperCase())>-1)))).map((e=>{const a=e.parentCode?t.list[e.parentCode]:null;return{label:a?"".concat(a.name,"\xb7").concat(e.name):e.name,value:e.code}}))}))}},M=(e,t)=>"en-US"===t?f()(e,"enName"):f()(e,"name"),k={cache:"CITY_DATA",isLocal:!0,ttl:864e5,loader:()=>a.e(7820).then(a.t.bind(a,37820,19)).then((e=>e.__esModule?e.default:e))},F=e=>{let{value:t,setValue:a}=e;const{fetchApi:n,props:o}=I(),[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:k,getList:F,searchCities:T}=(0,d.useMemo)((()=>L(n.data)),[n.data]),D=e=>{if(o.single)return void a([e]);const n=t.slice(0),s=n.indexOf(e);s>-1?n.splice(s,1):n.push(e),a(n)},E=p&&(0,P.jsx)(u.A,{className:N,children:(0,P.jsx)(l.List,{className:s.A.list,size:"small",dataSource:T(p),rowKey:"value",renderItem:e=>(0,P.jsx)(l.List.Item,{className:s.A["list-item"],onClick:()=>{D(e.value),m("")},children:(0,P.jsx)("span",{className:s.A["item-label"],children:e.label})})})});return(0,P.jsxs)("div",{className:i()(x,{[v]:o.isPopup}),children:[(0,P.jsx)(l.Input.Search,{className:i()(s.A["search-input"],{[s.A["is-popup"]]:o.isPopup}),placeholder:o.searchPlaceholder||g({id:"searchCity"}),prefix:(0,P.jsx)(c.default,{type:"icon-sousuo"}),enterButton:(0,P.jsx)(c.default,{type:"icon-sousuo"}),value:p,allowClear:!0,onChange:e=>{const t=e.target.value;m(t)},onSearch:e=>{m(e)}}),(0,P.jsx)("div",{className:C,children:E||(0,P.jsxs)(l.Row,{wrap:!1,children:[(0,P.jsx)(l.Col,{className:j,children:(0,P.jsx)(l.Tabs,{centered:!0,onChange:e=>{_(e)},items:[{key:"2",label:(0,P.jsx)(w.FormattedMessage,{id:"domestic",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5185"}),children:(0,P.jsx)(u.A,{className:b,children:(0,P.jsx)(l.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:S().map((e=>({label:M(e,f),key:e.id})))})})},{key:"1",label:(0,P.jsx)(w.FormattedMessage,{id:"abroad",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5916"}),children:(0,P.jsx)(u.A,{className:b,children:(0,P.jsx)(l.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:k().map((e=>({label:M(e,f),key:e.id})))})})}]})}),(0,P.jsxs)(l.Col,{flex:1,className:A,children:[(0,P.jsx)(l.Divider,{className:y,orientation:"left",children:M(O(h).city,f)}),(0,P.jsx)(u.A,{className:b,children:(0,P.jsx)(l.Space,{wrap:!0,children:F(h,{showChinaQuan:o.showChinaQuan,showForeignQuan:o.showForeignQuan}).map((e=>(0,P.jsx)(l.Tag.CheckableTag,{checked:t.indexOf(e.code)>-1,onChange:()=>{D(e.code)},children:M(e,f)},e.code)))})})]})]})})]})},T=e=>(0,P.jsx)(n.A,{...e,children:e=>{let{value:t,setValue:a}=e;return(0,P.jsx)(w.IntlProvider,{moduleName:"AddressSelect",importMessages:S,children:(0,P.jsx)(F,{value:t,setValue:a})})}});T.defaultProps={overlayWidth:"450px",isPopup:!0,api:k,dataFormat:(e,t)=>{let{city:a}=e;const{locale:n}=Object.assign({},t);return{list:Object.values(a.list).map((e=>Object.assign({},e,{value:e.code,label:M(e,n)})))}}};const D=(0,O.withFetch)((e=>{let{name:t,data:a,children:n,...s}=e;const{locale:l}=(0,r.A)(),{getCity:o}=(0,d.useMemo)((()=>L(a)),[a]);return n(o(t),Object.assign({},s,{locale:l}))}));D.defaultProps={...k,displayParent:!1,children:(e,t)=>{let{city:a,parent:n}=e,{displayParent:s,locale:l}=t;return s&&n?"".concat(M(n,l),"\xb7").concat(M(a,l)):M(a,l)}};const E=e=>{const t=(0,O.withFetch)((t=>{let{data:a,...n}=t;const s=(0,d.useMemo)((()=>L(a)),[a]);return(0,P.jsx)(e,{...n,addressApi:s})}));return t.defaultProps={...k},t};T.AddressEnum=D,T.createAddressApi=L,T.withAddressApi=E;const R=T;var z=a(10986),W=a.n(z),V=a(78491),B=a.n(V),U=a(20492),K=a(22616),H=a.n(K),q=a(1488),Q=a.n(q);const Z=e=>{const{isPopup:t,size:a,disabled:n,inputPlaceholder:s,onBlur:r,className:o,...i}=e,[c,d]=W()(e),u=["isPopup","searchPlaceholder","placeholder","overlayWidth","api","dataFormat"],{formatMessage:p}=(0,w.useIntl)({moduleName:"Common"}),m=B()((e=>{r&&r(e)}));return(0,P.jsx)("div",{ref:m,children:(0,P.jsxs)(l.Row,{gutter:10,children:[(0,P.jsx)(l.Col,{span:12,children:(0,P.jsx)(R,{...H()(i,u),className:o,disabled:n,single:!0,size:a,value:f()(c,"city"),onChange:e=>{d({city:e,detail:f()(c,"detail")})}})}),(0,P.jsx)(l.Col,{span:12,children:(0,P.jsx)(l.Input,{...Q()(i,u),className:o,placeholder:s||p({id:"pleaseInput"}),disabled:n,size:a,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,a)=>{a.d(t,{Bm:()=>D,Eo:()=>F,NR:()=>b,Ay:()=>E});var n=a(55199),s=a(83136),l=a.n(s),r=a(30509),o=a(25438),i=a(26475),c=a(33097),d=a.n(c),u=a(34677),p=a.n(u);const m="create-list_scroll-loader__zoaS7__abOpN",h="create-list_is-popup__t3d-G__abOpN",_="create-list_is-not-full__FXtX1__abOpN",g="create-list_search-input__tV3vf__abOpN",f="create-list_left__EXr3i__abOpN";var x=a(73161),v=a(70579);const y=r.A.useContext,b=e=>{let{renderList:t,defaultProps:a}=e;const s=e=>{let{value:a,setValue:s}=e;const{fetchApi:r,searchText:c,setSearchText:u,props:b,mapping:N}=y(),C=Object.assign({},{paramsType:"data",current:"currentPage",pageSizeName:"perPage",pageSize:20},b.pagination),j=d()(r.requestParams,[C.paramsType,C.current],1),A=d()(r.requestParams,[C.paramsType,C.pageSizeName])||C.pageSize,O=b.dataFormat(r.data),{right:S,leftBottom:w,leftSpan:P=24}=b;return(0,v.jsxs)(n.Row,{wrap:!1,className:S?_:"",children:[(0,v.jsxs)(n.Col,{span:P,className:l()(f,"advance-select-left"),children:[b.getSearchProps?(0,v.jsx)(x.A,{isPopup:b.isPopup,className:l()(g,o.A["search-input"],{[o.A["is-popup"]]:b.isPopup}),placeholder:b.searchPlaceholder,value:c,onSearch:e=>{r.reload(b.getSearchProps(e)),u(e)}}):null,(0,v.jsx)(i.A,{completeTips:"",isLoading:!r.isComplete,className:l()(m,{[h]:b.isPopup}),noMore:!O.total||j*A>=O.total,onLoader:async()=>{console.log("on loader"),await r.loadMore(p()({[C.paramsType]:{[C.pageSizeName]:A,[C.current]:j+1}},b.getSearchProps&&b.getSearchProps(c)),b.mergeList)},children:t({props:b,value:a,setValue:s,list:O.list,itemIsSelected:e=>a.indexOf(e.value)>-1,onSelect:e=>{if(b.single)return void s([e.value]);const t=a.slice(0),n=t.indexOf(e.value);n>-1?t.splice(n,1):t.push(e.value),s(t)}})}),w&&w({fetchApi:r,value:a,mapping:N})]}),S&&S({value:a,mapping:N,fetchApi:r})]})},c=e=>{let{extra:t,...a}=e;return(0,v.jsx)(r.A,{...a,extra:t,children:e=>{let{value:t,setValue:a}=e;return(0,v.jsx)(s,{value:t,setValue:a})}})};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})},a),c},N="list_list__TGynD__abOpN",C="list_list-item__WSswf__abOpN",j="list_is-selected__6Wkgt__abOpN",A="list_item-label__bYzhe__abOpN",O="list_item-des__2nsEn__abOpN",S="list_is-disabled__qxCvO__abOpN";var w=a(40438),P=a(64671);const I="user_list-inner__V508e__abOpN",L="user_list-info__y2nWo__abOpN",M="user_selected-icon__9OQJL__abOpN",k="user_item-des__o+7UR__abOpN",F=b({renderList:e=>{let{list:t,onSelect:a,itemIsSelected:s}=e;return(0,v.jsx)(n.List,{size:"small",className:N,dataSource:t,renderItem:e=>{const t=s(e);return(0,v.jsx)(n.List.Item,{className:l()(C,{[j]:t}),onClick:()=>a(e),children:(0,v.jsxs)(n.Row,{wrap:!1,align:"middle",className:I,children:[(0,v.jsx)(n.Col,{children:(0,v.jsx)(w.default.Avatar,{...Object.assign({},e.avatar),size:40,gender:"M"})}),(0,v.jsx)(n.Col,{className:L,flex:1,children:(0,v.jsxs)(n.Space,{direction:"vertical",children:[(0,v.jsx)("span",{className:A,children:e.label}),e.description&&(0,v.jsx)("span",{className:k,children:e.description})]})}),(0,v.jsx)(n.Col,{children:t?(0,v.jsx)(P.default,{className:M,type:"icon-gouxuan"}):null})]})})}})}}),T={},D=b({defaultProps:{overlayWidth:"450px"},renderList:e=>{let{props:t,list:a,onSelect:s,value:r,setValue:o,itemIsSelected:i}=e;return(0,v.jsx)(n.Table,{className:T.list,size:"small",dataSource:a,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)})})}}),E=b({renderList:e=>{let{props:t,list:a,itemIsSelected:s,onSelect:r}=e;const{listClassName:o="",selectIcon:i=null}=t||{};return(0,v.jsx)(n.List,{className:l()(N,o),size:"small",dataSource:a,renderItem:e=>{var a;const o=s(e);return(0,v.jsxs)(n.List.Item,{className:l()(C,{[j]:t.single&&o,[S]:e.disabled}),onClick:()=>{e.disabled||r(e)},children:[(0,v.jsxs)(n.Row,{wrap:!1,children:[t.single?null:(0,v.jsx)(n.Col,{children:(0,v.jsx)(n.Checkbox,{checked:o,disabled:e.disabled})}),(0,v.jsx)(n.Col,{children:(0,v.jsxs)(n.Space,{className:null!==(a=null===e||void 0===e?void 0:e.className)&&void 0!==a?a:"",children:[(0,v.jsx)("span",{className:A,children:e.label}),e.description&&(0,v.jsx)("span",{className:O,children:e.description})]})})]}),o&&i]})}})}})},45776:(e,t,a)=>{a.d(t,{yK:()=>L,ON:()=>h,Ay:()=>D});var n=a(30509),s=a(73884),l=a(96418),r=a.n(l),o=a(55199),i=a(64671),c=a(73161),d=a(33097),u=a.n(d),p=a(79686),m=a.n(p);const h=e=>{const t=Array.from(e.values()),a=t.filter((e=>null===e.parentId)),n=(e,t)=>{const a=e.indexOf(t);a>-1&&e.splice(a,1)},s=t=>{const a=[],n=t=>{const s=e.get(t);s&&Array.isArray(s.children)&&s.children.length>0&&(a.push(...s.children),s.children.forEach((e=>{n(e.id)})))};return n(t),a},l=(t,a)=>{const n=t=>{const s=e.get(t);return s?a(s)?s:m()(s.parentId)?null:n(s.parentId):null};return n(t)},r=t=>{const n=e.get(t);if(!n)return[];const s=n.parentId;if(m()(s))return a;return e.get(s).children},o=(()=>{const e=a=>Array.isArray(a)&&a.length>0?a.map((a=>{const n=t.filter((e=>e.parentId===a.id));return Object.assign({},a,{children:e(n)})})):null;return e(a)})();return{mapping:e,getSelectedQueue:t=>{const a=e.get(t);if(!a)return[];const n=e=>{if(e.children&&e.children.length>0)return n(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?n(t):e},l=function(t){const a=[t,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]],n=e.get(t);return!n||m()(n.parentId)?a:l(n.parentId,a)},r=n(a);return l(u()(r,"id"))},getAllChildren:s,computedCheckboxStatus:function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(l(t,(e=>a.indexOf(e.id)>-1)))return{checked:!0,indeterminate:!1};const n=((t,n)=>{const s=t=>{const n=e.get(t);return n?(l=n,a.indexOf(l.id)>-1?n:Array.isArray(n.children)&&n.children.length>0?n.children.find((e=>!!s(e.id))):void 0):null;var l};return!!s(t)})(t);return n?{checked:!1,indeterminate:!0}:{checked:!1,indeterminate:!1}},getSiblingNode:r,findInParents:l,setNodeChecked:function(t){const a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),l=t=>{const o=e.get(t);if(!o)return;a.push(t),s(t).forEach((e=>{n(a,e.id)}));const i=r(t),c=i.every((e=>a.indexOf(e.id)>-1));o.parentId&&c&&(i.forEach((e=>{n(a,e.id)})),l(o.parentId))};return l(t),a},setNodeUnchecked:function(t){const a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),s=t=>{const l=e.get(t);if(!l)return;if(a.indexOf(l.id)>-1)return void n(a,l.id);const o=r(t);l.parentId&&(o.forEach((e=>{t!==e.id&&a.push(e.id)})),s(l.parentId))};return s(t),a},treeData:o,treeMapping:new Map(o.map((e=>[e.id,e])))}};var _=a(74065),g=a.n(_),f=a(19853),x=a.n(f),v=a(17342),y=a(83136),b=a.n(y);const N={content:"style_content__Hxlt9__abOpN",columns:"style_columns__FmtPF__abOpN","content-item":"style_content-item__i6HCO__abOpN","last-level-area":"style_last-level-area__2y7jQ__abOpN","is-popup":"style_is-popup__+r3Mn__abOpN",menu:"style_menu__WZUVE__abOpN","scroll-plus-box":"style_scroll-plus-box__QcTst__abOpN","menu-label":"style_menu-label__iGt0Z__abOpN","menu-item":"style_menu-item__hXHfm__abOpN","checkbox-hidden":"style_checkbox-hidden__Xpx7J__abOpN",loading:"style_loading__ZwrVe__abOpN"};var C=a(87558),j=a(58609),A=a(25438),O=a(70579),S=a(27047);const w=new Map,P=(0,C.withFetch)((e=>{let{data:t,name:a,type:n,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(a);return w.set("".concat(a,"_").concat(n),c),r(c,i)})),I=e=>{const{locale:t}=(0,S.A)(),a="".concat(t,"_").concat(e.name,"_").concat(e.type),n=w.get(a);return n&&!e.force?e.children(n):(0,O.jsx)(P,{...e})};I.defaultProps={children:e=>u()(e,"label","")};const L=I,M=n.A.useContext,k=(0,C.withFetch)((e=>{let{data:t,computedIsChecked:a,onSelect:n}=e;return(0,O.jsx)(v.A,{className:N["scroll-plus-box"],children:(0,O.jsx)(o.List,{className:A.A.list,size:"small",dataSource:t,rowKey:"value",renderItem:e=>{const t=a(e);return(0,O.jsx)(o.List.Item,{className:b()(A.A["list-item"],{[A.A["is-selected"]]:t}),onClick:()=>n(e,t),children:(0,O.jsx)("span",{className:A.A["item-label"],children:e.label})})}})})})),F=e=>{let{value:t,setValue:a,size:n}=e;const{fetchApi:l,props:d}=M(),[p,m]=(0,s.useState)(""),_=r()(d.dataFormat),{formatMessage:f}=(0,j.useIntl)({moduleName:"Common"}),y=l.data,C=(0,s.useMemo)((()=>new Map(_(y).list.map((e=>[e.value,e])))),[y,_]),S=(0,s.useMemo)((()=>h(C)),[C]),w=(0,s.useRef)({});w.current={createMergeTree:d.createMergeTree,loadMore:l.loadMore,openLoadData:d.openLoadData,parentIdKey:d.parentIdKey,treeUtils:S};const[P,I]=(0,s.useState)((()=>{const e=t.find((e=>!!C.get(e)));return S.getSelectedQueue(e||u()(l.data.find((e=>e.children&&e.children.length>0)),"id")||u()(l.data,"[0].id"),C)}));(0,s.useEffect)((()=>{const{openLoadData:e,loadMore:t,parentIdKey:a,createMergeTree:n,treeUtils:s}=w.current;if(!e)return;const l=C.get(g()(P));if(!l)return;const r=s.getSelectedQueue(l.id);x()(P,r)?l.hasOwnProperty("children")||t({data:{[a]:l.id}},n(l.id)):I(r)}),[P,C]);const L=(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>n?o.message.error(f({id:"maxSelectedCount"},{count:n})):a(d.single&&l.length>0?[g()(l)]:l)},F=e=>{const t=C.get(e);return!(!d.openLoadData||t.hasOwnProperty("children"))||t.children&&t.children.length>0},T=!d.openLoadData&&"function"===typeof d.onSearch,D=T&&p&&(0,O.jsx)(k,{data:{searchText:p},loader:e=>{let{data:t}=e;return d.onSearch(t.searchText,{mapping:C})},computedIsChecked:e=>t.indexOf(e.id)>-1,onSelect:(e,t)=>{L(!t,e.id),!t&&I(S.getSelectedQueue(e.id,C)),m("")}});return(0,O.jsxs)("div",{className:b()(N.content,{[N["is-popup"]]:d.isPopup,[N["has-search"]]:T}),style:{"--menu-item-width":d.menuItemWidth},children:[T&&(0,O.jsx)(c.A,{isPopup:d.isPopup,className:b()(A.A["search-input"],{[A.A["is-popup"]]:d.isPopup}),placeholder:d.searchPlaceholder||f({id:"search"}),value:p,onSearch:e=>{m(e)}}),D||(0,O.jsx)("div",{children:(0,O.jsx)(v.A,{className:N.scroller,options:{autoHide:!1},children:(0,O.jsxs)("div",{className:N.columns,children:[P.map(((e,a)=>{const n=C.get(e),l=S.getSiblingNode(e),r=!F(null===n||void 0===n?void 0:n.id)&&a>0;return(0,O.jsx)(v.A,{className:b()(N["content-item"],{[N["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=>L(t.target.checked,e.id)},e.label)))}):(0,O.jsx)(o.Menu,{className:b()(N.menu),onSelect:e=>{const a=C.get(e.key);if(a)if(F(a.id))I(S.getSelectedQueue(a.id,C));else{const{checked:e}=S.computedCheckboxStatus(a.id,t);L(!e,a.id)}},selectedKeys:a===P.length-1?[]:P,items:l.map((e=>({key:e.id,label:(0,O.jsxs)(o.Space,{className:b()(N["menu-item"],{[N["checkbox-hidden"]]:d.onlyAllowLastLevel&&F(e.id)}),children:[!d.onlyAllowLastLevel&&(0,O.jsx)(o.Checkbox,{...S.computedCheckboxStatus(e.id,t),onChange:t=>L(t.target.checked,e.id)}),(0,O.jsx)("div",{className:N["menu-label"],children:e.label}),F(e.id)&&(0,O.jsx)(i.default,{className:N["menu-item-icon"],type:"icon-arrow-thin-right",size:12})]})})))})},u()(l,"[0].id",a))})),l.isComplete?null:(0,O.jsx)("div",{className:N.loading,children:(0,O.jsx)(o.Spin,{size:"small"})})]})})})]})},T=e=>{let{maxLength:t,nodeFormat:a,dataFormat:s,...l}=e;return(0,O.jsx)(n.A,{...l,dataFormat:e=>s(e,a),children:e=>{let{value:a,setValue:n}=e;return(0,O.jsx)(F,{size:t,value:a,setValue:n})}})};T.defaultProps={maxLength:Number.MAX_VALUE,size:"middle",isPopup:!0,overlayWidth:"460px",menuItemWidth:"180px",openLoadData:!1,onlyAllowLastLevel:!1,parentIdKey:"id",onSearch:(e,t)=>{let{mapping:a}=t;return Array.from(a.values()).filter((t=>t.label.indexOf(e)>-1))},dataFormat:(e,t)=>{const a=(e,n)=>{const s=[];return s.push(...(e||[]).map((e=>("function"===typeof t&&Object.assign(e,t(e)),e.children&&e.children.length>0&&s.push(...a(e.children,e.id)),Object.assign({},e,{value:e.id,parentId:n}))))),s};return{list:a(e,null)}},createMergeTree:e=>(t,a)=>{const n=t=>t.map((t=>t.id===e?Object.assign({},t,{children:a&&a.map((t=>Object.assign({},t,{parentId:e})))}):Array.isArray(t.children)&&t.children.length>0?Object.assign({},t,{children:n(t.children)}):t));return n(t)}};const D=T},41654:(e,t,a)=>{a.d(t,{A:()=>p});var n=a(45776),s=a(27047),l=a(33097),r=a.n(l),o=a(70579);const i=(e,t)=>"en-US"===t?r()(e,"enName"):r()(e,"chName"),c=()=>a.e(719).then(a.t.bind(a,10719,19)).then((e=>e.__esModule?e.default:e)),d={cache:"FUNCTION_DATA",isLocal:!0,ttl:864e5,loader:c},u=e=>{let{apis:t,...a}=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)(n.Ay,{...a,api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:a}=(0,n.ON)(new Map(t.map((e=>[e.code,{...e,id:e.code,label:i(e,r),parentId:e.parentCode||null}]))));return a}},c.functionData)})};u.defaultProps={overlayWidth:"640px",getSearchProps:e=>({data:{searchText:e}})},u.defaultData=c;u.Enum=e=>{let{apis:t,...a}=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)(n.yK,{...a,...c.functionData,type:"function",getLabel:e=>i(e,r),transformData:e=>{let{data:t}=e;return t}})};const p=u},53392:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(45776),s=a(27047),l=a(33097),r=a.n(l),o=a(70579);const i=(e,t)=>"en-US"===t?r()(e,"enName"):r()(e,"chName"),c={cache:"INDUSTRY_DATA",isLocal:!0,ttl:864e5,loader:()=>a.e(7183).then(a.t.bind(a,57183,19)).then((e=>e.__esModule?e.default:e))},d=e=>{let{apis:t,...a}=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)(n.Ay,{...a,api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:a}=(0,n.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 a}},d.industryData)})};d.defaultProps={overlayWidth:"635px"};d.Enum=e=>{let{apis:t,...a}=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)(n.yK,{...a,...d.industryData,type:"function",getLabel:e=>i(e,r),transformData:e=>{let{data:t}=e;return t}})};const u=d},26475:(e,t,a)=>{a.d(t,{A:()=>_});var n=a(73884),s=a(55199),l=a(96418),r=a.n(l),o=a(21485),i=a(83136),c=a.n(i),d=a(51941);const u="style_scroller-no-more__EH2J+__abOpN";var p=a(70579);const m=e=>{let{getScrollerRef:t,loadMore:a,maxFullCount:s}=e;const l=r()(a),o=r()(t);return(0,n.useEffect)((()=>{let e=s;const t=o(),a=async()=>{t.clientHeight===t.scrollHeight&&e>0&&(await l().then((()=>new Promise((e=>{setTimeout(e,500)})))),e--,await a())};a()}),[s,l,o]),null},h=(0,n.forwardRef)(((e,t)=>{let{className:a,noMore:l,onLoader:i,isLoading:h,completeTips:_,maxFullCount:g,children:f}=e;const[x,v]=(0,n.useState)(!1),y=(0,n.useRef)(),b=r()(i),N=(0,n.useRef)(!l&&!h);N.current=!l&&!h,(0,n.useImperativeHandle)(t,(()=>y.current),[]);const C=(0,d.useThrottledCallback)((e=>{const t=e.target;N.current&&t.clientHeight+t.scrollTop+20>t.scrollHeight&&b()}),100);return(0,p.jsxs)(o.A,{ref:y,onScroll:C,className:c()("load-container",a),onReady:()=>{v(!0)},children:[x&&!h&&!l&&(0,p.jsx)(m,{maxFullCount:g,getScrollerRef:()=>y.current,loadMore:b}),(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,a)=>{a.d(t,{A:()=>m});var n=a(55199),s=a(83136),l=a.n(s);const r="style_search-input__8aH1G__abOpN",o="style_is-popup__L0973__abOpN";var i=a(64671),c=a(73884),d=a(51941),u=a(70579);const p=e=>{let{value:t,debounce:a,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,a);return(0,c.useEffect)((()=>{t!==x.current&&(f(t),x.current=t)}),[t]),(0,u.jsx)(n.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,a)=>{a.d(t,{A:()=>B});const n={"ant-tag":"style_ant-tag__nNp8-__abOpN",input:"style_input__SpJTE__abOpN",overlay:"style_overlay__La5mO__abOpN","is-disabled":"style_is-disabled__joxdl__abOpN","input-icon":"style_input-icon__vVd8R__abOpN",large:"style_large__En6mL__abOpN",small:"style_small__DY0AQ__abOpN","input-inner":"style_input-inner__PWy27__abOpN","input-custom":"style_input-custom__ktsWD__abOpN","display-content":"style_display-content__hIKo+__abOpN","overlay-footer-extra":"style_overlay-footer-extra__Q+BiR__abOpN","selected-tag":"style_selected-tag__zXZZO__abOpN","selected-tag-list":"style_selected-tag-list__xUIms__abOpN","selected-tag-inner":"style_selected-tag-inner__Z5gPL__abOpN","text-inner":"style_text-inner__H24hY__abOpN",placeholder:"style_placeholder__x0ccE__abOpN","is-modal":"style_is-modal__JU+uq__abOpN","overlay-content":"style_overlay-content__WKqp+__abOpN"};var s=a(74981);const{context:l,useContext:r,Provider:o,Consumer:i}=(0,s.A)();var c=a(73884),d=a(10986),u=a.n(d),p=a(87558),m=a(33097),h=a.n(m),_=a(55199),g=a(83136),f=a.n(g),x=a(3382),v=a(64671),y=a(79686),b=a.n(y),N=a(41740),C=a.n(N),j=a(74065),A=a.n(j),O=a(21485),S=a(96418),w=a.n(S),P=a(77964),I=a(91176),L=a(58609),M=a(20492),k=a(27047),F=a(70579);const T=e=>{let{maxLength:t,single:a,setValue:n,value:s,message:l}=e;return e=>n(!a&&Number.isInteger(t)&&t>0&&e.length>t?(l(),s):e)},D=e=>{let{single:t,value:a,mapping:s,onClose:l}=e;return a&&Array.isArray(a)&&0!==a.length?t?(0,F.jsx)("span",{className:n["text-inner"],children:h()(s.get(a[0]),"label")||a[0]}):a.map((e=>{const t=s.get(e);return(0,F.jsx)(_.Tag,{className:n["display-tag"],closable:!0,onClose:a=>{a.preventDefault(),l(e,t)},children:(0,F.jsx)("span",{className:n["tag-inner"],children:h()(t,"label")||e})},e)})):null},E=(0,c.forwardRef)(((e,t)=>{let{value:a,onChange:s,extra:l,showSelectedTag:r,renderSelectedContent:o,children:i,...d}=e;const[u,p]=(0,c.useState)(a),m=(0,c.useRef)(a),{formatMessage:h}=(0,L.useIntl)({moduleName:"Common"});m.current=a;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(),b=T({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,F.jsx)(x.default,{...d,open:g,onConfirm:()=>{s(u)},onClose:()=>{v(!1)},footer:(r||l)&&(0,F.jsxs)(_.Space,{direction:"vertical",className:n["overlay-footer"],children:[l&&(0,F.jsx)("div",{className:n["overlay-footer-extra"],children:l}),r&&o({value:u,setValue:b})]}),children:"function"===typeof i?i({value:u,setValue:b}):i})})),R=(0,c.forwardRef)(((e,t)=>{let{value:a,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,b]=(0,c.useState)(!1),N=w()((e=>{var t;b(e),null===(t=v.onOpenChange)||void 0===t||t.call(v,e)}));return(0,c.useImperativeHandle)(t,(()=>({close:()=>{N(!1)}})),[N]),x?(0,F.jsx)("div",{className:n["input-inner"],children:d}):(0,F.jsx)(_.Popover,{...v,open:y,onOpenChange:N,transitionName:"ant-slide-up",overlayClassName:f()(n.overlay,g),arrow:!1,content:(0,F.jsxs)("div",{style:m?{"--overlay-width":m}:{},className:f()(n["overlay-content"],"over-content"),onClick:e=>{e.stopPropagation()},children:[(0,F.jsx)("div",{className:n["overlay-inner"],children:"function"===typeof l?l({value:a,setValue:e=>{(!u||a[0]!==e[0])&&s(e),u&&N(!1)}}):l}),(o||p)&&(0,F.jsxs)("div",{className:n["overlay-footer"],children:[p&&(0,F.jsx)("div",{className:n["overlay-footer-extra"],children:p}),o&&r({value:a,setValue:s})]})]}),trigger:"click",placement:i,children:(0,F.jsx)("div",{className:n["input-inner"],children:d})})})),z=(0,p.withFetch)((e=>{let{setFetchApi:t,wrapClassName:a,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,b]=m,{formatMessage:N}=(0,L.useIntl)({moduleName:"Common"}),{single:C,placement:j,getPopupContainer:A,placeholder:S,isPopup:P,disabled:M,showSelectedTag:k,extra:T,inputContent:z,allowClear:W,overlayClassName:V}=g,B=(0,c.useRef)(l);B.current=l;const U=w()(s);(0,c.useEffect)((()=>{U(P?u:d)}),[P,U]),(0,c.useEffect)((()=>{t(Object.assign({},B.current,{data:l.data,isComplete:l.isComplete}))}),[l.data,t,l.isComplete]);const K=D({single:C,value:y,mapping:h,onClose:e=>{b((t=>{const a=t.slice(0),n=t.indexOf(e);return n>-1&&a.splice(n,1),a}))}}),H=e=>{let{value:t,setValue:a}=e;return(0,F.jsxs)(_.Space,{className:n["selected-tag"],align:"center",wrap:!1,children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(L.FormattedMessage,{id:"selectedTextAdvanced",moduleName:"Common",defaultMessage:"\u5df2\u9009"}),!g.single&&Number.isInteger(g.maxLength)&&g.maxLength>0?"(".concat(t.length,"/").concat(g.maxLength,")"):"",":"]}),(0,F.jsx)(O.A,{className:n["selected-tag-list"],children:(0,F.jsx)("div",{className:n["selected-tag-inner"],children:D({value:t,mapping:h,onClose:e=>{a((t=>{const a=t.slice(0),n=t.indexOf(e);return n>-1&&a.splice(n,1),a}))}})})})]})},q=z?z(p):(0,F.jsxs)(_.Space,{className:n["display-content"],onMouseOver:()=>{i(!0)},onMouseOut:()=>{i(!1)},children:[(0,F.jsx)("div",{children:K||(0,F.jsx)("span",{className:n.placeholder,children:S||N({id:"pleaseSelect"})})}),o&&y&&y.length>0&&!M&&W?(0,F.jsx)(v.default,{className:f()(n.close,n["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),b([])}}):(0,F.jsx)(v.default,{className:f()(n["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return P?(0,F.jsx)(R,{ref:u,overlayWidth:(0,I.v)(Math.max(x,(0,I.j)(g.overlayWidth))),value:y,setValue:b,single:C,disabled:M,inputContent:q,onOpenChange:g.onOpenChange,overlayClassName:V,extra:"function"===typeof T?T({close:()=>u.current.close(),context:p}):T,renderSelectedContent:H,showSelectedTag:k,trigger:"click",placement:j,getPopupContainer:A,children:g.children}):(0,F.jsxs)("div",{className:n["input-inner"],onClick:()=>{M||d.current.modalOpen()},children:[(0,F.jsx)(E,{size:g.modalSize,ref:d,single:g.single,maxLength:g.maxLength,onOpenChange:g.onOpenChange,disabledScroller:!0,wrapClassName:f()(n.overlay,n["is-modal"],a),title:g.placeholder||N({id:"pleaseSelect"}),value:y,onChange:b,extra:"function"===typeof T?T({close:()=>d.current.close(),context:p}):T,showSelectedTag:k,renderSelectedContent:H,children:g.children}),q]})})),W=e=>{let{api:t,className:a,displayItems:s,wrapClassName:l,...r}=e;const{locale:i}=(0,k.A)(),[d,p]=(0,c.useState)(""),[m,g]=(0,c.useState)(new Map(s.map((e=>[e.value,e])))),{formatMessage:x}=(0,L.useIntl)({moduleName:"Common"}),[v,y]=(0,c.useState)(0),N=(0,P.A)((e=>{y(e.clientWidth)})),[j,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 a=C()(e);return t.forEach((e=>{a.set(e.value,e)})),a}))},I=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?b()(e)?[]:[e]:e||[],w,r.valueType),[M,D]=u()(Object.assign({},r,{onChange:e=>{const t=((e,t,a)=>"all"!==a?e:e.map((e=>t.get(e))).filter((e=>!!e)))(e,m,r.valueType);r.onChange&&r.onChange(r.single?A()(t):t)}},"value"in r?{value:I(r.value)}:{defaultValue:I(r.defaultValue)})),E=T({maxLength:r.maxLength,single:r.single,setValue:D,value:M,message:()=>S.error(x({id:"maxSelectedCount"},{count:r.maxLength}))}),R=(0,c.useRef)(null);return(0,F.jsx)(o,{value:{inputWidth:v,mapping:m,searchText:d,setSearchText:p,appendMapping:w,setItems:e=>{j.setData(e),w(h()(r.dataFormat(e,{locale:i}),"list",[]))},getContentApi:()=>R.current,fetchApi:j,valueState:[M,E],props:r},children:(0,F.jsx)("div",{ref:N,className:f()(n["input".concat(r.inputContent&&"function"===typeof r.inputContent?"-custom":"")],{"select-input-disabled":!!r.disabled},a),children:(0,F.jsx)(z,{...t,wrapClassName:l,loading:null,setFetchApi:O,getContentRef:e=>{e.current&&(R.current=e.current)},onRequestSuccess:e=>{w(h()(r.dataFormat(e,{locale:i}),"list",[])),t.onRequestSuccess&&t.onRequestSuccess(e)}})})})};W.defaultProps={displayItems:[],extra:null,api:{loader:()=>[]},dataFormat:e=>({list:e}),placement:"bottomLeft",showSelectedTag:!0,allowClear:!0};const V=(0,L.createWithIntl)({importMessages:M.A,moduleName:"Common"})(W);V.useContext=r;const B=V},17342:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(8762),s=a.n(n);a(46733);const l=s()},21485:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(73884),s=a(44418),l=a.n(s),r=a(96418),o=a.n(r),i=a(70579);const c=(0,n.forwardRef)(((e,t)=>{let{children:a,onScroll:s,options:r,onReady:c,...d}=e;const u=(0,n.useRef)(null),p=(0,n.useRef)(null),m=(0,n.useRef)(r),h=o()(c),_=o()(s);return(0,n.useImperativeHandle)(t,(()=>p.current)),(0,n.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,a]),(0,i.jsx)("div",{...d,ref:u,children:a})}))},89319:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(55199),s=a(10986),l=a.n(s),r=a(57469),o=a.n(r),i=a(20492),c=a(58609),d=a(70579);const u=(0,c.createWithIntl)({importMessages:i.A,moduleName:"Common"})((e=>{let{...t}=e;const{formatMessage:a}=(0,c.useIntl)({moduleName:"Common"}),s=new Map([["date",a({id:"customTime"})],["month",a({id:"monthly"})],["week",a({id:"weekly"})]]),[r,i]=l()(t);return(0,d.jsxs)(n.Space.Compact,{children:[(0,d.jsx)(n.Select,{style:{width:"120px"},value:(null===r||void 0===r?void 0:r.type)||"date",onChange:e=>{i((t=>{var a;return{value:null!==t&&void 0!==t&&null!==(a=t.value)&&void 0!==a&&a.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,a]=e;return{label:a,value:t}}))}),(0,d.jsx)(n.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,a)=>{a.d(t,{A:()=>n});const n=e=>({"en-US":()=>a.e(3086).then(a.bind(a,13086)),"zh-CN":()=>a.e(4308).then(a.bind(a,84308))}[e]())},29574:(e,t,a)=>{a.d(t,{Zi:()=>_,FI:()=>g,AG:()=>f,Ay:()=>v,lN:()=>x});const n="style_input-file__3JGm6__abOpN",s="style_input-file-input__Fb5iw__abOpN";var l=a(83136),r=a.n(l),o=a(73884),i=a(55199),c=a(76329),d=a(28987),u=a(80111),p=a.n(u),m=a(70579);const h=e=>t=>{let{className:a,accept:l,multiple:i,onChange:c,children:d,...u}=t;const p=(0,o.useRef)(null);return(0,m.jsxs)(e,{...u,className:r()(a,n),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,...a}=e;return(0,m.jsx)(i.Typography.Link,{...a,className:t})})),f=h((e=>{let{className:t,...a}=e;return(0,m.jsx)(i.Typography.Text,{...a,className:r()("ant-btn",t)})})),x=e=>{const{message:t}=i.App.useApp(),{multiple:a,fileSize:n,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),b=(0,o.useMemo)((()=>(0,d.A)(y.current)),[]);return{fileList:x,onFileSelected:async e=>{const r=s-l.length;1!==s&&!0===a&&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*n*1024)return void t.error("\u6587\u4ef6".concat(e.name,"\u4e0d\u80fd\u8d85\u8fc7").concat(n,"MB!"));const l=p()(),r=a=>{const n=a.message||"\u6587\u4ef6".concat(e.name,"\u4e0a\u4f20\u9519\u8bef").concat(a.message?":"+a.message:"");t.error(n),m&&m({file:e,error:a,errMsg:n}),v((e=>{const t=e.slice(0),a=t.findIndex((e=>e.uuid===l));return a>-1&&t.splice(a,1),t}))};try{v(1===s||!0!==a?[{uuid:l,type:"uploading",filename:e.name}]:t=>{const a=t.slice(0);return a.unshift({uuid:l,type:"uploading",filename:e.name}),a}),u&&await Promise.resolve(u(e));const t=g||f.ossUpload,{data:n}=await b((()=>t({file:e})));if(0!==n.code)return void r(new Error("\u6587\u4ef6".concat(e.name,"\u4e0a\u4f20\u5f02\u5e38").concat(n.msg?":"+n.msg:"")));const o=h?await Promise.resolve(h(n,e,l)):{filename:n.data.originalName||e.name,id:n.data.id,ossId:n.data.id,uuid:l};v((e=>{const t=e.slice(0),a=t.findIndex((e=>e.uuid===l));return a>-1&&t.splice(a,1),t})),_(1===s||!0!==a?[o]:e=>{const t=e.slice(0);return t.push(o),t})}catch(o){r(o)}})))}}},v=h},97211:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(87558),s=a.n(n),l=a(76329),r=a(34677),o=a.n(r),i=a(70579);const c=e=>{const t=t=>{let{id:a,url:n,error:r,apis:c,loading:d,...u}=t;const{apis:p}=(0,l.usePreset)(),m=o()({},p,c);if(!a)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:a},cache:"oss-file",ttl:6e6,render:t=>{let{data:n}=t;return(0,i.jsx)(e,{...u,id:a,data:n})}})};return t.defaultProps={loading:null},t}},27047:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(83694),s=a(33097),l=a.n(s);const r=()=>{const e=(0,n.useGlobalContext)();return l()(e,"preset",{apis:{}})}},77964:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(73884),s=a(79889),l=a.n(s),r=a(93950),o=a.n(r),i=a(96418),c=a.n(i);const d=(e,t)=>{const a=(0,n.useRef)(null);a.current=Object.assign({},{time:500,isDebounce:!1},t);const s=(0,n.useRef)(null),r=c()(e);return(0,n.useLayoutEffect)((()=>{const e=s.current,t=()=>(0,n.startTransition)((()=>{e&&r(e)}));t();const i=new ResizeObserver((a.current.isDebounce?o():l())(t,a.current.time));return e&&i.observe(e),()=>{i.disconnect()}}),[r]),s}},81348:(e,t,a)=>{a.d(t,{A:()=>n});const n=(e,t)=>{if(e&&t){const a=Array.isArray(t)?t:t.split(","),n=e.name||"",s=(e.type||"").toLowerCase(),l=s.replace(/\/.*$/,"");return a.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?l===t.replace(/\/.*$/,""):s===t}))}return!0}},69484:(e,t,a)=>{a.d(t,{A:()=>s,e:()=>n});const n=1e15,s=e=>{let t,a,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))>=n)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,a=""):(s=e.split("."),t=s[0],a=s[1].substr(0,4)),parseInt(t,10)>0){let e=0,a=t.length;for(let n=0;n<a;n++){let s=t.substr(n,1),i=a-n-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(""!==a){let e=a.length;for(let t=0;t<e;t++){let e=a.substr(t,1);"0"!==e&&(c+=l[Number(e)]+i[t])}}return""===c?c+=l[0]+"\u5143\u6574":""===a&&(c+="\u6574"),c=d+c,c}},74981:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(73884);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,n.createContext)(e),{Provider:a,Consumer:s}=t;return{context:t,Provider:a,Consumer:s,useContext:()=>(0,n.useContext)(t)}}},28987:(e,t,a)=>{a.d(t,{A:()=>n});const n=e=>{const t=[];let a=0;const n=()=>{if(0!==t.length){if(a<e){const e=t.shift();a+=1,e().finally((()=>{a-=1,n()}))}}else a=0};return e=>new Promise((a=>{t.push((()=>{const t=Promise.resolve().then((()=>e()));return a(t),t})),n()}))}},55490:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(12322),s=a.n(n),l=a(26727),r=a.n(l),o=a(54052),i=a.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,a)=>{a.d(t,{j:()=>s,v:()=>n});const n=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,a)=>{a.r(t),a.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:()=>b.A,changeMoneyToChinese:()=>n.A,createAddressApi:()=>h.LH,createDeferred:()=>N.A,createListField:()=>_.NR,createTreeUtils:()=>g.ON,getContainerBody:()=>s.c,getPopupContainer:()=>l,getScrollEl:()=>s.h,isNotEmpty:()=>C.A,numberToPx:()=>j.v,pxToNumber:()=>j.j,useFileUpload:()=>m.lN,useResize:()=>y.A,withAddressApi:()=>h.DF,withInputFile:()=>m.Ay,withOSSFile:()=>r.A});var n=a(69484),s=a(76801);const l=e=>{const t=e=>{const a=(0,s.h)();if(!e||e===a||!e.parentElement)return a;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=a(97211),o=a(26475),i=a(73025),c=a(21485),d=a(17342),u=a(73161),p=a(30509),m=a(29574),h=a(93761),_=a(12392),g=a(45776),f=a(41654),x=a(53392),v=a(89319),y=a(77964),b=a(81348),N=a(28987),C=a(55490),j=a(91176)},40438:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C});var n=a(87558),s=a.n(n),l=a(97211),r=a(64671),o=a(83136),i=a.n(o),c=a(55199),d=a(73884);const u=e=>{let{params:t}=e;const{data:a}=t;return new Promise(((e,t)=>{const n=new window.Image;n.src=a,n.addEventListener("load",(()=>{e(a)})),n.addEventListener("error",(e=>{t(e)}))}))},p="style_img-outer__4QLY5__abOpN",m="style_img__PSExq__abOpN",h="style_loading__WCOwA__abOpN",_="style_error__+ECgZ__abOpN";var g=a(18411),f=a(70579);const x=e=>{let{data:t,className:a,alt:n,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:n,className:i()(a,m),src:t}):(0,f.jsx)("img",{alt:n,className:i()(a,m),src:t})}})},v=(0,l.A)(x),y=e=>{let{loading:t,error:a,src:n,id:s,alt:l,className:r,children:o,apis:i}=e;const c=t&&(0,d.cloneElement)(t,{className:h}),u=a&&(0,d.cloneElement)(a,{className:_});return n?(0,f.jsx)(x,{alt:l,className:r,data:n,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},b=e=>{let{id:t,src:a,alt:n,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:a,id:t,alt:n,className:r,apis:o})})};b.Avatar=e=>{let{id:t,src:a,alt:n,gender:s,loading:l,error:o,className:d,gap:u,icon:m,children:h,shape:_,size:g,width:x,height:v,defaultAvatar:b,apis:N,...C}=e;const j=(()=>{const e=x&&v?{style:{width:x,height:v}}:{size:g};if(x&&x!==v&&(_="square"),t||a)return y({loading:l,error:o,src:a,defaultAvatar:b,id:t,alt:n,className:d,apis:N,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,{...C,src:b||(0,f.jsx)(r.default,{role:"touxiang",colorful:!0,type:t}),gap:u,shape:_,...e})}return(0,f.jsx)(c.Avatar,{...C,gap:u,icon:m,shape:_,size:g,src:b,...e,children:h})})();return(0,f.jsx)("div",{...C,"data-testid":"components-core-image-avatar",className:i()(d,p),style:{width:x&&v?x:g,height:x&&v?v:g},children:j})};const N={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})};b.defaultProps=Object.assign({},N),b.Avatar.defaultProps=Object.assign({},N,{size:100,defaultAvatar:g.A});const C=b},3382:(e,t,a)=>{a.r(t),a.d(t,{ModalButton:()=>I,TabsModal:()=>O,TabsModalButton:()=>P,default:()=>j,useConfirmModal:()=>C,useModal:()=>N,useTabsModal:()=>S});var n=a(73884),s=a(55199),l=a(83136),r=a.n(l);const o={modal:"style_modal__Pm3cF__abOpN",large:"style_large__iaqVE__abOpN","modal-body-inner":"style_modal-body-inner__4PhpA__abOpN","modal-title":"style_modal-title__dswaw__abOpN","modal-outer":"style_modal-outer__r3SkX__abOpN","modal-body":"style_modal-body__jQJSI__abOpN","right-options-modal":"style_right-options-modal__FajDP__abOpN","right-options-col":"style_right-options-col__3ilee__abOpN","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__abOpN","modal-footer":"style_modal-footer__-prbN__abOpN","modal-close":"style_modal-close__Oa5Kl__abOpN","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__abOpN","is-danger":"style_is-danger__H5110__abOpN",title:"style_title__orTym__abOpN",content:"style_content__k6MIF__abOpN","has-title":"style_has-title__qy0Wp__abOpN"},i=e=>({"en-US":()=>a.e(4628).then(a.bind(a,74628)),"zh-CN":()=>a.e(7478).then(a.bind(a,87478))}[e]());var c=a(58609),d=a(64671);const u=(e,t)=>"function"===typeof e?e(t):e;var p=a(81014),m=a(17342),h=a(70579);const _="Modal",g=e=>{let{options:t,children:a}=e;return t?(0,h.jsxs)(s.Row,{wrap:!1,children:[(0,h.jsx)(s.Col,{span:18,className:o["right-options-col"],children:a}),(0,h.jsx)(s.Col,{span:6,className:o["right-options-col"],children:t})]}):a},f=e=>{let{footer:t,footerButtons:a,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(a)&&0===a.length?null:(0,h.jsx)(s.Col,{children:(0,h.jsx)(s.Space,{children:(a||[{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:a,onClick:s,autoClose:l=!0,display:r,...i}=e;const c=a||p.default;return(0,n.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:a,disabledScroller:l,footerButtons:i,onClose:c,closable:u,onConfirm:p,onCancel:_,children:g}=e;const x=(0,n.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!==a||i?(0,h.jsx)("div",{className:r()(o["modal-footer"],"modal-footer"),children:(0,h.jsx)(f,{footer:a,footerButtons:i,onConfirm:p,onCancel:_,onClose:c})}):null]})},v=e=>{let{withDecorator:t,footerButtons:a,title:n,closable:s,onClose:l,onConfirm:r,onCancel:o,footer:i,rightOptions:c,disabledScroller:d,children:p}=e;const m=e=>(e=Object.assign({},{title:n},e),(0,h.jsx)(x,{title:u(e.title,{...e,close:l}),closable:s,onClose:l,onConfirm:r,onCancel:o,footerButtons:u(a,{...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:a,footer:n,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"]]:a}),...(b=d,"large"===b?{width:"".concat(Math.min(window.innerWidth-64,1500),"px")}:"small"===b?{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:n,footerButtons:s,rightOptions:a,disabledScroller:f,children:t})})};var b},b=e=>(0,h.jsx)(s.Modal,{...y(e)});b.defaultProps={size:"default"};const N=()=>{const{modal:e}=s.App.useApp();return t=>{const a={},{children:n,...s}=y({onClose:()=>a.close(),...t}),{destroy:l}=e.info({...s,content:n});return a.close=l,a}},C=()=>{const{modal:e}=s.App.useApp();return t=>{const a={},{type:n,icon:l,title:i,danger:c,wrapClassName:u,message:p,iconSetting:m={},confirmType:_="info",...g}={onClose:()=>a.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[n]){const{destroy:t}=e[n]({...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"===n?_:n)),type:l||f["confirm"===n?_:n]}),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"===n?_:n)),type:l||f["confirm"===n?_:n]}),p]})});a.close=t}return a}},j=b,A=e=>{let{items:t,className:a,activeKey:n,withDecorator:l,defaultActiveKey:o,onChange:i,...c}=e;return{...c,className:r()(a,"tabs-modal"),withDecorator:e=>{const a=a=>(0,h.jsx)(s.Tabs,{items:t.map((t=>{let{withDecorator:n,...s}=t;return Object.assign({},s,{children:"function"===typeof n?n((t=>e(Object.assign({},a,t,{children:s.children})))):e(Object.assign({},a,{children:s.children}))})})),destroyInactiveTabPane:!0,activeKey:n,defaultActiveKey:o,onChange:i});return"function"===typeof l?l(a):a()},children:e=>{let{children:t,...a}=e;return"function"===typeof t?t(a):t}}},O=e=>(0,h.jsx)(j,{...A(e)}),S=()=>{const e=N();return t=>e(A(t))};var w=a(73025);const P=e=>{const t=S();return(0,h.jsx)(w.A,{...e,modalFunc:t})},I=e=>{const t=N();return(0,h.jsx)(w.A,{...e,modalFunc:t})}},25438:(e,t,a)=>{a.d(t,{A:()=>n});const n={"search-input":"common_search-input__P6qLg__abOpN","is-popup":"common_is-popup__fJq+g__abOpN",list:"common_list__TKFzS__abOpN","list-item":"common_list-item__ASse7__abOpN","is-selected":"common_is-selected__-PU4Y__abOpN","item-label":"common_item-label__u+qz1__abOpN","item-des":"common_item-des__no2z0__abOpN"}}}]);
|
|
2
|
+
//# sourceMappingURL=36.72621a71.chunk.js.map
|