@kne-components/components-core 0.2.11 → 0.2.13
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 +122 -122
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/1151.0e0f439d.chunk.css +2 -0
- package/build/static/css/{1151.8a1ea8b2.chunk.css.map → 1151.0e0f439d.chunk.css.map} +1 -1
- package/build/static/css/1153.85f06ccf.chunk.css +2 -0
- package/build/static/css/1153.85f06ccf.chunk.css.map +1 -0
- package/build/static/css/1154.f4f205da.chunk.css +2 -0
- package/build/static/css/1154.f4f205da.chunk.css.map +1 -0
- package/build/static/css/1454.773ade76.chunk.css +2 -0
- package/build/static/css/{1454.597915d6.chunk.css.map → 1454.773ade76.chunk.css.map} +1 -1
- package/build/static/css/1554.378aab07.chunk.css +2 -0
- package/build/static/css/{1554.e0060527.chunk.css.map → 1554.378aab07.chunk.css.map} +1 -1
- package/build/static/css/2503.beef9f54.chunk.css +2 -0
- package/build/static/css/{2503.1c697ec5.chunk.css.map → 2503.beef9f54.chunk.css.map} +1 -1
- package/build/static/css/2517.ad3e2b99.chunk.css +2 -0
- package/build/static/css/{2517.98220b06.chunk.css.map → 2517.ad3e2b99.chunk.css.map} +1 -1
- package/build/static/css/2716.3c6f43fb.chunk.css +2 -0
- package/build/static/css/{2716.2ac76682.chunk.css.map → 2716.3c6f43fb.chunk.css.map} +1 -1
- package/build/static/css/2730.860e390e.chunk.css +2 -0
- package/build/static/css/{2730.2d0cbb3d.chunk.css.map → 2730.860e390e.chunk.css.map} +1 -1
- package/build/static/css/289.b138addc.chunk.css +2 -0
- package/build/static/css/{289.e6c6f1da.chunk.css.map → 289.b138addc.chunk.css.map} +1 -1
- package/build/static/css/3142.13adfc3a.chunk.css +2 -0
- package/build/static/css/{3142.3c249a67.chunk.css.map → 3142.13adfc3a.chunk.css.map} +1 -1
- package/build/static/css/3333.2f52a976.chunk.css +2 -0
- package/build/static/css/3333.2f52a976.chunk.css.map +1 -0
- package/build/static/css/{3843.f8664dd9.chunk.css → 3843.0a0692b4.chunk.css} +2 -2
- package/build/static/css/{3843.f8664dd9.chunk.css.map → 3843.0a0692b4.chunk.css.map} +1 -1
- package/build/static/css/4029.3296f349.chunk.css +2 -0
- package/build/static/css/4029.3296f349.chunk.css.map +1 -0
- package/build/static/css/4265.cc94dd41.chunk.css +2 -0
- package/build/static/css/4265.cc94dd41.chunk.css.map +1 -0
- package/build/static/css/4666.daddc0cc.chunk.css +2 -0
- package/build/static/css/{4666.33e12ff4.chunk.css.map → 4666.daddc0cc.chunk.css.map} +1 -1
- package/build/static/css/5443.35cb414e.chunk.css +2 -0
- package/build/static/css/5443.35cb414e.chunk.css.map +1 -0
- package/build/static/css/5600.ca194700.chunk.css +2 -0
- package/build/static/css/{5600.40c7f8d3.chunk.css.map → 5600.ca194700.chunk.css.map} +1 -1
- package/build/static/css/5873.ba71089f.chunk.css +2 -0
- package/build/static/css/{5873.043a805d.chunk.css.map → 5873.ba71089f.chunk.css.map} +1 -1
- package/build/static/css/{5996.7ccd8080.chunk.css → 5996.d5db9990.chunk.css} +2 -2
- package/build/static/css/{5996.7ccd8080.chunk.css.map → 5996.d5db9990.chunk.css.map} +1 -1
- package/build/static/css/6611.5ee2d32c.chunk.css +2 -0
- package/build/static/css/{6611.132d7bf4.chunk.css.map → 6611.5ee2d32c.chunk.css.map} +1 -1
- package/build/static/css/6779.5644d170.chunk.css +2 -0
- package/build/static/css/{6779.63d0647a.chunk.css.map → 6779.5644d170.chunk.css.map} +1 -1
- package/build/static/css/7121.82a6e5ff.chunk.css +2 -0
- package/build/static/css/{7121.69995c30.chunk.css.map → 7121.82a6e5ff.chunk.css.map} +1 -1
- package/build/static/css/7227.86530a2a.chunk.css +2 -0
- package/build/static/css/{7227.e6a66529.chunk.css.map → 7227.86530a2a.chunk.css.map} +1 -1
- package/build/static/css/8017.30097e6b.chunk.css +2 -0
- package/build/static/css/8017.30097e6b.chunk.css.map +1 -0
- package/build/static/css/{8725.1db6950e.chunk.css → 8725.f7685908.chunk.css} +2 -2
- package/build/static/css/{8725.1db6950e.chunk.css.map → 8725.f7685908.chunk.css.map} +1 -1
- package/build/static/css/931.86e57f64.chunk.css +2 -0
- package/build/static/css/931.86e57f64.chunk.css.map +1 -0
- package/build/static/js/{1106.509a010d.chunk.js → 1106.94b2f66d.chunk.js} +2 -2
- package/build/static/js/{1106.509a010d.chunk.js.map → 1106.94b2f66d.chunk.js.map} +1 -1
- package/build/static/js/{1153.3ca5a153.chunk.js → 1153.084c38bb.chunk.js} +3 -3
- package/build/static/js/{1153.3ca5a153.chunk.js.map → 1153.084c38bb.chunk.js.map} +1 -1
- package/build/static/js/1154.bf6eb17b.chunk.js +2 -0
- package/build/static/js/1154.bf6eb17b.chunk.js.map +1 -0
- package/build/static/js/1454.95cc1e18.chunk.js +3 -0
- package/build/static/js/{1454.b69c4181.chunk.js.map → 1454.95cc1e18.chunk.js.map} +1 -1
- package/build/static/js/1554.3483fb84.chunk.js +3 -0
- package/build/static/js/{1554.22446df8.chunk.js.map → 1554.3483fb84.chunk.js.map} +1 -1
- package/build/static/js/2503.e70ef261.chunk.js +2 -0
- package/build/static/js/{2503.48a98d11.chunk.js.map → 2503.e70ef261.chunk.js.map} +1 -1
- package/build/static/js/2517.618e29cf.chunk.js +2 -0
- package/build/static/js/{2517.12bffb49.chunk.js.map → 2517.618e29cf.chunk.js.map} +1 -1
- package/build/static/js/2716.b8095105.chunk.js +3 -0
- package/build/static/js/{2716.1b7d43b2.chunk.js.map → 2716.b8095105.chunk.js.map} +1 -1
- package/build/static/js/2730.25605c83.chunk.js +2 -0
- package/build/static/js/{2730.705a15e7.chunk.js.map → 2730.25605c83.chunk.js.map} +1 -1
- package/build/static/js/{2814.aafa2a65.chunk.js → 2814.ef0e78ca.chunk.js} +2 -2
- package/build/static/js/{2814.aafa2a65.chunk.js.map → 2814.ef0e78ca.chunk.js.map} +1 -1
- package/build/static/js/{289.c8a6e7a1.chunk.js → 289.e8f67dbf.chunk.js} +2 -2
- package/build/static/js/{289.c8a6e7a1.chunk.js.map → 289.e8f67dbf.chunk.js.map} +1 -1
- package/build/static/js/{3142.f7ddc1fa.chunk.js → 3142.1719d4a1.chunk.js} +2 -2
- package/build/static/js/{3142.f7ddc1fa.chunk.js.map → 3142.1719d4a1.chunk.js.map} +1 -1
- package/build/static/js/3333.2d80e8a4.chunk.js +2 -0
- package/build/static/js/3333.2d80e8a4.chunk.js.map +1 -0
- package/build/static/js/36.c44b9595.chunk.js +2 -0
- package/build/static/js/{36.1c63688d.chunk.js.map → 36.c44b9595.chunk.js.map} +1 -1
- package/build/static/js/{3843.c63f0e22.chunk.js → 3843.e3b94c91.chunk.js} +2 -2
- package/build/static/js/{3843.c63f0e22.chunk.js.map → 3843.e3b94c91.chunk.js.map} +1 -1
- package/build/static/js/4029.b169bb60.chunk.js +2 -0
- package/build/static/js/4029.b169bb60.chunk.js.map +1 -0
- package/build/static/js/4265.b63b8852.chunk.js +2 -0
- package/build/static/js/{4265.15b26581.chunk.js.map → 4265.b63b8852.chunk.js.map} +1 -1
- package/build/static/js/{4666.164a8d3a.chunk.js → 4666.586b40a7.chunk.js} +3 -3
- package/build/static/js/{4666.164a8d3a.chunk.js.map → 4666.586b40a7.chunk.js.map} +1 -1
- package/build/static/js/5443.eb1bd9c6.chunk.js +2 -0
- package/build/static/js/{5443.b66d023b.chunk.js.map → 5443.eb1bd9c6.chunk.js.map} +1 -1
- package/build/static/js/5600.81f2aef6.chunk.js +2 -0
- package/build/static/js/{5600.fbe5fb93.chunk.js.map → 5600.81f2aef6.chunk.js.map} +1 -1
- package/build/static/js/5873.55afd19e.chunk.js +2 -0
- package/build/static/js/{5873.6057b4b5.chunk.js.map → 5873.55afd19e.chunk.js.map} +1 -1
- package/build/static/js/{5996.e6d22e26.chunk.js → 5996.b6b4584c.chunk.js} +2 -2
- package/build/static/js/{5996.e6d22e26.chunk.js.map → 5996.b6b4584c.chunk.js.map} +1 -1
- package/build/static/js/{6569.9f6d9777.chunk.js → 6569.25ee0c69.chunk.js} +2 -2
- package/build/static/js/{6569.9f6d9777.chunk.js.map → 6569.25ee0c69.chunk.js.map} +1 -1
- package/build/static/js/6611.07e270e6.chunk.js +2 -0
- package/build/static/js/{6611.ecbae262.chunk.js.map → 6611.07e270e6.chunk.js.map} +1 -1
- package/build/static/js/6779.c1862ff1.chunk.js +2 -0
- package/build/static/js/{6779.4760144b.chunk.js.map → 6779.c1862ff1.chunk.js.map} +1 -1
- package/build/static/js/{6915.5dc9fc8a.chunk.js → 6915.3738b719.chunk.js} +2 -2
- package/build/static/js/{6915.5dc9fc8a.chunk.js.map → 6915.3738b719.chunk.js.map} +1 -1
- package/build/static/js/7121.10fd060f.chunk.js +2 -0
- package/build/static/js/{7121.2431a18a.chunk.js.map → 7121.10fd060f.chunk.js.map} +1 -1
- package/build/static/js/7227.0aee129e.chunk.js +3 -0
- package/build/static/js/{7227.c271e9d9.chunk.js.map → 7227.0aee129e.chunk.js.map} +1 -1
- package/build/static/js/{7790.531652b1.chunk.js → 7790.e1bcb362.chunk.js} +2 -2
- package/build/static/js/{7790.531652b1.chunk.js.map → 7790.e1bcb362.chunk.js.map} +1 -1
- package/build/static/js/{8017.cd3586a7.chunk.js → 8017.0adb338a.chunk.js} +2 -2
- package/build/static/js/{8017.cd3586a7.chunk.js.map → 8017.0adb338a.chunk.js.map} +1 -1
- package/build/static/js/{8725.b2f9157b.chunk.js → 8725.c77c40ca.chunk.js} +2 -2
- package/build/static/js/{8725.b2f9157b.chunk.js.map → 8725.c77c40ca.chunk.js.map} +1 -1
- package/build/static/js/{931.b6f30988.chunk.js → 931.25d5f1b7.chunk.js} +2 -2
- package/build/static/js/{931.b6f30988.chunk.js.map → 931.25d5f1b7.chunk.js.map} +1 -1
- package/build/static/js/{main.f05b1454.js → main.1547f954.js} +2 -2
- package/build/static/js/{main.f05b1454.js.map → main.1547f954.js.map} +1 -1
- package/package.json +1 -1
- package/build/static/css/1151.8a1ea8b2.chunk.css +0 -2
- package/build/static/css/1153.fec83a9b.chunk.css +0 -2
- package/build/static/css/1153.fec83a9b.chunk.css.map +0 -1
- package/build/static/css/1154.3ac979f0.chunk.css +0 -2
- package/build/static/css/1154.3ac979f0.chunk.css.map +0 -1
- package/build/static/css/1454.597915d6.chunk.css +0 -2
- package/build/static/css/1554.e0060527.chunk.css +0 -2
- package/build/static/css/2503.1c697ec5.chunk.css +0 -2
- package/build/static/css/2517.98220b06.chunk.css +0 -2
- package/build/static/css/2716.2ac76682.chunk.css +0 -2
- package/build/static/css/2730.2d0cbb3d.chunk.css +0 -2
- package/build/static/css/289.e6c6f1da.chunk.css +0 -2
- package/build/static/css/3142.3c249a67.chunk.css +0 -2
- package/build/static/css/3333.e42b3e6f.chunk.css +0 -2
- package/build/static/css/3333.e42b3e6f.chunk.css.map +0 -1
- package/build/static/css/4029.78a7d783.chunk.css +0 -2
- package/build/static/css/4029.78a7d783.chunk.css.map +0 -1
- package/build/static/css/4265.1ec41793.chunk.css +0 -2
- package/build/static/css/4265.1ec41793.chunk.css.map +0 -1
- package/build/static/css/4666.33e12ff4.chunk.css +0 -2
- package/build/static/css/5443.28a016be.chunk.css +0 -2
- package/build/static/css/5443.28a016be.chunk.css.map +0 -1
- package/build/static/css/5600.40c7f8d3.chunk.css +0 -2
- package/build/static/css/5873.043a805d.chunk.css +0 -2
- package/build/static/css/6611.132d7bf4.chunk.css +0 -2
- package/build/static/css/6779.63d0647a.chunk.css +0 -2
- package/build/static/css/7121.69995c30.chunk.css +0 -2
- package/build/static/css/7227.e6a66529.chunk.css +0 -2
- package/build/static/css/8017.cbd72a3a.chunk.css +0 -2
- package/build/static/css/8017.cbd72a3a.chunk.css.map +0 -1
- package/build/static/css/931.fc2017c7.chunk.css +0 -2
- package/build/static/css/931.fc2017c7.chunk.css.map +0 -1
- package/build/static/js/1154.dd461e4f.chunk.js +0 -2
- package/build/static/js/1154.dd461e4f.chunk.js.map +0 -1
- package/build/static/js/1454.b69c4181.chunk.js +0 -3
- package/build/static/js/1554.22446df8.chunk.js +0 -3
- package/build/static/js/2503.48a98d11.chunk.js +0 -2
- package/build/static/js/2517.12bffb49.chunk.js +0 -2
- package/build/static/js/2716.1b7d43b2.chunk.js +0 -3
- package/build/static/js/2730.705a15e7.chunk.js +0 -2
- package/build/static/js/3333.ed36409c.chunk.js +0 -2
- package/build/static/js/3333.ed36409c.chunk.js.map +0 -1
- package/build/static/js/36.1c63688d.chunk.js +0 -2
- package/build/static/js/4029.909eb89b.chunk.js +0 -2
- package/build/static/js/4029.909eb89b.chunk.js.map +0 -1
- package/build/static/js/4265.15b26581.chunk.js +0 -2
- package/build/static/js/5443.b66d023b.chunk.js +0 -2
- package/build/static/js/5600.fbe5fb93.chunk.js +0 -2
- package/build/static/js/5873.6057b4b5.chunk.js +0 -2
- package/build/static/js/6611.ecbae262.chunk.js +0 -2
- package/build/static/js/6779.4760144b.chunk.js +0 -2
- package/build/static/js/7121.2431a18a.chunk.js +0 -2
- package/build/static/js/7227.c271e9d9.chunk.js +0 -3
- /package/build/static/js/{1153.3ca5a153.chunk.js.LICENSE.txt → 1153.084c38bb.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1454.b69c4181.chunk.js.LICENSE.txt → 1454.95cc1e18.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1554.22446df8.chunk.js.LICENSE.txt → 1554.3483fb84.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2716.1b7d43b2.chunk.js.LICENSE.txt → 2716.b8095105.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4666.164a8d3a.chunk.js.LICENSE.txt → 4666.586b40a7.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.c271e9d9.chunk.js.LICENSE.txt → 7227.0aee129e.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1454.b69c4181.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1454,4671],{64671:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});s(73884);var r=s(83136),o=s.n(r),l=s(70579);const n=e=>(/^[1-9]+[0-9]*]*$/.test(e.toString())&&(e+="px"),e),c=e=>{let{type:t,colorful:s,className:r,size:c,style:a,prefix:i,..._}=e;const p=((e,t,s)=>"icon-"===t||""===t?(s?"icon-color-":"icon-")+e.replace(/^icon-(color-)?/,""):t+e)(t,i,s),d=o()(r,{iconfont:!s,"iconfont--color":s},p),f=Object.assign({},a,c?{fontSize:n(c)}:{});return s?(0,l.jsx)("svg",{..._,"data-testid":"components-core-iconfont",className:d,style:f,children:(0,l.jsx)("use",{xlinkHref:"#".concat(t),style:{pointerEvents:"none"}})}):(0,l.jsx)("i",{..._,"data-testid":"components-core-iconfont",className:d,style:f})};c.defaultProps={colorful:!1,prefix:""};const a=c},1454:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var r=s(55199),o=s(83136),l=s.n(o),n=s(64671);const c="style_part__+Vw3+__Fo22-",a="style_no-title__nO8sX__Fo22-",i="style_part-title__Uw+4K__Fo22-",_="style_collapse__ARl-O__Fo22-",p="style_is-active__i1zHH__Fo22-",d="style_part-title-sub__fcxT7__Fo22-";var f=s(70579);const u=e=>{let{children:t,className:s,...o}=e;return(0,f.jsx)(r.Collapse,{...o,className:l()(_,"collapse",s),expandIcon:e=>{let{isActive:t}=e;return(0,f.jsx)(n.default,{size:12,className:l()({[p]:t,"is-active":t}),type:"icon-triangle-right"})},children:t})};u.Panel=r.Collapse.Panel;const m=u,y=e=>{let{className:t,children:s,...o}=e;return(0,f.jsx)(r.Space,{...o,className:t,direction:"vertical",size:24,children:s})};y.Part=e=>{let{className:t,title:s,subTitle:o,extra:n,children:_,...p}=e;return(0,f.jsx)(r.Card,{className:l()(c,"part",t,{"no-title":!s,[a]:!s}),bordered:!1,title:s&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:l()("part-title",i),children:s}),o&&(0,f.jsx)("div",{className:l()("part-title-sub",d),children:o})]}),extra:n,...p,children:_})},y.Collapse=m;const x=y},51153:(e,t,s)=>{var r=s(73884),o=Symbol.for("react.element"),l=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(e,t,s){var r,l={},i=null,_=null;for(r in void 0!==s&&(i=""+s),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(_=t.ref),t)n.call(t,r)&&!a.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:i,ref:_,props:l,_owner:c.current}}t.Fragment=l,t.jsx=i,t.jsxs=i},70579:(e,t,s)=>{e.exports=s(51153)}}]);
|
|
3
|
-
//# sourceMappingURL=1454.b69c4181.chunk.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1554.22446df8.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1554,4671],{64671:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});s(73884);var o=s(83136),n=s.n(o),l=s(70579);const r=e=>(/^[1-9]+[0-9]*]*$/.test(e.toString())&&(e+="px"),e),_=e=>{let{type:t,colorful:s,className:o,size:_,style:a,prefix:c,...i}=e;const p=((e,t,s)=>"icon-"===t||""===t?(s?"icon-color-":"icon-")+e.replace(/^icon-(color-)?/,""):t+e)(t,c,s),d=n()(o,{iconfont:!s,"iconfont--color":s},p),f=Object.assign({},a,_?{fontSize:r(_)}:{});return s?(0,l.jsx)("svg",{...i,"data-testid":"components-core-iconfont",className:d,style:f,children:(0,l.jsx)("use",{xlinkHref:"#".concat(t),style:{pointerEvents:"none"}})}):(0,l.jsx)("i",{...i,"data-testid":"components-core-iconfont",className:d,style:f})};_.defaultProps={colorful:!1,prefix:""};const a=_},21554:(e,t,s)=>{s.r(t),s.d(t,{TooltipFetch:()=>S,TooltipInfoLabel:()=>b,default:()=>g});var o=s(55199),n=s(83136),l=s.n(n);const r="style_tooltip__zHGMI__Fo22-",_="style_large__lvmsm__Fo22-",a="style_small__nUt0r__Fo22-",c="style_popup-content__-rKQN__Fo22-",i="style_title__1EQPq__Fo22-",p="style_important-info__qTSZY__Fo22-",d="style_error__yTTq3__Fo22-",f="style_warning__CMJxz__Fo22-",y="style_success__AvJVx__Fo22-",u="style_sub-title__uD8CH__Fo22-",m="style_content__lzgUz__Fo22-",x="style_alone__q6q82__Fo22-",h="style_fetch-content__tEOEV__Fo22-",v="style_fetch-loading__tN-WB__Fo22-",j="style_title-info-icon__iY8Q+__Fo22-";var F=s(70579);const N=e=>{let{overlayClassName:t,title:s,size:n,subtitle:h,content:v,importantInfo:j,importantInfoType:N,moreInfo:g,...O}=e;return(0,F.jsx)(o.Tooltip,{...O,overlayClassName:l()(t,r,{[a]:"small"===n,[_]:"large"===n}),title:(0,F.jsxs)(o.Space,{direction:"vertical",className:c,children:[s&&(0,F.jsx)("div",{className:i,children:s}),j&&(0,F.jsx)("div",{className:l()(p,{[y]:"success"===N,[f]:"warning"===N,[d]:"error"===N}),children:j}),h&&(0,F.jsx)("div",{className:u,children:h}),v&&(0,F.jsx)("div",{className:l()(m,{[x]:[s,h,j,g].every((e=>!e))}),children:v}),g&&(0,F.jsx)("div",{children:g})]})})};N.defaultProps={};const g=N;var O=s(64671);const b=e=>{let{title:t,tooltipTitle:s}=e;return(0,F.jsxs)("div",{children:[t,s?(0,F.jsx)(g,{...s,children:(0,F.jsx)("span",{children:(0,F.jsx)(O.default,{type:"icon-xinxi-miaobian",className:j,size:14})})}):null]})};var C=s(73884),k=s(87558);const w=e=>{let{api:t,children:s,fetchContent:n,showLoading:r,loadingClassName:_,force:a,...c}=e;const[i,p]=(0,C.useState)(!1),d=(0,k.useFetch)(Object.assign({},t,{auto:!1})),{isComplete:f,isLoading:y,data:u,send:m}=d;return(0,F.jsx)(g,{...Object.assign({},c,f?n(u,d):{}),open:i,onOpenChange:async e=>{!e||f&&!a||await m({type:"refresh"}),p(e)},children:(0,F.jsxs)("span",{className:h,children:[s,r&&y?(0,F.jsx)(o.Spin,{size:"small",className:l()(_,v)}):null]})})};w.defaultProps={showLoading:!0};const S=w},51153:(e,t,s)=>{var o=s(73884),n=Symbol.for("react.element"),l=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,_=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,s){var o,l={},c=null,i=null;for(o in void 0!==s&&(c=""+s),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(i=t.ref),t)r.call(t,o)&&!a.hasOwnProperty(o)&&(l[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===l[o]&&(l[o]=t[o]);return{$$typeof:n,type:e,key:c,ref:i,props:l,_owner:_.current}}t.Fragment=l,t.jsx=c,t.jsxs=c},70579:(e,t,s)=>{e.exports=s(51153)}}]);
|
|
3
|
-
//# sourceMappingURL=1554.22446df8.chunk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2503,289,9034,7050],{17342:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(8762),o=n.n(r);n(46733);const s=o()},45362:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Label:()=>v,default:()=>x});var r=n(73884),o=n(55199),s=n(83136),i=n.n(s);const a="style_content__KHqQn__Fo22-",l="style_size-small__RwAEB__Fo22-",c="style_label__EG-qx__Fo22-",u="style_content-content__AkJj-__Fo22-",d="style_item__WV0-i__Fo22-";var f=n(63361),p=n(70579);const v=e=>{let{className:t,children:n,setWidth:o}=e;const s=(0,r.useRef)(null);return(0,r.useRef)(o).current=o,(0,r.useLayoutEffect)((()=>{const e=()=>{if(!s.current)return;const{width:e}=s.current.getBoundingClientRect();o(e)},t=new ResizeObserver(e);return t.observe(s.current),e(),()=>{t.disconnect()}}),[o]),(0,p.jsxs)("div",{ref:s,className:t,children:[n,"\uff1a"]})},_=e=>{let{list:t,labelAlign:n,col:s,gutter:_,className:x,size:b}=e;const h=(0,r.useRef)([]),[j,y]=(0,r.useState)(0);return(0,p.jsx)(o.Row,{"data-testid":"components-core-content",className:i()(a,"content",x,{[l]:"small"===b}),gutter:_,children:t.filter((e=>"function"===typeof e.display?e.display():!1!==e.display)).map(((e,t)=>{let{label:r,content:a,block:l,featureId:_}=e;const x=(0,p.jsx)(o.Col,{span:!0===l?24:24/s,className:d,children:(0,p.jsxs)(o.Space,{className:i()(d,"content-item"),children:[r?(0,p.jsx)("div",{style:j&&"auto"!==n?{minWidth:j,textAlign:n}:null,children:(0,p.jsx)(v,{className:i()(c,"content-label"),setWidth:e=>{h.current[t]=e,y(Math.max(...h.current))},children:r})}):null,(0,p.jsx)("div",{className:i()(u,"content-content"),children:a})]},t)},t);return _?(0,p.jsx)(f.default,{id:_,children:x}):x}))})};_.defaultProps={labelAlign:"left",col:1,gutter:0,list:[]};const x=_},63361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h,useFeatureCall:()=>b});var r=n(73884),o=n(76329),s=n(33097),i=n.n(s),a=n(15797),l=n.n(a),c=n(1488),u=n.n(c),d=n(70579);const f=(e,t,n)=>{e&&(Array.isArray(e)?e.forEach((e=>{f(e,t,n)})):(t(Object.assign({},u()(e,["children"]),{parentId:n})),f(e.children,t,n?n+":"+e.id:e.id)))},p=l()((e=>{const t=(()=>{const t=new Map;return f(e,(e=>{t.set(e.parentId?e.parentId+":"+e.id:e.id,e)})),t})(),n=(e=>Array.from(e.keys()).filter((t=>{const n=e.get(t);return!(Array.isArray(n.dependencies)&&n.dependencies.length>0&&n.dependencies.some((n=>!e.get(t))))})))(t);return{profile:e,features:n,profileMap:t}})),v=(e,t)=>{let{profileMap:n,features:r}=t;const o=n.get(e);return-1!==r.indexOf(e)&&!0!==o.close&&i()(o,"dependencies",[]).every((t=>{const o=n.get(e);return r.indexOf(t)>-1&&!0!==o.close}))},_=(0,r.createContext)(null),{Provider:x}=_,b=e=>{const{features:t,profile:n,profileMap:s,debug:a}=(()=>{const e=(0,o.usePreset)(),{profile:t,debug:n}=i()(e,"features",{debug:!1,profile:{}});return Object.assign({},p(t),{debug:n})})(),l="system"===n.type?n.id:"root",c=(0,r.useContext)(_),u=c?c+":"+e:l+":"+e;return(0,r.useEffect)((()=>{t&&t.length>0&&a&&console.log("[featureId] ".concat(u,",[state] ").concat(v(u,{features:t,profileMap:s})),s.get(u))}),[t,s,a,u]),{isPass:!(e&&t&&t.length>0)||v(u,{features:t,profileMap:s}),currentId:u,feature:s.get(u)}},h=e=>{let{id:t,children:n}=e;const{isPass:r,feature:o,currentId:s}=b(t);return(0,d.jsx)(x,{value:s,children:"function"===typeof n?n({isPass:r,options:r?i()(o,"options"):i()(o,"rejectedOptions"),currentId:s}):r&&n})}},89384:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(55199),o=n(53984),s=n.n(o),i=n(83136),a=n.n(i),l=n(17342),c=n(76329),u=n(64671),d=n(45362);const f={notification:"style_notification__Vv-MM__Fo22-",list:"style_list__l8KOo__Fo22-",header:"style_header__3dcv8__Fo22-",item:"style_item__d92RS__Fo22-","item-box":"style_item-box__dd-Lk__Fo22-","index-1":"style_index-1__f97L0__Fo22-","index-2":"style_index-2__04vAw__Fo22-","item-box-main":"style_item-box-main__lnSak__Fo22-","item-title":"style_item-title__mArMd__Fo22-","level-high":"style_level-high__Uys7Y__Fo22-","level-middle":"style_level-middle__EewyC__Fo22-","level-low":"style_level-low__8kVyL__Fo22-","title-icon":"style_title-icon__1EoAG__Fo22-","item-subtitle":"style_item-subtitle__xeFJs__Fo22-","close-btn":"style_close-btn__7qpG3__Fo22-","is-loading":"style_is-loading__upVL+__Fo22-","item-content":"style_item-content__8MlsG__Fo22-","link-outer":"style_link-outer__kegyZ__Fo22-",link:"style_link__F2CO-__Fo22-","is-last-item":"style_is-last-item__MytRl__Fo22-"};var p=n(73884),v=n(39835),_=n.n(v),x=n(85855),b=n.n(x),h=n(96604),j=n.n(h),y=n(81014),m=n(32520),g=n.n(m),A=n(70579);const w=["high","middle","low"],F=e=>{let{level:t,title:n,groupLength:o,subtitle:s,content:i,link:l,id:p,children:v,className:_}=e;const{setGlobal:x}=(0,c.useGlobalContext)("notification"),{apis:b,ajax:h}=(0,c.usePreset)(),{isLoading:m,callback:w}=(0,y.useLoading)((async()=>{var e;const{data:t}=null!==b&&void 0!==b&&null!==(e=b.notification)&&void 0!==e&&e.read?await h(Object.assign({},b.notification.read,{data:{ids:[p]}})):{data:{code:0}};0===t.code&&x((e=>{const t=((null===e||void 0===e?void 0:e.list)||[]).slice(0),n=g()(t,(e=>p===e.id));return n>-1&&t.splice(n,1),Object.assign({},e,{list:t})}))}));return(0,A.jsxs)("div",{className:a()(f.item,_),style:{"--group-length":Math.min(o,3)||1},children:[o&&o>1&&j()(1,Math.min(o,3)).reverse().map((e=>(0,A.jsx)("div",{className:a()(f["item-box"],f["index-".concat(e)])},e))),(0,A.jsxs)("div",{className:a()(f["item-box"],f["item-box-main"]),children:[(0,A.jsxs)("div",{className:a()(f["item-title"],f["level-".concat(t)]),children:[(0,A.jsx)(u.default,{className:f["title-icon"],type:"high"===t?"icon-tishi":"icon-daiwochuli"}),(0,A.jsx)(r.Typography.Text,{ellipsis:!0,children:n})]}),(0,A.jsxs)("div",{className:f["item-content"],children:[(0,A.jsxs)("div",{className:f["item-subtitle"],children:[(0,A.jsx)(r.Typography.Text,{ellipsis:!0,children:s||""}),(0,A.jsx)(u.default,{className:a()(f["close-btn"],{[f["is-loading"]]:m}),type:"icon-close-thin",onClick:()=>{m||p&&w()}})]}),Array.isArray(i)?(0,A.jsx)(d.default,{list:i,labelAlign:"auto",size:"small"}):v]}),l&&(0,A.jsx)("div",{className:f["link-outer"],children:(0,A.jsx)(y.default,{className:f.link,size:"small",onClick:async()=>{var e;const{data:t}=null!==b&&void 0!==b&&null!==(e=b.notification)&&void 0!==e&&e.read?await h(Object.assign({},b.notification.read,{data:{ids:[p]}})):{data:{code:0}};0===t.code&&window.open(l)},children:"\u67e5\u770b\u8be6\u60c5"})})]})]})};F.defaultProps={level:"low"};const O=()=>{const{global:e,setGlobal:t}=(0,c.useGlobalContext)("notification"),n=(0,p.useRef)(),{apis:o,ajax:i}=(0,c.usePreset)(),[u,d]=(0,p.useState)(32);(0,p.useEffect)((()=>{var e;n.current&&d(null===(e=n.current)||void 0===e?void 0:e.clientHeight)}),[]);const{list:v,expand:x}=Object.assign({},{expand:!1,list:[]},e),h=(0,p.useMemo)((()=>{const e=_()(v,(e=>e.level||"low"));return w.map((t=>e[t]||[]))}),[v]);return 0===v.length?null:(0,A.jsxs)("div",{className:f.notification,style:{"--head-option-height":"".concat(u,"px")},children:[(0,A.jsx)("div",{ref:n,children:(0,A.jsxs)(r.Row,{justify:"end",wrap:!1,className:f.header,gutter:8,children:[h.some((e=>e.length>1))&&(0,A.jsx)(r.Col,{children:(0,A.jsx)(r.Button,{size:"small",onClick:()=>{t(Object.assign({},e,{expand:!x}))},children:x?"\u5168\u90e8\u6298\u53e0":"\u5168\u90e8\u5c55\u5f00"})}),(0,A.jsx)(r.Col,{children:(0,A.jsx)(y.default,{type:"primary",size:"small",onClick:async()=>{var n;const{data:r}=null!==o&&void 0!==o&&null!==(n=o.notification)&&void 0!==n&&n.read?await i(Object.assign({},o.notification.read,{data:{ids:v.map((e=>e.id)).filter((e=>!!e))}})):{data:{code:0}};0===r.code&&t(Object.assign({},e,{list:[]}))},children:"\u5168\u90e8\u6e05\u9664"})})]})}),(0,A.jsx)(l.A,{className:f.list,children:(0,A.jsx)(s(),{leaveReverse:!0,duration:200,interval:20,children:h.filter((e=>e&&e.length>0)).map(((e,t)=>{var n;if(x)return e.map(((n,r)=>{var o;return n&&(0,A.jsx)("div",{children:(0,A.jsx)(F,{...Object.assign({},n),className:a()({[f["is-last-item"]]:+t+1===Math.min(null===(o=h.filter((e=>e&&e.length)))||void 0===o?void 0:o.length,3)&&r===(null===e||void 0===e?void 0:e.length)-1})})},"group-".concat(t,"-").concat(r))}));const r=b()(e);return(0,A.jsx)("div",{children:(0,A.jsx)(F,{...Object.assign({},r),groupLength:e.length,className:a()({[f["is-last-item"]]:(null===h||void 0===h?void 0:h.length)&&+t+1===Math.min(null===(n=h.filter((e=>e&&e.length)))||void 0===n?void 0:n.length,3)})})},"group-".concat(t,"-0"))}))})})]})}},94710:e=>{e.exports=function(e,t,n,r){for(var o=-1,s=null==e?0:e.length;++o<s;){var i=e[o];t(r,i,n(i),e)}return r}},32952:(e,t,n)=>{var r=n(45652);e.exports=function(e,t,n,o){return r(e,(function(e,r,s){t(o,e,n(e),s)})),o}},51104:(e,t,n)=>{var r=n(96614),o=n(28673);e.exports=function(e,t){return e&&r(t,o(t),e)}},55119:(e,t,n)=>{var r=n(96614),o=n(30474);e.exports=function(e,t){return e&&r(t,o(t),e)}},97132:(e,t,n)=>{var r=n(5538),o=n(80726),s=n(78420),i=n(51104),a=n(55119),l=n(44353),c=n(91980),u=n(98124),d=n(29075),f=n(59395),p=n(68592),v=n(26924),_=n(38268),x=n(18630),b=n(20310),h=n(54052),j=n(44543),y=n(57887),m=n(46686),g=n(45921),A=n(28673),w=n(30474),F="[object Arguments]",O="[object Function]",k="[object Object]",N={};N[F]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[k]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[O]=N["[object WeakMap]"]=!1,e.exports=function e(t,n,M,C,I,S){var R,E=1&n,P=2&n,L=4&n;if(M&&(R=I?M(t,C,I,S):M(t)),void 0!==R)return R;if(!m(t))return t;var G=h(t);if(G){if(R=_(t),!E)return c(t,R)}else{var U=v(t),z=U==O||"[object GeneratorFunction]"==U;if(j(t))return l(t,E);if(U==k||U==F||z&&!I){if(R=P||z?{}:b(t),!E)return P?d(t,a(R,t)):u(t,i(R,t))}else{if(!N[U])return I?t:{};R=x(t,U,E)}}S||(S=new r);var B=S.get(t);if(B)return B;S.set(t,R),g(t)?t.forEach((function(r){R.add(e(r,n,M,r,t,S))})):y(t)&&t.forEach((function(r,o){R.set(o,e(r,n,M,o,t,S))}));var V=G?void 0:(L?P?p:f:P?w:A)(t);return o(V||t,(function(r,o){V&&(r=t[o=r]),s(R,o,e(r,n,M,o,t,S))})),R}},45652:(e,t,n)=>{var r=n(94664),o=n(76516)(r);e.exports=o},75816:e=>{e.exports=function(e,t,n,r){for(var o=e.length,s=n+(r?1:-1);r?s--:++s<o;)if(t(e[s],s,e))return s;return-1}},80755:(e,t,n)=>{var r=n(48895),o=n(77116);e.exports=function e(t,n,s,i,a){var l=-1,c=t.length;for(s||(s=o),a||(a=[]);++l<c;){var u=t[l];n>0&&s(u)?n>1?e(u,n-1,s,i,a):r(a,u):i||(a[a.length]=u)}return a}},5791:(e,t,n)=>{var r=n(26924),o=n(22761);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},20449:(e,t,n)=>{var r=n(26924),o=n(22761);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},53871:e=>{e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++r<o;)s[r]=e[r+t];return s}},88140:(e,t,n)=>{var r=n(35324),o=n(74065),s=n(21676),i=n(70914);e.exports=function(e,t){return t=r(t,e),null==(e=s(e,t))||delete e[i(o(t))]}},6806:(e,t,n)=>{var r=n(61516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},18962:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},11295:(e,t,n)=>{var r=n(9812),o=r?r.prototype:void 0,s=o?o.valueOf:void 0;e.exports=function(e){return s?Object(s.call(e)):{}}},98124:(e,t,n)=>{var r=n(96614),o=n(69621);e.exports=function(e,t){return r(e,o(e),t)}},29075:(e,t,n)=>{var r=n(96614),o=n(56326);e.exports=function(e,t){return r(e,o(e),t)}},19449:(e,t,n)=>{var r=n(94710),o=n(32952),s=n(9096),i=n(54052);e.exports=function(e,t){return function(n,a){var l=i(n)?r:o,c=t?t():{};return l(n,e,s(a,2),c)}}},76516:(e,t,n)=>{var r=n(6571);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var s=n.length,i=t?s:-1,a=Object(n);(t?i--:++i<s)&&!1!==o(a[i],i,a););return n}}},96761:(e,t,n)=>{var r=n(12322);e.exports=function(e){return r(e)?void 0:e}},15857:(e,t,n)=>{var r=n(20819),o=n(55636),s=n(46350);e.exports=function(e){return s(o(e,void 0,r),e+"")}},68592:(e,t,n)=>{var r=n(4262),o=n(56326),s=n(30474);e.exports=function(e){return r(e,s,o)}},56326:(e,t,n)=>{var r=n(48895),o=n(85990),s=n(69621),i=n(57828),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,s(e)),e=o(e);return t}:i;e.exports=a},38268:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},18630:(e,t,n)=>{var r=n(61516),o=n(6806),s=n(18962),i=n(11295),a=n(38710);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return s(e);case"[object Symbol]":return i(e)}}},77116:(e,t,n)=>{var r=n(9812),o=n(22777),s=n(54052),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||o(e)||!!(i&&e&&e[i])}},21676:(e,t,n)=>{var r=n(52969),o=n(53871);e.exports=function(e,t){return t.length<2?e:r(e,o(t,0,-1))}},32520:(e,t,n)=>{var r=n(75816),o=n(9096),s=n(99140),i=Math.max;e.exports=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var l=null==n?0:s(n);return l<0&&(l=i(a+l,0)),r(e,o(t,3),l)}},85855:(e,t,n)=>{e.exports=n(96483)},20819:(e,t,n)=>{var r=n(80755);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},39835:(e,t,n)=>{var r=n(71775),o=n(19449),s=Object.prototype.hasOwnProperty,i=o((function(e,t,n){s.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=i},96483:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},57887:(e,t,n)=>{var r=n(5791),o=n(47574),s=n(56832),i=s&&s.isMap,a=i?o(i):r;e.exports=a},45921:(e,t,n)=>{var r=n(20449),o=n(47574),s=n(56832),i=s&&s.isSet,a=i?o(i):r;e.exports=a},74065:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},1488:(e,t,n)=>{var r=n(50149),o=n(97132),s=n(88140),i=n(35324),a=n(96614),l=n(96761),c=n(15857),u=n(68592),d=c((function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,(function(t){return t=i(t,e),c||(c=t.length>1),t})),a(e,u(e),n),c&&(n=o(n,7,l));for(var d=t.length;d--;)s(n,t[d]);return n}));e.exports=d},99140:(e,t,n)=>{var r=n(37303);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},46733:()=>{}}]);
|
|
2
|
-
//# sourceMappingURL=2503.48a98d11.chunk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2517,9034],{17342:(e,o,t)=>{t.d(o,{A:()=>s});var l=t(8762),n=t.n(l);t(46733);const s=n()},3382:(e,o,t)=>{t.r(o),t.d(o,{ModalButton:()=>O,TabsModal:()=>P,TabsModalButton:()=>A,default:()=>F,useConfirmModal:()=>N,useModal:()=>v,useTabsModal:()=>M});var l=t(73884),n=t(55199),s=t(83136),i=t.n(s);const r={modal:"style_modal__Pm3cF__Fo22-",large:"style_large__iaqVE__Fo22-","modal-body-inner":"style_modal-body-inner__4PhpA__Fo22-","modal-title":"style_modal-title__dswaw__Fo22-","modal-outer":"style_modal-outer__r3SkX__Fo22-","modal-body":"style_modal-body__jQJSI__Fo22-","right-options-modal":"style_right-options-modal__FajDP__Fo22-","right-options-row":"style_right-options-row__-mPb9__Fo22-","right-options-col":"style_right-options-col__3ilee__Fo22-","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__Fo22-",content:"style_content__k6MIF__Fo22-","modal-footer":"style_modal-footer__-prbN__Fo22-","modal-close":"style_modal-close__Oa5Kl__Fo22-","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__Fo22-","is-danger":"style_is-danger__H5110__Fo22-",title:"style_title__orTym__Fo22-","has-title":"style_has-title__qy0Wp__Fo22-"},a=e=>({"en-US":()=>t.e(4628).then(t.bind(t,74628)),"zh-CN":()=>t.e(7478).then(t.bind(t,87478))}[e]());var c=t(58609),d=t(64671);const m=(e,o)=>"function"===typeof e?e(o):e;var h=t(81014),_=t(17342),u=t(70579);const p="Modal",f=e=>{let{options:o,children:t}=e;return o?(0,u.jsxs)(n.Row,{wrap:!1,className:r["right-options-row"],children:[(0,u.jsx)(n.Col,{span:18,className:r["right-options-col"],children:t}),(0,u.jsx)(n.Col,{span:6,className:r["right-options-col"],children:o})]}):t},y=(e,o)=>"".concat(e-48-(o?58:0),"px"),g=(e,o)=>"large"===e?{width:"".concat(Math.min(window.innerWidth-64,1500),"px"),style:{"--min-modal-height":y(500,o)}}:"small"===e?{width:"600px",style:{"--min-modal-height":y(300,o)}}:{width:"1000px",style:{"--min-modal-height":y(500,o)}},C=e=>{let{footer:o,footerButtons:t,onConfirm:s,onCancel:i,onClose:r,targetProps:d}=e;return(0,u.jsxs)(n.Row,{gutter:10,wrap:!1,children:[(0,u.jsx)(n.Col,{flex:1,children:o}),Array.isArray(t)&&0===t.length?null:(0,u.jsx)(n.Col,{children:(0,u.jsx)(n.Space,{children:(t||[{children:(0,u.jsx)(c.IntlProvider,{importMessages:a,moduleName:p,children:(0,u.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:p})}),onClick:i},{type:"primary",children:(0,u.jsx)(c.IntlProvider,{importMessages:a,moduleName:p,children:(0,u.jsx)(c.FormattedMessage,{id:"Confirm",moduleName:p})}),onClick:s}]).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,o)=>{let{ButtonComponent:t,onClick:n,autoClose:s=!0,display:i,...a}=e;const c=t||h.default;return(0,l.createElement)(c,{...a,key:o,onClick:async function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];const l=await Promise.resolve(n&&n(...o,d));return s&&!1!==l&&r&&r(),l}})}))})})]})},b=e=>{let{title:o,footer:t,disabledScroller:s,footerButtons:a,onClose:c,closable:m,onConfirm:h,onCancel:p,children:f,targetProps:y}=e;const g=(0,l.useRef)(null);return(0,u.jsxs)("div",{className:r["modal-outer"],"data-testid":"components-core-modal",children:[!1===m?null:(0,u.jsx)(n.Button,{"data-testid":"components-core-modal-close-btn",className:r["modal-close"],type:"text",icon:(0,u.jsx)(d.default,{type:"icon-close-thin"}),onClick:e=>{e.stopPropagation(),c&&c()}}),o&&(0,u.jsx)("div",{className:r["modal-title"],children:o}),(0,u.jsx)(_.A,{className:i()(r["modal-body"],{[r["is-disabled-scroller"]]:s},"modal-body"),ref:g,children:(0,u.jsx)("div",{className:i()(r["modal-body-inner"],"modal-body-inner"),children:f})}),null!==t||a?(0,u.jsx)("div",{className:i()(r["modal-footer"],"modal-footer"),children:(0,u.jsx)(C,{footer:t,footerButtons:a,onConfirm:h,onCancel:p,onClose:c,targetProps:y})}):null]})},j=e=>{let{withDecorator:o,footerButtons:t,title:l,closable:n,onClose:s,onConfirm:i,onCancel:r,footer:a,rightOptions:c,disabledScroller:d,childrenRef:h,children:_}=e;const p=e=>(e=Object.assign({},{title:l},e),(0,u.jsx)(b,{title:m(e.title,{...e,childrenRef:h,close:s}),closable:n,onClose:s,onConfirm:i,onCancel:r,footerButtons:m(t,{...e,close:s}),disabledScroller:d,footer:m(a,{...e,childrenRef:h,close:s}),targetProps:Object.assign({},e,{childrenRef:h,close:s}),children:(0,u.jsx)(f,{options:m(c,{...e,childrenRef:h,close:s}),children:m(_,{...e,childrenRef:h,close:s})})}));return"function"===typeof o?o(p):p({})},x=e=>{let{children:o,rightOptions:t,footer:l,footerButtons:n,className:s,size:d,title:m,onClose:h,onConfirm:_,onCancel:p,closable:f,disabledScroller:y,withDecorator:C,childrenRef:b,...x}=e;return{...x,icon:null,centered:!0,title:null,maskClosable:!!x.hasOwnProperty("maskClosable")&&x.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:h,className:i()(s,r.modal,r[d],{[r["right-options-modal"]]:t}),...g(d,!(null===l&&!n)),children:(0,u.jsx)(c.IntlProvider,{importMessages:a,moduleName:"Modal",children:j({withDecorator:C,title:m,closable:f,onClose:h,onConfirm:_,onCancel:p,footer:l,footerButtons:n,rightOptions:t,disabledScroller:y,children:o,childrenRef:b})})}},w=e=>{const o=(0,l.useRef)(null);return(0,u.jsx)(n.Modal,{...x(Object.assign({},e,{childrenRef:o}))})};w.defaultProps={size:"default"};const v=()=>{const{modal:e}=n.App.useApp(),o=(0,l.useRef)(null);return t=>{const l={},{children:n,...s}=x({onClose:()=>l.close(),childrenRef:o,...t}),{destroy:i}=e.info({...s,content:n});return l.close=i,l}},N=()=>{const{modal:e}=n.App.useApp();return o=>{const t={},{type:l,icon:s,title:a,danger:c,wrapClassName:m,message:h,iconSetting:_={},confirmType:p="info",...f}={onClose:()=>t.close(),maskClosable:!1,...o},y=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},_);if(e[l]){const{destroy:o}=e[l]({...f,icon:null,wrapClassName:i()(r["confirm-modal-wrap"],m,{[r["is-danger"]]:c}),title:(0,u.jsx)(n.Space,{direction:"vertical",onClick:e=>{e.stopPropagation()},children:a&&(0,u.jsxs)(n.Space,{size:0,align:"start",className:r.title,children:[c?(0,u.jsx)(d.default,{className:i()("title-icon","title-icon-".concat("confirm"===l?p:l)),type:s||y["confirm"===l?p:l]}):null,a]})}),content:(0,u.jsxs)(n.Space,{size:0,align:"start",className:i()(r.content,{[r["has-title"]]:a}),children:[!a&&c?(0,u.jsx)(d.default,{className:i()("title-icon","title-icon-".concat("confirm"===l?p:l)),type:s||y["confirm"===l?p:l]}):null,h]})});t.close=o}return t}},F=w,k=e=>{let{items:o,className:t,activeKey:l,withDecorator:s,defaultActiveKey:r,onChange:a,...c}=e;return{...c,className:i()(t,"tabs-modal"),withDecorator:e=>{const t=t=>(0,u.jsx)(n.Tabs,{items:o.map((o=>{let{withDecorator:l,...n}=o;return Object.assign({},n,{children:"function"===typeof l?l((o=>e(Object.assign({},t,o,{children:n.children})))):e(Object.assign({},t,{children:n.children}))})})),destroyInactiveTabPane:!0,activeKey:l,defaultActiveKey:r,onChange:a});return"function"===typeof s?s(t):t()},children:e=>{let{children:o,...t}=e;return"function"===typeof o?o(t):o}}},P=e=>(0,u.jsx)(F,{...k(e)}),M=()=>{const e=v();return o=>e(k(o))};var R=t(73025);const A=e=>{const o=M();return(0,u.jsx)(R.A,{...e,modalFunc:o})},O=e=>{const o=v();return(0,u.jsx)(R.A,{...e,modalFunc:o})}},46733:()=>{}}]);
|
|
2
|
-
//# sourceMappingURL=2517.12bffb49.chunk.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 2716.1b7d43b2.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2716],{62716:(t,e,r)=>{r.r(e),r.d(e,{default:()=>u});var s=r(73884),o=r(83136),a=r.n(o);const l={"state-tag":"style_state-tag__Kx27z__Fo22-","state-result-tag":"style_state-result-tag__CssDz__Fo22-","state-skill-tag":"style_state-skill-tag__k0bQE__Fo22-","state-tag-filter-result-wrapper":"style_state-tag-filter-result-wrapper__QYS5z__Fo22-","state-tag-filter-name":"style_state-tag-filter-name__iJaJd__Fo22-","state-tag-filterResult":"style_state-tag-filterResult__KTkot__Fo22-","show-bg":"style_show-bg__OcL+R__Fo22-","tag-text":"style_tag-text__JHCt+__Fo22-","state-tag-wrapper":"style_state-tag-wrapper__A-gTE__Fo22-"};var _=r(55199),n=r(70579);const c={default:"#666666",skill:{color:"#666666",borderColor:"#EEEEEE"},result:"#666666",filterResult:"#5CB8B2",success:"#027A48",progress:"#F09700",danger:"#D14343",info:"#155ACF",other:"#6740C3"},i=t=>{let{showBorder:e,text:r,type:o,showBackground:i,className:u,filterName:p,...g}=t;const d=(0,s.useMemo)((()=>{var t,e;return{color:(null===c||void 0===c||null===(t=c[o])||void 0===t?void 0:t.color)||c[o],borderColor:(null===c||void 0===c||null===(e=c[o])||void 0===e?void 0:e.borderColor)||c[o]}}),[o]);return(0,n.jsxs)(_.Space,{"data-testid":"components-core-state-tag",className:a()(l["state-tag-wrapper"],"filterResult"===o?l["state-tag-filter-result-wrapper"]:""),align:"center",size:4,children:[p?(0,n.jsxs)("span",{className:l["state-tag-filter-name"],children:[p,":"]}):null,(0,n.jsx)(_.Tag,{color:d.color,...g,style:{background:i?d.color+"0F":"none",color:d.color,border:e?"1px solid ".concat(d.borderColor):"none"},className:a()(l["state-tag"],u,"result"===o?l["state-result-tag"]:"","skill"===o?l["state-skill-tag"]:"",l["state-tag-".concat(o)],i?l["show-bg"]:"",e?l["show-border"]:""),children:(0,n.jsx)("span",{className:l["tag-text"],children:r})})]})};i.defaultProps={color:"#666666",type:"default",showBorder:!1,showBackground:!0,text:"",className:""};const u=i},51153:(t,e,r)=>{var s=r(73884),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,_=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var s,a={},c=null,i=null;for(s in void 0!==r&&(c=""+r),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(i=e.ref),e)l.call(e,s)&&!n.hasOwnProperty(s)&&(a[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===a[s]&&(a[s]=e[s]);return{$$typeof:o,type:t,key:c,ref:i,props:a,_owner:_.current}}e.Fragment=a,e.jsx=c,e.jsxs=c},70579:(t,e,r)=>{t.exports=r(51153)}}]);
|
|
3
|
-
//# sourceMappingURL=2716.1b7d43b2.chunk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2730,9034,8725],{18411:(e,t,a)=>{a.d(t,{A:()=>r});a(73884);const r=a.p+"static/media/defaultAvatar.b1f2a8046cc7bee36d9a404ce6a0a1d7.svg"},97211:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(87558),n=a.n(r),s=a(76329),i=a(34677),o=a.n(i),l=a(70579);const c=e=>{const t=t=>{let{id:a,url:r,error:i,apis:c,loading:d,...u}=t;const{apis:m}=(0,s.usePreset)(),p=o()({},m,c);if(!a)return null;if(!p.oss)throw new Error("\u8bf7\u5728Global\u7ec4\u4ef6\u8bbe\u7f6epreset.apis.oss\u53c2\u6570");const{paramsType:g,paramsName:f,..._}=Object.assign({paramsType:"params",paramsName:"id"},p.oss),h={};return h[g]={[f]:a},(0,l.jsx)(n(),{...Object.assign({},_,h),updateType:"refresh",error:i,loading:d,cache:"oss-file",ttl:6e6,render:t=>{let{data:r}=t;return(0,l.jsx)(e,{...u,id:a,data:r})}})};return t.defaultProps={loading:null},t}},40438:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var r=a(87558),n=a.n(r),s=a(97211),i=a(64671),o=a(83136),l=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 r=new window.Image;r.src=a,r.addEventListener("load",(()=>{e(a)})),r.addEventListener("error",(e=>{t(e)}))}))},m="style_img-outer__4QLY5__Fo22-",p="style_img__PSExq__Fo22-",g="style_loading__WCOwA__Fo22-",f="style_error__+ECgZ__Fo22-";var _=a(18411),h=a(70579);const x=e=>{let{data:t,className:a,alt:r,innerLoading:s,loading:i,error:o,innerError:c,children:d,onClick:m}=e;return(0,h.jsx)(n(),{loader:u,params:{data:t},error:c||o,loading:s||i,render:e=>{let{data:t}=e;return"function"===typeof d?d({alt:r,className:l()(a,p),src:t}):(0,h.jsx)("img",{alt:r,className:l()(a,p),src:t,onClick:m})}})},v=(0,s.A)(x),j=e=>{let{loading:t,error:a,src:r,id:n,alt:s,className:i,children:o,apis:l,onClick:c}=e;const u=t&&(0,d.cloneElement)(t,{className:g}),m=a&&(0,d.cloneElement)(a,{className:f});return r?(0,h.jsx)(x,{alt:s,className:i,data:r,loading:u,error:m,onClick:c,children:o}):n?(0,h.jsx)(v,{alt:s,className:i,id:n,loading:u,innerLoading:u,error:m,innerError:m,apis:l,onClick:c,children:o}):m},y=e=>{let{id:t,src:a,alt:r,onClick:n,loading:s,error:i,className:o,apis:c,...d}=e;return(0,h.jsx)("div",{...d,"data-testid":"components-core-image",className:l()(o,m),children:j({loading:s,error:i,src:a,id:t,alt:r,className:o,apis:c,onClick:n})})};y.Avatar=e=>{let{id:t,src:a,alt:r,gender:n,loading:s,error:o,className:d,gap:u,icon:p,children:g,shape:f,size:_,width:x,height:v,defaultAvatar:y,apis:N,...b}=e;const w=(()=>{const e=x&&v?{style:{width:x,height:v}}:{size:_};if(x&&x!==v&&(f="square"),t||a)return j({loading:s,error:o,src:a,defaultAvatar:y,id:t,alt:r,className:d,apis:N,children:t=>(0,h.jsx)(c.Avatar,{...t,gap:u,shape:f,...e})});if(n){const t=n&&["F","female","f"].indexOf(n)>-1?"icon-color-touxiang-nv":"icon-color-touxiang-nan";return(0,h.jsx)(c.Avatar,{...b,src:(0,h.jsx)(i.default,{role:"touxiang",colorful:!0,type:t}),gap:u,shape:f,...e})}return(0,h.jsx)(c.Avatar,{...b,gap:u,icon:p,shape:f,size:_,src:y,...e,children:g})})();return(0,h.jsx)("div",{...b,"data-testid":"components-core-image-avatar",className:l()(d,m),style:{width:x&&v?x:_,height:x&&v?v:_},children:w})};const N={error:(0,h.jsx)(i.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),loading:(0,h.jsx)(c.Skeleton.Avatar,{shape:"square",active:!0})};y.defaultProps=Object.assign({},N),y.Avatar.defaultProps=Object.assign({},N,{size:100,defaultAvatar:_.A});const b=y},79329:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C,navigationHeight:()=>k});var r=a(55199),n=a(94679),s=a(33097),i=a.n(s),o=a(73884),l=a(83136),c=a.n(l);const d=a.p+"static/media/favicon.477a5bb996fd5b367fe0dddc29f67824.svg";var u=a(40438);const m=e=>({"en-US":()=>a.e(257).then(a.bind(a,30257)),"zh-CN":()=>a.e(5671).then(a.bind(a,5671))}[e]());var p=a(58609),g=a(64671);const f="style_navigation-wrap__VF8x2__Fo22-",_="style_navigation__60RrS__Fo22-",h="style_is-fixed__kHFWj__Fo22-",x="style_navigation-logo__q9qHu__Fo22-",v="style_logo__lB9RC__Fo22-",j="style_navigation-list__EYtkg__Fo22-",y="style_navigation-options__0BdJU__Fo22-",N="style_more-icon__gNMnt__Fo22-";var b=a(70579);const{Header:w}=r.Layout,k=48,A=e=>{let{name:t,mapping:a,defaultTitle:r}=e;const n=(0,o.useRef)({mapping:a,defaultTitle:r});return(0,o.useEffect)((()=>{const e=i()(n.current.mapping.get(t),"title");document.title=(e?e+"-":"")+n.current.defaultTitle}),[t]),null},F=e=>{let{permissions:t,list:a,headerLogo:s,rightOptions:l,isFixed:k,showIndex:F,indexLabel:C,defaultTitle:E,overflowedIndicator:O,base:L,onChange:T,className:M}=e;const P=(0,o.useMemo)((()=>new Map(a.map((e=>{let{key:t,...a}=e;return[t,a]})))),[a]),z=(0,n.useNavigate)(),I=(0,n.useLocation)(),R=(0,o.useRef)(),S=(0,o.useRef)(null),[q,H]=(0,o.useState)("\u66f4\u591a"),B=I.pathname.replace(new RegExp("^".concat(L)),"").split("/")[1],U=B?i()(Array.from(P.entries()).find((e=>{let[a,{path:r,permission:n}]=e;return-1!==("function"===typeof r?r(n,t):r).indexOf("/"+B)})),"[0]"):"home";(0,o.useEffect)((()=>{const e=()=>{if(R.current){const e=R.current.querySelectorAll("li[data-menu-id]");let t=!1;for(let r=0;r<e.length;r++){if(-1!==e[r].getAttribute("data-menu-id").indexOf(U)){t=!0;break}}let a=P.get(U)&&!t?i()(P.get(U),"title"):"";H(a)}},t={attributes:!0,childList:!0,subtree:!0};return R&&R.current&&(e(),S.current&&S.current.disconnect(),S.current=new MutationObserver(e),S.current.observe(R.current,t)),()=>{S.current&&S.current.disconnect()}}),[U,P]);const W=!!F&&{label:C||(0,b.jsx)(p.FormattedMessage,{id:"indexLabel",moduleName:"Navigation"}),key:"home",onClick:()=>{T&&T("/"),setTimeout((()=>{z("/")}),0)}};return(0,b.jsxs)(p.IntlProvider,{importMessages:m,moduleName:"Navigation",children:[(0,b.jsx)(p.FormattedMessage,{id:"defaultTitle",moduleName:"Navigation",children:e=>(0,b.jsx)(A,{defaultTitle:E||e,mapping:P,name:U})}),(0,b.jsx)("div",{className:c()(f,M),children:(0,b.jsx)(w,{className:c()("navigation",_,{[h]:k}),children:(0,b.jsxs)(r.Row,{justify:"space-around",wrap:!1,children:[(0,b.jsx)(r.Col,{className:c()("navigation-logo",x),children:(0,b.jsx)(u.default,{className:c()(v),src:d,alt:"logo",...s})}),(0,b.jsx)(r.Col,{ref:R,flex:1,className:c()("navigation-list",j),children:(0,b.jsx)(r.Menu,{selectedKeys:[U],mode:"horizontal",overflowedIndicator:O||(0,b.jsxs)(r.Space,{size:4,children:[(0,b.jsx)("span",{children:q||(0,b.jsx)(p.FormattedMessage,{id:"overflowedIndicator",moduleName:"Navigation"})}),(0,b.jsx)("span",{className:N,children:(0,b.jsx)(g.default,{type:"icon-arrow-thin-down"})})]}),items:[W,...Array.from(P.entries()).filter((e=>{let[a,{permission:r}]=e;if("string"===typeof r)return t.indexOf(r)>-1;if("function"===typeof r)return r(t);if(Array.isArray(r)){for(let e of r)if(t.indexOf(e)>-1)return!0;return!1}return!0})).map((e=>{let[a,{title:r,path:n,permission:s}]=e;const i="function"===typeof n?n(s,t):n;return{label:r,key:a,onClick:()=>{T&&T(i),setTimeout((()=>{z(i)}),0)}}}))]})}),(0,b.jsx)(r.Col,{className:y,children:l})]})})})]})};F.defaultProps={isFixed:!0,permissions:[],list:[],showIndex:!0,base:""};const C=F}}]);
|
|
2
|
-
//# sourceMappingURL=2730.705a15e7.chunk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[3333,1151,9034],{10419:(e,t,s)=>{s.r(t),s.d(t,{HtmlPreview:()=>f,ImagePreview:()=>L,OSSFilePreview:()=>C,OfficePreview:()=>g,PdfPreview:()=>S,TextPreview:()=>k,UnknownPreview:()=>b,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__Fo22-",d="style_loading__r3aiE__Fo22-",m="style_text-outer__TzhuG__Fo22-",u="style_error__wSaxt__Fo22-";var h=s(87558),p=s(70579);const x=(0,h.createWithFetch)({transformResponse:e=>{let{data:t}=e;return{data:{code:200,results:t}}}})((e=>{let{data:t}=e;const s=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const e=(new DOMParser).parseFromString(t,"text/html");e.querySelectorAll("script").forEach((e=>{e.parentElement.removeChild(e)}));const r=(0,c.getPublicPath)("components-core")+"/iframeResizer.contentWindow.js",a=document.createElement("script");a.src=r,e.head.appendChild(a);const n=document.createElement("style");n.innerText="html,body{height:auto!important;}body{pointer-events: none;background: #FFFFFF;}",e.head.appendChild(n),s.current.srcdoc=e.documentElement.outerHTML}),[t]),(0,n.useEffect)((()=>{a().iframeResize({checkOrigin:!1},s.current)}),[]),(0,p.jsx)("iframe",{title:"\u7b80\u5386\u9884\u89c8",frameBorder:"0",width:"100%",ref:s})})),f=e=>{let{className:t,url:s,maxWidth:r}=e;return(0,p.jsx)("div",{className:l()(t,i),style:{maxWidth:r},children:(0,p.jsx)(x,{url:s})})};var j=s(76329);const v=(0,h.createWithFetch)({cache:"office-preview"})((e=>{let{data:t,className:s,...r}=e;const{data:a}=t;return a.map((e=>{let{url:t}=e;const a=T(t);return(0,n.createElement)(a,{...r,url:t,key:t,className:s})}))})),g=e=>{let{id:t,apis:s,className:r,...a}=e;const{apis:n}=(0,j.usePreset)(),c=Object.assign({},n,s);return(0,p.jsx)(v,{...a,...c.previewOffice,data:{id:t},className:r})};var _=s(55199),N=s(39165),w=(s(71975),s(36));const P=(0,n.memo)((e=>{let{url:t,maxWidth:s,scale:r,rotate:a,className:o}=e;const[m,u]=(0,n.useState)(0);N.pdfjs.GlobalWorkerOptions.workerSrc=(0,c.getPublicPath)("components-core")+"/pdfjs/build/pdf.worker.js";const[h,x]=(0,n.useState)(s),f=(0,w.useResize)((()=>{f.current&&f.current.clientWidth&&x(Math.min(f.current.clientWidth,s))}));return(0,p.jsx)("div",{ref:f,className:l()(o,i),style:{maxWidth:s},children:(0,p.jsx)(N.Document,{file:{url:t},options:{standardFontDataUrl:(0,c.getPublicPath)("components-core")+"/pdfjs/standard_fonts/",cMapUrl:(0,c.getPublicPath)("components-core")+"/pdfjs/cmaps/",cMapPacked:!0},error:"PDF\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25",loading:(0,p.jsx)("div",{className:d,children:(0,p.jsx)(_.Spin,{})}),noData:"\u672a\u6307\u5b9aPDF\u6587\u4ef6",onLoadSuccess:e=>{let{numPages:t}=e;u(t),console.log("onLoadSuccess")},onLoadError:e=>{console.log("onLoadError",e)},onSourceError:e=>{console.log("onSourceError",e)},children:(0,p.jsx)(_.Space,{direction:"vertical",children:m>=1&&Array.from(new Array(m),((e,t)=>(0,p.jsx)(N.Page,{className:"preview-item",scale:r/100,rotate:a,pageNumber:t+1,width:h,loading:null,renderAnnotationLayer:!1,renderTextLayer:!0,noData:"\u672a\u6307\u5b9a\u9875\u9762"},"page_".concat(t))))})})})}));P.defaultProps={autoSize:!0,renderTextLayer:!1,scale:100,rotate:0,maxWidth:1200};const S=P;var y=s(91409),E=s.n(y),F=s(89946),W=s.n(F);const k=e=>{let{url:t,className:s,maxWidth:r}=e;const[a,c]=(0,n.useState)(""),[o,h]=(0,n.useState)(!0),[x,f]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{W().get(t).then((e=>{let{data:t}=e;c(t),h(!1)}),(()=>{h(!1),f(!0)}))}),[t]),(0,p.jsxs)("div",{className:l()(s,i),style:{maxWidth:r},children:[o?(0,p.jsx)("div",{className:d,children:(0,p.jsx)(_.Spin,{})}):null,(0,p.jsx)("div",{className:m,children:x?(0,p.jsx)("div",{className:u,children:"\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25"}):(0,p.jsx)(E(),{text:a})})]})},b=e=>{let{maxWidth:t}=e;return(0,p.jsx)("div",{className:i,style:{maxWidth:t},children:(0,p.jsx)("div",{className:m,children:(0,p.jsx)(_.Result,{status:"500",title:"\u4e0d\u652f\u6301\u7684\u6587\u4ef6\u7c7b\u578b",subTitle:"\u7cfb\u7edf\u4e0d\u652f\u6301\u8be5\u6587\u4ef6\u7c7b\u578b\u9884\u89c8\uff0c\u8bf7\u4e0b\u8f7d\u5230\u672c\u5730\u540e\u8fdb\u884c\u9884\u89c8"})})})},L=e=>{let{url:t,scale:s,rotate:r,className:a,maxWidth:c}=e;const[o,m]=(0,n.useState)(!0),[h,x]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const e=new Image;e.src=t;const s=()=>{m(!1)},r=()=>{m(!1),x(!0)};return e.addEventListener("load",s),e.addEventListener("error",r),()=>{e.removeEventListener("load",s),e.removeEventListener("error",r)}}),[t,s,r]),(0,p.jsxs)("div",{className:l()(a,i),style:{maxWidth:c},children:[o?(0,p.jsx)("div",{className:d,children:(0,p.jsx)(_.Spin,{})}):null,h?(0,p.jsx)("div",{className:u,children:"\u56fe\u7247\u52a0\u8f7d\u5931\u8d25"}):(0,p.jsx)("img",{src:t,alt:"\u7b80\u5386\u9884\u89c8"})]})},D=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"},O=D,T=e=>({txt:k,pdf:S,image:L,html:f,office:g,unknown:b}[D(e)]);const C=(0,s(97211).A)((e=>{let{data:t,id:s,className:r,...a}=e;const n=T(t);return"office"===O(t)?(0,p.jsx)(g,{...a,id:s,className:r}):(0,p.jsx)(n,{...a,className:r,url:t})})),R=e=>{let{id:t,originName:s,...r}=e;return"office"===O(s)?(0,p.jsx)(g,{...r,id:t,originName:s}):(0,p.jsx)(C,{...r,id:t,originName:s})}},71975:()=>{}}]);
|
|
2
|
-
//# sourceMappingURL=3333.ed36409c.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/3333.ed36409c.chunk.js","mappings":"mYACA,QAA4B,gCAA5B,EAA0K,8BAA1K,EAAie,iCAAje,EAA0gB,4B,0BCM1gB,MAAMA,GAAmBC,EAAAA,EAAAA,iBAAgB,CACvCC,kBAAmBC,IAAe,IAAd,KAAEC,GAAMD,EAC1B,MAAO,CACLC,KAAM,CACJC,KAAM,IACNC,QAASF,GAEZ,GAPoBH,EAStBM,IAAe,IAAd,KAAEH,GAAMG,EACV,MAAMC,GAAMC,EAAAA,EAAAA,QAAO,MAqBnB,OApBAC,EAAAA,EAAAA,YAAU,KACR,MACMC,GADS,IAAIC,WACQC,gBAAgBT,EAAM,aACjDO,EAAYG,iBAAiB,UAAUC,SAASC,IAC9CA,EAAGC,cAAcC,YAAYF,EAAG,IAElC,MAAMG,GACJC,EAAAA,EAAAA,eAAc,mBAAqB,kCAC/BC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbR,EAAYc,KAAKC,YAAYL,GAC7B,MAAMM,EAAQL,SAASC,cAAc,SACrCI,EAAMC,UACJ,mFACFjB,EAAYc,KAAKC,YAAYC,GAC7BnB,EAAIqB,QAAQC,OAASnB,EAAYoB,gBAAgBC,SAAS,GACzD,CAAC5B,KACJM,EAAAA,EAAAA,YAAU,KACRuB,IAAAA,aAA0B,CAAEC,aAAa,GAAS1B,EAAIqB,QAAQ,GAC7D,KACIM,EAAAA,EAAAA,KAAA,UAAQC,MAAM,2BAAOC,YAAY,IAAIC,MAAM,OAAO9B,IAAKA,GAAO,IAsCvE,EAnCoB+B,IAAmC,IAAlC,UAAEC,EAAS,IAAEC,EAAG,SAAEC,GAAUH,EAC/C,OACEJ,EAAAA,EAAAA,KAAA,OACEK,UAAWG,IAAWH,EAAWb,GACjCA,MAAO,CACLe,YACAE,UAEFT,EAAAA,EAAAA,KAACnC,EAAgB,CAACyC,IAAKA,KAuBnB,E,eCpEV,MAAMI,GAAqB5C,EAAAA,EAAAA,iBAAgB,CACzC6C,MAAO,kBADkB7C,EAExBE,IAAoC,IAAnC,KAAEC,EAAI,UAAEoC,KAAcO,GAAO5C,EAC/B,MAAQC,KAAM4C,GAAa5C,EAC3B,OAAO4C,EAASC,KAAI1C,IAAc,IAAb,IAAEkC,GAAKlC,EAC1B,MAAM2C,EAAmBC,EAAoBV,GAC7C,OACEW,EAAAA,EAAAA,eAACF,EAAgB,IAAKH,EAAON,IAAKA,EAAKY,IAAKZ,EAAKD,UAAWA,GAAa,GAE3E,IAgBJ,EAbsBD,IAAmD,IAAlD,GAAEe,EAAIC,KAAMC,EAAS,UAAEhB,KAAcO,GAAOR,EACjE,MAAQgB,KAAME,IAAaC,EAAAA,EAAAA,aACrBH,EAAOI,OAAOC,OAAO,CAAC,EAAGH,EAAUD,GACzC,OACErB,EAAAA,EAAAA,KAACU,EAAkB,IACbE,KACAQ,EAAKM,cACTzD,KAAM,CAAEkD,MACRd,UAAWA,GACX,E,6CChBN,MAAMsB,GAAaC,EAAAA,EAAAA,OAAK5D,IAAkD,IAAjD,IAAEsC,EAAG,SAAEC,EAAQ,MAAEsB,EAAK,OAAEC,EAAM,UAAEzB,GAAWrC,EAClE,MAAO+D,EAAUC,IAAeC,EAAAA,EAAAA,UAAS,GACzCC,EAAAA,MAAMC,oBAAoBC,WACxBnD,EAAAA,EAAAA,eAAc,mBAAqB,6BACrC,MAAOkB,EAAOkC,IAAYJ,EAAAA,EAAAA,UAAS1B,GAC7BlC,GAAMiE,EAAAA,EAAAA,YAAU,KAChBjE,EAAIqB,SAAWrB,EAAIqB,QAAQ6C,aAC7BF,EAASG,KAAKC,IAAIpE,EAAIqB,QAAQ6C,YAAahC,GAC7C,IAGF,OACEP,EAAAA,EAAAA,KAAA,OACE3B,IAAKA,EACLgC,UAAWG,IAAWH,EAAWb,GACjCA,MAAO,CACLe,SAAUA,GACVE,UAEFT,EAAAA,EAAAA,KAAC0C,EAAAA,SAAQ,CACPC,KAAM,CAAErC,OACRsC,QAAS,CACPC,qBACE5D,EAAAA,EAAAA,eAAc,mBAAqB,yBACrC6D,SAAS7D,EAAAA,EAAAA,eAAc,mBAAqB,gBAC5C8D,YAAY,GAEdC,MAAM,0CACNC,SACEjD,EAAAA,EAAAA,KAAA,OAAKK,UAAWb,EAAiBiB,UAC/BT,EAAAA,EAAAA,KAACkD,EAAAA,KAAI,MAGTC,OAAO,oCACPC,cAAehF,IAAmB,IAAlB,SAAE2D,GAAU3D,EAC1B4D,EAAYD,GACZsB,QAAQC,IAAI,gBAAgB,EAE9BC,YAAc3C,IACZyC,QAAQC,IAAI,cAAe1C,EAAM,EAEnC4C,cAAgB5C,IACdyC,QAAQC,IAAI,gBAAiB1C,EAAM,EACnCH,UAEFT,EAAAA,EAAAA,KAACyD,EAAAA,MAAK,CAACC,UAAU,WAAUjD,SACxBsB,GAAY,GACX4B,MAAMC,KAAK,IAAID,MAAM5B,IAAW,CAAClD,EAAIgF,KACnC7D,EAAAA,EAAAA,KAAC8D,EAAAA,KAAI,CAEHzD,UAAU,eACVwB,MAAOA,EAAQ,IACfC,OAAQA,EACRiC,WAAYF,EAAQ,EACpB1D,MAAOA,EACP8C,QAAS,KACTe,uBAAuB,EACvBC,iBAAiB,EACjBd,OAAO,kCAAO,QAAAe,OATDL,WAcnB,IAIVlC,EAAWwC,aAAe,CACxBC,UAAU,EACVH,iBAAiB,EACjBpC,MAAO,IACPC,OAAQ,EACRvB,SAAU,MAGZ,U,4CC7EA,MAwCA,EAxCoBvC,IAAmC,IAAlC,IAAEsC,EAAG,UAAED,EAAS,SAAEE,GAAUvC,EAC/C,MAAOqG,EAAMC,IAAWrC,EAAAA,EAAAA,UAAS,KAC1BgB,EAASsB,IAActC,EAAAA,EAAAA,WAAS,IAChCe,EAAOwB,IAAYvC,EAAAA,EAAAA,WAAS,GAcnC,OAbA1D,EAAAA,EAAAA,YAAU,KACRkG,IAAAA,IAAUnE,GAAKoE,MACbtG,IAAe,IAAd,KAAEH,GAAMG,EACPkG,EAAQrG,GACRsG,GAAW,EAAM,IAEnB,KACEA,GAAW,GACXC,GAAS,EAAK,GAEjB,GACA,CAAClE,KAGFqE,EAAAA,EAAAA,MAAA,OACEtE,UAAWG,IAAWH,EAAWb,GACjCA,MAAO,CACLe,YACAE,SAAA,CAEDwC,GACCjD,EAAAA,EAAAA,KAAA,OAAKK,UAAWb,EAAiBiB,UAC/BT,EAAAA,EAAAA,KAACkD,EAAAA,KAAI,MAEL,MACJlD,EAAAA,EAAAA,KAAA,OAAKK,UAAWb,EAAoBiB,SACjCuC,GACChD,EAAAA,EAAAA,KAAA,OAAKK,UAAWb,EAAeiB,SAAC,0CAEhCT,EAAAA,EAAAA,KAAC4E,IAAU,CAACP,KAAMA,QAGlB,ECrBV,EAnBuBrG,IAAmB,IAAlB,SAAEuC,GAAUvC,EAClC,OACEgC,EAAAA,EAAAA,KAAA,OACEK,UAAWb,EACXA,MAAO,CACLe,YACAE,UAEFT,EAAAA,EAAAA,KAAA,OAAKK,UAAWb,EAAoBiB,UAClCT,EAAAA,EAAAA,KAAC6E,EAAAA,OAAM,CACLC,OAAO,MACP7E,MAAM,mDACN8E,SAAS,wJAGT,EC8BV,EA3CqB/G,IAAkD,IAAjD,IAAEsC,EAAG,MAAEuB,EAAK,OAAEC,EAAM,UAAEzB,EAAS,SAAEE,GAAUvC,EAC/D,MAAOiF,EAASsB,IAActC,EAAAA,EAAAA,WAAS,IAChCe,EAAOwB,IAAYvC,EAAAA,EAAAA,WAAS,GAoBnC,OAnBA1D,EAAAA,EAAAA,YAAU,KACR,MAAMyG,EAAQ,IAAIC,MAClBD,EAAM3F,IAAMiB,EACZ,MAAM4E,EAAcA,KAClBX,GAAW,EAAM,EAGbY,EAAeA,KACnBZ,GAAW,GACXC,GAAS,EAAK,EAKhB,OAFAQ,EAAMI,iBAAiB,OAAQF,GAC/BF,EAAMI,iBAAiB,QAASD,GACzB,KACLH,EAAMK,oBAAoB,OAAQH,GAClCF,EAAMK,oBAAoB,QAASF,EAAa,CACjD,GACA,CAAC7E,EAAKuB,EAAOC,KAEd6C,EAAAA,EAAAA,MAAA,OACEtE,UAAWG,IAAWH,EAAWb,GACjCA,MAAO,CACLe,YACAE,SAAA,CAEDwC,GACCjD,EAAAA,EAAAA,KAAA,OAAKK,UAAWb,EAAiBiB,UAC/BT,EAAAA,EAAAA,KAACkD,EAAAA,KAAI,MAEL,KACHF,GACChD,EAAAA,EAAAA,KAAA,OAAKK,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__Fo22-\",\"container-html\":\"style_container-html__IsNVq__Fo22-\",\"html-inner\":\"style_html-inner__S05cI__Fo22-\",\"loading\":\"style_loading__r3aiE__Fo22-\",\"control-bar\":\"style_control-bar__kTKau__Fo22-\",\"scroller\":\"style_scroller__HOq7b__Fo22-\",\"outer\":\"style_outer__ntu--__Fo22-\",\"file-name\":\"style_file-name__UPbbe__Fo22-\",\"file-options\":\"style_file-options__5TE5l__Fo22-\",\"scale-input\":\"style_scale-input__JdF1K__Fo22-\",\"text-outer\":\"style_text-outer__TzhuG__Fo22-\",\"error\":\"style_error__wSaxt__Fo22-\",\"text-inner\":\"style_text-inner__jdi-A__Fo22-\",\"image-inner\":\"style_image-inner__zTiFU__Fo22-\"};","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 && 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,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[36],{18411:(e,t,n)=>{n.d(t,{A:()=>a});n(73884);const a=n.p+"static/media/defaultAvatar.b1f2a8046cc7bee36d9a404ce6a0a1d7.svg"},93761:(e,t,n)=>{n.d(t,{qn:()=>R,TM:()=>G,LH:()=>I,Ay:()=>E,NY:()=>L,DF:()=>D});var a=n(30509),l=n(25438),s=n(55199),o=n(27047),r=n(83136),i=n.n(r),c=n(64671),d=n(73884),u=n(21485),p=n(56434),m=n.n(p),h=n(15797),_=n.n(h),g=n(33097),f=n.n(g);const x="style_address__DIuRX__Fo22-",y="style_is-popup__tqVvp__Fo22-",v="style_title__FAe12__Fo22-",C="style_scroll-box__JWiDl__Fo22-",j="style_scroll-plus-box__lidEW__Fo22-",b="style_content__lAARZ__Fo22-",A="style_col-left__WPfeS__Fo22-",N="style_col-right__z0e9-__Fo22-";var F=n(87558);const S=e=>({"en-US":()=>n.e(3691).then(n.bind(n,83691)),"zh-CN":()=>n.e(2253).then(n.bind(n,32253))}[e]());var w=n(58609),O=n(70579);const P=a.A.useContext,I=e=>{let{city:t,province:n,country:a}=e;const l=_()((()=>{const e=[];return["gangaotai","municipality"].forEach((n=>{e.push(...t.relations[n])})),["provinces","continents"].forEach((n=>{t.relations[n].forEach((n=>{e.push(n),e.push(...t.relations[n])}))})),e.map((e=>t.list[e]))}));return{getCity:_()((e=>{const n=t.list[e];return n?{city:n,parent:n.parentCode?t.list[n.parentCode]:null}:{city:null,parent:null}})),getChinaHotCities:_()((()=>t.relations[2].map((e=>t.list[e])))),getChinaCities:_()((()=>["2",...n.relations.municipality,...n.relations.provinces,"gangaotai"].map((e=>Object.assign({id:e},t.list[e]))))),getCountries:_()((()=>["1",...a.relations.continents].map((e=>Object.assign({id:e},a.list[e]))))),getList:_()(((e,l)=>{const{showChinaQuan:s,showForeignQuan:o}=Object.assign({},l);if("gangaotai"===e)return n.relations.gangaotai.map((e=>t.list[e]));const r=Object.assign({},t.list[e]);if(n.relations.municipality.indexOf(e)>-1)return r.name="".concat(s?"\u5168":"")+r.name,[r];const i=t.relations[e].map((e=>t.list[e]));return n.relations.provinces.indexOf(e)>-1&&s&&(r.name="\u5168"+r.name,i.splice(0,0,r)),a.relations.continents.indexOf(e)>-1&&o&&(r.name="\u5168"+r.name,i.splice(0,0,r)),i})),getNationalityList:_()((e=>{let n=m()(t);return"1"===e&&n.relations[1].unshift("410"),"350"===e&&n.relations[350].unshift("410"),n.relations[e].filter((e=>n.list[e])).map((e=>n.list[e]))})),getCityByName:_()((e=>{const t=l();let n;return[t=>t.name===e,t=>t.name===e.replace(/(\u7701|\u5e02)$/,""),t=>0===e.indexOf(t.name)].find((e=>(n=t.find(e),n))),n})),combineCities:_()(((e,n)=>[...n.filter((n=>t.list[n].parentCode!==e&&t.list[e].parentCode!==n&&e!==n)),e])),searchCities:_()((e=>{if(!e)return[];return l().filter((t=>["pinyin","name","enName","spelling"].some((n=>t[n].toUpperCase().indexOf(e.toUpperCase())>-1)))).map((e=>{const n=e.parentCode?t.list[e.parentCode]:null;return{label:n?"".concat(n.name,"\xb7").concat(e.name):e.name,value:e.code}}))}))}},L=(e,t)=>"en-US"===t?f()(e,"enName"):f()(e,"name"),k={cache:"CITY_DATA",isLocal:!0,ttl:864e5,loader:()=>n.e(7820).then(n.t.bind(n,37820,19)).then((e=>e.__esModule?e.default:e))},M=e=>{let{value:t,setValue:n}=e;const{fetchApi:a,props:r}=P(),[p,m]=(0,d.useState)(""),[h,_]=(0,d.useState)("2"),{formatMessage:g}=(0,w.useIntl)({moduleName:"AddressSelect"}),{locale:f}=(0,o.A)(),{getCity:F,getChinaCities:S,getCountries:k,getList:M,searchCities:T}=(0,d.useMemo)((()=>I(a.data)),[a.data]),R=e=>{if(r.single)return void n([e]);const a=t.slice(0),l=a.indexOf(e);l>-1?a.splice(l,1):a.push(e),n(a)},D=p&&(0,O.jsx)(u.A,{className:j,children:(0,O.jsx)(s.List,{className:l.A.list,size:"small",dataSource:T(p),rowKey:"value",renderItem:e=>(0,O.jsx)(s.List.Item,{className:l.A["list-item"],onClick:()=>{R(e.value),m("")},children:(0,O.jsx)("span",{className:l.A["item-label"],children:e.label})})})});return(0,O.jsxs)("div",{className:i()(x,{[y]:r.isPopup}),children:[(0,O.jsx)(s.Input.Search,{className:i()(l.A["search-input"],{[l.A["is-popup"]]:r.isPopup}),placeholder:r.searchPlaceholder||g({id:"searchCity"}),prefix:(0,O.jsx)(c.default,{type:"icon-sousuo"}),enterButton:(0,O.jsx)(c.default,{type:"icon-sousuo"}),value:p,allowClear:!0,onChange:e=>{const t=e.target.value;m(t)},onSearch:e=>{m(e)}}),(0,O.jsx)("div",{className:b,children:D||(0,O.jsxs)(s.Row,{wrap:!1,children:[(0,O.jsx)(s.Col,{className:A,children:(0,O.jsx)(s.Tabs,{centered:!0,onChange:e=>{_(e)},items:[{key:"2",label:(0,O.jsx)(w.FormattedMessage,{id:"domestic",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5185"}),children:(0,O.jsx)(u.A,{className:C,children:(0,O.jsx)(s.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:S().map((e=>({label:L(e,f),key:e.id})))})})},{key:"1",label:(0,O.jsx)(w.FormattedMessage,{id:"abroad",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5916"}),children:(0,O.jsx)(u.A,{className:C,children:(0,O.jsx)(s.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:k().map((e=>({label:L(e,f),key:e.id})))})})}]})}),(0,O.jsxs)(s.Col,{flex:1,className:N,children:[(0,O.jsx)(s.Divider,{className:v,orientation:"left",children:L(F(h).city,f)}),(0,O.jsx)(u.A,{className:C,children:(0,O.jsx)(s.Space,{wrap:!0,children:M(h,{showChinaQuan:r.showChinaQuan,showForeignQuan:r.showForeignQuan}).map((e=>(0,O.jsx)(s.Tag.CheckableTag,{checked:t.indexOf(e.code)>-1,onChange:()=>{R(e.code)},children:L(e,f)},e.code)))})})]})]})})]})},T=e=>(0,O.jsx)(a.A,{...e,children:e=>{let{value:t,setValue:n}=e;return(0,O.jsx)(w.IntlProvider,{moduleName:"AddressSelect",importMessages:S,children:(0,O.jsx)(M,{value:t,setValue:n})})}});T.defaultProps={overlayWidth:"500px",isPopup:!0,api:k,dataFormat:(e,t)=>{let{city:n}=e;const{locale:a}=Object.assign({},t);return{list:Object.values(n.list).map((e=>Object.assign({},e,{value:e.code,label:L(e,a)})))}}};const R=(0,F.withFetch)((e=>{let{name:t,data:n,getAddressApi:a,children:l,...s}=e;const{locale:r}=(0,o.A)(),i=(0,d.useMemo)((()=>I(n)),[n]);return a?l(i):l(i.getCity(t),Object.assign({},s,{locale:r}))}));R.defaultProps={...k,displayParent:!1,children:(e,t)=>{let{city:n,parent:a}=e,{displayParent:l,locale:s}=t;return l&&a?"".concat(L(a,s),"\xb7").concat(L(n,s)):L(n,s)}};const D=e=>{const t=(0,F.withFetch)((t=>{let{data:n,...a}=t;const l=(0,d.useMemo)((()=>I(n)),[n]);return(0,O.jsx)(e,{...a,addressApi:l})}));return t.defaultProps={...k},t};T.AddressEnum=T.Enum=R,T.createAddressApi=I,T.withAddressApi=D,T.getLabelForLocal=L;const E=T;var z=n(10986),V=n.n(z),W=n(78491),B=n.n(W),U=n(20492),K=n(22616),q=n.n(K),H=n(1488),Q=n.n(H);const Z=e=>{const{isPopup:t,size:n,disabled:a,inputPlaceholder:l,onBlur:o,className:r,...i}=e,[c,d]=V()(e),u=["isPopup","searchPlaceholder","placeholder","overlayWidth","api","dataFormat"],{formatMessage:p}=(0,w.useIntl)({moduleName:"Common"}),m=B()((e=>{o&&o(e)}));return(0,O.jsx)("div",{ref:m,children:(0,O.jsxs)(s.Row,{gutter:10,children:[(0,O.jsx)(s.Col,{span:12,children:(0,O.jsx)(E,{...q()(i,u),className:r,disabled:a,single:!0,size:n,value:f()(c,"city"),onChange:e=>{d({city:e,detail:f()(c,"detail")})}})}),(0,O.jsx)(s.Col,{span:12,children:(0,O.jsx)(s.Input,{...Q()(i,u),className:r,placeholder:l||p({id:"pleaseInput"}),disabled:a,size:n,value:f()(c,"detail"),onChange:e=>{d({city:f()(c,"city"),detail:e.target.value})}})})]})})};Z.defaultProps={};const G=(0,w.createWithIntl)({importMessages:U.A,moduleName:"Common"})(Z)},12392:(e,t,n)=>{n.d(t,{Bm:()=>W,Eo:()=>z,NR:()=>A,Ay:()=>B});var a=n(55199),l=n(83136),s=n.n(l),o=n(30509),r=n(25438),i=n(26475),c=n(33097),d=n.n(c),u=n(34677),p=n.n(u);const m="create-list_scroll-loader__zoaS7__Fo22-",h="create-list_is-popup__t3d-G__Fo22-",_="create-list_is-not-full__FXtX1__Fo22-",g="create-list_search-input__tV3vf__Fo22-",f="create-list_left__EXr3i__Fo22-",x="create-list_list-header__3xeJa__Fo22-",y="create-list_is-modal__BMfya__Fo22-";var v=n(73161),C=n(58609),j=n(70579);const b=o.A.useContext,A=e=>{let{renderList:t,defaultProps:n}=e;const l=e=>{let{value:n,setValue:l}=e;const{fetchApi:o,searchText:c,setSearchText:u,props:A,mapping:N}=b(),F=Object.assign({},{paramsType:"data",current:"currentPage",pageSizeName:"perPage",pageSize:20},A.pagination),S=d()(o.requestParams,[F.paramsType,F.current],1),w=d()(o.requestParams,[F.paramsType,F.pageSizeName])||F.pageSize,{formatMessage:O}=(0,C.useIntl)({moduleName:"Common"}),P=A.dataFormat(o.data),{right:I,leftBottom:L,leftSpan:k=24}=A,M=1===n.length&&"all"===n[0];return(0,j.jsxs)(a.Row,{wrap:!1,className:I?s()("is-not-full",_):"",children:[(0,j.jsxs)(a.Col,{span:k,className:s()(f,"advance-select-left"),children:[A.getSearchProps?(0,j.jsx)(v.A,{isPopup:A.isPopup,className:s()(g,r.A["search-input"],{[r.A["is-popup"]]:A.isPopup}),placeholder:A.searchPlaceholder||O({id:"search"}),value:c,onSearch:e=>{o.reload(A.getSearchProps(e)),u(e)}}):null,A.single||!A.showSelectedCount&&!A.allowSelectAll?null:(0,j.jsxs)(a.Flex,{className:s()(x,{[y]:!A.isPopup}),justify:"space-between",children:[A.showSelectedCount?(0,j.jsxs)(a.Space,{children:[(0,j.jsx)(a.Typography,{children:"\u5df2\u9009:"}),(0,j.jsx)(a.Typography.Link,{children:M?A.allLabel||(0,j.jsx)(C.FormattedMessage,{id:"all",moduleName:"Common"}):"".concat(n.length).concat(A.countUnit||O({id:"items"}))})]}):(0,j.jsx)("div",{}),A.allowSelectAll?(0,j.jsx)("div",{children:(0,j.jsx)(a.Checkbox,{checked:M,onChange:e=>{l(e.target.checked?[A.allValue||"all"]:[])},children:(0,j.jsx)(C.FormattedMessage,{id:"selectAll",moduleName:"Common",values:{label:A.allLabel||(0,j.jsx)(C.FormattedMessage,{id:"all",moduleName:"Common"})}})})}):(0,j.jsx)("div",{})]}),(0,j.jsx)(i.A,{completeTips:"",isLoading:!o.isComplete,className:s()(m,{[h]:A.isPopup}),noMore:!P.total||S*w>=P.total,onLoader:async()=>{console.log("on loader"),await o.loadMore(p()({[F.paramsType]:{[F.pageSizeName]:w,[F.current]:S+1}},A.getSearchProps&&A.getSearchProps(c)),A.mergeList)},children:t({props:A,value:n,setValue:l,list:P.list,itemIsSelected:e=>n.indexOf(e.value)>-1,isSelectedAll:M,onSelect:e=>{if(A.single)return void l([e.value]);const t=n.slice(0),a=t.indexOf(e.value);a>-1?t.splice(a,1):t.push(e.value),l(t)}})}),L&&L({fetchApi:o,value:n,mapping:N})]}),I&&I({value:n,mapping:N,fetchApi:o})]})},c=e=>{let{extra:t,...n}=e;return(0,j.jsx)(o.A,{...n,extra:t,children:e=>{let{value:t,setValue:n}=e;return(0,j.jsx)(l,{value:t,setValue:n})}})};return c.defaultProps=Object.assign({},{isPopup:!0,pagination:{},mergeList:(e,t)=>Object.assign({},t,{pageData:e.pageData.concat(t.pageData)}),dataFormat:e=>({list:e.pageData,total:e.totalCount})},n),c},N="list_list__TGynD__Fo22-",F="list_list-item__WSswf__Fo22-",S="list_is-selected__6Wkgt__Fo22-",w="list_item-label__bYzhe__Fo22-",O="list_item-des__2nsEn__Fo22-",P="list_is-disabled__qxCvO__Fo22-",I="list_is-selected-all__Mp-hG__Fo22-";var L=n(40438),k=n(64671);const M="user_list-inner__V508e__Fo22-",T="user_list-info__y2nWo__Fo22-",R="user_selected-icon__9OQJL__Fo22-",D="user_item-des__o+7UR__Fo22-",E="user_is-selected-all__2q0VZ__Fo22-",z=A({renderList:e=>{let{list:t,onSelect:n,itemIsSelected:l,isSelectedAll:o}=e;return(0,j.jsx)(a.List,{size:"small",className:s()(N,{[I]:o,[E]:o}),dataSource:t,renderItem:e=>{const t=l(e);return(0,j.jsx)(a.List.Item,{className:s()(F,{[S]:t}),onClick:()=>n(e),children:(0,j.jsxs)(a.Row,{wrap:!1,align:"middle",className:M,children:[(0,j.jsx)(a.Col,{children:(0,j.jsx)(L.default.Avatar,{...Object.assign({},e.avatar),size:40,gender:"M"})}),(0,j.jsx)(a.Col,{className:T,flex:1,children:(0,j.jsxs)(a.Space,{direction:"vertical",children:[(0,j.jsx)("span",{className:w,children:e.label}),e.description&&(0,j.jsx)("span",{className:D,children:e.description})]})}),(0,j.jsx)(a.Col,{children:o||t?(0,j.jsx)(k.default,{className:R,type:"icon-gouxuan"}):null})]})})}})}}),V={"is-selected-all":"table_is-selected-all__IwXUY__Fo22-"},W=A({defaultProps:{overlayWidth:"450px"},renderList:e=>{let{props:t,list:n,onSelect:l,value:o,setValue:r,itemIsSelected:i,isSelectedAll:c}=e;return(0,j.jsx)(a.Table,{className:s()(V.list,N,{[I]:c,[V["is-selected-all"]]:c}),size:"small",dataSource:n,columns:t.columns,rowClassName:e=>s()({"ant-table-row-selected":i(e)}),rowKey:t.rowKey||"value",pagination:!1,rowSelection:t.single?null:c?{selectedRowKeys:n.map((e=>{let{value:t}=e;return t})),getCheckboxProps:()=>({disabled:!0})}:{selectedRowKeys:o,onChange:e=>{r(e)}},sticky:!0,onRow:e=>({onClick:()=>l(e)})})}}),B=A({renderList:e=>{let{props:t,list:n,itemIsSelected:l,isSelectedAll:o,onSelect:r}=e;const{listClassName:i="",selectIcon:c=null}=t||{};return(0,j.jsx)(a.List,{className:s()(N,i,{[I]:o}),size:"small",dataSource:n,renderItem:e=>{var n;const i=l(e);return(0,j.jsxs)(a.List.Item,{className:s()(F,{[S]:t.single&&i,[P]:o||e.disabled}),onClick:()=>{e.disabled||r(e)},children:[(0,j.jsxs)(a.Row,{wrap:!1,children:[t.single?null:(0,j.jsx)(a.Col,{children:(0,j.jsx)(a.Checkbox,{checked:o||i,disabled:o||e.disabled})}),(0,j.jsx)(a.Col,{children:(0,j.jsxs)(a.Space,{className:null!==(n=null===e||void 0===e?void 0:e.className)&&void 0!==n?n:"",children:[(0,j.jsx)("span",{className:w,children:e.label}),e.description&&(0,j.jsx)("span",{className:O,children:e.description})]})})]}),i&&c]})}})}})},45776:(e,t,n)=>{n.d(t,{yK:()=>I,ON:()=>h,Ay:()=>R});var a=n(30509),l=n(73884),s=n(96418),o=n.n(s),r=n(55199),i=n(64671),c=n(73161),d=n(33097),u=n.n(d),p=n(79686),m=n.n(p);const h=e=>{const t=Array.from(e.values()),n=t.filter((e=>null===e.parentId)),a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},l=t=>{const n=[],a=t=>{const l=e.get(t);l&&Array.isArray(l.children)&&l.children.length>0&&(n.push(...l.children),l.children.forEach((e=>{a(e.id)})))};return a(t),n},s=(t,n)=>{const a=t=>{const l=e.get(t);return l?n(l)?l:m()(l.parentId)?null:a(l.parentId):null};return a(t)},o=t=>{const a=e.get(t);if(!a)return[];const l=a.parentId;if(m()(l))return n;return e.get(l).children},r=(()=>{const e=n=>Array.isArray(n)&&n.length>0?n.map((n=>{const a=t.filter((e=>e.parentId===n.id));return Object.assign({},n,{children:e(a)})})):null;return e(n)})();return{mapping:e,getSelectedQueue:t=>{const n=e.get(t);if(!n)return[];const a=e=>{if(e.children&&e.children.length>0)return a(e.children.find((t=>t.children&&e.children.length>0))||u()(e.children,"0"));const t=l(e.parentId).find((e=>e.children&&e.children.length>0));return t?a(t):e},s=function(t){const n=[t,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]],a=e.get(t);return!a||m()(a.parentId)?n:s(a.parentId,n)},o=a(n);return s(u()(o,"id"))},getAllChildren:l,computedCheckboxStatus:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(s(t,(e=>n.indexOf(e.id)>-1)))return{checked:!0,indeterminate:!1};const a=((t,a)=>{const l=t=>{const a=e.get(t);return a?(s=a,n.indexOf(s.id)>-1?a:Array.isArray(a.children)&&a.children.length>0?a.children.find((e=>!!l(e.id))):void 0):null;var s};return!!l(t)})(t);return a?{checked:!1,indeterminate:!0}:{checked:!1,indeterminate:!1}},getSiblingNode:o,findInParents:s,setNodeChecked:function(t){const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),s=t=>{const r=e.get(t);if(!r)return;n.push(t),l(t).forEach((e=>{a(n,e.id)}));const i=o(t),c=i.every((e=>n.indexOf(e.id)>-1));r.parentId&&c&&(i.forEach((e=>{a(n,e.id)})),s(r.parentId))};return s(t),n},setNodeUnchecked:function(t){const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),l=t=>{const s=e.get(t);if(!s)return;if(n.indexOf(s.id)>-1)return void a(n,s.id);const r=o(t);s.parentId&&(r.forEach((e=>{t!==e.id&&n.push(e.id)})),l(s.parentId))};return l(t),n},treeData:r,treeMapping:new Map(r.map((e=>[e.id,e])))}};var _=n(74065),g=n.n(_),f=n(19853),x=n.n(f),y=n(17342),v=n(83136),C=n.n(v);const j={content:"style_content__Hxlt9__Fo22-",columns:"style_columns__FmtPF__Fo22-","content-item":"style_content-item__i6HCO__Fo22-","last-level-area":"style_last-level-area__2y7jQ__Fo22-","is-popup":"style_is-popup__+r3Mn__Fo22-",menu:"style_menu__WZUVE__Fo22-","scroll-plus-box":"style_scroll-plus-box__QcTst__Fo22-","menu-label":"style_menu-label__iGt0Z__Fo22-","menu-item":"style_menu-item__hXHfm__Fo22-","checkbox-hidden":"style_checkbox-hidden__Xpx7J__Fo22-",loading:"style_loading__ZwrVe__Fo22-"};var b=n(87558),A=n(58609),N=n(25438),F=n(70579),S=n(27047);const w=new Map,O=(0,b.withFetch)((e=>{let{data:t,name:n,type:a,cache:s,children:o,getLabel:r,...i}=e;const c=(0,l.useMemo)((()=>new Map(t.map((e=>[e.code,{...e,id:e.code,label:r?r(e):e.chName,parentId:e.parentCode||null}])))),[t,r]).get(n);return w.set("".concat(n,"_").concat(a),c),o(c,i)})),P=e=>{const{locale:t}=(0,S.A)(),n="".concat(t,"_").concat(e.name,"_").concat(e.type),a=w.get(n);return a&&!e.force?e.children(a):(0,F.jsx)(O,{...e})};P.defaultProps={children:e=>u()(e,"label","")};const I=P,L=a.A.useContext,k=(0,b.withFetch)((e=>{let{data:t,computedIsChecked:n,onSelect:a}=e;return(0,F.jsx)(y.A,{className:j["scroll-plus-box"],children:(0,F.jsx)(r.List,{className:N.A.list,size:"small",dataSource:t,rowKey:"value",renderItem:e=>{const t=n(e);return(0,F.jsx)(r.List.Item,{className:C()(N.A["list-item"],{[N.A["is-selected"]]:t}),onClick:()=>a(e,t),children:(0,F.jsx)("span",{className:N.A["item-label"],children:e.label})})}})})})),M=e=>{let{value:t,setValue:n,size:a,selectLevel:s}=e;const{fetchApi:d,props:p}=L(),[m,_]=(0,l.useState)(""),f=o()(p.dataFormat),{formatMessage:v}=(0,A.useIntl)({moduleName:"Common"}),b=d.data,S=(0,l.useMemo)((()=>new Map(f(b).list.map((e=>[e.value,e])))),[b,f]),w=(0,l.useMemo)((()=>h(S)),[S]),O=(0,l.useRef)({});O.current={createMergeTree:p.createMergeTree,loadMore:d.loadMore,openLoadData:p.openLoadData,parentIdKey:p.parentIdKey,treeUtils:w};const[P,I]=(0,l.useState)((()=>{const e=t.find((e=>!!S.get(e)));return w.getSelectedQueue(e||u()(d.data.find((e=>e.children&&e.children.length>0)),"id")||u()(d.data,"[0].id"),S)}));(0,l.useEffect)((()=>{const{openLoadData:e,loadMore:t,parentIdKey:n,createMergeTree:a,treeUtils:l}=O.current;if(!e)return;const s=S.get(g()(P));if(!s)return;const o=l.getSelectedQueue(s.id);x()(P,o)?s.hasOwnProperty("children")||t({data:{[n]:s.id}},a(s.id)):I(o)}),[P,S]);const M=(e,l)=>{const s=(()=>{if(p.onlyAllowLastLevel&&e){const e=t.slice(0);return e.push(l),e}if(p.onlyAllowLastLevel){const e=t.slice(0);return e.splice(t.indexOf(l),1),e}return e?w.setNodeChecked(l,t):w.setNodeUnchecked(l,t)})();s.length>a?r.message.error(v({id:"maxSelectedCount"},{count:a})):n(p.single&&s.length>0?[g()(s)]:s)},T=e=>{const t=S.get(e);return!(!p.openLoadData||t.hasOwnProperty("children"))||t.children&&t.children.length>0},R=!p.openLoadData&&"function"===typeof p.onSearch,D=R&&m&&(0,F.jsx)(k,{data:{searchText:m},loader:e=>{let{data:t}=e;return p.onSearch(t.searchText,{mapping:S})},computedIsChecked:e=>t.indexOf(e.id)>-1,onSelect:(e,t)=>{M(!t,e.id),!t&&I(w.getSelectedQueue(e.id,S)),_("")}});return(0,F.jsxs)("div",{className:C()(j.content,{[j["is-popup"]]:p.isPopup,[j["has-search"]]:R}),style:{"--menu-item-width":p.menuItemWidth},children:[R&&(0,F.jsx)(c.A,{isPopup:p.isPopup,className:C()(N.A["search-input"],{[N.A["is-popup"]]:p.isPopup}),placeholder:p.searchPlaceholder||v({id:"search"}),value:m,onSearch:e=>{_(e)}}),D||(0,F.jsx)("div",{children:(0,F.jsx)(y.A,{className:j.scroller,options:{autoHide:!1},children:(0,F.jsxs)("div",{className:j.columns,children:[P.map(((e,n)=>{const a=S.get(e),o=w.getSiblingNode(e),c=!T(null===a||void 0===a?void 0:a.id)&&n>0;return(0,F.jsx)(y.A,{className:C()(j["content-item"],{[j["last-level-area"]]:c}),children:c?(0,F.jsx)(r.Space,{wrap:!0,children:o.map((e=>(0,l.createElement)(r.Checkbox,{...w.computedCheckboxStatus(e.id,t),disabled:s>1&&(t.indexOf(e.parentCode)>-1||t.indexOf(e.code.slice(0,3))>-1),key:e.id,onChange:t=>M(t.target.checked,e.id)},e.label)))}):(0,F.jsx)(r.Menu,{className:C()(j.menu),onSelect:e=>{const n=S.get(e.key);if(n)if(T(n.id))I(w.getSelectedQueue(n.id,S));else{const{checked:e}=w.computedCheckboxStatus(n.id,t);M(!e,n.id)}},selectedKeys:n===P.length-1?[]:P,items:o.map((e=>({key:e.id,label:(0,F.jsxs)(r.Space,{className:C()(j["menu-item"],{[j["checkbox-hidden"]]:p.onlyAllowLastLevel&&T(e.id)}),children:[!p.onlyAllowLastLevel&&(0,F.jsx)(r.Checkbox,{...w.computedCheckboxStatus(e.id,t),disabled:s>1&&t.indexOf(e.parentCode)>-1,onChange:t=>M(t.target.checked,e.id)}),(0,F.jsx)("div",{className:j["menu-label"],children:e.label}),T(e.id)&&(0,F.jsx)(i.default,{className:j["menu-item-icon"],type:"icon-arrow-thin-right",size:12})]})})))})},u()(o,"[0].id",n))})),d.isComplete?null:(0,F.jsx)("div",{className:j.loading,children:(0,F.jsx)(r.Spin,{size:"small"})})]})})})]})},T=e=>{let{maxLength:t,nodeFormat:n,dataFormat:l,...s}=e;return(0,F.jsx)(a.A,{...s,dataFormat:e=>l(e,n),children:e=>{let{value:n,setValue:a}=e;return(0,F.jsx)(M,{...s,size:t,value:n,setValue:a})}})};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:n}=t;return Array.from(n.values()).filter((t=>t.label.indexOf(e)>-1))},dataFormat:(e,t)=>{const n=(e,a)=>{const l=[];return l.push(...(e||[]).map((e=>("function"===typeof t&&Object.assign(e,t(e)),e.children&&e.children.length>0&&l.push(...n(e.children,e.id)),Object.assign({},e,{value:e.id,parentId:a}))))),l};return{list:n(e,null)}},createMergeTree:e=>(t,n)=>{const a=t=>t.map((t=>t.id===e?Object.assign({},t,{children:n&&n.map((t=>Object.assign({},t,{parentId:e})))}):Array.isArray(t.children)&&t.children.length>0?Object.assign({},t,{children:a(t.children)}):t));return a(t)}};const R=T},41654:(e,t,n)=>{n.d(t,{A:()=>m,K:()=>p});var a=n(45776),l=n(27047),s=n(33097),o=n.n(s),r=n(70579);const i=(e,t)=>"en-US"===t?o()(e,"enName"):o()(e,"chName"),c=()=>n.e(719).then(n.t.bind(n,10719,19)).then((e=>e.__esModule?e.default:e)),d={cache:"FUNCTION_DATA",isLocal:!0,ttl:864e5,loader:c},u=e=>{let{apis:t,...n}=e;const{apis:s,locale:o}=(0,l.A)(),c=Object.assign({},{functionData:d},null===s||void 0===s?void 0:s.staticData,t);return(0,r.jsx)(a.Ay,{...n,api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:n}=(0,a.ON)(new Map(t.map((e=>[e.code,{...e,id:e.code,label:i(e,o),parentId:e.parentCode||null}]))));return n}},c.functionData)})};u.defaultProps={overlayWidth:"640px",getSearchProps:e=>({data:{searchText:e}})},u.defaultData=c;const p=e=>{let{apis:t,...n}=e;const{apis:s,locale:o}=(0,l.A)(),c=Object.assign({},{functionData:d},null===s||void 0===s?void 0:s.staticData,t);return(0,r.jsx)(a.yK,{...n,...c.functionData,type:"function",getLabel:e=>i(e,o),transformData:e=>{let{data:t}=e;return t}})};u.FunctionEnum=u.Enum=p;const m=u},53392:(e,t,n)=>{n.d(t,{A:()=>p,W:()=>u});var a=n(45776),l=n(27047),s=n(33097),o=n.n(s),r=n(70579);const i=(e,t)=>"en-US"===t?o()(e,"enName"):o()(e,"chName"),c={cache:"INDUSTRY_DATA",isLocal:!0,ttl:864e5,loader:()=>n.e(7183).then(n.t.bind(n,57183,19)).then((e=>e.__esModule?e.default:e))},d=e=>{let{apis:t,...n}=e;const{apis:s,locale:o}=(0,l.A)(),d=Object.assign({},{industryData:c},null===s||void 0===s?void 0:s.staticData,t);return(0,r.jsx)(a.Ay,{...n,api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:n}=(0,a.ON)(new Map(t.filter((e=>"000"!==e.code)).map((e=>[e.code,{...e,id:e.code,label:i(e,o),parentId:e.parentCode||null}]))));return n}},d.industryData)})};d.defaultProps={overlayWidth:"635px"};const u=e=>{let{apis:t,...n}=e;const{apis:s,locale:o}=(0,l.A)(),d=Object.assign({},{industryData:c},null===s||void 0===s?void 0:s.staticData,t);return(0,r.jsx)(a.yK,{...n,...d.industryData,type:"function",getLabel:e=>i(e,o),transformData:e=>{let{data:t}=e;return t}})};d.IndustryEnum=d.Enum=u;const p=d},26475:(e,t,n)=>{n.d(t,{A:()=>_});var a=n(73884),l=n(55199),s=n(96418),o=n.n(s),r=n(21485),i=n(83136),c=n.n(i),d=n(51941);const u="style_scroller-no-more__EH2J+__Fo22-";var p=n(70579);const m=e=>{let{getScrollerRef:t,loadMore:n,maxFullCount:l}=e;const s=o()(n),r=o()(t);return(0,a.useEffect)((()=>{let e=l;const t=r(),n=async()=>{t.clientHeight===t.scrollHeight&&e>0&&(await s().then((()=>new Promise((e=>{setTimeout(e,500)})))),e--,await n())};n()}),[l,s,r]),null},h=(0,a.forwardRef)(((e,t)=>{let{className:n,noMore:s,onLoader:i,isLoading:h,completeTips:_,maxFullCount:g,children:f}=e;const[x,y]=(0,a.useState)(!1),v=(0,a.useRef)(),C=o()(i),j=(0,a.useRef)(!s&&!h);j.current=!s&&!h,(0,a.useImperativeHandle)(t,(()=>v.current),[]);const b=(0,d.useThrottledCallback)((e=>{const t=e.target;j.current&&t.clientHeight+t.scrollTop+20>t.scrollHeight&&C()}),100);return(0,p.jsxs)(r.A,{ref:v,onScroll:b,className:c()("load-container",n),onReady:()=>{y(!0)},children:[x&&!h&&!s&&(0,p.jsx)(m,{maxFullCount:g,getScrollerRef:()=>v.current,loadMore:C}),(0,p.jsxs)(l.Space,{direction:"vertical",children:[(0,p.jsx)("div",{children:f}),h?(0,p.jsx)("div",{className:u,children:(0,p.jsx)(l.Spin,{size:"small"})}):null,s&&_?(0,p.jsx)("div",{className:u,children:_}):null]})]})}));h.defaultProps={maxFullCount:3,completeTips:"\u52a0\u8f7d\u5b8c\u6210"};const _=h},73161:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(55199),l=n(83136),s=n.n(l);const o="style_search-input__8aH1G__Fo22-",r="style_is-popup__L0973__Fo22-";var i=n(64671),c=n(73884),d=n(51941),u=n(70579);const p=e=>{let{value:t,debounce:n,onSearch:l,isPopup:p,placeholder:m,className:h,..._}=e;const[g,f]=(0,c.useState)(t),x=(0,c.useRef)(t),y=(0,d.useDebouncedCallback)(l,n);return(0,c.useEffect)((()=>{t!==x.current&&(f(t),x.current=t)}),[t]),(0,u.jsx)(a.Input.Search,{..._,allowClear:!0,className:s()(h,o,{[r]: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),y(t)},onSearch:e=>{y(e)}})};p.defaultProps={debounce:500};const m=p},30509:(e,t,n)=>{n.d(t,{A:()=>B});const a={"ant-tag":"style_ant-tag__nNp8-__Fo22-",overlay:"style_overlay__La5mO__Fo22-",input:"style_input__SpJTE__Fo22-","is-disabled":"style_is-disabled__joxdl__Fo22-","input-icon":"style_input-icon__vVd8R__Fo22-",large:"style_large__En6mL__Fo22-",small:"style_small__DY0AQ__Fo22-","input-inner":"style_input-inner__PWy27__Fo22-","input-custom":"style_input-custom__ktsWD__Fo22-","display-content":"style_display-content__hIKo+__Fo22-","overlay-footer-extra":"style_overlay-footer-extra__Q+BiR__Fo22-","selected-tag":"style_selected-tag__zXZZO__Fo22-","selected-tag-list":"style_selected-tag-list__xUIms__Fo22-","selected-tag-inner":"style_selected-tag-inner__Z5gPL__Fo22-","text-inner":"style_text-inner__H24hY__Fo22-",placeholder:"style_placeholder__x0ccE__Fo22-","is-modal":"style_is-modal__JU+uq__Fo22-","overlay-content":"style_overlay-content__WKqp+__Fo22-"};var l=n(74981);const{context:s,useContext:o,Provider:r,Consumer:i}=(0,l.A)();var c=n(73884),d=n(10986),u=n.n(d),p=n(87558),m=n(33097),h=n.n(m),_=n(55199),g=n(83136),f=n.n(g),x=n(3382),y=n(64671),v=n(79686),C=n.n(v),j=n(41740),b=n.n(j),A=n(74065),N=n.n(A),F=n(21485),S=n(96418),w=n.n(S),O=n(77964),P=n(91176),I=n(58609),L=n(20492),k=n(27047),M=n(70579);const T=e=>{let{maxLength:t,single:n,setValue:a,value:l,message:s}=e;return e=>a(!n&&Number.isInteger(t)&&t>0&&e.length>t?(s(),l):e)},R=e=>{let{single:t,value:n,mapping:l,allValue:s,allLabel:o,onClose:r}=e;return n&&Array.isArray(n)&&0!==n.length?t?(0,M.jsx)("span",{className:a["text-inner"],children:h()(l.get(n[0]),"label")||n[0]}):1===n.length&&n[0]===(s||"all")?(0,M.jsx)("span",{className:a["text-inner"],children:o||(0,M.jsx)(I.FormattedMessage,{id:"all",moduleName:"Common"})}):n.map((e=>{const t=l.get(e);return(0,M.jsx)(_.Tag,{className:a["display-tag"],closable:!0,onClose:n=>{n.preventDefault(),r(e,t)},children:(0,M.jsx)("span",{className:a["tag-inner"],children:h()(t,"label")||e})},e)})):null},D=(0,c.forwardRef)(((e,t)=>{let{value:n,onChange:l,extra:s,showSelectedTag:o,renderSelectedContent:r,children:i,...d}=e;const[u,p]=(0,c.useState)(n),m=(0,c.useRef)(n),{formatMessage:h}=(0,I.useIntl)({moduleName:"Common"});m.current=n;const[g,f]=(0,c.useState)(!1),y=e=>{var t;f(e),null===(t=d.onOpenChange)||void 0===t||t.call(d,e)},{message:v}=_.App.useApp(),C=T({maxLength:d.maxLength,single:d.single,setValue:p,value:u,message:()=>v.error(h({id:"maxSelectedCount"},{count:d.maxLength}))});return(0,c.useEffect)((()=>{g&&p(m.current)}),[g]),(0,c.useImperativeHandle)(t,(()=>({modalOpen:()=>{y(!0)},close:()=>{y(!1)}}))),(0,M.jsx)(x.default,{...d,open:g,onConfirm:()=>{l(u)},onClose:()=>{y(!1)},footer:(0,M.jsxs)(_.Space,{direction:"vertical",className:a["overlay-footer"],children:[s&&(0,M.jsx)("div",{className:a["overlay-footer-extra"],children:s}),o&&r({value:u,setValue:C})]}),children:"function"===typeof i?i({value:u,setValue:C}):i})})),E=(0,c.forwardRef)(((e,t)=>{let{value:n,setValue:l,children:s,renderSelectedContent:o,showSelectedTag:r,placement:i,inputContent:d,single:u,extra:p,overlayWidth:m,wrapClassName:h,overlayClassName:g,disabled:x,...y}=e;const[v,C]=(0,c.useState)(!1),j=w()((e=>{var t;C(e),null===(t=y.onOpenChange)||void 0===t||t.call(y,e)}));return(0,c.useImperativeHandle)(t,(()=>({close:()=>{j(!1)}})),[j]),x?(0,M.jsx)("div",{className:a["input-inner"],children:d}):(0,M.jsx)(_.Popover,{...y,open:v,onOpenChange:j,transitionName:"ant-slide-up",overlayClassName:f()(a.overlay,g),arrow:!1,content:(0,M.jsxs)("div",{style:m?{"--overlay-width":m}:{},className:f()(a["overlay-content"],"over-content"),onClick:e=>{e.stopPropagation()},children:[(0,M.jsx)("div",{className:a["overlay-inner"],children:"function"===typeof s?s({value:n,setValue:e=>{(!u||n[0]!==e[0])&&l(e),u&&j(!1)}}):s}),(r||p)&&(0,M.jsxs)("div",{className:a["overlay-footer"],children:[p&&(0,M.jsx)("div",{className:a["overlay-footer-extra"],children:p}),r&&o({value:n,setValue:l})]})]}),trigger:"click",placement:i,children:(0,M.jsx)("div",{className:a["input-inner"],children:d})})})),z=(0,p.withFetch)((e=>{let{setFetchApi:t,wrapClassName:n,getContentRef:l,...s}=e;const[r,i]=(0,c.useState)(!1),d=(0,c.useRef)(null),u=(0,c.useRef)(null),p=o(),{valueState:m,mapping:h,props:g,inputWidth:x}=p,[v,C]=m,{formatMessage:j}=(0,I.useIntl)({moduleName:"Common"}),{single:b,placement:A,getPopupContainer:N,placeholder:S,isPopup:O,disabled:L,showSelectedTag:k,extra:T,inputContent:z,allowClear:V,overlayClassName:W}=g,B=(0,c.useRef)(s);B.current=s;const U=w()(l);(0,c.useEffect)((()=>{U(O?u:d)}),[O,U]),(0,c.useEffect)((()=>{t(Object.assign({},B.current,{data:s.data,isComplete:s.isComplete}))}),[s.data,t,s.isComplete]);const K=R({single:b,value:v,mapping:h,allValue:g.allValue,allLabel:g.allLabel,onClose:e=>{C((t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n}))}}),q=e=>{let{value:t,setValue:n}=e;return(0,M.jsxs)(_.Space,{className:a["selected-tag"],align:"center",wrap:!1,children:[(0,M.jsxs)("div",{children:[(0,M.jsx)(I.FormattedMessage,{id:"selectedTextAdvanced",moduleName:"Common",defaultMessage:"\u5df2\u9009"}),!g.single&&Number.isInteger(g.maxLength)&&g.maxLength>0?"(".concat(t.length,"/").concat(g.maxLength,")"):"",":"]}),(0,M.jsx)(F.A,{className:a["selected-tag-list"],children:(0,M.jsx)("div",{className:a["selected-tag-inner"],children:R({value:t,mapping:h,allValue:g.allValue,allLabel:g.allLabel,onClose:e=>{n((t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n}))}})})})]})},H=z?z(p):(0,M.jsxs)(_.Space,{className:a["display-content"],onMouseOver:()=>{i(!0)},onMouseOut:()=>{i(!1)},children:[(0,M.jsx)("div",{children:K||(0,M.jsx)("span",{className:a.placeholder,children:S||j({id:"pleaseSelect"})})}),r&&v&&v.length>0&&!L&&V?(0,M.jsx)(y.default,{className:f()(a.close,a["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),C([])}}):(0,M.jsx)(y.default,{className:f()(a["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return O?(0,M.jsx)(E,{ref:u,overlayWidth:(0,P.v)(Math.max(x,(0,P.j)(g.overlayWidth))),value:v,setValue:C,single:b,disabled:L,inputContent:H,onOpenChange:g.onOpenChange,overlayClassName:W,extra:"function"===typeof T?T({close:()=>u.current.close(),context:p}):T,renderSelectedContent:q,showSelectedTag:k,trigger:"click",placement:A,getPopupContainer:N,children:g.children}):(0,M.jsxs)("div",{className:a["input-inner"],onClick:()=>{L||d.current.modalOpen()},children:[(0,M.jsx)(D,{size:g.modalSize,ref:d,single:g.single,maxLength:g.maxLength,onOpenChange:g.onOpenChange,disabledScroller:!0,wrapClassName:f()(a.overlay,a["is-modal"],n),title:g.placeholder||j({id:"pleaseSelect"}),value:v,onChange:C,extra:"function"===typeof T?T({close:()=>d.current.close(),context:p}):T,showSelectedTag:k,renderSelectedContent:q,children:g.children}),H]})})),V=e=>{let{api:t,className:n,displayItems:l,wrapClassName:s,...o}=e;const{locale:i}=(0,k.A)(),[d,p]=(0,c.useState)(""),[m,g]=(0,c.useState)(new Map(l.map((e=>[e.value,e])))),{formatMessage:x}=(0,I.useIntl)({moduleName:"Common"}),[y,v]=(0,c.useState)(0),j=(0,O.A)((e=>{v(e.clientWidth)})),[A,F]=(0,c.useState)({}),{message:S}=_.App.useApp(),w=e=>{const t=e.filter((e=>m.get(e.value)!==e));0!==t.length&&g((e=>{const n=b()(e);return t.forEach((e=>{n.set(e.value,e)})),n}))},P=e=>((e,t)=>Array.isArray(e)&&e.every((e=>e&&e.hasOwnProperty("value")&&e.hasOwnProperty("label")))?(t(e),e.map((e=>e.value))):e)(o.single?C()(e)?[]:[e]:e||[],w,o.valueType),[L,R]=u()(Object.assign({},o,{onChange:e=>{const t=((e,t,n)=>"all"!==n?e:e.map((e=>t.get(e))).filter((e=>!!e)))(e,m,o.valueType);o.onChange&&o.onChange(o.single?N()(t):t)}},"value"in o?{value:P(o.value)}:{defaultValue:P(o.defaultValue)})),D=T({maxLength:o.maxLength,single:o.single,setValue:R,value:L,message:()=>S.error(x({id:"maxSelectedCount"},{count:o.maxLength}))}),E=(0,c.useRef)(null);return(0,M.jsx)(r,{value:{inputWidth:y,mapping:m,searchText:d,setSearchText:p,appendMapping:w,setItems:e=>{A.setData(e),w(h()(o.dataFormat(e,{locale:i}),"list",[]))},getContentApi:()=>E.current,fetchApi:A,valueState:[L,D],props:o},children:(0,M.jsx)("div",{ref:j,className:f()(a["input".concat(o.inputContent&&"function"===typeof o.inputContent?"-custom":"")],{"select-input-disabled":!!o.disabled},n),children:(0,M.jsx)(z,{...t,wrapClassName:s,loading:null,setFetchApi:F,getContentRef:e=>{e.current&&(E.current=e.current)},onRequestSuccess:e=>{w(h()(o.dataFormat(e,{locale:i}),"list",[])),t.onRequestSuccess&&t.onRequestSuccess(e)}})})})};V.defaultProps={displayItems:[],extra:null,api:{loader:()=>[]},dataFormat:e=>({list:e}),placement:"bottomLeft",showSelectedTag:!0,allowClear:!0};const W=(0,I.createWithIntl)({importMessages:L.A,moduleName:"Common"})(V);W.useContext=o;const B=W},17342:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(8762),l=n.n(a);n(46733);const s=l()},21485:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(73884),l=n(44418),s=n.n(l),o=n(96418),r=n.n(o),i=n(70579);const c=(0,a.forwardRef)(((e,t)=>{let{children:n,onScroll:l,options:o,onReady:c,...d}=e;const u=(0,a.useRef)(null),p=(0,a.useRef)(null),m=(0,a.useRef)(o),h=r()(c),_=r()(l);return(0,a.useImperativeHandle)(t,(()=>p.current)),(0,a.useEffect)((()=>{const e=new(s())(u.current,m.current);return p.current=e.getScrollElement(),p.current.addEventListener("scroll",_),h(p.current),()=>{p.current.removeEventListener("scroll",_)}}),[_,h,n]),(0,i.jsx)("div",{...d,ref:u,children:n})}))},89319:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(55199),l=n(10986),s=n.n(l),o=n(57469),r=n.n(o),i=n(20492),c=n(58609),d=n(70579);const u=(0,c.createWithIntl)({importMessages:i.A,moduleName:"Common"})((e=>{let{...t}=e;const{formatMessage:n}=(0,c.useIntl)({moduleName:"Common"}),l=new Map([["date",n({id:"customTime"})],["month",n({id:"monthly"})],["week",n({id:"weekly"})]]),[o,i]=s()(t);return(0,d.jsxs)(a.Space.Compact,{children:[(0,d.jsx)(a.Select,{style:{width:"120px"},value:(null===o||void 0===o?void 0:o.type)||"date",onChange:e=>{i((t=>{var n;return{value:null!==t&&void 0!==t&&null!==(n=t.value)&&void 0!==n&&n.length?[r()(t.value[0]).startOf(e||"date"),r()(t.value[1]).endOf(e||"date")]:null,type:e||"date"}}))},options:Array.from(l).map((e=>{let[t,n]=e;return{label:n,value:t}}))}),(0,d.jsx)(a.DatePicker.RangePicker,{...t,picker:(null===o||void 0===o?void 0:o.type)||"date",value:Array.isArray(null===o||void 0===o?void 0:o.value)&&2===o.value.length&&o.value.map((e=>e&&r()(e))),onChange:e=>{i((t=>(console.log(Object.assign({type:"date"},t,{value:e&&[e[0]&&new Date(e[0].startOf((null===t||void 0===t?void 0:t.type)||"date").valueOf()),e[1]&&new Date(e[1].endOf((null===t||void 0===t?void 0:t.type)||"date").valueOf())]})),Object.assign({type:"date"},t,{value:e&&[e[0]&&new Date(e[0].startOf((null===t||void 0===t?void 0:t.type)||"date").valueOf()),e[1]&&new Date(e[1].endOf((null===t||void 0===t?void 0:t.type)||"date").valueOf())]}))))}})]})}))},20492:(e,t,n)=>{n.d(t,{A:()=>a});const a=e=>({"en-US":()=>n.e(3086).then(n.bind(n,13086)),"zh-CN":()=>n.e(4308).then(n.bind(n,84308))}[e]())},29574:(e,t,n)=>{n.d(t,{Zi:()=>_,FI:()=>g,AG:()=>f,Ay:()=>y,lN:()=>x});const a="style_input-file__3JGm6__Fo22-",l="style_input-file-input__Fb5iw__Fo22-";var s=n(83136),o=n.n(s),r=n(73884),i=n(55199),c=n(76329),d=n(28987),u=n(80111),p=n.n(u),m=n(70579);const h=e=>t=>{let{className:n,accept:s,multiple:i,onChange:c,children:d,...u}=t;const p=(0,r.useRef)(null);return(0,m.jsxs)(e,{...u,className:o()(n,a),children:[d,!0!==u.disabled&&(0,m.jsx)("input",{ref:p,type:"file",accept:s,multiple:i,className:l,onChange:e=>{const t=[].slice.call(e.target.files,0);0!==t.length&&(p.current.setAttribute("type","text"),p.current.setAttribute("type","file"),c(t))}})]})},_=h(i.Button),g=h((e=>{let{className:t,...n}=e;return(0,m.jsx)(i.Typography.Link,{...n,className:t})})),f=h((e=>{let{className:t,...n}=e;return(0,m.jsx)(i.Typography.Text,{...n,className:o()("ant-btn",t)})})),x=e=>{const{message:t}=i.App.useApp(),{multiple:n,fileSize:a,maxLength:l,value:s,concurrentCount:o,onAdd:u,onError:m,onSave:h,onChange:_,ossUpload:g}=Object.assign({},{concurrentCount:1,value:[]},e),{apis:f}=(0,c.usePreset)(),[x,y]=(0,r.useState)([]),v=(0,r.useRef)(o),C=(0,r.useMemo)((()=>(0,d.A)(v.current)),[]);return{fileList:x,onFileSelected:async e=>{const o=l-s.length;1!==l&&!0===n&&e.length>o?t.error("\u4e0a\u4f20\u6587\u4ef6\u4e0d\u80fd\u8d85\u8fc7\u6700\u5927\u5141\u8bb8\u6570\u91cf".concat(l)):await Promise.allSettled(e.map((async e=>{if(e.size>1024*a*1024)return void t.error("\u6587\u4ef6".concat(e.name,"\u4e0d\u80fd\u8d85\u8fc7").concat(a,"MB!"));const s=p()(),o=n=>{const a=n.message||"\u6587\u4ef6".concat(e.name,"\u4e0a\u4f20\u9519\u8bef").concat(n.message?":"+n.message:"");t.error(a),m&&m({file:e,error:n,errMsg:a}),y((e=>{const t=e.slice(0),n=t.findIndex((e=>e.uuid===s));return n>-1&&t.splice(n,1),t}))};try{y(1===l||!0!==n?[{uuid:s,type:"uploading",filename:e.name}]:t=>{const n=t.slice(0);return n.unshift({uuid:s,type:"uploading",filename:e.name}),n}),u&&await Promise.resolve(u(e));const t=g||f.ossUpload,{data:a}=await C((()=>t({file:e})));if(0!==a.code)return void o(new Error("\u6587\u4ef6".concat(e.name,"\u4e0a\u4f20\u5f02\u5e38").concat(a.msg?":"+a.msg:"")));const r=h?await Promise.resolve(h(a,e,s)):{filename:a.data.originalName||a.data.filename||e.name,id:a.data.id,ossId:a.data.id,uuid:s};y((e=>{const t=e.slice(0),n=t.findIndex((e=>e.uuid===s));return n>-1&&t.splice(n,1),t})),_(1===l||!0!==n?[r]:e=>{const t=e.slice(0);return t.push(r),t})}catch(r){o(r)}})))}}},y=h},97211:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(87558),l=n.n(a),s=n(76329),o=n(34677),r=n.n(o),i=n(70579);const c=e=>{const t=t=>{let{id:n,url:a,error:o,apis:c,loading:d,...u}=t;const{apis:p}=(0,s.usePreset)(),m=r()({},p,c);if(!n)return null;if(!m.oss)throw new Error("\u8bf7\u5728Global\u7ec4\u4ef6\u8bbe\u7f6epreset.apis.oss\u53c2\u6570");const{paramsType:h,paramsName:_,...g}=Object.assign({paramsType:"params",paramsName:"id"},m.oss),f={};return f[h]={[_]:n},(0,i.jsx)(l(),{...Object.assign({},g,f),updateType:"refresh",error:o,loading:d,cache:"oss-file",ttl:6e6,render:t=>{let{data:a}=t;return(0,i.jsx)(e,{...u,id:n,data:a})}})};return t.defaultProps={loading:null},t}},27047:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(83694),l=n(33097),s=n.n(l);const o=()=>{const e=(0,a.useGlobalContext)();return s()(e,"preset",{apis:{}})}},77964:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(73884),l=n(79889),s=n.n(l),o=n(93950),r=n.n(o),i=n(96418),c=n.n(i);const d=(e,t)=>{const n=(0,a.useRef)(null);n.current=Object.assign({},{time:500,isDebounce:!1},t);const l=(0,a.useRef)(null),o=c()(e);return(0,a.useLayoutEffect)((()=>{const e=l.current,t=()=>window.requestAnimationFrame((()=>{e&&o(e)}));t();const a=new ResizeObserver((n.current.isDebounce?r():s())(t,n.current.time));return e&&a.observe(e),()=>{a.disconnect()}}),[o]),l}},81348:(e,t,n)=>{n.d(t,{A:()=>a});const a=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),a=e.name||"",l=(e.type||"").toLowerCase(),s=l.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?a.toLowerCase().endsWith(t):t.endsWith("/*")?s===t.replace(/\/.*$/,""):l===t}))}return!0}},69484:(e,t,n)=>{n.d(t,{A:()=>l,e:()=>a});const a=1e15,l=e=>{let t,n,l,s=["\u96f6","\u58f9","\u8d30","\u53c1","\u8086","\u4f0d","\u9646","\u67d2","\u634c","\u7396"],o=["","\u62fe","\u4f70","\u4edf"],r=["","\u4e07","\u4ebf","\u5146"],i=["\u89d2","\u5206","\u6beb","\u5398"],c="",d="";if(""===e)return"";if((e=parseFloat(e))>=a)return c="\u8d85\u51fa\u6700\u5927\u5904\u7406\u6570\u5b57",console.error("\u8d85\u51fa\u6700\u5927\u5904\u7406\u6570\u5b57"),c;if(0===e)return c=s[0]+"\u5143\u6574",c;if(e<0&&(e=-e,d="\u8d1f "),-1===(e=e.toString()).indexOf(".")?(t=e,n=""):(l=e.split("."),t=l[0],n=l[1].substr(0,4)),parseInt(t,10)>0){let e=0,n=t.length;for(let a=0;a<n;a++){let l=t.substr(a,1),i=n-a-1,d=i/4,u=i%4;"0"===l?e++:(e>0&&(c+=s[0]),e=0,c+=s[parseInt(l)]+o[u]),0===u&&e<4&&(c+=r[d])}c+="\u5143"}if(""!==n){let e=n.length;for(let t=0;t<e;t++){let e=n.substr(t,1);"0"!==e&&(c+=s[Number(e)]+i[t])}}return""===c?c+=s[0]+"\u5143\u6574":""===n&&(c+="\u6574"),c=d+c,c}},74981:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(73884);const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.createContext)(e),{Provider:n,Consumer:l}=t;return{context:t,Provider:n,Consumer:l,useContext:()=>(0,a.useContext)(t)}}},28987:(e,t,n)=>{n.d(t,{A:()=>a});const a=e=>{const t=[];let n=0;const a=()=>{if(0!==t.length){if(n<e){const e=t.shift();n+=1,e().finally((()=>{n-=1,a()}))}}else n=0};return e=>new Promise((n=>{t.push((()=>{const t=Promise.resolve().then((()=>e()));return n(t),t})),a()}))}},55490:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(12322),l=n.n(a),s=n(26727),o=n.n(s),r=n(54052),i=n.n(r);const c=e=>{if(l()(e)){const t=o()(e);return t.length>0&&t.some((e=>c(e)))}return i()(e)?e.length>0&&e.some((e=>c(e))):"number"===typeof e?!isNaN(e):!(void 0===e||null===e||""===e||0===e.length)},d=c},91176:(e,t,n)=>{n.d(t,{j:()=>l,v:()=>a});const a=e=>"number"===typeof e?"".concat(e,"px"):e,l=e=>{if(!e)return 0;const t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}},36:(e,t,n)=>{n.r(t),n.d(t,{AddressEnum:()=>h.qn,AddressInputField:()=>h.TM,AddressSelectField:()=>h.Ay,AdvancedSelectField:()=>_.Ay,CascaderField:()=>g.Ay,FetchButton:()=>i.A,FunctionEnum:()=>f.K,FunctionSelectField:()=>f.A,IndustryEnum:()=>x.W,IndustrySelectField:()=>x.A,InputFileButton:()=>m.Zi,InputFileLink:()=>m.FI,InputFileText:()=>m.AG,ScrollLoader:()=>r.A,SearchInput:()=>u.A,SelectInnerInput:()=>p.A,SimpleBar:()=>d.A,SimpleBarBox:()=>c.A,TableField:()=>_.Bm,TypeDateRangePickerField:()=>y.A,UserField:()=>_.Eo,accept:()=>C.A,changeMoneyToChinese:()=>a.A,createAddressApi:()=>h.LH,createDeferred:()=>j.A,createListField:()=>_.NR,createTreeUtils:()=>g.ON,getContainerBody:()=>l.c,getPopupContainer:()=>s,getScrollEl:()=>l.h,isNotEmpty:()=>b.A,numberToPx:()=>A.v,pxToNumber:()=>A.j,useFileUpload:()=>m.lN,useResize:()=>v.A,withAddressApi:()=>h.DF,withInputFile:()=>m.Ay,withOSSFile:()=>o.A});var a=n(69484),l=n(76801);const s=e=>{const t=e=>{const n=(0,l.h)();if(!e||e===n||!e.parentElement)return n;return[].slice.call(e.classList,0).find((e=>["ant-modal-body","ant-modal-content","ant-popover-content"].indexOf(e)>-1))?e:t(e.parentElement)};return t(e)};var o=n(97211),r=n(26475),i=n(73025),c=n(21485),d=n(17342),u=n(73161),p=n(30509),m=n(29574),h=n(93761),_=n(12392),g=n(45776),f=n(41654),x=n(53392),y=n(89319),v=n(77964),C=n(81348),j=n(28987),b=n(55490),A=n(91176)},40438:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var a=n(87558),l=n.n(a),s=n(97211),o=n(64671),r=n(83136),i=n.n(r),c=n(55199),d=n(73884);const u=e=>{let{params:t}=e;const{data:n}=t;return new Promise(((e,t)=>{const a=new window.Image;a.src=n,a.addEventListener("load",(()=>{e(n)})),a.addEventListener("error",(e=>{t(e)}))}))},p="style_img-outer__4QLY5__Fo22-",m="style_img__PSExq__Fo22-",h="style_loading__WCOwA__Fo22-",_="style_error__+ECgZ__Fo22-";var g=n(18411),f=n(70579);const x=e=>{let{data:t,className:n,alt:a,innerLoading:s,loading:o,error:r,innerError:c,children:d,onClick:p}=e;return(0,f.jsx)(l(),{loader:u,params:{data:t},error:c||r,loading:s||o,render:e=>{let{data:t}=e;return"function"===typeof d?d({alt:a,className:i()(n,m),src:t}):(0,f.jsx)("img",{alt:a,className:i()(n,m),src:t,onClick:p})}})},y=(0,s.A)(x),v=e=>{let{loading:t,error:n,src:a,id:l,alt:s,className:o,children:r,apis:i,onClick:c}=e;const u=t&&(0,d.cloneElement)(t,{className:h}),p=n&&(0,d.cloneElement)(n,{className:_});return a?(0,f.jsx)(x,{alt:s,className:o,data:a,loading:u,error:p,onClick:c,children:r}):l?(0,f.jsx)(y,{alt:s,className:o,id:l,loading:u,innerLoading:u,error:p,innerError:p,apis:i,onClick:c,children:r}):p},C=e=>{let{id:t,src:n,alt:a,onClick:l,loading:s,error:o,className:r,apis:c,...d}=e;return(0,f.jsx)("div",{...d,"data-testid":"components-core-image",className:i()(r,p),children:v({loading:s,error:o,src:n,id:t,alt:a,className:r,apis:c,onClick:l})})};C.Avatar=e=>{let{id:t,src:n,alt:a,gender:l,loading:s,error:r,className:d,gap:u,icon:m,children:h,shape:_,size:g,width:x,height:y,defaultAvatar:C,apis:j,...b}=e;const A=(()=>{const e=x&&y?{style:{width:x,height:y}}:{size:g};if(x&&x!==y&&(_="square"),t||n)return v({loading:s,error:r,src:n,defaultAvatar:C,id:t,alt:a,className:d,apis:j,children:t=>(0,f.jsx)(c.Avatar,{...t,gap:u,shape:_,...e})});if(l){const t=l&&["F","female","f"].indexOf(l)>-1?"icon-color-touxiang-nv":"icon-color-touxiang-nan";return(0,f.jsx)(c.Avatar,{...b,src:(0,f.jsx)(o.default,{role:"touxiang",colorful:!0,type:t}),gap:u,shape:_,...e})}return(0,f.jsx)(c.Avatar,{...b,gap:u,icon:m,shape:_,size:g,src:C,...e,children:h})})();return(0,f.jsx)("div",{...b,"data-testid":"components-core-image-avatar",className:i()(d,p),style:{width:x&&y?x:g,height:x&&y?y:g},children:A})};const j={error:(0,f.jsx)(o.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),loading:(0,f.jsx)(c.Skeleton.Avatar,{shape:"square",active:!0})};C.defaultProps=Object.assign({},j),C.Avatar.defaultProps=Object.assign({},j,{size:100,defaultAvatar:g.A});const b=C},3382:(e,t,n)=>{n.r(t),n.d(t,{ModalButton:()=>L,TabsModal:()=>w,TabsModalButton:()=>I,default:()=>F,useConfirmModal:()=>N,useModal:()=>A,useTabsModal:()=>O});var a=n(73884),l=n(55199),s=n(83136),o=n.n(s);const r={modal:"style_modal__Pm3cF__Fo22-",large:"style_large__iaqVE__Fo22-","modal-body-inner":"style_modal-body-inner__4PhpA__Fo22-","modal-title":"style_modal-title__dswaw__Fo22-","modal-outer":"style_modal-outer__r3SkX__Fo22-","modal-body":"style_modal-body__jQJSI__Fo22-","right-options-modal":"style_right-options-modal__FajDP__Fo22-","right-options-row":"style_right-options-row__-mPb9__Fo22-","right-options-col":"style_right-options-col__3ilee__Fo22-","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__Fo22-",content:"style_content__k6MIF__Fo22-","modal-footer":"style_modal-footer__-prbN__Fo22-","modal-close":"style_modal-close__Oa5Kl__Fo22-","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__Fo22-","is-danger":"style_is-danger__H5110__Fo22-",title:"style_title__orTym__Fo22-","has-title":"style_has-title__qy0Wp__Fo22-"},i=e=>({"en-US":()=>n.e(4628).then(n.bind(n,74628)),"zh-CN":()=>n.e(7478).then(n.bind(n,87478))}[e]());var c=n(58609),d=n(64671);const u=(e,t)=>"function"===typeof e?e(t):e;var p=n(81014),m=n(17342),h=n(70579);const _="Modal",g=e=>{let{options:t,children:n}=e;return t?(0,h.jsxs)(l.Row,{wrap:!1,className:r["right-options-row"],children:[(0,h.jsx)(l.Col,{span:18,className:r["right-options-col"],children:n}),(0,h.jsx)(l.Col,{span:6,className:r["right-options-col"],children:t})]}):n},f=(e,t)=>"".concat(e-48-(t?58:0),"px"),x=(e,t)=>"large"===e?{width:"".concat(Math.min(window.innerWidth-64,1500),"px"),style:{"--min-modal-height":f(500,t)}}:"small"===e?{width:"600px",style:{"--min-modal-height":f(300,t)}}:{width:"1000px",style:{"--min-modal-height":f(500,t)}},y=e=>{let{footer:t,footerButtons:n,onConfirm:s,onCancel:o,onClose:r,targetProps:d}=e;return(0,h.jsxs)(l.Row,{gutter:10,wrap:!1,children:[(0,h.jsx)(l.Col,{flex:1,children:t}),Array.isArray(n)&&0===n.length?null:(0,h.jsx)(l.Col,{children:(0,h.jsx)(l.Space,{children:(n||[{children:(0,h.jsx)(c.IntlProvider,{importMessages:i,moduleName:_,children:(0,h.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:_})}),onClick:o},{type:"primary",children:(0,h.jsx)(c.IntlProvider,{importMessages:i,moduleName:_,children:(0,h.jsx)(c.FormattedMessage,{id:"Confirm",moduleName:_})}),onClick:s}]).filter((e=>"function"===typeof(null===e||void 0===e?void 0:e.display)?null===e||void 0===e?void 0:e.display():!1!==(null===e||void 0===e?void 0:e.display))).map(((e,t)=>{let{ButtonComponent:n,onClick:l,autoClose:s=!0,display:o,...i}=e;const c=n||p.default;return(0,a.createElement)(c,{...i,key:t,onClick:async function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const a=await Promise.resolve(l&&l(...t,d));return s&&!1!==a&&r&&r(),a}})}))})})]})},v=e=>{let{title:t,footer:n,disabledScroller:s,footerButtons:i,onClose:c,closable:u,onConfirm:p,onCancel:_,children:g,targetProps:f}=e;const x=(0,a.useRef)(null);return(0,h.jsxs)("div",{className:r["modal-outer"],"data-testid":"components-core-modal",children:[!1===u?null:(0,h.jsx)(l.Button,{"data-testid":"components-core-modal-close-btn",className:r["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:r["modal-title"],children:t}),(0,h.jsx)(m.A,{className:o()(r["modal-body"],{[r["is-disabled-scroller"]]:s},"modal-body"),ref:x,children:(0,h.jsx)("div",{className:o()(r["modal-body-inner"],"modal-body-inner"),children:g})}),null!==n||i?(0,h.jsx)("div",{className:o()(r["modal-footer"],"modal-footer"),children:(0,h.jsx)(y,{footer:n,footerButtons:i,onConfirm:p,onCancel:_,onClose:c,targetProps:f})}):null]})},C=e=>{let{withDecorator:t,footerButtons:n,title:a,closable:l,onClose:s,onConfirm:o,onCancel:r,footer:i,rightOptions:c,disabledScroller:d,childrenRef:p,children:m}=e;const _=e=>(e=Object.assign({},{title:a},e),(0,h.jsx)(v,{title:u(e.title,{...e,childrenRef:p,close:s}),closable:l,onClose:s,onConfirm:o,onCancel:r,footerButtons:u(n,{...e,close:s}),disabledScroller:d,footer:u(i,{...e,childrenRef:p,close:s}),targetProps:Object.assign({},e,{childrenRef:p,close:s}),children:(0,h.jsx)(g,{options:u(c,{...e,childrenRef:p,close:s}),children:u(m,{...e,childrenRef:p,close:s})})}));return"function"===typeof t?t(_):_({})},j=e=>{let{children:t,rightOptions:n,footer:a,footerButtons:l,className:s,size:d,title:u,onClose:p,onConfirm:m,onCancel:_,closable:g,disabledScroller:f,withDecorator:y,childrenRef:v,...j}=e;return{...j,icon:null,centered:!0,title:null,maskClosable:!!j.hasOwnProperty("maskClosable")&&j.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:o()(s,r.modal,r[d],{[r["right-options-modal"]]:n}),...x(d,!(null===a&&!l)),children:(0,h.jsx)(c.IntlProvider,{importMessages:i,moduleName:"Modal",children:C({withDecorator:y,title:u,closable:g,onClose:p,onConfirm:m,onCancel:_,footer:a,footerButtons:l,rightOptions:n,disabledScroller:f,children:t,childrenRef:v})})}},b=e=>{const t=(0,a.useRef)(null);return(0,h.jsx)(l.Modal,{...j(Object.assign({},e,{childrenRef:t}))})};b.defaultProps={size:"default"};const A=()=>{const{modal:e}=l.App.useApp(),t=(0,a.useRef)(null);return n=>{const a={},{children:l,...s}=j({onClose:()=>a.close(),childrenRef:t,...n}),{destroy:o}=e.info({...s,content:l});return a.close=o,a}},N=()=>{const{modal:e}=l.App.useApp();return t=>{const n={},{type:a,icon:s,title:i,danger:c,wrapClassName:u,message:p,iconSetting:m={},confirmType:_="info",...g}={onClose:()=>n.close(),maskClosable:!1,...t},f=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},m);if(e[a]){const{destroy:t}=e[a]({...g,icon:null,wrapClassName:o()(r["confirm-modal-wrap"],u,{[r["is-danger"]]:c}),title:(0,h.jsx)(l.Space,{direction:"vertical",onClick:e=>{e.stopPropagation()},children:i&&(0,h.jsxs)(l.Space,{size:0,align:"start",className:r.title,children:[c?(0,h.jsx)(d.default,{className:o()("title-icon","title-icon-".concat("confirm"===a?_:a)),type:s||f["confirm"===a?_:a]}):null,i]})}),content:(0,h.jsxs)(l.Space,{size:0,align:"start",className:o()(r.content,{[r["has-title"]]:i}),children:[!i&&c?(0,h.jsx)(d.default,{className:o()("title-icon","title-icon-".concat("confirm"===a?_:a)),type:s||f["confirm"===a?_:a]}):null,p]})});n.close=t}return n}},F=b,S=e=>{let{items:t,className:n,activeKey:a,withDecorator:s,defaultActiveKey:r,onChange:i,...c}=e;return{...c,className:o()(n,"tabs-modal"),withDecorator:e=>{const n=n=>(0,h.jsx)(l.Tabs,{items:t.map((t=>{let{withDecorator:a,...l}=t;return Object.assign({},l,{children:"function"===typeof a?a((t=>e(Object.assign({},n,t,{children:l.children})))):e(Object.assign({},n,{children:l.children}))})})),destroyInactiveTabPane:!0,activeKey:a,defaultActiveKey:r,onChange:i});return"function"===typeof s?s(n):n()},children:e=>{let{children:t,...n}=e;return"function"===typeof t?t(n):t}}},w=e=>(0,h.jsx)(F,{...S(e)}),O=()=>{const e=A();return t=>e(S(t))};var P=n(73025);const I=e=>{const t=O();return(0,h.jsx)(P.A,{...e,modalFunc:t})},L=e=>{const t=A();return(0,h.jsx)(P.A,{...e,modalFunc:t})}},25438:(e,t,n)=>{n.d(t,{A:()=>a});const a={"search-input":"common_search-input__P6qLg__Fo22-","is-popup":"common_is-popup__fJq+g__Fo22-",list:"common_list__TKFzS__Fo22-","list-item":"common_list-item__ASse7__Fo22-","is-selected":"common_is-selected__-PU4Y__Fo22-","item-label":"common_item-label__u+qz1__Fo22-","item-des":"common_item-des__no2z0__Fo22-"}}}]);
|
|
2
|
-
//# sourceMappingURL=36.1c63688d.chunk.js.map
|