@kne-components/components-core 0.2.41 → 0.2.43
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 +151 -176
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/1151.4de42b45.chunk.css +2 -0
- package/build/static/css/{1151.174bd54b.chunk.css.map → 1151.4de42b45.chunk.css.map} +1 -1
- package/build/static/css/1153.bb4ac3a6.chunk.css +2 -0
- package/build/static/css/1153.bb4ac3a6.chunk.css.map +1 -0
- package/build/static/css/1554.4df98f31.chunk.css +2 -0
- package/build/static/css/{1554.d2fca62a.chunk.css.map → 1554.4df98f31.chunk.css.map} +1 -1
- package/build/static/css/2503.b81a8ac3.chunk.css +2 -0
- package/build/static/css/{2503.fefbc858.chunk.css.map → 2503.b81a8ac3.chunk.css.map} +1 -1
- package/build/static/css/2517.7a55b2d6.chunk.css +2 -0
- package/build/static/css/{2517.f69b3b63.chunk.css.map → 2517.7a55b2d6.chunk.css.map} +1 -1
- package/build/static/css/2716.7b031170.chunk.css +2 -0
- package/build/static/css/{2716.ad57f666.chunk.css.map → 2716.7b031170.chunk.css.map} +1 -1
- package/build/static/css/2730.789b24d5.chunk.css +2 -0
- package/build/static/css/{2730.9c490085.chunk.css.map → 2730.789b24d5.chunk.css.map} +1 -1
- package/build/static/css/3142.dccff030.chunk.css +2 -0
- package/build/static/css/{3142.bcd730ed.chunk.css.map → 3142.dccff030.chunk.css.map} +1 -1
- package/build/static/css/4029.986cc830.chunk.css +2 -0
- package/build/static/css/4029.986cc830.chunk.css.map +1 -0
- package/build/static/css/4265.7c0bc7a4.chunk.css +2 -0
- package/build/static/css/4265.7c0bc7a4.chunk.css.map +1 -0
- package/build/static/css/4319.4f3710fd.chunk.css +2 -0
- package/build/static/css/{4319.4d5cfa09.chunk.css.map → 4319.4f3710fd.chunk.css.map} +1 -1
- package/build/static/css/4666.fa3483be.chunk.css +2 -0
- package/build/static/css/{4666.a656d2c4.chunk.css.map → 4666.fa3483be.chunk.css.map} +1 -1
- package/build/static/css/5443.382d8e47.chunk.css +2 -0
- package/build/static/css/5443.382d8e47.chunk.css.map +1 -0
- package/build/static/css/5600.daded1e6.chunk.css +2 -0
- package/build/static/css/{5600.8117cf36.chunk.css.map → 5600.daded1e6.chunk.css.map} +1 -1
- package/build/static/css/5962.fd066085.chunk.css +2 -0
- package/build/static/css/{5962.f29a181f.chunk.css.map → 5962.fd066085.chunk.css.map} +1 -1
- package/build/static/css/{5996.a18dcec9.chunk.css → 5996.bb4216d8.chunk.css} +2 -2
- package/build/static/css/{5996.a18dcec9.chunk.css.map → 5996.bb4216d8.chunk.css.map} +1 -1
- package/build/static/css/6611.1622b705.chunk.css +2 -0
- package/build/static/css/{6611.91ad2413.chunk.css.map → 6611.1622b705.chunk.css.map} +1 -1
- package/build/static/css/6779.ab82ccbd.chunk.css +2 -0
- package/build/static/css/{6779.9f6193d6.chunk.css.map → 6779.ab82ccbd.chunk.css.map} +1 -1
- package/build/static/css/7121.fdf84e05.chunk.css +2 -0
- package/build/static/css/{7121.f089fe7d.chunk.css.map → 7121.fdf84e05.chunk.css.map} +1 -1
- package/build/static/css/7227.013f99a9.chunk.css +2 -0
- package/build/static/css/{7227.4f25ba8c.chunk.css.map → 7227.013f99a9.chunk.css.map} +1 -1
- package/build/static/css/8017.4e6600a8.chunk.css +2 -0
- package/build/static/css/8017.4e6600a8.chunk.css.map +1 -0
- package/build/static/css/8332.5337d614.chunk.css +2 -0
- package/build/static/css/{8332.83d205a2.chunk.css.map → 8332.5337d614.chunk.css.map} +1 -1
- package/build/static/css/{8725.b253f64c.chunk.css → 8725.4ebcb56b.chunk.css} +2 -2
- package/build/static/css/{8725.b253f64c.chunk.css.map → 8725.4ebcb56b.chunk.css.map} +1 -1
- package/build/static/css/9968.f88faca8.chunk.css +2 -0
- package/build/static/css/9968.f88faca8.chunk.css.map +1 -0
- package/build/static/js/{1153.cdc50c19.chunk.js → 1153.b6ff505e.chunk.js} +3 -3
- package/build/static/js/{1153.cdc50c19.chunk.js.map → 1153.b6ff505e.chunk.js.map} +1 -1
- package/build/static/js/1400.31ca0433.chunk.js +2 -0
- package/build/static/js/{1400.3a90f09a.chunk.js.map → 1400.31ca0433.chunk.js.map} +1 -1
- package/build/static/js/1554.bae12001.chunk.js +3 -0
- package/build/static/js/{1554.0beb5494.chunk.js.map → 1554.bae12001.chunk.js.map} +1 -1
- package/build/static/js/1581.811ba84b.chunk.js +2 -0
- package/build/static/js/{3962.3e44db16.chunk.js.map → 1581.811ba84b.chunk.js.map} +1 -1
- package/build/static/js/2331.b6f2a506.chunk.js +2 -0
- package/build/static/js/{2331.017c7318.chunk.js.map → 2331.b6f2a506.chunk.js.map} +1 -1
- package/build/static/js/2503.a8362b49.chunk.js +2 -0
- package/build/static/js/{2503.15f977e4.chunk.js.map → 2503.a8362b49.chunk.js.map} +1 -1
- package/build/static/js/2517.3255de49.chunk.js +2 -0
- package/build/static/js/{2517.304d1c92.chunk.js.map → 2517.3255de49.chunk.js.map} +1 -1
- package/build/static/js/2716.6975d095.chunk.js +3 -0
- package/build/static/js/{2716.66d4eab2.chunk.js.map → 2716.6975d095.chunk.js.map} +1 -1
- package/build/static/js/2730.1a859433.chunk.js +2 -0
- package/build/static/js/{2730.3e2fa120.chunk.js.map → 2730.1a859433.chunk.js.map} +1 -1
- package/build/static/js/2814.dd5df99c.chunk.js +2 -0
- package/build/static/js/{2814.1ea829c8.chunk.js.map → 2814.dd5df99c.chunk.js.map} +1 -1
- package/build/static/js/2970.cb5e7784.chunk.js +2 -0
- package/build/static/js/{2970.326287df.chunk.js.map → 2970.cb5e7784.chunk.js.map} +1 -1
- package/build/static/js/3142.b2c018df.chunk.js +2 -0
- package/build/static/js/{3142.b79193df.chunk.js.map → 3142.b2c018df.chunk.js.map} +1 -1
- package/build/static/js/36.c8cda08b.chunk.js +2 -0
- package/build/static/js/{36.dccdc545.chunk.js.map → 36.c8cda08b.chunk.js.map} +1 -1
- package/build/static/js/{4029.75545d82.chunk.js → 4029.14ac6ed1.chunk.js} +2 -2
- package/build/static/js/4029.14ac6ed1.chunk.js.map +1 -0
- package/build/static/js/4106.8ff2b68d.chunk.js +2 -0
- package/build/static/js/{1725.bc60f755.chunk.js.map → 4106.8ff2b68d.chunk.js.map} +1 -1
- package/build/static/js/4265.9062620c.chunk.js +2 -0
- package/build/static/js/{4265.f2c2f034.chunk.js.map → 4265.9062620c.chunk.js.map} +1 -1
- package/build/static/js/{4319.cf5925fe.chunk.js → 4319.f41624a0.chunk.js} +2 -2
- package/build/static/js/{4319.cf5925fe.chunk.js.map → 4319.f41624a0.chunk.js.map} +1 -1
- package/build/static/js/{4666.c9024365.chunk.js → 4666.d7833510.chunk.js} +3 -3
- package/build/static/js/{4666.c9024365.chunk.js.map → 4666.d7833510.chunk.js.map} +1 -1
- package/build/static/js/5443.7314913f.chunk.js +2 -0
- package/build/static/js/{5443.f7281d63.chunk.js.map → 5443.7314913f.chunk.js.map} +1 -1
- package/build/static/js/556.1fe51b22.chunk.js +2 -0
- package/build/static/js/{556.9e43bff7.chunk.js.map → 556.1fe51b22.chunk.js.map} +1 -1
- package/build/static/js/5600.44942680.chunk.js +2 -0
- package/build/static/js/{5600.d728bcd3.chunk.js.map → 5600.44942680.chunk.js.map} +1 -1
- package/build/static/js/5786.fd6a0b33.chunk.js +2 -0
- package/build/static/js/{5786.4a032c0e.chunk.js.map → 5786.fd6a0b33.chunk.js.map} +1 -1
- package/build/static/js/5962.0da47a92.chunk.js +2 -0
- package/build/static/js/{5962.7cd8c3e1.chunk.js.map → 5962.0da47a92.chunk.js.map} +1 -1
- package/build/static/js/{5996.eb4c7c52.chunk.js → 5996.86ac2f71.chunk.js} +2 -2
- package/build/static/js/{5996.eb4c7c52.chunk.js.map → 5996.86ac2f71.chunk.js.map} +1 -1
- package/build/static/js/628.78906eef.chunk.js +2 -0
- package/build/static/js/{628.4d54b21d.chunk.js.map → 628.78906eef.chunk.js.map} +1 -1
- package/build/static/js/6611.aa28eda7.chunk.js +2 -0
- package/build/static/js/{6611.1be48e69.chunk.js.map → 6611.aa28eda7.chunk.js.map} +1 -1
- package/build/static/js/6779.af16ee56.chunk.js +2 -0
- package/build/static/js/{6779.2092cdf9.chunk.js.map → 6779.af16ee56.chunk.js.map} +1 -1
- package/build/static/js/6908.b9d9e979.chunk.js +3 -0
- package/build/static/js/6908.b9d9e979.chunk.js.map +1 -0
- package/build/static/js/6915.b7f0a418.chunk.js +2 -0
- package/build/static/js/{6915.d3fc7b65.chunk.js.map → 6915.b7f0a418.chunk.js.map} +1 -1
- package/build/static/js/7060.fb665524.chunk.js +2 -0
- package/build/static/js/{7060.2de08549.chunk.js.map → 7060.fb665524.chunk.js.map} +1 -1
- package/build/static/js/7121.c865a673.chunk.js +2 -0
- package/build/static/js/{7121.5ffc808f.chunk.js.map → 7121.c865a673.chunk.js.map} +1 -1
- package/build/static/js/7227.254ec5f8.chunk.js +3 -0
- package/build/static/js/{7227.2b908933.chunk.js.map → 7227.254ec5f8.chunk.js.map} +1 -1
- package/build/static/js/7322.7509f0aa.chunk.js +2 -0
- package/build/static/js/{4941.ae76674b.chunk.js.map → 7322.7509f0aa.chunk.js.map} +1 -1
- package/build/static/js/7617.69cfc4d5.chunk.js +2 -0
- package/build/static/js/{7617.e7bfe484.chunk.js.map → 7617.69cfc4d5.chunk.js.map} +1 -1
- package/build/static/js/{7967.e2a25670.chunk.js → 7967.3d26b043.chunk.js} +2 -2
- package/build/static/js/{7967.e2a25670.chunk.js.map → 7967.3d26b043.chunk.js.map} +1 -1
- package/build/static/js/{8017.a61ddbed.chunk.js → 8017.f6128e03.chunk.js} +2 -2
- package/build/static/js/{8017.a61ddbed.chunk.js.map → 8017.f6128e03.chunk.js.map} +1 -1
- package/build/static/js/{8151.f8e1d2af.chunk.js → 8151.712d3f0a.chunk.js} +2 -2
- package/build/static/js/{8151.f8e1d2af.chunk.js.map → 8151.712d3f0a.chunk.js.map} +1 -1
- package/build/static/js/8332.0c378091.chunk.js +2 -0
- package/build/static/js/{8332.c9939217.chunk.js.map → 8332.0c378091.chunk.js.map} +1 -1
- package/build/static/js/8725.dd2e6691.chunk.js +2 -0
- package/build/static/js/{8725.cbf5f6aa.chunk.js.map → 8725.dd2e6691.chunk.js.map} +1 -1
- package/build/static/js/903.9e4ec4b4.chunk.js +1 -0
- package/build/static/js/9439.e8385e17.chunk.js +2 -0
- package/build/static/js/{1820.72fe029d.chunk.js.map → 9439.e8385e17.chunk.js.map} +1 -1
- package/build/static/js/{9968.2dec8716.chunk.js → 9968.fb47c40a.chunk.js} +2 -2
- package/build/static/js/{9968.2dec8716.chunk.js.map → 9968.fb47c40a.chunk.js.map} +1 -1
- package/build/static/js/main.6ab8b419.js +2 -0
- package/build/static/js/main.6ab8b419.js.map +1 -0
- package/package.json +1 -1
- package/build/static/css/1151.174bd54b.chunk.css +0 -2
- package/build/static/css/1153.3be02ec9.chunk.css +0 -2
- package/build/static/css/1153.3be02ec9.chunk.css.map +0 -1
- package/build/static/css/1554.d2fca62a.chunk.css +0 -2
- package/build/static/css/2503.fefbc858.chunk.css +0 -2
- package/build/static/css/2517.f69b3b63.chunk.css +0 -2
- package/build/static/css/2716.ad57f666.chunk.css +0 -2
- package/build/static/css/2730.9c490085.chunk.css +0 -2
- package/build/static/css/3142.bcd730ed.chunk.css +0 -2
- package/build/static/css/4029.83824f1a.chunk.css +0 -2
- package/build/static/css/4029.83824f1a.chunk.css.map +0 -1
- package/build/static/css/4265.bae2afe4.chunk.css +0 -2
- package/build/static/css/4265.bae2afe4.chunk.css.map +0 -1
- package/build/static/css/4319.4d5cfa09.chunk.css +0 -2
- package/build/static/css/4666.a656d2c4.chunk.css +0 -2
- package/build/static/css/5443.e92e3bbe.chunk.css +0 -2
- package/build/static/css/5443.e92e3bbe.chunk.css.map +0 -1
- package/build/static/css/5600.8117cf36.chunk.css +0 -2
- package/build/static/css/5962.f29a181f.chunk.css +0 -2
- package/build/static/css/6611.91ad2413.chunk.css +0 -2
- package/build/static/css/6779.9f6193d6.chunk.css +0 -2
- package/build/static/css/7121.f089fe7d.chunk.css +0 -2
- package/build/static/css/7227.4f25ba8c.chunk.css +0 -2
- package/build/static/css/8017.f71b311f.chunk.css +0 -2
- package/build/static/css/8017.f71b311f.chunk.css.map +0 -1
- package/build/static/css/8332.83d205a2.chunk.css +0 -2
- package/build/static/css/9968.31fdfff6.chunk.css +0 -2
- package/build/static/css/9968.31fdfff6.chunk.css.map +0 -1
- package/build/static/js/1400.3a90f09a.chunk.js +0 -2
- package/build/static/js/1554.0beb5494.chunk.js +0 -3
- package/build/static/js/1581.ebb0eb2e.chunk.js +0 -2
- package/build/static/js/1581.ebb0eb2e.chunk.js.map +0 -1
- package/build/static/js/1725.bc60f755.chunk.js +0 -2
- package/build/static/js/1820.72fe029d.chunk.js +0 -2
- package/build/static/js/2331.017c7318.chunk.js +0 -2
- package/build/static/js/2503.15f977e4.chunk.js +0 -2
- package/build/static/js/2517.304d1c92.chunk.js +0 -2
- package/build/static/js/2716.66d4eab2.chunk.js +0 -3
- package/build/static/js/2730.3e2fa120.chunk.js +0 -2
- package/build/static/js/2814.1ea829c8.chunk.js +0 -2
- package/build/static/js/2970.326287df.chunk.js +0 -2
- package/build/static/js/3142.b79193df.chunk.js +0 -2
- package/build/static/js/3284.8e2ca828.chunk.js +0 -1
- package/build/static/js/3405.8fab2c85.chunk.js +0 -2
- package/build/static/js/3405.8fab2c85.chunk.js.map +0 -1
- package/build/static/js/36.dccdc545.chunk.js +0 -2
- package/build/static/js/3962.3e44db16.chunk.js +0 -2
- package/build/static/js/4029.75545d82.chunk.js.map +0 -1
- package/build/static/js/4106.e972d67d.chunk.js +0 -2
- package/build/static/js/4106.e972d67d.chunk.js.map +0 -1
- package/build/static/js/4265.f2c2f034.chunk.js +0 -2
- package/build/static/js/4679.c9e2f109.chunk.js +0 -2
- package/build/static/js/4679.c9e2f109.chunk.js.map +0 -1
- package/build/static/js/4712.b3ce8808.chunk.js +0 -2
- package/build/static/js/4712.b3ce8808.chunk.js.map +0 -1
- package/build/static/js/4941.ae76674b.chunk.js +0 -2
- package/build/static/js/5443.f7281d63.chunk.js +0 -2
- package/build/static/js/556.9e43bff7.chunk.js +0 -2
- package/build/static/js/5600.d728bcd3.chunk.js +0 -2
- package/build/static/js/5786.4a032c0e.chunk.js +0 -2
- package/build/static/js/589.89f94e63.chunk.js +0 -2
- package/build/static/js/589.89f94e63.chunk.js.map +0 -1
- package/build/static/js/5962.7cd8c3e1.chunk.js +0 -2
- package/build/static/js/628.4d54b21d.chunk.js +0 -2
- package/build/static/js/6611.1be48e69.chunk.js +0 -2
- package/build/static/js/6779.2092cdf9.chunk.js +0 -2
- package/build/static/js/6908.e4e20932.chunk.js +0 -3
- package/build/static/js/6908.e4e20932.chunk.js.map +0 -1
- package/build/static/js/6915.d3fc7b65.chunk.js +0 -2
- package/build/static/js/7060.2de08549.chunk.js +0 -2
- package/build/static/js/7121.5ffc808f.chunk.js +0 -2
- package/build/static/js/7227.2b908933.chunk.js +0 -3
- package/build/static/js/7322.dd5d9179.chunk.js +0 -2
- package/build/static/js/7322.dd5d9179.chunk.js.map +0 -1
- package/build/static/js/7617.e7bfe484.chunk.js +0 -2
- package/build/static/js/8175.61ab1d7e.chunk.js +0 -2
- package/build/static/js/8175.61ab1d7e.chunk.js.map +0 -1
- package/build/static/js/8247.aaa4ad4e.chunk.js +0 -2
- package/build/static/js/8247.aaa4ad4e.chunk.js.map +0 -1
- package/build/static/js/8332.c9939217.chunk.js +0 -2
- package/build/static/js/8725.cbf5f6aa.chunk.js +0 -2
- package/build/static/js/9019.b8dab87c.chunk.js +0 -2
- package/build/static/js/9019.b8dab87c.chunk.js.map +0 -1
- package/build/static/js/903.c384d9b6.chunk.js +0 -1
- package/build/static/js/9439.51dd3ec1.chunk.js +0 -2
- package/build/static/js/9439.51dd3ec1.chunk.js.map +0 -1
- package/build/static/js/9998.c5890abc.chunk.js +0 -2
- package/build/static/js/9998.c5890abc.chunk.js.map +0 -1
- package/build/static/js/main.7fa303fe.js +0 -2
- package/build/static/js/main.7fa303fe.js.map +0 -1
- /package/build/static/js/{1153.cdc50c19.chunk.js.LICENSE.txt → 1153.b6ff505e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1554.0beb5494.chunk.js.LICENSE.txt → 1554.bae12001.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2716.66d4eab2.chunk.js.LICENSE.txt → 2716.6975d095.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4666.c9024365.chunk.js.LICENSE.txt → 4666.d7833510.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6908.e4e20932.chunk.js.LICENSE.txt → 6908.b9d9e979.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.2b908933.chunk.js.LICENSE.txt → 7227.254ec5f8.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/1153.
|
|
1
|
+
{"version":3,"file":"static/js/1153.b6ff505e.chunk.js","mappings":";wNACA,QAA6B,gDCE7B,MAAMA,GAAUC,EAAAA,EAAAA,eAAc,CAAC,IACzB,SAAEC,GAAaF,EAQRG,EAAoBC,IAA6C,IAA5C,KAAEC,EAAI,SAAEC,EAAQ,mBAAEC,GAAoBH,EACtE,OACEI,EAAAA,EAAAA,KAACN,EAAQ,CAACO,MAAO,CAAEJ,OAAME,sBAAqBD,UAC5CE,EAAAA,EAAAA,KAAA,QAAM,cAAY,4BAA2BF,SAAEA,KACtC,EAGfH,EAAkBO,aAAe,CAC/BC,eAAe,EACfN,KAAM,GACNE,mBAAoB,IAEtB,MAAMK,EAAYC,IAA4B,IAA3B,QAAEC,EAAO,SAAER,GAAUO,EACtC,MAAM,KAAER,EAAI,cAAEM,EAAa,mBAAEJ,IAAuBQ,EAAAA,EAAAA,YAAWf,GACzDgB,GAAYC,EAAAA,EAAAA,UAAQ,KACxB,IAAKX,EAA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U,EAAET,IAAIU,EAAEI,MAAMN,EAAEO,OAAOpB,EAAEqB,QAAQ,CAACC,EAAQC,SAAS5B,EAAE2B,EAAQE,IAAIhB,EAAEc,EAAQG,KAAKjB,mBCPxWkB,EAAOJ,QAAU,EAAjBI","sources":["webpack://@kne-components/components-core/./src/components/Highlight/style.module.scss?a31a","components/Highlight/index.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/jsx-runtime.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"high-color\":\"style_high-color__-DN7m__lcEcn\"};","import { createContext, createElement, useContext, useMemo } from \"react\";\nimport style from \"./style.module.scss\";\n\nconst context = createContext({});\nconst { Provider } = context;\n\nconst escapeSpecialCharacter = (str) => {\n const pattern =\n /[`+~!@#_$%^*()=|{}':;,\\\\[\\].<>/?!¥…&()—【】‘;:”“。,、?\\s]/g;\n return str.replace(pattern, (match) => \"\\\\\" + match);\n};\n\nexport const HighlightProvider = ({ list, children, highlightClassName }) => {\n return (\n <Provider value={{ list, highlightClassName }}>\n <span data-testid=\"components-core-highlight\">{children}</span>\n </Provider>\n );\n};\nHighlightProvider.defaultProps = {\n caseSensitive: false,\n list: [],\n highlightClassName: \"\",\n};\nconst Highlight = ({ tagName, children }) => {\n const { list, caseSensitive, highlightClassName } = useContext(context);\n const renderStr = useMemo(() => {\n if (!children) return;\n let target = children?.toString();\n if (!list || list.length === 0) {\n return target;\n }\n const allWordsRe = list\n .map(function (word) {\n return \"(\" + escapeSpecialCharacter(word) + \")\";\n })\n .join(\"|\");\n\n const regExp = new RegExp(allWordsRe, caseSensitive ? \"gm\" : \"gim\");\n\n return target.replace(regExp, (innerMatch) => {\n return `<font class=\"${style[\"high-color\"]} ${highlightClassName}\">${innerMatch}</font>`;\n });\n }, [list, caseSensitive, children, highlightClassName]);\n\n return createElement(tagName, {\n dangerouslySetInnerHTML: { __html: renderStr },\n });\n};\nHighlight.defaultProps = {\n tagName: \"span\",\n children: \"\",\n};\n\n// Highlight.propTypes={\n// children:PropTypes.string\n// }\nexport default Highlight;\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["context","createContext","Provider","HighlightProvider","_ref","list","children","highlightClassName","_jsx","value","defaultProps","caseSensitive","Highlight","_ref2","tagName","useContext","renderStr","useMemo","target","toString","length","allWordsRe","map","word","replace","match","join","regExp","RegExp","innerMatch","style","createElement","dangerouslySetInnerHTML","__html","f","require","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","$$typeof","type","props","_owner","current","exports","Fragment","jsx","jsxs","module"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1400],{81400:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});var c=t(73884);const o=function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const t=(0,c.useRef)(e);return n||(t.current=e),(0,c.useCallback)((function(){return t.current&&t.current(...arguments)}),[])}}}]);
|
|
2
|
+
//# sourceMappingURL=1400.31ca0433.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/1400.
|
|
1
|
+
{"version":3,"file":"static/js/1400.31ca0433.chunk.js","mappings":"gMAEM,MAAAA,EAAiB,SAACC,GAA+B,IAArBC,EAAQC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GACxC,MAAMG,GAAcC,EAAAA,EAAAA,QAAON,GAI3B,OAHKC,IACHI,EAAYE,QAAUP,IAEjBQ,EAAAA,EAAAA,cAAY,WACjB,OAAOH,EAAYE,SAAWF,EAAYE,WAAQL,U,GACjD,GACJ,C","sources":["../node_modules/@kne/use-ref-callback/src/index.js"],"sourcesContent":["import { useRef, useCallback } from \"react\";\n\nconst useRefCallback = (callback, keepInit = false) => {\n const callbackRef = useRef(callback);\n if (!keepInit) {\n callbackRef.current = callback;\n }\n return useCallback((...args) => {\n return callbackRef.current && callbackRef.current(...args);\n }, []);\n};\n\nexport default useRefCallback;\n"],"names":["useRefCallback","callback","keepInit","arguments","length","undefined","callbackRef","useRef","current","useCallback"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 1554.bae12001.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,n)=>{n.r(t),n.d(t,{default:()=>_});n(73884);var s=n(83136),l=n.n(s),o=n(70579);const c=e=>(/^[1-9]+[0-9]*]*$/.test(e.toString())&&(e+="px"),e),r=e=>{let{type:t,colorful:n,className:s,size:r,style:_,prefix:a,...i}=e;const p=((e,t,n)=>"icon-"===t||""===t?(n?"icon-color-":"icon-")+e.replace(/^icon-(color-)?/,""):t+e)(t,a,n),d=l()(s,{iconfont:!n,"iconfont--color":n},p),f=Object.assign({},_,r?{fontSize:c(r)}:{});return n?(0,o.jsx)("svg",{...i,"data-testid":"components-core-iconfont",className:d,style:f,children:(0,o.jsx)("use",{xlinkHref:`#${t}`,style:{pointerEvents:"none"}})}):(0,o.jsx)("i",{...i,"data-testid":"components-core-iconfont",className:d,style:f})};r.defaultProps={colorful:!1,prefix:""};const _=r},21554:(e,t,n)=>{n.r(t),n.d(t,{TooltipFetch:()=>S,TooltipInfoLabel:()=>b,default:()=>g});var s=n(55199),l=n(83136),o=n.n(l);const c="style_tooltip__zHGMI__lcEcn",r="style_large__lvmsm__lcEcn",_="style_small__nUt0r__lcEcn",a="style_popup-content__-rKQN__lcEcn",i="style_title__1EQPq__lcEcn",p="style_important-info__qTSZY__lcEcn",d="style_error__yTTq3__lcEcn",f="style_warning__CMJxz__lcEcn",y="style_success__AvJVx__lcEcn",u="style_sub-title__uD8CH__lcEcn",m="style_content__lzgUz__lcEcn",x="style_alone__q6q82__lcEcn",h="style_fetch-content__tEOEV__lcEcn",v="style_fetch-loading__tN-WB__lcEcn",E="style_title-info-icon__iY8Q+__lcEcn";var j=n(70579);const N=e=>{let{overlayClassName:t,title:n,size:l,subtitle:h,content:v,importantInfo:E,importantInfoType:N,moreInfo:g,...O}=e;return(0,j.jsx)(s.Tooltip,{...O,overlayClassName:o()(t,c,{[_]:"small"===l,[r]:"large"===l}),title:(0,j.jsxs)(s.Space,{direction:"vertical",className:a,children:[n&&(0,j.jsx)("div",{className:i,children:n}),E&&(0,j.jsx)("div",{className:o()(p,{[y]:"success"===N,[f]:"warning"===N,[d]:"error"===N}),children:E}),h&&(0,j.jsx)("div",{className:u,children:h}),v&&(0,j.jsx)("div",{className:o()(m,{[x]:[n,h,E,g].every((e=>!e))}),children:v}),g&&(0,j.jsx)("div",{children:g})]})})};N.defaultProps={};const g=N;var O=n(64671);const b=e=>{let{title:t,tooltipTitle:n}=e;return(0,j.jsxs)("div",{children:[t,n?(0,j.jsx)(g,{...n,children:(0,j.jsx)("span",{children:(0,j.jsx)(O.default,{type:"icon-xinxi-miaobian",className:E,size:14})})}):null]})};var C=n(73884),k=n(87558);const w=e=>{let{api:t,children:n,fetchContent:l,showLoading:c,loadingClassName:r,force:_,...a}=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,j.jsx)(g,{...Object.assign({},a,f?l(u,d):{}),open:i,onOpenChange:async e=>{!e||f&&!_||await m({type:"refresh"}),p(e)},children:(0,j.jsxs)("span",{className:h,children:[n,c&&y?(0,j.jsx)(s.Spin,{size:"small",className:o()(r,v)}):null]})})};w.defaultProps={showLoading:!0};const S=w},51153:(e,t,n)=>{var s=n(73884),l=Symbol.for("react.element"),o=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,r=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var s,o={},a=null,i=null;for(s in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(i=t.ref),t)c.call(t,s)&&!_.hasOwnProperty(s)&&(o[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===o[s]&&(o[s]=t[s]);return{$$typeof:l,type:e,key:a,ref:i,props:o,_owner:r.current}}t.Fragment=o,t.jsx=a,t.jsxs=a},70579:(e,t,n)=>{e.exports=n(51153)}}]);
|
|
3
|
+
//# sourceMappingURL=1554.bae12001.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/1554.0beb5494.chunk.js","mappings":";kOAIA,MAAMA,EAAiBC,IACjB,mBAAmBC,KAAKD,EAAKE,cAC/BF,GAAQ,MAEHA,GAaHG,E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AEmB,QAAQ,CAACC,EAAQC,SAASzB,EAAEwB,EAAQE,IAAId,EAAEY,EAAQG,KAAKf,mBCPxWgB,EAAOJ,QAAU,EAAjBI","sources":["components/Icon/index.js","webpack://@kne-components/components-core/./src/components/Tooltip/style.module.scss?c30c","components/Tooltip/tooltip.js","components/Tooltip/tooltipInfoLabel.js","components/Tooltip/tooltipFetch.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/jsx-runtime.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\n\nconst calculateSize = (size) => {\n if (/^[1-9]+[0-9]*]*$/.test(size.toString())) {\n size += \"px\";\n }\n return size;\n};\n\nconst calculateType = (prefixType, prefix, colorful) => {\n if (prefix === \"icon-\" || prefix === \"\") {\n return (\n (colorful ? \"icon-color-\" : \"icon-\") +\n prefixType.replace(/^icon-(color-)?/, \"\")\n );\n }\n return prefix + prefixType;\n};\n\nconst Iconfont = ({\n type,\n colorful,\n className,\n size,\n style,\n prefix,\n ...other\n}) => {\n const fontClass = calculateType(type, prefix, colorful),\n computedClassName = classnames(\n className,\n {\n iconfont: !colorful,\n \"iconfont--color\": colorful,\n },\n fontClass\n ),\n computedStyle = Object.assign(\n {},\n style,\n size ? { fontSize: calculateSize(size) } : {}\n );\n return colorful ? (\n <svg\n {...other}\n data-testid=\"components-core-iconfont\"\n className={computedClassName}\n style={computedStyle}\n >\n <use xlinkHref={`#${type}`} style={{ pointerEvents: \"none\" }} />\n </svg>\n ) : (\n <i\n {...other}\n data-testid=\"components-core-iconfont\"\n className={computedClassName}\n style={computedStyle}\n />\n );\n};\n\nIconfont.defaultProps = {\n colorful: false,\n prefix: \"\",\n};\n\nIconfont.propTypes = {\n colorful: PropTypes.bool,\n prefix: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n type: PropTypes.string.isRequired,\n style: PropTypes.object,\n className: PropTypes.string,\n};\n\nexport default Iconfont;\n","// extracted by mini-css-extract-plugin\nexport default {\"tooltip\":\"style_tooltip__zHGMI__BSy+U\",\"large\":\"style_large__lvmsm__BSy+U\",\"small\":\"style_small__nUt0r__BSy+U\",\"popup-content\":\"style_popup-content__-rKQN__BSy+U\",\"title\":\"style_title__1EQPq__BSy+U\",\"important-info\":\"style_important-info__qTSZY__BSy+U\",\"error\":\"style_error__yTTq3__BSy+U\",\"warning\":\"style_warning__CMJxz__BSy+U\",\"success\":\"style_success__AvJVx__BSy+U\",\"sub-title\":\"style_sub-title__uD8CH__BSy+U\",\"content\":\"style_content__lzgUz__BSy+U\",\"alone\":\"style_alone__q6q82__BSy+U\",\"fetch-content\":\"style_fetch-content__tEOEV__BSy+U\",\"fetch-loading\":\"style_fetch-loading__tN-WB__BSy+U\",\"title-info-icon\":\"style_title-info-icon__iY8Q+__BSy+U\"};","import { Space, Tooltip as AntdTooltip } from \"antd\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\n\nconst Tooltip = ({\n overlayClassName,\n title,\n size,\n subtitle,\n content,\n importantInfo,\n importantInfoType,\n moreInfo,\n ...props\n}) => {\n return (\n <AntdTooltip\n {...props}\n overlayClassName={classnames(overlayClassName, style[\"tooltip\"], {\n [style[\"small\"]]: size === \"small\",\n [style[\"large\"]]: size === \"large\",\n })}\n title={\n <Space direction=\"vertical\" className={style[\"popup-content\"]}>\n {title && <div className={style[\"title\"]}>{title}</div>}\n {importantInfo && (\n <div\n className={classnames(style[\"important-info\"], {\n [style[\"success\"]]: importantInfoType === \"success\",\n [style[\"warning\"]]: importantInfoType === \"warning\",\n [style[\"error\"]]: importantInfoType === \"error\",\n })}\n >\n {importantInfo}\n </div>\n )}\n {subtitle && <div className={style[\"sub-title\"]}>{subtitle}</div>}\n {content && (\n <div\n className={classnames(style[\"content\"], {\n [style[\"alone\"]]: [\n title,\n subtitle,\n importantInfo,\n moreInfo,\n ].every((item) => !item),\n })}\n >\n {content}\n </div>\n )}\n {moreInfo && <div>{moreInfo}</div>}\n </Space>\n }\n />\n );\n};\n\nTooltip.defaultProps = {};\n\nexport default Tooltip;\n","import style from \"./style.module.scss\";\nimport Tooltip from \"./index\";\nimport Icon from \"@components/Icon\";\n\nconst TooltipInfoLabel = ({ title, tooltipTitle }) => {\n return (\n <div>\n {title}\n {tooltipTitle ? (\n <Tooltip {...tooltipTitle}>\n <span>\n <Icon\n type=\"icon-xinxi-miaobian\"\n className={style[\"title-info-icon\"]}\n size={14}\n />\n </span>\n </Tooltip>\n ) : null}\n </div>\n );\n};\n\nexport default TooltipInfoLabel;\n","import { useState } from \"react\";\nimport { useFetch } from \"@kne/react-fetch\";\nimport { Spin } from \"antd\";\nimport style from \"./style.module.scss\";\nimport Tooltip from \"./index\";\nimport classnames from \"classnames\";\n\nconst TooltipFetch = ({\n api,\n children,\n fetchContent,\n showLoading,\n loadingClassName,\n force,\n ...props\n}) => {\n const [open, setOpen] = useState(false);\n const fetchApi = useFetch(Object.assign({}, api, { auto: false }));\n const { isComplete, isLoading, data, send } = fetchApi;\n return (\n <Tooltip\n {...Object.assign(\n {},\n props,\n isComplete ? fetchContent(data, fetchApi) : {}\n )}\n open={open}\n onOpenChange={async (open) => {\n if (open && (!isComplete || force)) {\n await send({ type: \"refresh\" });\n }\n setOpen(open);\n }}\n >\n <span className={style[\"fetch-content\"]}>\n {children}\n {showLoading && isLoading ? (\n <Spin\n size=\"small\"\n className={classnames(loadingClassName, style[\"fetch-loading\"])}\n />\n ) : null}\n </span>\n </Tooltip>\n );\n};\n\nTooltipFetch.defaultProps = {\n showLoading: true,\n};\n\nexport default TooltipFetch;\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["calculateSize","size","test","toString","Iconfont","_ref","type","colorful","className","style","prefix","other","fontClass","calculateType","prefixType","replace","computedClassName","classnames","iconfont","computedStyle","Object","assign","fontSize","_jsx","children","xlinkHref","pointerEvents","defaultProps","Tooltip","overlayClassName","title","subtitle","content","importantInfo","importantInfoType","moreInfo","props","AntdTooltip","_jsxs","Space","direction","every","item","tooltipTitle","Icon","TooltipFetch","api","fetchContent","showLoading","loadingClassName","force","open","setOpen","useState","fetchApi","useFetch","auto","isComplete","isLoading","data","send","onOpenChange","async","Spin","f","require","k","Symbol","for","l","m","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","$$typeof","_owner","current","exports","Fragment","jsx","jsxs","module"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/1554.bae12001.chunk.js","mappings":";kOAIA,MAAMA,EAAiBC,IACjB,mBAAmBC,KAAKD,EAAKE,cAC/BF,GAAQ,MAEHA,GAaHG,EAAWC,IAQV,IARW,KAChBC,EAAI,SACJC,EAAQ,UACRC,EAAS,KACTP,EAAI,MACJQ,EAAK,OACLC,KACGC,GACJN,E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U,EAAjBI","sources":["components/Icon/index.js","webpack://@kne-components/components-core/./src/components/Tooltip/style.module.scss?c30c","components/Tooltip/tooltip.js","components/Tooltip/tooltipInfoLabel.js","components/Tooltip/tooltipFetch.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/jsx-runtime.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\n\nconst calculateSize = (size) => {\n if (/^[1-9]+[0-9]*]*$/.test(size.toString())) {\n size += \"px\";\n }\n return size;\n};\n\nconst calculateType = (prefixType, prefix, colorful) => {\n if (prefix === \"icon-\" || prefix === \"\") {\n return (\n (colorful ? \"icon-color-\" : \"icon-\") +\n prefixType.replace(/^icon-(color-)?/, \"\")\n );\n }\n return prefix + prefixType;\n};\n\nconst Iconfont = ({\n type,\n colorful,\n className,\n size,\n style,\n prefix,\n ...other\n}) => {\n const fontClass = calculateType(type, prefix, colorful),\n computedClassName = classnames(\n className,\n {\n iconfont: !colorful,\n \"iconfont--color\": colorful,\n },\n fontClass\n ),\n computedStyle = Object.assign(\n {},\n style,\n size ? { fontSize: calculateSize(size) } : {}\n );\n return colorful ? (\n <svg\n {...other}\n data-testid=\"components-core-iconfont\"\n className={computedClassName}\n style={computedStyle}\n >\n <use xlinkHref={`#${type}`} style={{ pointerEvents: \"none\" }} />\n </svg>\n ) : (\n <i\n {...other}\n data-testid=\"components-core-iconfont\"\n className={computedClassName}\n style={computedStyle}\n />\n );\n};\n\nIconfont.defaultProps = {\n colorful: false,\n prefix: \"\",\n};\n\nIconfont.propTypes = {\n colorful: PropTypes.bool,\n prefix: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n type: PropTypes.string.isRequired,\n style: PropTypes.object,\n className: PropTypes.string,\n};\n\nexport default Iconfont;\n","// extracted by mini-css-extract-plugin\nexport default {\"tooltip\":\"style_tooltip__zHGMI__lcEcn\",\"large\":\"style_large__lvmsm__lcEcn\",\"small\":\"style_small__nUt0r__lcEcn\",\"popup-content\":\"style_popup-content__-rKQN__lcEcn\",\"title\":\"style_title__1EQPq__lcEcn\",\"important-info\":\"style_important-info__qTSZY__lcEcn\",\"error\":\"style_error__yTTq3__lcEcn\",\"warning\":\"style_warning__CMJxz__lcEcn\",\"success\":\"style_success__AvJVx__lcEcn\",\"sub-title\":\"style_sub-title__uD8CH__lcEcn\",\"content\":\"style_content__lzgUz__lcEcn\",\"alone\":\"style_alone__q6q82__lcEcn\",\"fetch-content\":\"style_fetch-content__tEOEV__lcEcn\",\"fetch-loading\":\"style_fetch-loading__tN-WB__lcEcn\",\"title-info-icon\":\"style_title-info-icon__iY8Q+__lcEcn\"};","import { Space, Tooltip as AntdTooltip } from \"antd\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\n\nconst Tooltip = ({\n overlayClassName,\n title,\n size,\n subtitle,\n content,\n importantInfo,\n importantInfoType,\n moreInfo,\n ...props\n}) => {\n return (\n <AntdTooltip\n {...props}\n overlayClassName={classnames(overlayClassName, style[\"tooltip\"], {\n [style[\"small\"]]: size === \"small\",\n [style[\"large\"]]: size === \"large\",\n })}\n title={\n <Space direction=\"vertical\" className={style[\"popup-content\"]}>\n {title && <div className={style[\"title\"]}>{title}</div>}\n {importantInfo && (\n <div\n className={classnames(style[\"important-info\"], {\n [style[\"success\"]]: importantInfoType === \"success\",\n [style[\"warning\"]]: importantInfoType === \"warning\",\n [style[\"error\"]]: importantInfoType === \"error\",\n })}\n >\n {importantInfo}\n </div>\n )}\n {subtitle && <div className={style[\"sub-title\"]}>{subtitle}</div>}\n {content && (\n <div\n className={classnames(style[\"content\"], {\n [style[\"alone\"]]: [\n title,\n subtitle,\n importantInfo,\n moreInfo,\n ].every((item) => !item),\n })}\n >\n {content}\n </div>\n )}\n {moreInfo && <div>{moreInfo}</div>}\n </Space>\n }\n />\n );\n};\n\nTooltip.defaultProps = {};\n\nexport default Tooltip;\n","import style from \"./style.module.scss\";\nimport Tooltip from \"./index\";\nimport Icon from \"@components/Icon\";\n\nconst TooltipInfoLabel = ({ title, tooltipTitle }) => {\n return (\n <div>\n {title}\n {tooltipTitle ? (\n <Tooltip {...tooltipTitle}>\n <span>\n <Icon\n type=\"icon-xinxi-miaobian\"\n className={style[\"title-info-icon\"]}\n size={14}\n />\n </span>\n </Tooltip>\n ) : null}\n </div>\n );\n};\n\nexport default TooltipInfoLabel;\n","import { useState } from \"react\";\nimport { useFetch } from \"@kne/react-fetch\";\nimport { Spin } from \"antd\";\nimport style from \"./style.module.scss\";\nimport Tooltip from \"./index\";\nimport classnames from \"classnames\";\n\nconst TooltipFetch = ({\n api,\n children,\n fetchContent,\n showLoading,\n loadingClassName,\n force,\n ...props\n}) => {\n const [open, setOpen] = useState(false);\n const fetchApi = useFetch(Object.assign({}, api, { auto: false }));\n const { isComplete, isLoading, data, send } = fetchApi;\n return (\n <Tooltip\n {...Object.assign(\n {},\n props,\n isComplete ? fetchContent(data, fetchApi) : {}\n )}\n open={open}\n onOpenChange={async (open) => {\n if (open && (!isComplete || force)) {\n await send({ type: \"refresh\" });\n }\n setOpen(open);\n }}\n >\n <span className={style[\"fetch-content\"]}>\n {children}\n {showLoading && isLoading ? (\n <Spin\n size=\"small\"\n className={classnames(loadingClassName, style[\"fetch-loading\"])}\n />\n ) : null}\n </span>\n </Tooltip>\n );\n};\n\nTooltipFetch.defaultProps = {\n showLoading: true,\n};\n\nexport default TooltipFetch;\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["calculateSize","size","test","toString","Iconfont","_ref","type","colorful","className","style","prefix","other","fontClass","calculateType","prefixType","replace","computedClassName","classnames","iconfont","computedStyle","Object","assign","fontSize","_jsx","children","xlinkHref","pointerEvents","defaultProps","Tooltip","overlayClassName","title","subtitle","content","importantInfo","importantInfoType","moreInfo","props","AntdTooltip","_jsxs","Space","direction","every","item","tooltipTitle","Icon","TooltipFetch","api","fetchContent","showLoading","loadingClassName","force","open","setOpen","useState","fetchApi","useFetch","auto","isComplete","isLoading","data","send","onOpenChange","async","Spin","f","require","k","Symbol","for","l","m","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","$$typeof","_owner","current","exports","Fragment","jsx","jsxs","module"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1581],{21581:(e,t,n)=>{n.r(t),n.d(t,{default:()=>C,preset:()=>d});var o=n(84391),r=n(74529),c=n.n(r),s=n(73884),a=n.n(s),l=n(96418),i=n.n(l);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,o,r={},c=Object.keys(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const p={getContainer:null,withInstall:e=>t=>a().createElement(e,t)},d=e=>Object.assign(p,e),h=["onCancel","onDestroy","outRef","onMount","onOk"],m=["withInstall","getContainer"],y=e=>t=>{let{onCancel:n,onDestroy:o,outRef:r,onMount:c,onOk:l}=t,p=f(t,h);const[d,m]=(0,s.useState)(!1);(0,s.useImperativeHandle)(r,(()=>({close:()=>m(!1),setVisible:m,visible:d})),[d,m]);const y=i()(c);return(0,s.useEffect)((()=>{y(),m(!0)}),[y]),a().createElement(e,u({},p,{open:d,close:()=>m(!1),onOk:async()=>{if(!l)return void m(!1);!1!==await l()&&m(!1)},onCancel:function(){m(!1),n&&n(...arguments)},afterClose:o}))},C=e=>{const t=(0,s.createRef)(null);return n=>{const r=p.getContainer&&p.getContainer()||document.body,s=document.createElement("div"),l=Object.assign({},n),{withInstall:i,getContainer:d}=l,h=f(l,m);r.appendChild(s);const C=o.createRoot(s),b=new Promise((n=>{const o=c()(y,p.withInstall)("function"===typeof i?i(e):e);C.render(a().createElement(o,u({outRef:t},h,{getContainer:d||(()=>s),onDestroy:()=>{s.style.opacity="0",r.removeChild(s),setTimeout((()=>{C.unmount()}),0)},onMount:()=>{n({close:t.current.close})}})))})),g=()=>b.then((e=>{let{close:t}=e;t()}));return{close:g,current:{close:g}}}}},84391:(e,t,n)=>{var o=n(10486);t.createRoot=o.createRoot,t.hydrateRoot=o.hydrateRoot}}]);
|
|
2
|
+
//# sourceMappingURL=1581.811ba84b.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/
|
|
1
|
+
{"version":3,"file":"static/js/1581.811ba84b.chunk.js","mappings":"mnBAEO,MAAMA,EAAS,CACpBC,aAAc,KACdC,YAAcC,GAAsBC,GAAUC,IAAAA,cAACF,EAAqBC,IAGzDE,EAAUC,GACdC,O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AAWA,KACTyB,EAAKa,MAAMC,QAAU,IACrBhB,EAAKiB,YAAYf,GACjBgB,YAAW,KACTX,EAAQY,SAAS,GAChB,EAAE,EAEPxC,QAASA,KACPgC,EAAQ,CACNxB,MAAOU,EAAIuB,QAAQjC,OACnB,KAEH,IAGCA,EAAQA,IACLsB,EAAQY,MAAKC,IAAe,IAAd,MAAEnC,GAAOmC,EAC5BnC,GAAO,IAGX,MAAO,CACLA,QAAOiC,QAAS,CAAEjC,SACnB,CACF,C,kBChFH,IAAIoC,EAAIC,EAAQ,OAEdC,EAAQC,WAAaH,EAAEG,WACvBD,EAAQE,YAAcJ,EAAEI,W","sources":["../node_modules/@kne/with-layer/src/preset.js","../node_modules/@kne/with-layer/src/index.js","../node_modules/react-dom/client.js"],"sourcesContent":["import React from \"react\";\r\n\r\nexport const global = {\r\n getContainer: null,\r\n withInstall: (WrappedComponent) => (props) => <WrappedComponent {...props} />\r\n};\r\n\r\nexport const preset = (options) => {\r\n return Object.assign(global, options);\r\n};\r\n\r\nexport default preset;\r\n","import ReactDOM from \"react-dom/client\";\r\nimport compose from \"@kne/compose\";\r\nimport React, { createRef, useState, useImperativeHandle, useEffect } from \"react\";\r\nimport useRefCallback from \"@kne/use-ref-callback\";\r\nimport { global } from \"./preset\";\r\n\r\nconst withLayer = WrappedComponent => {\r\n return ({ onCancel, onDestroy, outRef, onMount, onOk, ...props }) => {\r\n const [visible, setVisible] = useState(false);\r\n useImperativeHandle(outRef, () => {\r\n return {\r\n close: () => setVisible(false), setVisible, visible\r\n };\r\n }, [visible, setVisible]);\r\n\r\n const mount = useRefCallback(onMount);\r\n\r\n useEffect(() => {\r\n mount();\r\n setVisible(true);\r\n }, [mount]);\r\n\r\n return (<WrappedComponent\r\n {...props}\r\n open={visible}\r\n close={() => setVisible(false)}\r\n onOk={async () => {\r\n if (!onOk) {\r\n setVisible(false);\r\n return;\r\n }\r\n const res = await onOk();\r\n if (res !== false) {\r\n setVisible(false);\r\n }\r\n }}\r\n onCancel={(...args) => {\r\n setVisible(false);\r\n onCancel && onCancel(...args);\r\n }}\r\n afterClose={onDestroy}\r\n />);\r\n };\r\n};\r\n\r\nconst createWithLayer = WrappedComponent => {\r\n const ref = createRef(null);\r\n return (args) => {\r\n const body = global.getContainer && global.getContainer() || document.body;\r\n const root = document.createElement(\"div\");\r\n const { withInstall, getContainer, ...props } = Object.assign({}, args);\r\n body.appendChild(root);\r\n const rootDom = ReactDOM.createRoot(root);\r\n const promise = new Promise((resolve) => {\r\n const LayerInstance = compose(withLayer, global.withInstall)(typeof withInstall === \"function\" ? withInstall(WrappedComponent) : WrappedComponent);\r\n rootDom.render(<LayerInstance\r\n outRef={ref}\r\n {...props}\r\n getContainer={getContainer || (() => root)}\r\n onDestroy={() => {\r\n root.style.opacity = \"0\";\r\n body.removeChild(root);\r\n setTimeout(() => {\r\n rootDom.unmount();\r\n }, 0);\r\n }}\r\n onMount={() => {\r\n resolve({\r\n close: ref.current.close\r\n });\r\n }}\r\n />);\r\n });\r\n\r\n const close = () => {\r\n return promise.then(({ close }) => {\r\n close();\r\n });\r\n };\r\n return {\r\n close, current: { close }\r\n };\r\n };\r\n};\r\n\r\nexport default createWithLayer;\r\nexport { preset } from \"./preset\";\r\n","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n"],"names":["global","getContainer","withInstall","WrappedComponent","props","React","preset","options","Object","assign","withLayer","_ref","onCancel","onDestroy","outRef","onMount","onOk","_objectWithoutPropertiesLoose","_excluded","visible","setVisible","useState","useImperativeHandle","close","mount","useRefCallback","useEffect","_extends","open","async","arguments","afterClose","createWithLayer","ref","createRef","args","body","document","root","createElement","_Object$assign","_excluded2","appendChild","rootDom","ReactDOM","promise","Promise","resolve","LayerInstance","compose","render","style","opacity","removeChild","setTimeout","unmount","current","then","_ref2","m","require","exports","createRoot","hydrateRoot"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2331],{72331:(e,n,r)=>{r.r(n),r.d(n,{default:()=>u});var t=r(5544),a=r(73884);const u=function(e,n){n=Object.assign({},{defaultValue:"defaultValue",value:"value",onChange:"onChange"},n);var r=(0,a.useRef)(n.value in e),u=(0,a.useState)(e[n.defaultValue]),o=(0,t.A)(u,2),l=o[0],c=o[1],i=(0,a.useRef)(null);return i.current=r.current?e[n.value]:l,[i.current,function(t){for(var a="function"===typeof t?i.current=t(i.current):t,u=arguments.length,o=new Array(u>1?u-1:0),l=1;l<u;l++)o[l-1]=arguments[l];e[n.onChange]&&e[n.onChange].apply(e,[a].concat(o)),r.current||c(a)}]}},43145:(e,n,r)=>{function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=Array(n);r<n;r++)t[r]=e[r];return t}r.d(n,{A:()=>t})},96369:(e,n,r)=>{function t(e){if(Array.isArray(e))return e}r.d(n,{A:()=>t})},76562:(e,n,r)=>{function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(n,{A:()=>t})},5544:(e,n,r)=>{r.d(n,{A:()=>o});var t=r(96369);var a=r(27800),u=r(76562);function o(e,n){return(0,t.A)(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,a,u,o,l=[],c=!0,i=!1;try{if(u=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=u.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){i=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(i)throw a}}return l}}(e,n)||(0,a.A)(e,n)||(0,u.A)()}},27800:(e,n,r)=>{r.d(n,{A:()=>a});var t=r(43145);function a(e,n){if(e){if("string"==typeof e)return(0,t.A)(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,t.A)(e,n):void 0}}}}]);
|
|
2
|
+
//# sourceMappingURL=2331.b6f2a506.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/2331.
|
|
1
|
+
{"version":3,"file":"static/js/2331.b6f2a506.chunk.js","mappings":"kNAEe,SAACA,EAAOC,GACnBA,EAAMC,OAAOC,OAAO,CAAC,EAAG,CAACC,aAAc,eAAgBC,MAAO,QAASC,SAAU,YAAaL,GACxF,IAAAM,GAAYC,EAAAA,EAAAA,QAAOP,EAAW,SAAKD,GAAMS,GAAgCC,EAAAA,EAAAA,UAASV,EAAMC,EAAkB,eAAGU,GAAAC,EAAAA,EAAAA,GAAAH,EAAA,GAAjEI,EAAUF,EAAA,GAAEG,EAAaH,EAAA,GACrEI,GAAkBP,EAAAA,EAAAA,QAAO,MAE/B,OADAO,EAAgBC,QAAUT,EAAUS,QAAUhB,EAAMC,EAAW,OAAKY,EAC7D,CAACE,EAAgBC,QAAS,SAACC,GAC2F,IAAzH,IAAMC,EAA+B,oBAAbD,EAA0BF,EAAgBC,QAAUC,EAASF,EAAgBC,SAAWC,EAASE,EAAAC,UAAAC,OAD9EC,EAAM,IAAAC,MAAAJ,EAAA,EAAAA,EAAA,KAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAANF,EAAME,EAAA,GAA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AA2BrB,EAAGE,KAAM,EAAAoB,EAAA,IAChG,C,kDELA,SAASC,EAA4BvB,EAAGC,GACtC,GAAID,EAAG,CACL,GAAI,iBAAmBA,EAAG,OAAO,OAAiBA,EAAGC,GACrD,IAAIS,EAAI,CAAC,EAAEc,SAASP,KAAKjB,GAAGyB,MAAM,GAAI,GACtC,MAAO,WAAaf,GAAKV,EAAE0B,cAAgBhB,EAAIV,EAAE0B,YAAYC,MAAO,QAAUjB,GAAK,QAAUA,EAAIf,MAAMiC,KAAK5B,GAAK,cAAgBU,GAAK,2CAA2CmB,KAAKnB,IAAK,OAAiBV,EAAGC,QAAK,CACtN,CACF,C","sources":["../node_modules/@kne/use-control-value/src/index.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"],"sourcesContent":["import React, {useState, useRef} from \"react\";\n\nexport default (props, map) => {\n map = Object.assign({}, {defaultValue: \"defaultValue\", value: \"value\", onChange: \"onChange\"}, map);\n const isControl = useRef(map[\"value\"] in props), [stateValue, setStateValue] = useState(props[map[\"defaultValue\"]]);\n const currentValueRef = useRef(null);\n currentValueRef.current = isControl.current ? props[map[\"value\"]] : stateValue;\n return [currentValueRef.current, (newValue, ...others) => {\n const newState = typeof newValue === \"function\" ? currentValueRef.current = newValue(currentValueRef.current) : newValue;\n props[map[\"onChange\"]] && props[map[\"onChange\"]](newState, ...others);\n if (!isControl.current) {\n setStateValue(newState);\n }\n }];\n};\n","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };"],"names":["props","map","Object","assign","defaultValue","value","onChange","isControl","useRef","_useState","useState","_useState2","_slicedToArray","stateValue","setStateValue","currentValueRef","current","newValue","newState","_len","arguments","length","others","Array","_key","apply","concat","_arrayLikeToArray","r","a","e","n","_arrayWithHoles","isArray","_nonIterableRest","TypeError","arrayWithHoles","l","t","Symbol","iterator","i","u","f","o","call","next","done","push","unsupportedIterableToArray","nonIterableRest","_unsupportedIterableToArray","toString","slice","constructor","name","from","test"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2503,2723,9034],{17342:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var n=l(8762),i=l.n(n);l(46733);const s=i()},82723:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>n.Content});var n=l(44802)},89384:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>N});var n=l(55199),i=l(53984),s=l.n(i),a=l(83136),c=l.n(a),o=l(17342),r=l(63908),d=l(64671),_=l(82723);const u={notification:"style_notification__Vv-MM__lcEcn",list:"style_list__l8KOo__lcEcn",header:"style_header__3dcv8__lcEcn",item:"style_item__d92RS__lcEcn","item-box":"style_item-box__dd-Lk__lcEcn","index-1":"style_index-1__f97L0__lcEcn","index-2":"style_index-2__04vAw__lcEcn","item-box-main":"style_item-box-main__lnSak__lcEcn","item-title":"style_item-title__mArMd__lcEcn","level-high":"style_level-high__Uys7Y__lcEcn","level-middle":"style_level-middle__EewyC__lcEcn","level-low":"style_level-low__8kVyL__lcEcn","title-icon":"style_title-icon__1EoAG__lcEcn","item-subtitle":"style_item-subtitle__xeFJs__lcEcn","close-btn":"style_close-btn__7qpG3__lcEcn","is-loading":"style_is-loading__upVL+__lcEcn","item-content":"style_item-content__8MlsG__lcEcn","link-outer":"style_link-outer__kegyZ__lcEcn",link:"style_link__F2CO-__lcEcn","is-last-item":"style_is-last-item__MytRl__lcEcn"};var v=l(73884),h=l(39835),m=l.n(h),x=l(85855),p=l.n(x),f=l(96604),g=l.n(f),y=l(81014),j=l(32520),b=l.n(j),E=l(70579);const k=["high","middle","low"],w=e=>{let{level:t,title:l,groupLength:i,subtitle:s,content:a,link:o,id:v,children:h,className:m}=e;const{setGlobal:x}=(0,r.useGlobalContext)("notification"),{apis:p,ajax:f}=(0,r.usePreset)(),{isLoading:j,callback:k}=(0,y.useLoading)((async()=>{var e;const{data:t}=null!==p&&void 0!==p&&null!==(e=p.notification)&&void 0!==e&&e.read?await f(Object.assign({},p.notification.read,{data:{ids:[v]}})):{data:{code:0}};0===t.code&&x((e=>{const t=((null===e||void 0===e?void 0:e.list)||[]).slice(0),l=b()(t,(e=>v===e.id));return l>-1&&t.splice(l,1),Object.assign({},e,{list:t})}))}));return(0,E.jsxs)("div",{className:c()(u.item,m),style:{"--group-length":Math.min(i,3)||1},children:[i&&i>1&&g()(1,Math.min(i,3)).reverse().map((e=>(0,E.jsx)("div",{className:c()(u["item-box"],u[`index-${e}`])},e))),(0,E.jsxs)("div",{className:c()(u["item-box"],u["item-box-main"]),children:[(0,E.jsxs)("div",{className:c()(u["item-title"],u[`level-${t}`]),children:[(0,E.jsx)(d.default,{className:u["title-icon"],type:"high"===t?"icon-tishi":"icon-daiwochuli"}),(0,E.jsx)(n.Typography.Text,{ellipsis:!0,children:l})]}),(0,E.jsxs)("div",{className:u["item-content"],children:[(0,E.jsxs)("div",{className:u["item-subtitle"],children:[(0,E.jsx)(n.Typography.Text,{ellipsis:!0,children:s||""}),(0,E.jsx)(d.default,{className:c()(u["close-btn"],{[u["is-loading"]]:j}),type:"icon-close-thin",onClick:()=>{j||v&&k()}})]}),Array.isArray(a)?(0,E.jsx)(_.default,{list:a,labelAlign:"auto",size:"small"}):h]}),o&&(0,E.jsx)("div",{className:u["link-outer"],children:(0,E.jsx)(y.default,{className:u.link,size:"small",onClick:async()=>{var e;const{data:t}=null!==p&&void 0!==p&&null!==(e=p.notification)&&void 0!==e&&e.read?await f(Object.assign({},p.notification.read,{data:{ids:[v]}})):{data:{code:0}};0===t.code&&window.open(o)},children:"\u67e5\u770b\u8be6\u60c5"})})]})]})};w.defaultProps={level:"low"};const N=e=>{let{itemClassName:t}=e;const{global:l,setGlobal:i}=(0,r.useGlobalContext)("notification"),a=(0,v.useRef)(),{apis:d,ajax:_}=(0,r.usePreset)(),[h,x]=(0,v.useState)(32);(0,v.useEffect)((()=>{var e;a.current&&x(null===(e=a.current)||void 0===e?void 0:e.clientHeight)}),[]);const{list:f,expand:g}=Object.assign({},{expand:!1,list:[]},l),j=(0,v.useMemo)((()=>{const e=m()(f,(e=>e.level||"low"));return k.map((t=>e[t]||[]))}),[f]);return 0===f.length?null:(0,E.jsxs)("div",{className:c()({},u.notification,"notification"),style:{"--head-option-height":`${h}px`},children:[(0,E.jsx)("div",{ref:a,children:(0,E.jsxs)(n.Row,{justify:"end",wrap:!1,className:u.header,gutter:8,children:[j.some((e=>e.length>1))&&(0,E.jsx)(n.Col,{children:(0,E.jsx)(n.Button,{size:"small",onClick:()=>{i(Object.assign({},l,{expand:!g}))},children:g?"\u5168\u90e8\u6298\u53e0":"\u5168\u90e8\u5c55\u5f00"})}),(0,E.jsx)(n.Col,{children:(0,E.jsx)(y.default,{type:"primary",size:"small",onClick:async()=>{var e;const{data:t}=null!==d&&void 0!==d&&null!==(e=d.notification)&&void 0!==e&&e.read?await _(Object.assign({},d.notification.read,{data:{ids:f.map((e=>e.id)).filter((e=>!!e))}})):{data:{code:0}};0===t.code&&i(Object.assign({},l,{list:[]}))},children:"\u5168\u90e8\u6e05\u9664"})})]})}),(0,E.jsx)(o.A,{className:u.list,children:(0,E.jsx)(s(),{leaveReverse:!0,duration:200,interval:20,children:j.filter((e=>e&&e.length>0)).map(((e,l)=>{var n;if(g)return e.map(((t,n)=>{var i;return t&&(0,E.jsx)("div",{children:(0,E.jsx)(w,{...Object.assign({},t),className:c()({[u["is-last-item"]]:+l+1===Math.min(null===(i=j.filter((e=>e&&e.length)))||void 0===i?void 0:i.length,3)&&n===(null===e||void 0===e?void 0:e.length)-1})})},`group-${l}-${n}`)}));const i=p()(e);return(0,E.jsx)("div",{children:(0,E.jsx)(w,{...Object.assign({},i),groupLength:e.length,className:c()({[u["is-last-item"]]:(null===j||void 0===j?void 0:j.length)&&+l+1===Math.min(null===(n=j.filter((e=>e&&e.length)))||void 0===n?void 0:n.length,3)},t)})},`group-${l}-0`)}))})})]})}},94710:e=>{e.exports=function(e,t,l,n){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(n,a,l(a),e)}return n}},32952:(e,t,l)=>{var n=l(45652);e.exports=function(e,t,l,i){return n(e,(function(e,n,s){t(i,e,l(e),s)})),i}},45652:(e,t,l)=>{var n=l(94664),i=l(76516)(n);e.exports=i},75816:e=>{e.exports=function(e,t,l,n){for(var i=e.length,s=l+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},19449:(e,t,l)=>{var n=l(94710),i=l(32952),s=l(9096),a=l(54052);e.exports=function(e,t){return function(l,c){var o=a(l)?n:i,r=t?t():{};return o(l,e,s(c,2),r)}}},76516:(e,t,l)=>{var n=l(6571);e.exports=function(e,t){return function(l,i){if(null==l)return l;if(!n(l))return e(l,i);for(var s=l.length,a=t?s:-1,c=Object(l);(t?a--:++a<s)&&!1!==i(c[a],a,c););return l}}},32520:(e,t,l)=>{var n=l(75816),i=l(9096),s=l(99140),a=Math.max;e.exports=function(e,t,l){var c=null==e?0:e.length;if(!c)return-1;var o=null==l?0:s(l);return o<0&&(o=a(c+o,0)),n(e,i(t,3),o)}},85855:(e,t,l)=>{e.exports=l(96483)},39835:(e,t,l)=>{var n=l(71775),i=l(19449),s=Object.prototype.hasOwnProperty,a=i((function(e,t,l){s.call(e,l)?e[l].push(t):n(e,l,[t])}));e.exports=a},96483:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},99140:(e,t,l)=>{var n=l(37303);e.exports=function(e){var t=n(e),l=t%1;return t===t?l?t-l:t:0}},46733:()=>{}}]);
|
|
2
|
+
//# sourceMappingURL=2503.a8362b49.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/2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QAZP,SAAmBC,EAAOW,EAAWC,GACnC,IAAIlC,EAAkB,MAATsB,EAAgB,EAAIA,EAAMtB,OACvC,IAAKA,EACH,OAAQ,EAEV,IAAIhD,EAAqB,MAAbkF,EAAoB,EAAIW,EAAUX,GAI9C,OAHIlF,EAAQ,IACVA,EAAQ8F,EAAU9C,EAAShD,EAAO,IAE7B4F,EAActB,EAAOgB,EAAaL,EAAW,GAAIjF,EAC1D,C,kBCpDAoE,EAAOC,QAAU,EAAjBD,M,kBCAA,IAAI4B,EAAkBpB,EAAQ,OAC1BqB,EAAmBrB,EAAQ,OAM3BsB,EAHczG,OAAO0G,UAGQD,eAyB7BpD,EAAUmD,GAAiB,SAASG,EAAQ1B,EAAOI,GACjDoB,EAAeG,KAAKD,EAAQtB,GAC9BsB,EAAOtB,GAAKwB,KAAK5B,GAEjBsB,EAAgBI,EAAQtB,EAAK,CAACJ,GAElC,IAEAN,EAAOC,QAAUvB,C,YClBjBsB,EAAOC,QAJP,SAAcC,GACZ,OAAQA,GAASA,EAAMtB,OAAUsB,EAAM,QAAKiC,CAC9C,C,kBCpBA,IAAIC,EAAW5B,EAAQ,OAmCvBR,EAAOC,QAPP,SAAmBK,GACjB,IAAI0B,EAASI,EAAS9B,GAClB+B,EAAYL,EAAS,EAEzB,OAAOA,IAAWA,EAAUK,EAAYL,EAASK,EAAYL,EAAU,CACzE,C","sources":["common/components/SimpleBar.js","webpack://@kne-components/components-core/./src/components/Notification/style.module.scss?659e","components/Notification/index.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/findIndex.js","../node_modules/lodash/first.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/head.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","// extracted by mini-css-extract-plugin\nexport default {\"notification\":\"style_notification__Vv-MM__BSy+U\",\"list\":\"style_list__l8KOo__BSy+U\",\"header\":\"style_header__3dcv8__BSy+U\",\"item\":\"style_item__d92RS__BSy+U\",\"item-box\":\"style_item-box__dd-Lk__BSy+U\",\"index-1\":\"style_index-1__f97L0__BSy+U\",\"index-2\":\"style_index-2__04vAw__BSy+U\",\"item-box-main\":\"style_item-box-main__lnSak__BSy+U\",\"item-title\":\"style_item-title__mArMd__BSy+U\",\"level-high\":\"style_level-high__Uys7Y__BSy+U\",\"level-middle\":\"style_level-middle__EewyC__BSy+U\",\"level-low\":\"style_level-low__8kVyL__BSy+U\",\"title-icon\":\"style_title-icon__1EoAG__BSy+U\",\"item-subtitle\":\"style_item-subtitle__xeFJs__BSy+U\",\"close-btn\":\"style_close-btn__7qpG3__BSy+U\",\"is-loading\":\"style_is-loading__upVL+__BSy+U\",\"item-content\":\"style_item-content__8MlsG__BSy+U\",\"link-outer\":\"style_link-outer__kegyZ__BSy+U\",\"link\":\"style_link__F2CO-__BSy+U\",\"is-last-item\":\"style_is-last-item__MytRl__BSy+U\"};","import { Row, Col, Button, Typography } from \"antd\";\nimport QueueAnim from \"rc-queue-anim\";\nimport classnames from \"classnames\";\nimport SimpleBar from \"@common/components/SimpleBar\";\nimport { useGlobalContext, usePreset } from \"@components/Global\";\nimport Icon from \"@components/Icon\";\nimport Content from \"@components/Content\";\nimport style from \"./style.module.scss\";\nimport { useMemo, useRef, useState, useEffect } from \"react\";\nimport groupBy from \"lodash/groupBy\";\nimport first from \"lodash/first\";\nimport range from \"lodash/range\";\nimport LoadingButton, { useLoading } from \"@components/LoadingButton\";\nimport findIndex from \"lodash/findIndex\";\n\nconst LEVEL = [\"high\", \"middle\", \"low\"];\n\nconst NotificationItem = ({\n level,\n title,\n groupLength,\n subtitle,\n content,\n link,\n id,\n children,\n className,\n}) => {\n const { setGlobal } = useGlobalContext(\"notification\");\n const { apis, ajax } = usePreset();\n const { isLoading, callback } = useLoading(async () => {\n const { data: resData } = apis?.notification?.read\n ? await ajax(\n Object.assign({}, apis.notification.read, {\n data: { ids: [id] },\n })\n )\n : { data: { code: 0 } };\n\n if (resData.code === 0) {\n setGlobal((notification) => {\n const newList = (notification?.list || []).slice(0);\n const index = findIndex(newList, (item) => id === item.id);\n if (index > -1) {\n newList.splice(index, 1);\n }\n return Object.assign({}, notification, { list: newList });\n });\n }\n });\n return (\n <div\n className={classnames(style[\"item\"], className)}\n style={{ \"--group-length\": Math.min(groupLength, 3) || 1 }}\n >\n {groupLength &&\n groupLength > 1 &&\n range(1, Math.min(groupLength, 3))\n .reverse()\n .map((number) => (\n <div\n className={classnames(\n style[\"item-box\"],\n style[`index-${number}`]\n )}\n key={number}\n />\n ))}\n <div className={classnames(style[\"item-box\"], style[\"item-box-main\"])}>\n <div\n className={classnames(style[\"item-title\"], style[`level-${level}`])}\n >\n <Icon\n className={style[\"title-icon\"]}\n type={level === \"high\" ? \"icon-tishi\" : \"icon-daiwochuli\"}\n />\n <Typography.Text ellipsis>{title}</Typography.Text>\n </div>\n <div className={style[\"item-content\"]}>\n <div className={style[\"item-subtitle\"]}>\n <Typography.Text ellipsis>{subtitle || \"\"}</Typography.Text>\n <Icon\n className={classnames(style[\"close-btn\"], {\n [style[\"is-loading\"]]: isLoading,\n })}\n type=\"icon-close-thin\"\n onClick={() => {\n if (isLoading) {\n return;\n }\n\n if (!id) {\n return;\n }\n\n callback();\n }}\n />\n </div>\n {Array.isArray(content) ? (\n <Content list={content} labelAlign=\"auto\" size=\"small\" />\n ) : (\n children\n )}\n </div>\n {link && (\n <div className={style[\"link-outer\"]}>\n <LoadingButton\n className={style[\"link\"]}\n size=\"small\"\n onClick={async () => {\n const { data: resData } = apis?.notification?.read\n ? await ajax(\n Object.assign({}, apis.notification.read, {\n data: { ids: [id] },\n })\n )\n : { data: { code: 0 } };\n if (resData.code === 0) {\n window.open(link);\n }\n }}\n >\n 查看详情\n </LoadingButton>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nNotificationItem.defaultProps = {\n level: \"low\",\n};\n\nconst Notification = ({ itemClassName }) => {\n const { global: notification, setGlobal } = useGlobalContext(\"notification\");\n const headOptionRef = useRef();\n const { apis, ajax } = usePreset();\n const [headOptionHeight, setHeadOptionHeight] = useState(32);\n\n useEffect(() => {\n headOptionRef.current &&\n setHeadOptionHeight(headOptionRef.current?.clientHeight);\n }, []);\n\n const { list, expand } = Object.assign(\n {},\n {\n expand: false,\n list: [],\n },\n notification\n );\n\n const groupList = useMemo(() => {\n const group = groupBy(list, (item) => item.level || \"low\");\n return LEVEL.map((name) => group[name] || []);\n }, [list]);\n\n if (list.length === 0) {\n return null;\n }\n\n return (\n <div\n className={classnames({}, style[\"notification\"], \"notification\")}\n style={{\n \"--head-option-height\": `${headOptionHeight}px`,\n }}\n >\n <div ref={headOptionRef}>\n <Row justify=\"end\" wrap={false} className={style[\"header\"]} gutter={8}>\n {groupList.some((item) => item.length > 1) && (\n <Col>\n <Button\n size=\"small\"\n onClick={() => {\n setGlobal(\n Object.assign({}, notification, { expand: !expand })\n );\n }}\n >\n {expand ? \"全部折叠\" : \"全部展开\"}\n </Button>\n </Col>\n )}\n <Col>\n <LoadingButton\n type=\"primary\"\n size=\"small\"\n onClick={async () => {\n const { data: resData } = apis?.notification?.read\n ? await ajax(\n Object.assign({}, apis.notification.read, {\n data: {\n ids: list.map((item) => item.id).filter((id) => !!id),\n },\n })\n )\n : { data: { code: 0 } };\n if (resData.code === 0) {\n setGlobal(Object.assign({}, notification, { list: [] }));\n }\n }}\n >\n 全部清除\n </LoadingButton>\n </Col>\n </Row>\n </div>\n <SimpleBar className={style[\"list\"]}>\n <QueueAnim leaveReverse duration={200} interval={20}>\n {groupList\n .filter((item) => item && item.length > 0)\n .map((item, groupKey) => {\n if (expand) {\n return item.map(\n (notification, index) =>\n notification && (\n <div key={`group-${groupKey}-${index}`}>\n <NotificationItem\n {...Object.assign({}, notification)}\n className={classnames({\n [style[\"is-last-item\"]]:\n +groupKey + 1 ===\n Math.min(\n groupList.filter(\n (item) => item && item.length\n )?.length,\n 3\n ) && index === item?.length - 1,\n })}\n />\n </div>\n )\n );\n }\n const firstItem = first(item);\n return (\n <div key={`group-${groupKey}-0`}>\n <NotificationItem\n {...Object.assign({}, firstItem)}\n groupLength={item.length}\n className={classnames(\n {\n [style[\"is-last-item\"]]:\n groupList?.length &&\n +groupKey + 1 ===\n Math.min(\n groupList.filter((item) => item && item.length)\n ?.length,\n 3\n ),\n },\n itemClassName\n )}\n />\n </div>\n );\n })}\n </QueueAnim>\n </SimpleBar>\n </div>\n );\n};\n\nexport default Notification;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","module.exports = require('./head');\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n"],"names":["SimpleBar","LEVEL","NotificationItem","_ref","level","title","groupLength","subtitle","content","link","id","children","className","setGlobal","useGlobalContext","apis","ajax","usePreset","isLoading","callback","useLoading","async","_apis$notification","data","resData","notification","read","Object","assign","ids","code","newList","list","slice","index","findIndex","item","splice","_jsxs","classnames","style","Math","min","range","reverse","map","number","_jsx","Icon","type","Typography","Text","ellipsis","onClick","Array","isArray","Content","labelAlign","size","LoadingButton","_apis$notification2","window","open","defaultProps","_ref2","itemClassName","global","headOptionRef","useRef","headOptionHeight","setHeadOptionHeight","useState","useEffect","_headOptionRef$curren","current","clientHeight","expand","groupList","useMemo","group","groupBy","name","length","ref","Row","justify","wrap","gutter","some","Col","Button","_apis$notification3","filter","QueueAnim","leaveReverse","duration","interval","groupKey","_groupList$filter2","_groupList$filter","firstItem","first","module","exports","array","setter","iteratee","accumulator","value","baseEach","require","collection","key","baseForOwn","createBaseEach","predicate","fromIndex","fromRight","arrayAggregator","baseAggregator","baseIteratee","initializer","func","isArrayLike","eachFunc","iterable","baseFindIndex","toInteger","nativeMax","max","baseAssignValue","createAggregator","hasOwnProperty","prototype","result","call","push","undefined","toFinite","remainder"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/2503.a8362b49.chunk.js","mappings":"8MAGA,QAAeA,G,mPCFf,SAAgB,aAAe,mCAAmC,KAAO,2BAA2B,OAAS,6BAA6B,KAAO,2BAA2B,WAAW,+BAA+B,UAAU,8BAA8B,UAAU,8BAA8B,gBAAgB,oCAAoC,aAAa,iCAAiC,aAAa,iCAAiC,eAAe,mCAAmC,YAAY,gCAAgC,aAAa,iCAAiC,gBAAgB,oCAAoC,YAAY,gCAAgC,aAAa,iCAAiC,eAAe,mCAAmC,aAAa,iCAAiC,KAAO,2BAA2B,eAAe,oC,qHCcj2B,MAAMC,EAAQ,CAAC,OAAQ,SAAU,OAE3BC,EAAmBC,IAUlB,IAVmB,MACxBC,EAAK,MACLC,EAAK,YACLC,EAAW,SACXC,EAAQ,QACRC,EAAO,KACPC,EAAI,GACJC,EAAE,SACFC,EAAQ,UACRC,GACDT,EACC,MAAM,UAAEU,IAAcC,EAAAA,EAAAA,kBAAiB,iBACjC,KAA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BjBsB,EAAOC,QAJP,SAAcC,GACZ,OAAQA,GAASA,EAAMtB,OAAUsB,EAAM,QAAKiC,CAC9C,C,kBCpBA,IAAIC,EAAW5B,EAAQ,OAmCvBR,EAAOC,QAPP,SAAmBK,GACjB,IAAI0B,EAASI,EAAS9B,GAClB+B,EAAYL,EAAS,EAEzB,OAAOA,IAAWA,EAAUK,EAAYL,EAASK,EAAYL,EAAU,CACzE,C","sources":["common/components/SimpleBar.js","webpack://@kne-components/components-core/./src/components/Notification/style.module.scss?659e","components/Notification/index.js","../node_modules/lodash/_arrayAggregator.js","../node_modules/lodash/_baseAggregator.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_createAggregator.js","../node_modules/lodash/_createBaseEach.js","../node_modules/lodash/findIndex.js","../node_modules/lodash/first.js","../node_modules/lodash/groupBy.js","../node_modules/lodash/head.js","../node_modules/lodash/toInteger.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","// extracted by mini-css-extract-plugin\nexport default {\"notification\":\"style_notification__Vv-MM__lcEcn\",\"list\":\"style_list__l8KOo__lcEcn\",\"header\":\"style_header__3dcv8__lcEcn\",\"item\":\"style_item__d92RS__lcEcn\",\"item-box\":\"style_item-box__dd-Lk__lcEcn\",\"index-1\":\"style_index-1__f97L0__lcEcn\",\"index-2\":\"style_index-2__04vAw__lcEcn\",\"item-box-main\":\"style_item-box-main__lnSak__lcEcn\",\"item-title\":\"style_item-title__mArMd__lcEcn\",\"level-high\":\"style_level-high__Uys7Y__lcEcn\",\"level-middle\":\"style_level-middle__EewyC__lcEcn\",\"level-low\":\"style_level-low__8kVyL__lcEcn\",\"title-icon\":\"style_title-icon__1EoAG__lcEcn\",\"item-subtitle\":\"style_item-subtitle__xeFJs__lcEcn\",\"close-btn\":\"style_close-btn__7qpG3__lcEcn\",\"is-loading\":\"style_is-loading__upVL+__lcEcn\",\"item-content\":\"style_item-content__8MlsG__lcEcn\",\"link-outer\":\"style_link-outer__kegyZ__lcEcn\",\"link\":\"style_link__F2CO-__lcEcn\",\"is-last-item\":\"style_is-last-item__MytRl__lcEcn\"};","import { Row, Col, Button, Typography } from \"antd\";\nimport QueueAnim from \"rc-queue-anim\";\nimport classnames from \"classnames\";\nimport SimpleBar from \"@common/components/SimpleBar\";\nimport { useGlobalContext, usePreset } from \"@components/Global\";\nimport Icon from \"@components/Icon\";\nimport Content from \"@components/Content\";\nimport style from \"./style.module.scss\";\nimport { useMemo, useRef, useState, useEffect } from \"react\";\nimport groupBy from \"lodash/groupBy\";\nimport first from \"lodash/first\";\nimport range from \"lodash/range\";\nimport LoadingButton, { useLoading } from \"@components/LoadingButton\";\nimport findIndex from \"lodash/findIndex\";\n\nconst LEVEL = [\"high\", \"middle\", \"low\"];\n\nconst NotificationItem = ({\n level,\n title,\n groupLength,\n subtitle,\n content,\n link,\n id,\n children,\n className,\n}) => {\n const { setGlobal } = useGlobalContext(\"notification\");\n const { apis, ajax } = usePreset();\n const { isLoading, callback } = useLoading(async () => {\n const { data: resData } = apis?.notification?.read\n ? await ajax(\n Object.assign({}, apis.notification.read, {\n data: { ids: [id] },\n })\n )\n : { data: { code: 0 } };\n\n if (resData.code === 0) {\n setGlobal((notification) => {\n const newList = (notification?.list || []).slice(0);\n const index = findIndex(newList, (item) => id === item.id);\n if (index > -1) {\n newList.splice(index, 1);\n }\n return Object.assign({}, notification, { list: newList });\n });\n }\n });\n return (\n <div\n className={classnames(style[\"item\"], className)}\n style={{ \"--group-length\": Math.min(groupLength, 3) || 1 }}\n >\n {groupLength &&\n groupLength > 1 &&\n range(1, Math.min(groupLength, 3))\n .reverse()\n .map((number) => (\n <div\n className={classnames(\n style[\"item-box\"],\n style[`index-${number}`]\n )}\n key={number}\n />\n ))}\n <div className={classnames(style[\"item-box\"], style[\"item-box-main\"])}>\n <div\n className={classnames(style[\"item-title\"], style[`level-${level}`])}\n >\n <Icon\n className={style[\"title-icon\"]}\n type={level === \"high\" ? \"icon-tishi\" : \"icon-daiwochuli\"}\n />\n <Typography.Text ellipsis>{title}</Typography.Text>\n </div>\n <div className={style[\"item-content\"]}>\n <div className={style[\"item-subtitle\"]}>\n <Typography.Text ellipsis>{subtitle || \"\"}</Typography.Text>\n <Icon\n className={classnames(style[\"close-btn\"], {\n [style[\"is-loading\"]]: isLoading,\n })}\n type=\"icon-close-thin\"\n onClick={() => {\n if (isLoading) {\n return;\n }\n\n if (!id) {\n return;\n }\n\n callback();\n }}\n />\n </div>\n {Array.isArray(content) ? (\n <Content list={content} labelAlign=\"auto\" size=\"small\" />\n ) : (\n children\n )}\n </div>\n {link && (\n <div className={style[\"link-outer\"]}>\n <LoadingButton\n className={style[\"link\"]}\n size=\"small\"\n onClick={async () => {\n const { data: resData } = apis?.notification?.read\n ? await ajax(\n Object.assign({}, apis.notification.read, {\n data: { ids: [id] },\n })\n )\n : { data: { code: 0 } };\n if (resData.code === 0) {\n window.open(link);\n }\n }}\n >\n 查看详情\n </LoadingButton>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nNotificationItem.defaultProps = {\n level: \"low\",\n};\n\nconst Notification = ({ itemClassName }) => {\n const { global: notification, setGlobal } = useGlobalContext(\"notification\");\n const headOptionRef = useRef();\n const { apis, ajax } = usePreset();\n const [headOptionHeight, setHeadOptionHeight] = useState(32);\n\n useEffect(() => {\n headOptionRef.current &&\n setHeadOptionHeight(headOptionRef.current?.clientHeight);\n }, []);\n\n const { list, expand } = Object.assign(\n {},\n {\n expand: false,\n list: [],\n },\n notification\n );\n\n const groupList = useMemo(() => {\n const group = groupBy(list, (item) => item.level || \"low\");\n return LEVEL.map((name) => group[name] || []);\n }, [list]);\n\n if (list.length === 0) {\n return null;\n }\n\n return (\n <div\n className={classnames({}, style[\"notification\"], \"notification\")}\n style={{\n \"--head-option-height\": `${headOptionHeight}px`,\n }}\n >\n <div ref={headOptionRef}>\n <Row justify=\"end\" wrap={false} className={style[\"header\"]} gutter={8}>\n {groupList.some((item) => item.length > 1) && (\n <Col>\n <Button\n size=\"small\"\n onClick={() => {\n setGlobal(\n Object.assign({}, notification, { expand: !expand })\n );\n }}\n >\n {expand ? \"全部折叠\" : \"全部展开\"}\n </Button>\n </Col>\n )}\n <Col>\n <LoadingButton\n type=\"primary\"\n size=\"small\"\n onClick={async () => {\n const { data: resData } = apis?.notification?.read\n ? await ajax(\n Object.assign({}, apis.notification.read, {\n data: {\n ids: list.map((item) => item.id).filter((id) => !!id),\n },\n })\n )\n : { data: { code: 0 } };\n if (resData.code === 0) {\n setGlobal(Object.assign({}, notification, { list: [] }));\n }\n }}\n >\n 全部清除\n </LoadingButton>\n </Col>\n </Row>\n </div>\n <SimpleBar className={style[\"list\"]}>\n <QueueAnim leaveReverse duration={200} interval={20}>\n {groupList\n .filter((item) => item && item.length > 0)\n .map((item, groupKey) => {\n if (expand) {\n return item.map(\n (notification, index) =>\n notification && (\n <div key={`group-${groupKey}-${index}`}>\n <NotificationItem\n {...Object.assign({}, notification)}\n className={classnames({\n [style[\"is-last-item\"]]:\n +groupKey + 1 ===\n Math.min(\n groupList.filter(\n (item) => item && item.length\n )?.length,\n 3\n ) && index === item?.length - 1,\n })}\n />\n </div>\n )\n );\n }\n const firstItem = first(item);\n return (\n <div key={`group-${groupKey}-0`}>\n <NotificationItem\n {...Object.assign({}, firstItem)}\n groupLength={item.length}\n className={classnames(\n {\n [style[\"is-last-item\"]]:\n groupList?.length &&\n +groupKey + 1 ===\n Math.min(\n groupList.filter((item) => item && item.length)\n ?.length,\n 3\n ),\n },\n itemClassName\n )}\n />\n </div>\n );\n })}\n </QueueAnim>\n </SimpleBar>\n </div>\n );\n};\n\nexport default Notification;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","module.exports = require('./head');\n","var baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nmodule.exports = groupBy;\n","/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n"],"names":["SimpleBar","LEVEL","NotificationItem","_ref","level","title","groupLength","subtitle","content","link","id","children","className","setGlobal","useGlobalContext","apis","ajax","usePreset","isLoading","callback","useLoading","async","_apis$notification","data","resData","notification","read","Object","assign","ids","code","newList","list","slice","index","findIndex","item","splice","_jsxs","classnames","style","Math","min","range","reverse","map","number","_jsx","Icon","type","Typography","Text","ellipsis","onClick","Array","isArray","Content","labelAlign","size","LoadingButton","_apis$notification2","window","open","defaultProps","_ref2","itemClassName","global","headOptionRef","useRef","headOptionHeight","setHeadOptionHeight","useState","useEffect","_headOptionRef$curren","current","clientHeight","expand","groupList","useMemo","group","groupBy","name","length","ref","Row","justify","wrap","gutter","some","Col","Button","_apis$notification3","filter","QueueAnim","leaveReverse","duration","interval","groupKey","_groupList$filter2","_groupList$filter","firstItem","first","module","exports","array","setter","iteratee","accumulator","value","baseEach","require","collection","key","baseForOwn","createBaseEach","predicate","fromIndex","fromRight","arrayAggregator","baseAggregator","baseIteratee","initializer","func","isArrayLike","eachFunc","iterable","baseFindIndex","toInteger","nativeMax","max","baseAssignValue","createAggregator","hasOwnProperty","prototype","result","call","push","undefined","toFinite","remainder"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2517,9034],{17342:(e,o,l)=>{l.d(o,{A:()=>s});var n=l(8762),t=l.n(n);l(46733);const s=t()},3382:(e,o,l)=>{l.r(o),l.d(o,{ModalButton:()=>A,TabsModal:()=>E,TabsModalButton:()=>R,default:()=>k,useConfirmModal:()=>N,useModal:()=>v,useTabsModal:()=>S});var n=l(73884),t=l(55199),s=l(83136),i=l.n(s);const r={modal:"style_modal__Pm3cF__lcEcn",large:"style_large__iaqVE__lcEcn","modal-body-inner":"style_modal-body-inner__4PhpA__lcEcn","modal-title":"style_modal-title__dswaw__lcEcn","modal-outer":"style_modal-outer__r3SkX__lcEcn","modal-body":"style_modal-body__jQJSI__lcEcn","right-options-modal":"style_right-options-modal__FajDP__lcEcn","right-options-row":"style_right-options-row__-mPb9__lcEcn","right-options-col":"style_right-options-col__3ilee__lcEcn","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__lcEcn",content:"style_content__k6MIF__lcEcn","modal-footer":"style_modal-footer__-prbN__lcEcn","modal-close":"style_modal-close__Oa5Kl__lcEcn","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__lcEcn","is-danger":"style_is-danger__H5110__lcEcn",title:"style_title__orTym__lcEcn","has-title":"style_has-title__qy0Wp__lcEcn"},c=e=>({"en-US":()=>l.e(4628).then(l.bind(l,74628)),"zh-CN":()=>l.e(7478).then(l.bind(l,87478))}[e]());var a=l(58609),d=l(64671);const m=(e,o)=>"function"===typeof e?e(o):e;var h=l(81014),p=l(17342),_=l(70579);const u="Modal",f=e=>{let{options:o,rightSpan:l=6,children:n}=e;return o?(0,_.jsxs)(t.Row,{wrap:!1,className:r["right-options-row"],children:[(0,_.jsx)(t.Col,{span:24-l,className:r["right-options-col"],children:n}),(0,_.jsx)(t.Col,{span:l,className:r["right-options-col"],children:o})]}):n},y=(e,o)=>e-48-(o?58:0)+"px",g=(e,o)=>"large"===e?{width:`${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:l,onConfirm:s,onCancel:i,onClose:r,targetProps:d}=e;return(0,_.jsxs)(t.Row,{gutter:10,wrap:!1,children:[(0,_.jsx)(t.Col,{flex:1,children:o}),Array.isArray(l)&&0===l.length?null:(0,_.jsx)(t.Col,{children:(0,_.jsx)(t.Space,{children:(l||[{children:(0,_.jsx)(a.IntlProvider,{importMessages:c,moduleName:u,children:(0,_.jsx)(a.FormattedMessage,{id:"Cancel",moduleName:u})}),onClick:i},{type:"primary",children:(0,_.jsx)(a.IntlProvider,{importMessages:c,moduleName:u,children:(0,_.jsx)(a.FormattedMessage,{id:"Confirm",moduleName:u})}),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:l,onClick:t,autoClose:s=!0,display:i,...c}=e;const a=l||h.default;return(0,n.createElement)(a,{...c,key:o,onClick:async function(){for(var e=arguments.length,o=new Array(e),l=0;l<e;l++)o[l]=arguments[l];const n=await Promise.resolve(t&&t(...o,d));return s&&!1!==n&&r&&r(),n}})}))})})]})},b=e=>{let{title:o,footer:l,disabledScroller:s,footerButtons:c,onClose:a,closable:m,onConfirm:h,onCancel:u,children:f,targetProps:y}=e;const g=(0,n.useRef)(null);return(0,_.jsxs)("div",{className:r["modal-outer"],"data-testid":"components-core-modal",children:[!1===m?null:(0,_.jsx)(t.Button,{"data-testid":"components-core-modal-close-btn",className:r["modal-close"],type:"text",icon:(0,_.jsx)(d.default,{type:"icon-close-thin"}),onClick:e=>{e.stopPropagation(),a&&a()}}),o&&(0,_.jsx)("div",{className:r["modal-title"],children:o}),(0,_.jsx)(p.A,{className:i()(r["modal-body"],{[r["is-disabled-scroller"]]:s},"modal-body"),ref:g,children:(0,_.jsx)("div",{className:i()(r["modal-body-inner"],"modal-body-inner"),children:f})}),null!==l||c?(0,_.jsx)("div",{className:i()(r["modal-footer"],"modal-footer"),children:(0,_.jsx)(C,{footer:l,footerButtons:c,onConfirm:h,onCancel:u,onClose:a,targetProps:y})}):null]})},j=e=>{let{withDecorator:o,footerButtons:l,title:n,closable:t,onClose:s,onConfirm:i,onCancel:r,footer:c,rightOptions:a,rightSpan:d,disabledScroller:h,childrenRef:p,children:u}=e;const y=e=>(e=Object.assign({},{title:n},e),(0,_.jsx)(b,{title:m(e.title,{...e,childrenRef:p,close:s}),closable:t,onClose:s,onConfirm:i,onCancel:r,footerButtons:m(l,{...e,close:s}),disabledScroller:h,footer:m(c,{...e,childrenRef:p,close:s}),targetProps:Object.assign({},e,{childrenRef:p,close:s}),children:(0,_.jsx)(f,{rightSpan:d,options:m(a,{...e,childrenRef:p,close:s}),children:m(u,{...e,childrenRef:p,close:s})})}));return"function"===typeof o?o(y):y({})},x=e=>{let{children:o,rightOptions:l,rightSpan:n,footer:t,footerButtons:s,className:d,size:m,title:h,onClose:p,onConfirm:u,onCancel:f,closable:y,disabledScroller:C,withDecorator:b,childrenRef:x,...w}=e;return{...w,icon:null,centered:!0,title:null,maskClosable:!!w.hasOwnProperty("maskClosable")&&w.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:i()(d,r.modal,r[m],{[r["right-options-modal"]]:l}),...g(m,!(null===t&&!s)),children:(0,_.jsx)(a.IntlProvider,{importMessages:c,moduleName:"Modal",children:j({withDecorator:b,title:h,closable:y,onClose:p,onConfirm:u,onCancel:f,footer:t,footerButtons:s,rightOptions:l,rightSpan:n,disabledScroller:C,children:o,childrenRef:x})})}},w=e=>{const o=(0,n.useRef)(null);return(0,_.jsx)(t.Modal,{...x(Object.assign({},e,{childrenRef:o}))})};w.defaultProps={size:"default"};const v=()=>{const{modal:e}=t.App.useApp(),o=(0,n.useRef)(null);return l=>{const n={},{children:t,...s}=x({onClose:()=>n.close(),childrenRef:o,...l}),{destroy:i}=e.info({...s,content:t});return n.close=i,n}},N=()=>{const{modal:e}=t.App.useApp();return o=>{const l={},{type:n,icon:s,title:c,danger:a,wrapClassName:m,message:h,iconSetting:p={},confirmType:u="info",...f}={onClose:()=>l.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"},p);if(e[n]){const{destroy:o}=e[n]({...f,icon:null,wrapClassName:i()(r["confirm-modal-wrap"],m,{[r["is-danger"]]:a}),title:(0,_.jsx)(t.Space,{direction:"vertical",onClick:e=>{e.stopPropagation()},children:c&&(0,_.jsxs)(t.Space,{size:0,align:"start",className:r.title,children:[a?(0,_.jsx)(d.default,{className:i()("title-icon",`title-icon-${"confirm"===n?u:n}`),type:s||y["confirm"===n?u:n]}):null,c]})}),content:(0,_.jsxs)(t.Space,{size:0,align:"start",className:i()(r.content,{[r["has-title"]]:c}),children:[!c&&a?(0,_.jsx)(d.default,{className:i()("title-icon",`title-icon-${"confirm"===n?u:n}`),type:s||y["confirm"===n?u:n]}):null,h]})});l.close=o}return l}},k=w,P=e=>{let{items:o,className:l,activeKey:n,withDecorator:s,defaultActiveKey:r,onChange:c,...a}=e;return{...a,className:i()(l,"tabs-modal"),withDecorator:e=>{const l=l=>(0,_.jsx)(t.Tabs,{items:o.map((o=>{let{withDecorator:n,...t}=o;return Object.assign({},t,{children:"function"===typeof n?n((o=>e(Object.assign({},l,o,{children:t.children})))):e(Object.assign({},l,{children:t.children}))})})),destroyInactiveTabPane:!0,activeKey:n,defaultActiveKey:r,onChange:c});return"function"===typeof s?s(l):l()},children:e=>{let{children:o,...l}=e;return"function"===typeof o?o(l):o}}},E=e=>(0,_.jsx)(k,{...P(e)}),S=()=>{const e=v();return o=>e(P(o))};var M=l(73025);const R=e=>{const o=S();return e.api?(0,_.jsx)(M.A,{...e,modalFunc:o}):(0,_.jsx)(t.Button,{...e,onClick:()=>{o(e.modalProps)}})},A=e=>{const o=v();if(!e.api){const{modalProps:l,...n}=e;return(0,_.jsx)(t.Button,{...n,onClick:()=>{o(l)}})}return(0,_.jsx)(M.A,{...e,modalFunc:o})}},46733:()=>{}}]);
|
|
2
|
+
//# sourceMappingURL=2517.3255de49.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/2517.304d1c92.chunk.js","mappings":"yMAGA,QAAeA,G,6MCFf,SAAgB,MAAQ,4BAA4B,MAAQ,4BAA4B,mBAAmB,uCAAuC,cAAc,kCAAkC,cAAc,kCAAkC,aAAa,iCAAiC,sBAAsB,0CAA0C,oBAAoB,wCAAwC,oBAAoB,wCAAwC,uBAAuB,2CAA2C,QAAU,8BAA8B,eAAe,mCAAmC,cAAc,kCAAkC,qBAAqB,yCAAyC,YAAY,gCAAgC,MAAQ,4BAA4B,YAAY,iCCK9zB,EANwBC,IACZ,CACJ,QAASC,IAAM,gCAAmB,QAASC,IAAM,iCAClDF,M,0BCHP,MAOA,EAP0BG,CAACC,EAAQC,IACX,oBAAXD,EACFA,EAAOC,GAETD,E,qCCOT,MAAME,EAAmB,QAEZC,EAAeC,IAA2C,IAA1C,QAAEH,EAAO,UAAEI,EAAY,EAAC,SAAEC,GAAUF,EAC/D,OAAKH,GAIHM,EAAAA,EAAAA,MAACC,EAAAA,IAAG,CAACC,MAAM,EAAOC,UAAWC,EAAM,qBAAqBL,SAAA,EACtDM,EAAAA,EAAAA,KAACC,EAAAA,IAAG,CAACC,KAAM,GAAKT,EAAWK,UAAWC,EAAM,qBAAqBL,SAC9DA,KAEHM,EAAAA,EAAAA,KAACC,EAAAA,IAAG,CAACC,KAAMT,EAAWK,UAAWC,EAAM,qBAAqBL,SACzDL,OAREK,CAUD,EAIJS,EAAaA,CAACC,EAAQhB,IAChBgB,EAAS,IAAMhB,EAAS,GA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WF,KARtCvH,EAAAA,EAAAA,KAAC2D,EAAAA,OAAM,IACDpB,EACJT,QAASA,KACPyF,EAAUhF,EAAMmF,WAAW,GAKoB,EAEzD,EA9BqBnF,IACnB,MAAM+C,EAAQD,IACd,IAAK9C,EAAMkD,IAAK,CACd,MAAM,WAAEiC,KAAeC,GAAWpF,EAClC,OACEvC,EAAAA,EAAAA,KAAC2D,EAAAA,OAAM,IACDgE,EACJ7F,QAASA,KACPwD,EAAMoC,EAAW,GAIzB,CACA,OAAO1H,EAAAA,EAAAA,KAACwH,EAAAA,EAAW,IAAKjF,EAAOkF,UAAWnC,GAAS,C","sources":["common/components/SimpleBar.js","webpack://@kne-components/components-core/./src/components/Modal/style.module.scss?4fe4","components/Modal/locale/index.js","components/Modal/renderWithOptions.js","components/Modal/Modal.js","components/Modal/TabsModal.js","components/Modal/ModalButton.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"style_modal__Pm3cF__BSy+U\",\"large\":\"style_large__iaqVE__BSy+U\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__BSy+U\",\"modal-title\":\"style_modal-title__dswaw__BSy+U\",\"modal-outer\":\"style_modal-outer__r3SkX__BSy+U\",\"modal-body\":\"style_modal-body__jQJSI__BSy+U\",\"right-options-modal\":\"style_right-options-modal__FajDP__BSy+U\",\"right-options-row\":\"style_right-options-row__-mPb9__BSy+U\",\"right-options-col\":\"style_right-options-col__3ilee__BSy+U\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__BSy+U\",\"content\":\"style_content__k6MIF__BSy+U\",\"modal-footer\":\"style_modal-footer__-prbN__BSy+U\",\"modal-close\":\"style_modal-close__Oa5Kl__BSy+U\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__BSy+U\",\"is-danger\":\"style_is-danger__H5110__BSy+U\",\"title\":\"style_title__orTym__BSy+U\",\"has-title\":\"style_has-title__qy0Wp__BSy+U\"};","const importMessages = (locale) => {\n return ({\n 'en-US': () => import('./en-US'), 'zh-CN': () => import('./zh-CN')\n })[locale]();\n};\n\nexport default importMessages;","const renderWithOptions = (footer, options) => {\n if (typeof footer === \"function\") {\n return footer(options);\n }\n return footer;\n};\n\nexport default renderWithOptions;\n","import React, { useRef } from \"react\";\nimport { App, Button, Col, Modal as AntdModal, Row, Space } from \"antd\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport importMessages from \"./locale\";\nimport { FormattedMessage, IntlProvider } from \"@components/Intl\";\nimport Icon from \"@components/Icon\";\nimport renderWithOptions from \"./renderWithOptions\";\nimport LoadingButton from \"@components/LoadingButton\";\nimport SimpleBar from \"@common/components/SimpleBar\";\n\nconst localeModuleName = \"Modal\";\n\nexport const RightOptions = ({ options, rightSpan = 6, children }) => {\n if (!options) {\n return children;\n }\n return (\n <Row wrap={false} className={style[\"right-options-row\"]}>\n <Col span={24 - rightSpan} className={style[\"right-options-col\"]}>\n {children}\n </Col>\n <Col span={rightSpan} className={style[\"right-options-col\"]}>\n {options}\n </Col>\n </Row>\n );\n};\n\nconst calcHeight = (height, footer) => {\n return `${height - 48 - (footer ? 58 : 0)}px`;\n};\n\nconst sizeMap = (type, footer) => {\n if (type === \"large\") {\n return {\n width: `${Math.min(window.innerWidth - 64, 1500)}px`,\n style: { \"--min-modal-height\": calcHeight(500, footer) },\n };\n }\n if (type === \"small\") {\n return {\n width: \"600px\",\n style: { \"--min-modal-height\": calcHeight(300, footer) },\n };\n }\n return {\n width: \"1000px\",\n style: { \"--min-modal-height\": calcHeight(500, footer) },\n };\n};\n\nconst Footer = ({\n footer,\n footerButtons,\n onConfirm,\n onCancel,\n onClose,\n targetProps,\n}) => {\n return (\n <Row gutter={10} wrap={false}>\n <Col flex={1}>{footer}</Col>\n {Array.isArray(footerButtons) && footerButtons.length === 0 ? null : (\n <Col>\n <Space>\n {(\n footerButtons || [\n {\n children: (\n <IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Cancel\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>\n ),\n onClick: onCancel,\n },\n {\n type: \"primary\",\n children: (\n <IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Confirm\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>\n ),\n onClick: onConfirm,\n },\n ]\n )\n .filter((item) => {\n if (typeof item?.display === \"function\") {\n return item?.display();\n }\n return item?.display !== false;\n })\n .map(\n (\n {\n ButtonComponent,\n onClick,\n autoClose = true,\n display,\n ...props\n },\n index\n ) => {\n const CurrentButton = ButtonComponent || LoadingButton;\n return (\n <CurrentButton\n {...props}\n key={index}\n onClick={async (...args) => {\n const res = await Promise.resolve(\n onClick && onClick(...args, targetProps)\n );\n autoClose && res !== false && onClose && onClose();\n return res;\n }}\n />\n );\n }\n )}\n </Space>\n </Col>\n )}\n </Row>\n );\n};\n\nconst ModalOuter = ({\n title,\n footer,\n disabledScroller,\n footerButtons,\n onClose,\n closable,\n onConfirm,\n onCancel,\n children,\n targetProps,\n}) => {\n const modalBodyRef = useRef(null);\n return (\n <div className={style[\"modal-outer\"]} data-testid=\"components-core-modal\">\n {closable === false ? null : (\n <Button\n data-testid=\"components-core-modal-close-btn\"\n className={style[\"modal-close\"]}\n type=\"text\"\n icon={<Icon type=\"icon-close-thin\" />}\n onClick={(e) => {\n e.stopPropagation();\n onClose && onClose();\n }}\n />\n )}\n {title && <div className={style[\"modal-title\"]}>{title}</div>}\n <SimpleBar\n className={classnames(\n style[\"modal-body\"],\n {\n [style[\"is-disabled-scroller\"]]: disabledScroller,\n },\n \"modal-body\"\n )}\n ref={modalBodyRef}\n >\n <div\n className={classnames(style[\"modal-body-inner\"], \"modal-body-inner\")}\n >\n {children}\n </div>\n </SimpleBar>\n {footer === null && !footerButtons ? null : (\n <div className={classnames(style[\"modal-footer\"], \"modal-footer\")}>\n <Footer\n footer={footer}\n footerButtons={footerButtons}\n onConfirm={onConfirm}\n onCancel={onCancel}\n onClose={onClose}\n targetProps={targetProps}\n />\n </div>\n )}\n </div>\n );\n};\n\nconst runWithDecorator = ({\n withDecorator,\n footerButtons,\n title,\n closable,\n onClose,\n onConfirm,\n onCancel,\n footer,\n rightOptions,\n rightSpan,\n disabledScroller,\n childrenRef,\n children,\n}) => {\n const getInner = (props) => {\n props = Object.assign({}, { title }, props);\n return (\n <ModalOuter\n title={renderWithOptions(props.title, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n closable={closable}\n onClose={onClose}\n onConfirm={onConfirm}\n onCancel={onCancel}\n footerButtons={renderWithOptions(footerButtons, {\n ...props,\n close: onClose,\n })}\n disabledScroller={disabledScroller}\n footer={renderWithOptions(footer, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n targetProps={Object.assign({}, props, { childrenRef, close: onClose })}\n >\n <RightOptions\n rightSpan={rightSpan}\n options={renderWithOptions(rightOptions, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n >\n {renderWithOptions(children, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n </RightOptions>\n </ModalOuter>\n );\n };\n return typeof withDecorator === \"function\"\n ? withDecorator(getInner)\n : getInner({});\n};\n\nconst computedCommonProps = ({\n children,\n rightOptions,\n rightSpan,\n footer,\n footerButtons,\n className,\n size,\n title,\n onClose,\n onConfirm,\n onCancel,\n closable,\n disabledScroller,\n withDecorator,\n childrenRef,\n ...props\n}) => {\n return {\n ...props,\n icon: null,\n centered: true,\n title: null,\n maskClosable: props.hasOwnProperty(\"maskClosable\")\n ? props.maskClosable\n : false,\n destroyOnClose: true,\n footer: null,\n closable: false,\n onCancel: onClose,\n className: classnames(className, style[\"modal\"], style[size], {\n [style[\"right-options-modal\"]]: rightOptions,\n }),\n ...sizeMap(size, !(footer === null && !footerButtons)),\n children: (\n <IntlProvider importMessages={importMessages} moduleName=\"Modal\">\n {runWithDecorator({\n withDecorator,\n title,\n closable,\n onClose,\n onConfirm,\n onCancel,\n footer,\n footerButtons,\n rightOptions,\n rightSpan,\n disabledScroller,\n children,\n childrenRef,\n })}\n </IntlProvider>\n ),\n };\n};\n\nconst Modal = (props) => {\n const childrenRef = useRef(null);\n return (\n <AntdModal\n {...computedCommonProps(Object.assign({}, props, { childrenRef }))}\n />\n );\n};\n\nModal.defaultProps = {\n size: \"default\", //large small\n};\n\nexport const useModal = () => {\n const { modal } = App.useApp();\n const childrenRef = useRef(null);\n return (props) => {\n const api = {};\n const { children, ...otherProps } = computedCommonProps({\n onClose: () => api.close(),\n childrenRef,\n ...props,\n });\n const { destroy } = modal.info({\n ...otherProps,\n content: children,\n });\n api.close = destroy;\n\n return api;\n };\n};\n\nexport const useConfirmModal = () => {\n const { modal } = App.useApp();\n return (props) => {\n const api = {};\n const {\n type,\n icon,\n title,\n danger,\n wrapClassName,\n message,\n iconSetting = {},\n confirmType = \"info\",\n ...otherProps\n } = {\n onClose: () => api.close(),\n maskClosable: false,\n ...props,\n };\n const typeEnum = Object.assign(\n {},\n {\n info: \"icon-xinxi-tianchong\",\n confirm: \"icon-tishi-tianchong\",\n warning: \"icon-tishi-tianchong\",\n error: \"icon-shibai\",\n success: \"icon-chenggong\",\n },\n iconSetting\n );\n if (modal[type]) {\n const { destroy } = modal[type]({\n ...otherProps,\n icon: null,\n wrapClassName: classnames(style[\"confirm-modal-wrap\"], wrapClassName, {\n [style[\"is-danger\"]]: danger,\n }),\n title: (\n <Space\n direction=\"vertical\"\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {title && (\n <Space size={0} align=\"start\" className={style[\"title\"]}>\n {danger ? (\n <Icon\n className={classnames(\n \"title-icon\",\n `title-icon-${type === \"confirm\" ? confirmType : type}`\n )}\n type={\n icon || typeEnum[type === \"confirm\" ? confirmType : type]\n }\n />\n ) : null}\n {title}\n </Space>\n )}\n </Space>\n ),\n content: (\n <Space\n size={0}\n align=\"start\"\n className={classnames(style[\"content\"], {\n [style[\"has-title\"]]: title,\n })}\n >\n {!title && danger ? (\n <Icon\n className={classnames(\n \"title-icon\",\n `title-icon-${type === \"confirm\" ? confirmType : type}`\n )}\n type={icon || typeEnum[type === \"confirm\" ? confirmType : type]}\n />\n ) : null}\n {message}\n </Space>\n ),\n });\n api.close = destroy;\n }\n return api;\n };\n};\n\nexport default Modal;\n","import Modal, { useModal } from \"./Modal\";\nimport { Tabs } from \"antd\";\nimport classnames from \"classnames\";\n\nconst computedCommonProps = ({\n items,\n className,\n activeKey,\n withDecorator,\n defaultActiveKey,\n onChange,\n ...props\n}) => {\n return {\n ...props,\n className: classnames(className, \"tabs-modal\"),\n withDecorator: (render) => {\n const innerRender = (props) => (\n <Tabs\n items={items.map(({ withDecorator: itemWithDecorator, ...item }) => {\n return Object.assign({}, item, {\n children:\n typeof itemWithDecorator === \"function\"\n ? itemWithDecorator((innerProps) =>\n render(\n Object.assign({}, props, innerProps, {\n children: item.children,\n })\n )\n )\n : render(\n Object.assign({}, props, { children: item.children })\n ),\n });\n })}\n destroyInactiveTabPane\n activeKey={activeKey}\n defaultActiveKey={defaultActiveKey}\n onChange={onChange}\n />\n );\n return typeof withDecorator === \"function\"\n ? withDecorator(innerRender)\n : innerRender();\n },\n children: ({ children, ...props }) => {\n return typeof children === \"function\" ? children(props) : children;\n },\n };\n};\n\nconst TabsModal = (props) => {\n return <Modal {...computedCommonProps(props)} />;\n};\n\nexport default TabsModal;\n\nexport const useTabsModal = () => {\n const modal = useModal();\n return (props) => modal(computedCommonProps(props));\n};\n","import { useModal } from \"./Modal\";\nimport { useTabsModal } from \"./TabsModal\";\nimport FetchButton from \"@common/components/FetchButton\";\nimport { Button } from \"antd\";\n\nconst ModalButton = (props) => {\n const modal = useModal();\n if (!props.api) {\n const { modalProps, ...others } = props;\n return (\n <Button\n {...others}\n onClick={() => {\n modal(modalProps);\n }}\n />\n );\n }\n return <FetchButton {...props} modalFunc={modal} />;\n};\n\nexport const TabsModalButton = (props) => {\n const tabsModal = useTabsModal();\n if (!props.api) {\n return (\n <Button\n {...props}\n onClick={() => {\n tabsModal(props.modalProps);\n }}\n />\n );\n }\n return <FetchButton {...props} modalFunc={tabsModal} />;\n};\nexport default ModalButton;\n"],"names":["SimpleBar","locale","en-US","zh-CN","renderWithOptions","footer","options","localeModuleName","RightOptions","_ref","rightSpan","children","_jsxs","Row","wrap","className","style","_jsx","Col","span","calcHeight","height","sizeMap","type","width","Math","min","window","innerWidth","Footer","_ref2","footerButtons","onConfirm","onCancel","onClose","targetProps","gutter","flex","Array","isArray","length","Space","IntlProvider","importMessages","moduleName","FormattedMessage","id","onClick","filter","item","display","map","_ref3","index","ButtonComponent","autoClose","props","CurrentButton","LoadingButton","_createElement","key","async","_len","arguments","args","_key","res","Promise","resolve","ModalOuter","_ref4","title","disabledScroller","closable","modalBodyRef","useRef","Button","icon","Icon","e","stopPropagation","classnames","ref","runWithDecorator","_ref5","withDecorator","rightOptions","childrenRef","getInner","Object","assign","close","computedCommonProps","_ref6","size","centered","maskClosable","hasOwnProperty","destroyOnClose","Modal","AntdModal","defaultProps","useModal","modal","App","useApp","api","otherProps","destroy","info","content","useConfirmModal","danger","wrapClassName","message","iconSetting","confirmType","typeEnum","confirm","warning","error","success","direction","align","items","activeKey","defaultActiveKey","onChange","render","innerRender","Tabs","itemWithDecorator","innerProps","destroyInactiveTabPane","useTabsModal","TabsModalButton","tabsModal","FetchButton","modalFunc","modalProps","others"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/2517.3255de49.chunk.js","mappings":"yMAGA,QAAeA,G,6MCFf,SAAgB,MAAQ,4BAA4B,MAAQ,4BAA4B,mBAAmB,uCAAuC,cAAc,kCAAkC,cAAc,kCAAkC,aAAa,iCAAiC,sBAAsB,0CAA0C,oBAAoB,wCAAwC,oBAAoB,wCAAwC,uBAAuB,2CAA2C,QAAU,8BAA8B,eAAe,mCAAmC,cAAc,kCAAkC,qBAAqB,yCAAyC,YAAY,gCAAgC,MAAQ,4BAA4B,YAAY,iCCK9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EACEvC,OAAOC,OAAO,CAAC,EAAGlC,EAAO,CAAE7C,SAAUsC,EAAKtC,aAElD,IAEJ0H,wBAAsB,EACtBR,UAAWA,EACXC,iBAAkBA,EAClBC,SAAUA,IAGd,MAAgC,oBAAlB1C,EACVA,EAAc4C,GACdA,GAAa,EAEnBtH,SAAUyC,IAA6B,IAA5B,SAAEzC,KAAa6C,GAAOJ,EAC/B,MAA2B,oBAAbzC,EAA0BA,EAAS6C,GAAS7C,CAAQ,EAErE,EAOH,EAJmB6C,IACVvC,EAAAA,EAAAA,KAACkF,EAAK,IAAKP,EAAoBpC,KAK3B8E,EAAeA,KAC1B,MAAM/B,EAAQD,IACd,OAAQ9C,GAAU+C,EAAMX,EAAoBpC,GAAO,E,eCtDrD,MAgBa+E,EAAmB/E,IAC9B,MAAMgF,EAAYF,IAClB,OAAK9E,EAAMkD,KAUJzF,EAAAA,EAAAA,KAACwH,EAAAA,EAAW,IAAKjF,EAAOkF,UAAWF,KARtCvH,EAAAA,EAAAA,KAAC2D,EAAAA,OAAM,IACDpB,EACJT,QAASA,KACPyF,EAAUhF,EAAMmF,WAAW,GAKoB,EAEzD,EA9BqBnF,IACnB,MAAM+C,EAAQD,IACd,IAAK9C,EAAMkD,IAAK,CACd,MAAM,WAAEiC,KAAeC,GAAWpF,EAClC,OACEvC,EAAAA,EAAAA,KAAC2D,EAAAA,OAAM,IACDgE,EACJ7F,QAASA,KACPwD,EAAMoC,EAAW,GAIzB,CACA,OAAO1H,EAAAA,EAAAA,KAACwH,EAAAA,EAAW,IAAKjF,EAAOkF,UAAWnC,GAAS,C","sources":["common/components/SimpleBar.js","webpack://@kne-components/components-core/./src/components/Modal/style.module.scss?4fe4","components/Modal/locale/index.js","components/Modal/renderWithOptions.js","components/Modal/Modal.js","components/Modal/TabsModal.js","components/Modal/ModalButton.js"],"sourcesContent":["import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n","// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"style_modal__Pm3cF__lcEcn\",\"large\":\"style_large__iaqVE__lcEcn\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__lcEcn\",\"modal-title\":\"style_modal-title__dswaw__lcEcn\",\"modal-outer\":\"style_modal-outer__r3SkX__lcEcn\",\"modal-body\":\"style_modal-body__jQJSI__lcEcn\",\"right-options-modal\":\"style_right-options-modal__FajDP__lcEcn\",\"right-options-row\":\"style_right-options-row__-mPb9__lcEcn\",\"right-options-col\":\"style_right-options-col__3ilee__lcEcn\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__lcEcn\",\"content\":\"style_content__k6MIF__lcEcn\",\"modal-footer\":\"style_modal-footer__-prbN__lcEcn\",\"modal-close\":\"style_modal-close__Oa5Kl__lcEcn\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__lcEcn\",\"is-danger\":\"style_is-danger__H5110__lcEcn\",\"title\":\"style_title__orTym__lcEcn\",\"has-title\":\"style_has-title__qy0Wp__lcEcn\"};","const importMessages = (locale) => {\n return ({\n 'en-US': () => import('./en-US'), 'zh-CN': () => import('./zh-CN')\n })[locale]();\n};\n\nexport default importMessages;","const renderWithOptions = (footer, options) => {\n if (typeof footer === \"function\") {\n return footer(options);\n }\n return footer;\n};\n\nexport default renderWithOptions;\n","import React, { useRef } from \"react\";\nimport { App, Button, Col, Modal as AntdModal, Row, Space } from \"antd\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport importMessages from \"./locale\";\nimport { FormattedMessage, IntlProvider } from \"@components/Intl\";\nimport Icon from \"@components/Icon\";\nimport renderWithOptions from \"./renderWithOptions\";\nimport LoadingButton from \"@components/LoadingButton\";\nimport SimpleBar from \"@common/components/SimpleBar\";\n\nconst localeModuleName = \"Modal\";\n\nexport const RightOptions = ({ options, rightSpan = 6, children }) => {\n if (!options) {\n return children;\n }\n return (\n <Row wrap={false} className={style[\"right-options-row\"]}>\n <Col span={24 - rightSpan} className={style[\"right-options-col\"]}>\n {children}\n </Col>\n <Col span={rightSpan} className={style[\"right-options-col\"]}>\n {options}\n </Col>\n </Row>\n );\n};\n\nconst calcHeight = (height, footer) => {\n return `${height - 48 - (footer ? 58 : 0)}px`;\n};\n\nconst sizeMap = (type, footer) => {\n if (type === \"large\") {\n return {\n width: `${Math.min(window.innerWidth - 64, 1500)}px`,\n style: { \"--min-modal-height\": calcHeight(500, footer) },\n };\n }\n if (type === \"small\") {\n return {\n width: \"600px\",\n style: { \"--min-modal-height\": calcHeight(300, footer) },\n };\n }\n return {\n width: \"1000px\",\n style: { \"--min-modal-height\": calcHeight(500, footer) },\n };\n};\n\nconst Footer = ({\n footer,\n footerButtons,\n onConfirm,\n onCancel,\n onClose,\n targetProps,\n}) => {\n return (\n <Row gutter={10} wrap={false}>\n <Col flex={1}>{footer}</Col>\n {Array.isArray(footerButtons) && footerButtons.length === 0 ? null : (\n <Col>\n <Space>\n {(\n footerButtons || [\n {\n children: (\n <IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Cancel\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>\n ),\n onClick: onCancel,\n },\n {\n type: \"primary\",\n children: (\n <IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Confirm\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>\n ),\n onClick: onConfirm,\n },\n ]\n )\n .filter((item) => {\n if (typeof item?.display === \"function\") {\n return item?.display();\n }\n return item?.display !== false;\n })\n .map(\n (\n {\n ButtonComponent,\n onClick,\n autoClose = true,\n display,\n ...props\n },\n index\n ) => {\n const CurrentButton = ButtonComponent || LoadingButton;\n return (\n <CurrentButton\n {...props}\n key={index}\n onClick={async (...args) => {\n const res = await Promise.resolve(\n onClick && onClick(...args, targetProps)\n );\n autoClose && res !== false && onClose && onClose();\n return res;\n }}\n />\n );\n }\n )}\n </Space>\n </Col>\n )}\n </Row>\n );\n};\n\nconst ModalOuter = ({\n title,\n footer,\n disabledScroller,\n footerButtons,\n onClose,\n closable,\n onConfirm,\n onCancel,\n children,\n targetProps,\n}) => {\n const modalBodyRef = useRef(null);\n return (\n <div className={style[\"modal-outer\"]} data-testid=\"components-core-modal\">\n {closable === false ? null : (\n <Button\n data-testid=\"components-core-modal-close-btn\"\n className={style[\"modal-close\"]}\n type=\"text\"\n icon={<Icon type=\"icon-close-thin\" />}\n onClick={(e) => {\n e.stopPropagation();\n onClose && onClose();\n }}\n />\n )}\n {title && <div className={style[\"modal-title\"]}>{title}</div>}\n <SimpleBar\n className={classnames(\n style[\"modal-body\"],\n {\n [style[\"is-disabled-scroller\"]]: disabledScroller,\n },\n \"modal-body\"\n )}\n ref={modalBodyRef}\n >\n <div\n className={classnames(style[\"modal-body-inner\"], \"modal-body-inner\")}\n >\n {children}\n </div>\n </SimpleBar>\n {footer === null && !footerButtons ? null : (\n <div className={classnames(style[\"modal-footer\"], \"modal-footer\")}>\n <Footer\n footer={footer}\n footerButtons={footerButtons}\n onConfirm={onConfirm}\n onCancel={onCancel}\n onClose={onClose}\n targetProps={targetProps}\n />\n </div>\n )}\n </div>\n );\n};\n\nconst runWithDecorator = ({\n withDecorator,\n footerButtons,\n title,\n closable,\n onClose,\n onConfirm,\n onCancel,\n footer,\n rightOptions,\n rightSpan,\n disabledScroller,\n childrenRef,\n children,\n}) => {\n const getInner = (props) => {\n props = Object.assign({}, { title }, props);\n return (\n <ModalOuter\n title={renderWithOptions(props.title, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n closable={closable}\n onClose={onClose}\n onConfirm={onConfirm}\n onCancel={onCancel}\n footerButtons={renderWithOptions(footerButtons, {\n ...props,\n close: onClose,\n })}\n disabledScroller={disabledScroller}\n footer={renderWithOptions(footer, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n targetProps={Object.assign({}, props, { childrenRef, close: onClose })}\n >\n <RightOptions\n rightSpan={rightSpan}\n options={renderWithOptions(rightOptions, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n >\n {renderWithOptions(children, {\n ...props,\n childrenRef,\n close: onClose,\n })}\n </RightOptions>\n </ModalOuter>\n );\n };\n return typeof withDecorator === \"function\"\n ? withDecorator(getInner)\n : getInner({});\n};\n\nconst computedCommonProps = ({\n children,\n rightOptions,\n rightSpan,\n footer,\n footerButtons,\n className,\n size,\n title,\n onClose,\n onConfirm,\n onCancel,\n closable,\n disabledScroller,\n withDecorator,\n childrenRef,\n ...props\n}) => {\n return {\n ...props,\n icon: null,\n centered: true,\n title: null,\n maskClosable: props.hasOwnProperty(\"maskClosable\")\n ? props.maskClosable\n : false,\n destroyOnClose: true,\n footer: null,\n closable: false,\n onCancel: onClose,\n className: classnames(className, style[\"modal\"], style[size], {\n [style[\"right-options-modal\"]]: rightOptions,\n }),\n ...sizeMap(size, !(footer === null && !footerButtons)),\n children: (\n <IntlProvider importMessages={importMessages} moduleName=\"Modal\">\n {runWithDecorator({\n withDecorator,\n title,\n closable,\n onClose,\n onConfirm,\n onCancel,\n footer,\n footerButtons,\n rightOptions,\n rightSpan,\n disabledScroller,\n children,\n childrenRef,\n })}\n </IntlProvider>\n ),\n };\n};\n\nconst Modal = (props) => {\n const childrenRef = useRef(null);\n return (\n <AntdModal\n {...computedCommonProps(Object.assign({}, props, { childrenRef }))}\n />\n );\n};\n\nModal.defaultProps = {\n size: \"default\", //large small\n};\n\nexport const useModal = () => {\n const { modal } = App.useApp();\n const childrenRef = useRef(null);\n return (props) => {\n const api = {};\n const { children, ...otherProps } = computedCommonProps({\n onClose: () => api.close(),\n childrenRef,\n ...props,\n });\n const { destroy } = modal.info({\n ...otherProps,\n content: children,\n });\n api.close = destroy;\n\n return api;\n };\n};\n\nexport const useConfirmModal = () => {\n const { modal } = App.useApp();\n return (props) => {\n const api = {};\n const {\n type,\n icon,\n title,\n danger,\n wrapClassName,\n message,\n iconSetting = {},\n confirmType = \"info\",\n ...otherProps\n } = {\n onClose: () => api.close(),\n maskClosable: false,\n ...props,\n };\n const typeEnum = Object.assign(\n {},\n {\n info: \"icon-xinxi-tianchong\",\n confirm: \"icon-tishi-tianchong\",\n warning: \"icon-tishi-tianchong\",\n error: \"icon-shibai\",\n success: \"icon-chenggong\",\n },\n iconSetting\n );\n if (modal[type]) {\n const { destroy } = modal[type]({\n ...otherProps,\n icon: null,\n wrapClassName: classnames(style[\"confirm-modal-wrap\"], wrapClassName, {\n [style[\"is-danger\"]]: danger,\n }),\n title: (\n <Space\n direction=\"vertical\"\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {title && (\n <Space size={0} align=\"start\" className={style[\"title\"]}>\n {danger ? (\n <Icon\n className={classnames(\n \"title-icon\",\n `title-icon-${type === \"confirm\" ? confirmType : type}`\n )}\n type={\n icon || typeEnum[type === \"confirm\" ? confirmType : type]\n }\n />\n ) : null}\n {title}\n </Space>\n )}\n </Space>\n ),\n content: (\n <Space\n size={0}\n align=\"start\"\n className={classnames(style[\"content\"], {\n [style[\"has-title\"]]: title,\n })}\n >\n {!title && danger ? (\n <Icon\n className={classnames(\n \"title-icon\",\n `title-icon-${type === \"confirm\" ? confirmType : type}`\n )}\n type={icon || typeEnum[type === \"confirm\" ? confirmType : type]}\n />\n ) : null}\n {message}\n </Space>\n ),\n });\n api.close = destroy;\n }\n return api;\n };\n};\n\nexport default Modal;\n","import Modal, { useModal } from \"./Modal\";\nimport { Tabs } from \"antd\";\nimport classnames from \"classnames\";\n\nconst computedCommonProps = ({\n items,\n className,\n activeKey,\n withDecorator,\n defaultActiveKey,\n onChange,\n ...props\n}) => {\n return {\n ...props,\n className: classnames(className, \"tabs-modal\"),\n withDecorator: (render) => {\n const innerRender = (props) => (\n <Tabs\n items={items.map(({ withDecorator: itemWithDecorator, ...item }) => {\n return Object.assign({}, item, {\n children:\n typeof itemWithDecorator === \"function\"\n ? itemWithDecorator((innerProps) =>\n render(\n Object.assign({}, props, innerProps, {\n children: item.children,\n })\n )\n )\n : render(\n Object.assign({}, props, { children: item.children })\n ),\n });\n })}\n destroyInactiveTabPane\n activeKey={activeKey}\n defaultActiveKey={defaultActiveKey}\n onChange={onChange}\n />\n );\n return typeof withDecorator === \"function\"\n ? withDecorator(innerRender)\n : innerRender();\n },\n children: ({ children, ...props }) => {\n return typeof children === \"function\" ? children(props) : children;\n },\n };\n};\n\nconst TabsModal = (props) => {\n return <Modal {...computedCommonProps(props)} />;\n};\n\nexport default TabsModal;\n\nexport const useTabsModal = () => {\n const modal = useModal();\n return (props) => modal(computedCommonProps(props));\n};\n","import { useModal } from \"./Modal\";\nimport { useTabsModal } from \"./TabsModal\";\nimport FetchButton from \"@common/components/FetchButton\";\nimport { Button } from \"antd\";\n\nconst ModalButton = (props) => {\n const modal = useModal();\n if (!props.api) {\n const { modalProps, ...others } = props;\n return (\n <Button\n {...others}\n onClick={() => {\n modal(modalProps);\n }}\n />\n );\n }\n return <FetchButton {...props} modalFunc={modal} />;\n};\n\nexport const TabsModalButton = (props) => {\n const tabsModal = useTabsModal();\n if (!props.api) {\n return (\n <Button\n {...props}\n onClick={() => {\n tabsModal(props.modalProps);\n }}\n />\n );\n }\n return <FetchButton {...props} modalFunc={tabsModal} />;\n};\nexport default ModalButton;\n"],"names":["SimpleBar","locale","en-US","zh-CN","renderWithOptions","footer","options","localeModuleName","RightOptions","_ref","rightSpan","children","_jsxs","Row","wrap","className","style","_jsx","Col","span","calcHeight","height","sizeMap","type","width","Math","min","window","innerWidth","Footer","_ref2","footerButtons","onConfirm","onCancel","onClose","targetProps","gutter","flex","Array","isArray","length","Space","IntlProvider","importMessages","moduleName","FormattedMessage","id","onClick","filter","item","display","map","_ref3","index","ButtonComponent","autoClose","props","CurrentButton","LoadingButton","_createElement","key","async","_len","arguments","args","_key","res","Promise","resolve","ModalOuter","_ref4","title","disabledScroller","closable","modalBodyRef","useRef","Button","icon","Icon","e","stopPropagation","classnames","ref","runWithDecorator","_ref5","withDecorator","rightOptions","childrenRef","getInner","Object","assign","close","computedCommonProps","_ref6","size","centered","maskClosable","hasOwnProperty","destroyOnClose","Modal","AntdModal","defaultProps","useModal","modal","App","useApp","api","otherProps","destroy","info","content","useConfirmModal","danger","wrapClassName","message","iconSetting","confirmType","typeEnum","confirm","warning","error","success","direction","align","items","activeKey","defaultActiveKey","onChange","render","innerRender","Tabs","itemWithDecorator","innerProps","destroyInactiveTabPane","useTabsModal","TabsModalButton","tabsModal","FetchButton","modalFunc","modalProps","others"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 2716.6975d095.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:()=>g});var s=r(73884),l=r(83136),a=r.n(l);const o={"state-tag":"style_state-tag__Kx27z__lcEcn","state-result-tag":"style_state-result-tag__CssDz__lcEcn","state-skill-tag":"style_state-skill-tag__k0bQE__lcEcn","event-tag":"style_event-tag__cg6SE__lcEcn","state-tag-filter-result-wrapper":"style_state-tag-filter-result-wrapper__QYS5z__lcEcn","state-tag-filter-name":"style_state-tag-filter-name__iJaJd__lcEcn","state-tag-filterResult":"style_state-tag-filterResult__KTkot__lcEcn","show-bg":"style_show-bg__OcL+R__lcEcn","tag-text":"style_tag-text__JHCt+__lcEcn","state-tag-wrapper":"style_state-tag-wrapper__A-gTE__lcEcn"};var n=r(55199),_=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:l,showBackground:i,className:g,filterName:u,...p}=t;const d=(0,s.useMemo)((()=>{var t,e;return{color:(null===c||void 0===c||null===(t=c[l])||void 0===t?void 0:t.color)||c[l],borderColor:(null===c||void 0===c||null===(e=c[l])||void 0===e?void 0:e.borderColor)||c[l]}}),[l]);return(0,_.jsxs)(n.Space,{"data-testid":"components-core-state-tag",className:a()(o["state-tag-wrapper"],"filterResult"===l?o["state-tag-filter-result-wrapper"]:""),align:"center",size:4,children:[u?(0,_.jsxs)("span",{className:o["state-tag-filter-name"],children:[u,":"]}):null,(0,_.jsx)(n.Tag,{color:d.color,...p,style:{background:i?d.color+"0F":"none",color:d.color,border:e?`1px solid ${d.borderColor}`:"none"},className:a()(o["state-tag"],g,"result"===l?o["state-result-tag"]:"","skill"===l?o["state-skill-tag"]:"",o[`state-tag-${l}`],i?o["show-bg"]:"",e?o["show-border"]:"",null!==p&&void 0!==p&&p.onClick?o["event-tag"]:""),children:(0,_.jsx)("span",{className:o["tag-text"],children:r})})]})};i.defaultProps={color:"#666666",type:"default",showBorder:!1,showBackground:!0,text:"",className:""};const g=i},51153:(t,e,r)=>{var s=r(73884),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,n=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={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)o.call(e,s)&&!_.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:l,type:t,key:c,ref:i,props:a,_owner:n.current}}e.Fragment=a,e.jsx=c,e.jsxs=c},70579:(t,e,r)=>{t.exports=r(51153)}}]);
|
|
3
|
+
//# sourceMappingURL=2716.6975d095.chunk.js.map
|