@kne-components/components-core 0.2.48 → 0.2.49

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.
Files changed (153) hide show
  1. package/build/asset-manifest.json +108 -108
  2. package/build/index.html +1 -1
  3. package/build/remoteEntry.js +1 -1
  4. package/build/remoteEntry.js.map +1 -1
  5. package/build/static/css/1151.d531cb42.chunk.css +2 -0
  6. package/build/static/css/{1151.f40f6e6a.chunk.css.map → 1151.d531cb42.chunk.css.map} +1 -1
  7. package/build/static/css/1153.6bfd975b.chunk.css +2 -0
  8. package/build/static/css/1153.6bfd975b.chunk.css.map +1 -0
  9. package/build/static/css/1554.9b4ea595.chunk.css +2 -0
  10. package/build/static/css/{1554.e83d2267.chunk.css.map → 1554.9b4ea595.chunk.css.map} +1 -1
  11. package/build/static/css/2503.039df415.chunk.css +2 -0
  12. package/build/static/css/{2503.f2371958.chunk.css.map → 2503.039df415.chunk.css.map} +1 -1
  13. package/build/static/css/2517.8960d95a.chunk.css +2 -0
  14. package/build/static/css/{2517.2b4fc856.chunk.css.map → 2517.8960d95a.chunk.css.map} +1 -1
  15. package/build/static/css/2716.c63150a9.chunk.css +2 -0
  16. package/build/static/css/{2716.c000d45e.chunk.css.map → 2716.c63150a9.chunk.css.map} +1 -1
  17. package/build/static/css/2730.78e4f5a8.chunk.css +2 -0
  18. package/build/static/css/{2730.1f60a513.chunk.css.map → 2730.78e4f5a8.chunk.css.map} +1 -1
  19. package/build/static/css/3142.baacc098.chunk.css +2 -0
  20. package/build/static/css/{3142.e08f04e7.chunk.css.map → 3142.baacc098.chunk.css.map} +1 -1
  21. package/build/static/css/4029.a75a09cc.chunk.css +2 -0
  22. package/build/static/css/4029.a75a09cc.chunk.css.map +1 -0
  23. package/build/static/css/4265.9bf696cc.chunk.css +2 -0
  24. package/build/static/css/4265.9bf696cc.chunk.css.map +1 -0
  25. package/build/static/css/4666.4bd45148.chunk.css +2 -0
  26. package/build/static/css/{4666.05d09090.chunk.css.map → 4666.4bd45148.chunk.css.map} +1 -1
  27. package/build/static/css/5443.c9319052.chunk.css +2 -0
  28. package/build/static/css/5443.c9319052.chunk.css.map +1 -0
  29. package/build/static/css/5600.92cf0d42.chunk.css +2 -0
  30. package/build/static/css/{5600.b7714b1e.chunk.css.map → 5600.92cf0d42.chunk.css.map} +1 -1
  31. package/build/static/css/5962.c772f8d0.chunk.css +2 -0
  32. package/build/static/css/{5962.aea6e05a.chunk.css.map → 5962.c772f8d0.chunk.css.map} +1 -1
  33. package/build/static/css/{5996.9e578c74.chunk.css → 5996.6842d01b.chunk.css} +2 -2
  34. package/build/static/css/{5996.9e578c74.chunk.css.map → 5996.6842d01b.chunk.css.map} +1 -1
  35. package/build/static/css/6611.e8cb13a4.chunk.css +2 -0
  36. package/build/static/css/{6611.341eefe2.chunk.css.map → 6611.e8cb13a4.chunk.css.map} +1 -1
  37. package/build/static/css/6779.a1d9c772.chunk.css +2 -0
  38. package/build/static/css/{6779.d029fa93.chunk.css.map → 6779.a1d9c772.chunk.css.map} +1 -1
  39. package/build/static/css/6995.ccf433c2.chunk.css +2 -0
  40. package/build/static/css/{6995.5bb68455.chunk.css.map → 6995.ccf433c2.chunk.css.map} +1 -1
  41. package/build/static/css/7121.351b65d6.chunk.css +2 -0
  42. package/build/static/css/{7121.eb4fa5bb.chunk.css.map → 7121.351b65d6.chunk.css.map} +1 -1
  43. package/build/static/css/7227.869cd234.chunk.css +2 -0
  44. package/build/static/css/{7227.5f1a90dc.chunk.css.map → 7227.869cd234.chunk.css.map} +1 -1
  45. package/build/static/css/8017.6e51125e.chunk.css +2 -0
  46. package/build/static/css/8017.6e51125e.chunk.css.map +1 -0
  47. package/build/static/css/8332.1283d368.chunk.css +2 -0
  48. package/build/static/css/{8332.a3534d23.chunk.css.map → 8332.1283d368.chunk.css.map} +1 -1
  49. package/build/static/css/{8725.4a1a24b9.chunk.css → 8725.b83b84c9.chunk.css} +2 -2
  50. package/build/static/css/{8725.4a1a24b9.chunk.css.map → 8725.b83b84c9.chunk.css.map} +1 -1
  51. package/build/static/css/9968.bf7c8c4f.chunk.css +2 -0
  52. package/build/static/css/9968.bf7c8c4f.chunk.css.map +1 -0
  53. package/build/static/js/{1153.665a146b.chunk.js → 1153.b3e14a3c.chunk.js} +3 -3
  54. package/build/static/js/{1153.665a146b.chunk.js.map → 1153.b3e14a3c.chunk.js.map} +1 -1
  55. package/build/static/js/1554.41dff4cd.chunk.js +3 -0
  56. package/build/static/js/{1554.62727036.chunk.js.map → 1554.41dff4cd.chunk.js.map} +1 -1
  57. package/build/static/js/2503.b58a5071.chunk.js +2 -0
  58. package/build/static/js/{2503.cfdae4ae.chunk.js.map → 2503.b58a5071.chunk.js.map} +1 -1
  59. package/build/static/js/{2517.713b0d68.chunk.js → 2517.8985bc01.chunk.js} +2 -2
  60. package/build/static/js/{2517.713b0d68.chunk.js.map → 2517.8985bc01.chunk.js.map} +1 -1
  61. package/build/static/js/{2716.1a3cf021.chunk.js → 2716.ba8f83d6.chunk.js} +3 -3
  62. package/build/static/js/{2716.1a3cf021.chunk.js.map → 2716.ba8f83d6.chunk.js.map} +1 -1
  63. package/build/static/js/2730.ea7793a6.chunk.js +2 -0
  64. package/build/static/js/{2730.ee0befe4.chunk.js.map → 2730.ea7793a6.chunk.js.map} +1 -1
  65. package/build/static/js/2814.e9b34af7.chunk.js +2 -0
  66. package/build/static/js/{2814.ca4b7502.chunk.js.map → 2814.e9b34af7.chunk.js.map} +1 -1
  67. package/build/static/js/{3142.cddc627f.chunk.js → 3142.7ba43e5d.chunk.js} +2 -2
  68. package/build/static/js/{3142.cddc627f.chunk.js.map → 3142.7ba43e5d.chunk.js.map} +1 -1
  69. package/build/static/js/36.896e9537.chunk.js +2 -0
  70. package/build/static/js/36.896e9537.chunk.js.map +1 -0
  71. package/build/static/js/{4029.bbb47dbe.chunk.js → 4029.79d98096.chunk.js} +2 -2
  72. package/build/static/js/{4029.bbb47dbe.chunk.js.map → 4029.79d98096.chunk.js.map} +1 -1
  73. package/build/static/js/4265.bbc5239b.chunk.js +2 -0
  74. package/build/static/js/{4265.1adcfd10.chunk.js.map → 4265.bbc5239b.chunk.js.map} +1 -1
  75. package/build/static/js/{4666.40e9c7fa.chunk.js → 4666.182f4011.chunk.js} +3 -3
  76. package/build/static/js/{4666.40e9c7fa.chunk.js.map → 4666.182f4011.chunk.js.map} +1 -1
  77. package/build/static/js/5443.e97a3519.chunk.js +2 -0
  78. package/build/static/js/{5443.e2e5c228.chunk.js.map → 5443.e97a3519.chunk.js.map} +1 -1
  79. package/build/static/js/{5600.2ae5f60d.chunk.js → 5600.3fdca536.chunk.js} +2 -2
  80. package/build/static/js/{5600.2ae5f60d.chunk.js.map → 5600.3fdca536.chunk.js.map} +1 -1
  81. package/build/static/js/5962.92f1a359.chunk.js +2 -0
  82. package/build/static/js/{5962.96b625b0.chunk.js.map → 5962.92f1a359.chunk.js.map} +1 -1
  83. package/build/static/js/{5996.f18ec861.chunk.js → 5996.c59fde58.chunk.js} +2 -2
  84. package/build/static/js/{5996.f18ec861.chunk.js.map → 5996.c59fde58.chunk.js.map} +1 -1
  85. package/build/static/js/{6611.d296ef5b.chunk.js → 6611.abf93d05.chunk.js} +2 -2
  86. package/build/static/js/{6611.d296ef5b.chunk.js.map → 6611.abf93d05.chunk.js.map} +1 -1
  87. package/build/static/js/{6779.ec58c00c.chunk.js → 6779.84155da6.chunk.js} +2 -2
  88. package/build/static/js/{6779.ec58c00c.chunk.js.map → 6779.84155da6.chunk.js.map} +1 -1
  89. package/build/static/js/{6915.be6c9bb5.chunk.js → 6915.30c9ff90.chunk.js} +2 -2
  90. package/build/static/js/{6915.be6c9bb5.chunk.js.map → 6915.30c9ff90.chunk.js.map} +1 -1
  91. package/build/static/js/{6995.a26ca591.chunk.js → 6995.4e59b0d0.chunk.js} +2 -2
  92. package/build/static/js/{6995.a26ca591.chunk.js.map → 6995.4e59b0d0.chunk.js.map} +1 -1
  93. package/build/static/js/{7121.2505a6db.chunk.js → 7121.36ef61d5.chunk.js} +2 -2
  94. package/build/static/js/{7121.2505a6db.chunk.js.map → 7121.36ef61d5.chunk.js.map} +1 -1
  95. package/build/static/js/{7227.1491da92.chunk.js → 7227.da7eaa53.chunk.js} +3 -3
  96. package/build/static/js/{7227.1491da92.chunk.js.map → 7227.da7eaa53.chunk.js.map} +1 -1
  97. package/build/static/js/{7967.28a514e2.chunk.js → 7967.0069bd18.chunk.js} +2 -2
  98. package/build/static/js/{7967.28a514e2.chunk.js.map → 7967.0069bd18.chunk.js.map} +1 -1
  99. package/build/static/js/{8017.fc24364d.chunk.js → 8017.d07f9913.chunk.js} +2 -2
  100. package/build/static/js/{8017.fc24364d.chunk.js.map → 8017.d07f9913.chunk.js.map} +1 -1
  101. package/build/static/js/{8151.64a650e5.chunk.js → 8151.9a6aae96.chunk.js} +2 -2
  102. package/build/static/js/{8151.64a650e5.chunk.js.map → 8151.9a6aae96.chunk.js.map} +1 -1
  103. package/build/static/js/{8332.2c9776e4.chunk.js → 8332.00e4ab73.chunk.js} +2 -2
  104. package/build/static/js/{8332.2c9776e4.chunk.js.map → 8332.00e4ab73.chunk.js.map} +1 -1
  105. package/build/static/js/{8725.45184f26.chunk.js → 8725.204f19af.chunk.js} +2 -2
  106. package/build/static/js/{8725.45184f26.chunk.js.map → 8725.204f19af.chunk.js.map} +1 -1
  107. package/build/static/js/{9968.45a96856.chunk.js → 9968.625c4770.chunk.js} +2 -2
  108. package/build/static/js/{9968.45a96856.chunk.js.map → 9968.625c4770.chunk.js.map} +1 -1
  109. package/build/static/js/{main.7ccad8d0.js → main.b940efb7.js} +2 -2
  110. package/build/static/js/{main.7ccad8d0.js.map → main.b940efb7.js.map} +1 -1
  111. package/package.json +1 -1
  112. package/build/static/css/1151.f40f6e6a.chunk.css +0 -2
  113. package/build/static/css/1153.8b754dbb.chunk.css +0 -2
  114. package/build/static/css/1153.8b754dbb.chunk.css.map +0 -1
  115. package/build/static/css/1554.e83d2267.chunk.css +0 -2
  116. package/build/static/css/2503.f2371958.chunk.css +0 -2
  117. package/build/static/css/2517.2b4fc856.chunk.css +0 -2
  118. package/build/static/css/2716.c000d45e.chunk.css +0 -2
  119. package/build/static/css/2730.1f60a513.chunk.css +0 -2
  120. package/build/static/css/3142.e08f04e7.chunk.css +0 -2
  121. package/build/static/css/4029.5fdddb45.chunk.css +0 -2
  122. package/build/static/css/4029.5fdddb45.chunk.css.map +0 -1
  123. package/build/static/css/4265.b389c08f.chunk.css +0 -2
  124. package/build/static/css/4265.b389c08f.chunk.css.map +0 -1
  125. package/build/static/css/4666.05d09090.chunk.css +0 -2
  126. package/build/static/css/5443.ff76a7b9.chunk.css +0 -2
  127. package/build/static/css/5443.ff76a7b9.chunk.css.map +0 -1
  128. package/build/static/css/5600.b7714b1e.chunk.css +0 -2
  129. package/build/static/css/5962.aea6e05a.chunk.css +0 -2
  130. package/build/static/css/6611.341eefe2.chunk.css +0 -2
  131. package/build/static/css/6779.d029fa93.chunk.css +0 -2
  132. package/build/static/css/6995.5bb68455.chunk.css +0 -2
  133. package/build/static/css/7121.eb4fa5bb.chunk.css +0 -2
  134. package/build/static/css/7227.5f1a90dc.chunk.css +0 -2
  135. package/build/static/css/8017.9ee01a06.chunk.css +0 -2
  136. package/build/static/css/8017.9ee01a06.chunk.css.map +0 -1
  137. package/build/static/css/8332.a3534d23.chunk.css +0 -2
  138. package/build/static/css/9968.17c4111c.chunk.css +0 -2
  139. package/build/static/css/9968.17c4111c.chunk.css.map +0 -1
  140. package/build/static/js/1554.62727036.chunk.js +0 -3
  141. package/build/static/js/2503.cfdae4ae.chunk.js +0 -2
  142. package/build/static/js/2730.ee0befe4.chunk.js +0 -2
  143. package/build/static/js/2814.ca4b7502.chunk.js +0 -2
  144. package/build/static/js/36.f1bb8722.chunk.js +0 -2
  145. package/build/static/js/36.f1bb8722.chunk.js.map +0 -1
  146. package/build/static/js/4265.1adcfd10.chunk.js +0 -2
  147. package/build/static/js/5443.e2e5c228.chunk.js +0 -2
  148. package/build/static/js/5962.96b625b0.chunk.js +0 -2
  149. /package/build/static/js/{1153.665a146b.chunk.js.LICENSE.txt → 1153.b3e14a3c.chunk.js.LICENSE.txt} +0 -0
  150. /package/build/static/js/{1554.62727036.chunk.js.LICENSE.txt → 1554.41dff4cd.chunk.js.LICENSE.txt} +0 -0
  151. /package/build/static/js/{2716.1a3cf021.chunk.js.LICENSE.txt → 2716.ba8f83d6.chunk.js.LICENSE.txt} +0 -0
  152. /package/build/static/js/{4666.40e9c7fa.chunk.js.LICENSE.txt → 4666.182f4011.chunk.js.LICENSE.txt} +0 -0
  153. /package/build/static/js/{7227.1491da92.chunk.js.LICENSE.txt → 7227.da7eaa53.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/1153.665a146b.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,EAAU,OACf,IAAIY,EAAiB,OAARZ,QAAQ,IAARA,OAAQ,EAARA,EAAUa,WACvB,IAAKd,GAAwB,IAAhBA,EAAKe,OAChB,OAAOF,EAET,MAAMG,EAAahB,EAChBiB,KAAI,SAAUC,GACb,MAAO,KAA6BA,EAzB/BC,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-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__Mz-vv\"};","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":""}
1
+ {"version":3,"file":"static/js/1153.b3e14a3c.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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,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEd,EAAEoB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAE3C,aAAa,IAAI8C,KAAKF,EAAED,EAAE3C,kBAAe,IAAS+C,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACK,SAASzB,EAAE0B,KAAKT,EAAEL,IAAIU,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__+BqSZ\"};","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,3 @@
1
+ /*! For license information please see 1554.41dff4cd.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1554,4671],{64671:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});s(73884);var n=s(83136),o=s.n(n),l=s(70579);const r=e=>(/^[1-9]+[0-9]*]*$/.test(e.toString())&&(e+="px"),e),_=e=>{let{type:t,colorful:s,className:n,size:_,style:a,prefix:c,...i}=e;const p=((e,t,s)=>"icon-"===t||""===t?(s?"icon-color-":"icon-")+e.replace(/^icon-(color-)?/,""):t+e)(t,c,s),d=o()(n,{iconfont:!s,"iconfont--color":s},p),f=Object.assign({},a,_?{fontSize:r(_)}:{});return s?(0,l.jsx)("svg",{...i,"data-testid":"components-core-iconfont",className:d,style:f,children:(0,l.jsx)("use",{xlinkHref:`#${t}`,style:{pointerEvents:"none"}})}):(0,l.jsx)("i",{...i,"data-testid":"components-core-iconfont",className:d,style:f})};_.defaultProps={colorful:!1,prefix:""};const a=_},21554:(e,t,s)=>{s.r(t),s.d(t,{TooltipFetch:()=>C,TooltipInfoLabel:()=>B,default:()=>N});var n=s(55199),o=s(83136),l=s.n(o);const r="style_tooltip__zHGMI__+BqSZ",_="style_large__lvmsm__+BqSZ",a="style_small__nUt0r__+BqSZ",c="style_popup-content__-rKQN__+BqSZ",i="style_title__1EQPq__+BqSZ",p="style_important-info__qTSZY__+BqSZ",d="style_error__yTTq3__+BqSZ",f="style_warning__CMJxz__+BqSZ",y="style_success__AvJVx__+BqSZ",u="style_sub-title__uD8CH__+BqSZ",m="style_content__lzgUz__+BqSZ",x="style_alone__q6q82__+BqSZ",h="style_fetch-content__tEOEV__+BqSZ",S="style_fetch-loading__tN-WB__+BqSZ",v="style_title-info-icon__iY8Q+__+BqSZ";var j=s(70579);const q=e=>{let{overlayClassName:t,title:s,size:o,subtitle:h,content:S,importantInfo:v,importantInfoType:q,moreInfo:N,...g}=e;return(0,j.jsx)(n.Tooltip,{...g,overlayClassName:l()(t,r,{[a]:"small"===o,[_]:"large"===o}),title:(0,j.jsxs)(n.Space,{direction:"vertical",className:c,children:[s&&(0,j.jsx)("div",{className:i,children:s}),v&&(0,j.jsx)("div",{className:l()(p,{[y]:"success"===q,[f]:"warning"===q,[d]:"error"===q}),children:v}),h&&(0,j.jsx)("div",{className:u,children:h}),S&&(0,j.jsx)("div",{className:l()(m,{[x]:[s,h,v,N].every((e=>!e))}),children:S}),N&&(0,j.jsx)("div",{children:N})]})})};q.defaultProps={};const N=q;var g=s(64671);const B=e=>{let{title:t,tooltipTitle:s}=e;return(0,j.jsxs)("div",{children:[t,s?(0,j.jsx)(N,{...s,children:(0,j.jsx)("span",{children:(0,j.jsx)(g.default,{type:"icon-xinxi-miaobian",className:v,size:14})})}):null]})};var Z=s(73884),O=s(87558);const b=e=>{let{api:t,children:s,fetchContent:o,showLoading:r,loadingClassName:_,force:a,...c}=e;const[i,p]=(0,Z.useState)(!1),d=(0,O.useFetch)(Object.assign({},t,{auto:!1})),{isComplete:f,isLoading:y,data:u,send:m}=d;return(0,j.jsx)(N,{...Object.assign({},c,f?o(u,d):{}),open:i,onOpenChange:async e=>{!e||f&&!a||await m({type:"refresh"}),p(e)},children:(0,j.jsxs)("span",{className:h,children:[s,r&&y?(0,j.jsx)(n.Spin,{size:"small",className:l()(_,S)}):null]})})};b.defaultProps={showLoading:!0};const C=b},51153:(e,t,s)=>{var n=s(73884),o=Symbol.for("react.element"),l=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,_=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,s){var n,l={},c=null,i=null;for(n in void 0!==s&&(c=""+s),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(i=t.ref),t)r.call(t,n)&&!a.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:i,props:l,_owner:_.current}}t.Fragment=l,t.jsx=c,t.jsxs=c},70579:(e,t,s)=>{e.exports=s(51153)}}]);
3
+ //# sourceMappingURL=1554.41dff4cd.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/1554.62727036.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,EACC,MAAMO,EAnBcC,EAACC,EAAYJ,EAAQH,IAC1B,UAAXG,GAAiC,KAAXA,GAErBH,EAAW,cAAgB,SAC5BO,EAAWC,QAAQ,kBAAmB,IAGnCL,EAASI,EAYED,CAAcP,EAAMI,EAAQH,GAC5CS,EAAoBC,IAClBT,EACA,CACEU,UAAWX,EACX,kBAAmBA,GAErBK,GAEFO,EAAgBC,OAAOC,OACrB,CAAC,EACDZ,EACAR,EAAO,CAAEqB,SAAUtB,EAAcC,IAAU,CAAC,GAEhD,OAAOM,GACLgB,EAAAA,EAAAA,KAAA,UACMZ,EACJ,cAAY,2BACZH,UAAWQ,EACXP,MAAOU,EAAcK,UAErBD,EAAAA,EAAAA,KAAA,OAAKE,UAAW,IAAInB,IAAQG,MAAO,CAAEiB,cAAe,aAGtDH,EAAAA,EAAAA,KAAA,QACMZ,EACJ,cAAY,2BACZH,UAAWQ,EACXP,MAAOU,GA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EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEb,EAAEmB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAEvD,aAAa,IAAI0D,KAAKF,EAAED,EAAEvD,kBAAe,IAAS2D,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACK,SAASxB,EAAE5D,KAAK4E,EAAEL,IAAIU,EAAET,IAAIU,EAAEpD,MAAMkD,EAAEK,OAAOlB,EAAEmB,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__Mz-vv\",\"large\":\"style_large__lvmsm__Mz-vv\",\"small\":\"style_small__nUt0r__Mz-vv\",\"popup-content\":\"style_popup-content__-rKQN__Mz-vv\",\"title\":\"style_title__1EQPq__Mz-vv\",\"important-info\":\"style_important-info__qTSZY__Mz-vv\",\"error\":\"style_error__yTTq3__Mz-vv\",\"warning\":\"style_warning__CMJxz__Mz-vv\",\"success\":\"style_success__AvJVx__Mz-vv\",\"sub-title\":\"style_sub-title__uD8CH__Mz-vv\",\"content\":\"style_content__lzgUz__Mz-vv\",\"alone\":\"style_alone__q6q82__Mz-vv\",\"fetch-content\":\"style_fetch-content__tEOEV__Mz-vv\",\"fetch-loading\":\"style_fetch-loading__tN-WB__Mz-vv\",\"title-info-icon\":\"style_title-info-icon__iY8Q+__Mz-vv\"};","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.41dff4cd.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,EACC,MAAMO,EAnBcC,EAACC,EAAYJ,EAAQH,IAC1B,UAAXG,GAAiC,KAAXA,GAErBH,EAAW,cAAgB,SAC5BO,EAAWC,QAAQ,kBAAmB,IAGnCL,EAASI,EAYED,CAAcP,EAAMI,EAAQH,GAC5CS,EAAoBC,IAClBT,EACA,CACEU,UAAWX,EACX,kBAAmBA,GAErBK,GAEFO,EAAgBC,OAAOC,OACrB,CAAC,EACDZ,EACAR,EAAO,CAAEqB,SAAUtB,EAAcC,IAAU,CAAC,GAEhD,OAAOM,GACLgB,EAAAA,EAAAA,KAAA,UACMZ,EACJ,cAAY,2BACZH,UAAWQ,EACXP,MAAOU,EAAcK,UAErBD,EAAAA,EAAAA,KAAA,OAAKE,UAAW,IAAInB,IAAQG,MAAO,CAAEiB,cAAe,aAGtDH,EAAAA,EAAAA,KAAA,QACMZ,EACJ,cAAY,2BACZH,UAAWQ,EACXP,MAAOU,GAEV,EAGHf,EAASuB,aAAe,CACtBpB,UAAU,EACVG,OAAQ,IAYV,sIC5EA,QAA0B,8BAA1B,EAAg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CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEb,EAAEmB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAEvD,aAAa,IAAI0D,KAAKF,EAAED,EAAEvD,kBAAe,IAAS2D,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACK,SAASxB,EAAE5D,KAAK4E,EAAEL,IAAIU,EAAET,IAAIU,EAAEpD,MAAMkD,EAAEK,OAAOlB,EAAEmB,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__+BqSZ\",\"large\":\"style_large__lvmsm__+BqSZ\",\"small\":\"style_small__nUt0r__+BqSZ\",\"popup-content\":\"style_popup-content__-rKQN__+BqSZ\",\"title\":\"style_title__1EQPq__+BqSZ\",\"important-info\":\"style_important-info__qTSZY__+BqSZ\",\"error\":\"style_error__yTTq3__+BqSZ\",\"warning\":\"style_warning__CMJxz__+BqSZ\",\"success\":\"style_success__AvJVx__+BqSZ\",\"sub-title\":\"style_sub-title__uD8CH__+BqSZ\",\"content\":\"style_content__lzgUz__+BqSZ\",\"alone\":\"style_alone__q6q82__+BqSZ\",\"fetch-content\":\"style_fetch-content__tEOEV__+BqSZ\",\"fetch-loading\":\"style_fetch-loading__tN-WB__+BqSZ\",\"title-info-icon\":\"style_title-info-icon__iY8Q+__+BqSZ\"};","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
+ (self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2503,2723,9034],{17342:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var l=i(8762),n=i.n(l);i(46733);const s=n()},82723:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l.Content});var l=i(20363)},89384:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>B});var l=i(55199),n=i(53984),s=i.n(n),a=i(83136),o=i.n(a),r=i(17342),c=i(63908),d=i(64671),_=i(82723);const u={notification:"style_notification__Vv-MM__+BqSZ",list:"style_list__l8KOo__+BqSZ",header:"style_header__3dcv8__+BqSZ",item:"style_item__d92RS__+BqSZ","item-box":"style_item-box__dd-Lk__+BqSZ","index-1":"style_index-1__f97L0__+BqSZ","index-2":"style_index-2__04vAw__+BqSZ","item-box-main":"style_item-box-main__lnSak__+BqSZ","item-title":"style_item-title__mArMd__+BqSZ","level-high":"style_level-high__Uys7Y__+BqSZ","level-middle":"style_level-middle__EewyC__+BqSZ","level-low":"style_level-low__8kVyL__+BqSZ","title-icon":"style_title-icon__1EoAG__+BqSZ","item-subtitle":"style_item-subtitle__xeFJs__+BqSZ","close-btn":"style_close-btn__7qpG3__+BqSZ","is-loading":"style_is-loading__upVL+__+BqSZ","item-content":"style_item-content__8MlsG__+BqSZ","link-outer":"style_link-outer__kegyZ__+BqSZ",link:"style_link__F2CO-__+BqSZ","is-last-item":"style_is-last-item__MytRl__+BqSZ"};var v=i(73884),h=i(39835),m=i.n(h),x=i(85855),p=i.n(x),f=i(96604),g=i.n(f),y=i(81014),j=i(32520),b=i.n(j),S=i(70579);const k=["high","middle","low"],q=e=>{let{level:t,title:i,groupLength:n,subtitle:s,content:a,link:r,id:v,children:h,className:m}=e;const{setGlobal:x}=(0,c.useGlobalContext)("notification"),{apis:p,ajax:f}=(0,c.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),i=b()(t,(e=>v===e.id));return i>-1&&t.splice(i,1),Object.assign({},e,{list:t})}))}));return(0,S.jsxs)("div",{className:o()(u.item,m),style:{"--group-length":Math.min(n,3)||1},children:[n&&n>1&&g()(1,Math.min(n,3)).reverse().map((e=>(0,S.jsx)("div",{className:o()(u["item-box"],u[`index-${e}`])},e))),(0,S.jsxs)("div",{className:o()(u["item-box"],u["item-box-main"]),children:[(0,S.jsxs)("div",{className:o()(u["item-title"],u[`level-${t}`]),children:[(0,S.jsx)(d.default,{className:u["title-icon"],type:"high"===t?"icon-tishi":"icon-daiwochuli"}),(0,S.jsx)(l.Typography.Text,{ellipsis:!0,children:i})]}),(0,S.jsxs)("div",{className:u["item-content"],children:[(0,S.jsxs)("div",{className:u["item-subtitle"],children:[(0,S.jsx)(l.Typography.Text,{ellipsis:!0,children:s||""}),(0,S.jsx)(d.default,{className:o()(u["close-btn"],{[u["is-loading"]]:j}),type:"icon-close-thin",onClick:()=>{j||v&&k()}})]}),Array.isArray(a)?(0,S.jsx)(_.default,{list:a,labelAlign:"auto",size:"small"}):h]}),r&&(0,S.jsx)("div",{className:u["link-outer"],children:(0,S.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(r)},children:"\u67e5\u770b\u8be6\u60c5"})})]})]})};q.defaultProps={level:"low"};const B=e=>{let{itemClassName:t}=e;const{global:i,setGlobal:n}=(0,c.useGlobalContext)("notification"),a=(0,v.useRef)(),{apis:d,ajax:_}=(0,c.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:[]},i),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,S.jsxs)("div",{className:o()({},u.notification,"notification"),style:{"--head-option-height":`${h}px`},children:[(0,S.jsx)("div",{ref:a,children:(0,S.jsxs)(l.Row,{justify:"end",wrap:!1,className:u.header,gutter:8,children:[j.some((e=>e.length>1))&&(0,S.jsx)(l.Col,{children:(0,S.jsx)(l.Button,{size:"small",onClick:()=>{n(Object.assign({},i,{expand:!g}))},children:g?"\u5168\u90e8\u6298\u53e0":"\u5168\u90e8\u5c55\u5f00"})}),(0,S.jsx)(l.Col,{children:(0,S.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&&n(Object.assign({},i,{list:[]}))},children:"\u5168\u90e8\u6e05\u9664"})})]})}),(0,S.jsx)(r.A,{className:u.list,children:(0,S.jsx)(s(),{leaveReverse:!0,duration:200,interval:20,children:j.filter((e=>e&&e.length>0)).map(((e,i)=>{var l;if(g)return e.map(((t,l)=>{var n;return t&&(0,S.jsx)("div",{children:(0,S.jsx)(q,{...Object.assign({},t),className:o()({[u["is-last-item"]]:+i+1===Math.min(null===(n=j.filter((e=>e&&e.length)))||void 0===n?void 0:n.length,3)&&l===(null===e||void 0===e?void 0:e.length)-1})})},`group-${i}-${l}`)}));const n=p()(e);return(0,S.jsx)("div",{children:(0,S.jsx)(q,{...Object.assign({},n),groupLength:e.length,className:o()({[u["is-last-item"]]:(null===j||void 0===j?void 0:j.length)&&+i+1===Math.min(null===(l=j.filter((e=>e&&e.length)))||void 0===l?void 0:l.length,3)},t)})},`group-${i}-0`)}))})})]})}},94710:e=>{e.exports=function(e,t,i,l){for(var n=-1,s=null==e?0:e.length;++n<s;){var a=e[n];t(l,a,i(a),e)}return l}},32952:(e,t,i)=>{var l=i(45652);e.exports=function(e,t,i,n){return l(e,(function(e,l,s){t(n,e,i(e),s)})),n}},45652:(e,t,i)=>{var l=i(94664),n=i(76516)(l);e.exports=n},75816:e=>{e.exports=function(e,t,i,l){for(var n=e.length,s=i+(l?1:-1);l?s--:++s<n;)if(t(e[s],s,e))return s;return-1}},19449:(e,t,i)=>{var l=i(94710),n=i(32952),s=i(9096),a=i(54052);e.exports=function(e,t){return function(i,o){var r=a(i)?l:n,c=t?t():{};return r(i,e,s(o,2),c)}}},76516:(e,t,i)=>{var l=i(6571);e.exports=function(e,t){return function(i,n){if(null==i)return i;if(!l(i))return e(i,n);for(var s=i.length,a=t?s:-1,o=Object(i);(t?a--:++a<s)&&!1!==n(o[a],a,o););return i}}},32520:(e,t,i)=>{var l=i(75816),n=i(9096),s=i(99140),a=Math.max;e.exports=function(e,t,i){var o=null==e?0:e.length;if(!o)return-1;var r=null==i?0:s(i);return r<0&&(r=a(o+r,0)),l(e,n(t,3),r)}},85855:(e,t,i)=>{e.exports=i(96483)},39835:(e,t,i)=>{var l=i(71775),n=i(19449),s=Object.prototype.hasOwnProperty,a=n((function(e,t,i){s.call(e,i)?e[i].push(t):l(e,i,[t])}));e.exports=a},96483:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},99140:(e,t,i)=>{var l=i(37303);e.exports=function(e){var t=l(e),i=t%1;return t===t?i?t-i:t:0}},46733:()=>{}}]);
2
+ //# sourceMappingURL=2503.b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B,EAAQ,OAGpBkB,EAAYvF,KAAKwF,IAiDrB3B,EAAOC,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__Mz-vv\",\"list\":\"style_list__l8KOo__Mz-vv\",\"header\":\"style_header__3dcv8__Mz-vv\",\"item\":\"style_item__d92RS__Mz-vv\",\"item-box\":\"style_item-box__dd-Lk__Mz-vv\",\"index-1\":\"style_index-1__f97L0__Mz-vv\",\"index-2\":\"style_index-2__04vAw__Mz-vv\",\"item-box-main\":\"style_item-box-main__lnSak__Mz-vv\",\"item-title\":\"style_item-title__mArMd__Mz-vv\",\"level-high\":\"style_level-high__Uys7Y__Mz-vv\",\"level-middle\":\"style_level-middle__EewyC__Mz-vv\",\"level-low\":\"style_level-low__8kVyL__Mz-vv\",\"title-icon\":\"style_title-icon__1EoAG__Mz-vv\",\"item-subtitle\":\"style_item-subtitle__xeFJs__Mz-vv\",\"close-btn\":\"style_close-btn__7qpG3__Mz-vv\",\"is-loading\":\"style_is-loading__upVL+__Mz-vv\",\"item-content\":\"style_item-content__8MlsG__Mz-vv\",\"link-outer\":\"style_link-outer__kegyZ__Mz-vv\",\"link\":\"style_link__F2CO-__Mz-vv\",\"is-last-item\":\"style_is-last-item__MytRl__Mz-vv\"};","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.b58a5071.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,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EjBsB,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__+BqSZ\",\"list\":\"style_list__l8KOo__+BqSZ\",\"header\":\"style_header__3dcv8__+BqSZ\",\"item\":\"style_item__d92RS__+BqSZ\",\"item-box\":\"style_item-box__dd-Lk__+BqSZ\",\"index-1\":\"style_index-1__f97L0__+BqSZ\",\"index-2\":\"style_index-2__04vAw__+BqSZ\",\"item-box-main\":\"style_item-box-main__lnSak__+BqSZ\",\"item-title\":\"style_item-title__mArMd__+BqSZ\",\"level-high\":\"style_level-high__Uys7Y__+BqSZ\",\"level-middle\":\"style_level-middle__EewyC__+BqSZ\",\"level-low\":\"style_level-low__8kVyL__+BqSZ\",\"title-icon\":\"style_title-icon__1EoAG__+BqSZ\",\"item-subtitle\":\"style_item-subtitle__xeFJs__+BqSZ\",\"close-btn\":\"style_close-btn__7qpG3__+BqSZ\",\"is-loading\":\"style_is-loading__upVL+__+BqSZ\",\"item-content\":\"style_item-content__8MlsG__+BqSZ\",\"link-outer\":\"style_link-outer__kegyZ__+BqSZ\",\"link\":\"style_link__F2CO-__+BqSZ\",\"is-last-item\":\"style_is-last-item__MytRl__+BqSZ\"};","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,2 +1,2 @@
1
- "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2517,9034],{17342:(e,o,t)=>{t.d(o,{A:()=>s});var l=t(8762),n=t.n(l);t(46733);const s=n()},3382:(e,o,t)=>{t.r(o),t.d(o,{ModalButton:()=>A,TabsModal:()=>z,TabsModalButton:()=>R,default:()=>N,useConfirmModal:()=>w,useModal:()=>M,useTabsModal:()=>P});var l=t(73884),n=t(55199),s=t(83136),i=t.n(s);const r={modal:"style_modal__Pm3cF__Mz-vv",large:"style_large__iaqVE__Mz-vv","modal-body-inner":"style_modal-body-inner__4PhpA__Mz-vv","modal-title":"style_modal-title__dswaw__Mz-vv","modal-outer":"style_modal-outer__r3SkX__Mz-vv","modal-body":"style_modal-body__jQJSI__Mz-vv","right-options-modal":"style_right-options-modal__FajDP__Mz-vv","right-options-row":"style_right-options-row__-mPb9__Mz-vv","right-options-col":"style_right-options-col__3ilee__Mz-vv","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__Mz-vv",content:"style_content__k6MIF__Mz-vv","modal-footer":"style_modal-footer__-prbN__Mz-vv","modal-close":"style_modal-close__Oa5Kl__Mz-vv","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__Mz-vv","is-danger":"style_is-danger__H5110__Mz-vv",title:"style_title__orTym__Mz-vv","has-title":"style_has-title__qy0Wp__Mz-vv"},a=e=>({"en-US":()=>t.e(4628).then(t.bind(t,74628)),"zh-CN":()=>t.e(7478).then(t.bind(t,87478))}[e]());var c=t(58609),d=t(64671);const m=(e,o)=>"function"===typeof e?e(o):e;var h=t(81014),p=t(17342),_=t(70579);const u="Modal",f=e=>{let{options:o,rightSpan:t=6,children:l}=e;return o?(0,_.jsxs)(n.Row,{wrap:!1,className:r["right-options-row"],children:[(0,_.jsx)(n.Col,{span:24-t,className:r["right-options-col"],children:l}),(0,_.jsx)(n.Col,{span:t,className:r["right-options-col"],children:o})]}):l},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)}},v=e=>{let{footer:o,footerButtons:t,onConfirm:s,onCancel:i,onClose:r,targetProps:d}=e;return(0,_.jsxs)(n.Row,{gutter:10,wrap:!1,children:[(0,_.jsx)(n.Col,{flex:1,children:o}),Array.isArray(t)&&0===t.length?null:(0,_.jsx)(n.Col,{children:(0,_.jsx)(n.Space,{children:(t||[{children:(0,_.jsx)(c.IntlProvider,{importMessages:a,moduleName:u,children:(0,_.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:u})}),onClick:i},{type:"primary",children:(0,_.jsx)(c.IntlProvider,{importMessages:a,moduleName:u,children:(0,_.jsx)(c.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:t,onClick:n,autoClose:s=!0,display:i,...a}=e;const c=t||h.default;return(0,l.createElement)(c,{...a,key:o,onClick:async function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];const l=await Promise.resolve(n&&n(...o,d));return s&&!1!==l&&r&&r(),l}})}))})})]})},C=e=>{let{title:o,footer:t,disabledScroller:s,footerButtons:a,onClose:c,closable:m,onConfirm:h,onCancel:u,children:f,targetProps:y}=e;const g=(0,l.useRef)(null);return(0,_.jsxs)("div",{className:r["modal-outer"],"data-testid":"components-core-modal",children:[!1===m?null:(0,_.jsx)(n.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(),c&&c()}}),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!==t||a?(0,_.jsx)("div",{className:i()(r["modal-footer"],"modal-footer"),children:(0,_.jsx)(v,{footer:t,footerButtons:a,onConfirm:h,onCancel:u,onClose:c,targetProps:y})}):null]})},b=e=>{let{withDecorator:o,footerButtons:t,title:l,closable:n,onClose:s,onConfirm:i,onCancel:r,footer:a,rightOptions:c,rightSpan:d,disabledScroller:h,childrenRef:p,children:u}=e;const y=e=>(e=Object.assign({},{title:l},e),(0,_.jsx)(C,{title:m(e.title,{...e,childrenRef:p,close:s}),closable:n,onClose:s,onConfirm:i,onCancel:r,footerButtons:m(t,{...e,close:s}),disabledScroller:h,footer:m(a,{...e,childrenRef:p,close:s}),targetProps:Object.assign({},e,{childrenRef:p,close:s}),children:(0,_.jsx)(f,{rightSpan:d,options:m(c,{...e,childrenRef:p,close:s}),children:m(u,{...e,childrenRef:p,close:s})})}));return"function"===typeof o?o(y,{childrenRef:p,close:s}):y({})},j=e=>{let{children:o,rightOptions:t,rightSpan:l,footer:n,footerButtons:s,className:d,size:m,title:h,onClose:p,onConfirm:u,onCancel:f,closable:y,disabledScroller:v,withDecorator:C,childrenRef:j,...x}=e;return{...x,icon:null,centered:!0,title:null,maskClosable:!!x.hasOwnProperty("maskClosable")&&x.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:i()(d,r.modal,r[m],{[r["right-options-modal"]]:t}),...g(m,!(null===n&&!s)),children:(0,_.jsx)(c.IntlProvider,{importMessages:a,moduleName:"Modal",children:b({withDecorator:C,title:h,closable:y,onClose:p,onConfirm:u,onCancel:f,footer:n,footerButtons:s,rightOptions:t,rightSpan:l,disabledScroller:v,children:o,childrenRef:j})})}},x=e=>{const o=(0,l.useRef)(null);return(0,_.jsx)(n.Modal,{...j(Object.assign({},e,{childrenRef:o}))})};x.defaultProps={size:"default"};const M=()=>{const{modal:e}=n.App.useApp(),o=(0,l.useRef)(null);return t=>{const l={},{children:n,...s}=j({onClose:()=>l.close(),childrenRef:o,...t}),{destroy:i}=e.info({...s,content:n});return l.close=i,l}},w=()=>{const{modal:e}=n.App.useApp();return o=>{const t={},{type:l,icon:s,title:a,danger:c,wrapClassName:m,message:h,iconSetting:p={},confirmType:u="info",...f}={onClose:()=>t.close(),maskClosable:!1,...o},y=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},p);if(e[l]){const{destroy:o}=e[l]({...f,icon:null,wrapClassName:i()(r["confirm-modal-wrap"],m,{[r["is-danger"]]:c}),title:(0,_.jsx)(n.Space,{direction:"vertical",onClick:e=>{e.stopPropagation()},children:a&&(0,_.jsxs)(n.Space,{size:0,align:"start",className:r.title,children:[c?(0,_.jsx)(d.default,{className:i()("title-icon",`title-icon-${"confirm"===l?u:l}`),type:s||y["confirm"===l?u:l]}):null,a]})}),content:(0,_.jsxs)(n.Space,{size:0,align:"start",className:i()(r.content,{[r["has-title"]]:a}),children:[!a&&c?(0,_.jsx)(d.default,{className:i()("title-icon",`title-icon-${"confirm"===l?u:l}`),type:s||y["confirm"===l?u:l]}):null,h]})});t.close=o}return t}},N=x,k=e=>{let{items:o,className:t,activeKey:l,withDecorator:s,defaultActiveKey:r,onChange:a,...c}=e;return{...c,className:i()(t,"tabs-modal"),withDecorator:e=>{const t=t=>(0,_.jsx)(n.Tabs,{items:o.map((o=>{let{withDecorator:l,...n}=o;return Object.assign({},n,{children:"function"===typeof l?l((o=>e(Object.assign({},t,o,{children:n.children})))):e(Object.assign({},t,{children:n.children}))})})),destroyInactiveTabPane:!0,activeKey:l,defaultActiveKey:r,onChange:a});return"function"===typeof s?s(t):t()},children:e=>{let{children:o,...t}=e;return"function"===typeof o?o(t):o}}},z=e=>(0,_.jsx)(N,{...k(e)}),P=()=>{const e=M();return o=>e(k(o))};var S=t(73025);const R=e=>{const o=P();return e.api?(0,_.jsx)(S.A,{...e,modalFunc:o}):(0,_.jsx)(n.Button,{...e,onClick:()=>{o(e.modalProps)}})},A=e=>{const o=M();if(!e.api){const{modalProps:t,...l}=e;return(0,_.jsx)(n.Button,{...l,onClick:()=>{o(t)}})}return(0,_.jsx)(S.A,{...e,modalFunc:o})}},46733:()=>{}}]);
2
- //# sourceMappingURL=2517.713b0d68.chunk.js.map
1
+ "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2517,9034],{17342:(e,o,t)=>{t.d(o,{A:()=>s});var l=t(8762),n=t.n(l);t(46733);const s=n()},3382:(e,o,t)=>{t.r(o),t.d(o,{ModalButton:()=>M,TabsModal:()=>k,TabsModalButton:()=>Z,default:()=>v,useConfirmModal:()=>B,useModal:()=>w,useTabsModal:()=>P});var l=t(73884),n=t(55199),s=t(83136),i=t.n(s);const r={modal:"style_modal__Pm3cF__+BqSZ",large:"style_large__iaqVE__+BqSZ","modal-body-inner":"style_modal-body-inner__4PhpA__+BqSZ","modal-title":"style_modal-title__dswaw__+BqSZ","modal-outer":"style_modal-outer__r3SkX__+BqSZ","modal-body":"style_modal-body__jQJSI__+BqSZ","right-options-modal":"style_right-options-modal__FajDP__+BqSZ","right-options-row":"style_right-options-row__-mPb9__+BqSZ","right-options-col":"style_right-options-col__3ilee__+BqSZ","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__+BqSZ",content:"style_content__k6MIF__+BqSZ","modal-footer":"style_modal-footer__-prbN__+BqSZ","modal-close":"style_modal-close__Oa5Kl__+BqSZ","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__+BqSZ","is-danger":"style_is-danger__H5110__+BqSZ",title:"style_title__orTym__+BqSZ","has-title":"style_has-title__qy0Wp__+BqSZ"},a=e=>({"en-US":()=>t.e(4628).then(t.bind(t,74628)),"zh-CN":()=>t.e(7478).then(t.bind(t,87478))}[e]());var c=t(58609),d=t(64671);const m=(e,o)=>"function"===typeof e?e(o):e;var h=t(81014),p=t(17342),_=t(70579);const u="Modal",f=e=>{let{options:o,rightSpan:t=6,children:l}=e;return o?(0,_.jsxs)(n.Row,{wrap:!1,className:r["right-options-row"],children:[(0,_.jsx)(n.Col,{span:24-t,className:r["right-options-col"],children:l}),(0,_.jsx)(n.Col,{span:t,className:r["right-options-col"],children:o})]}):l},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:t,onConfirm:s,onCancel:i,onClose:r,targetProps:d}=e;return(0,_.jsxs)(n.Row,{gutter:10,wrap:!1,children:[(0,_.jsx)(n.Col,{flex:1,children:o}),Array.isArray(t)&&0===t.length?null:(0,_.jsx)(n.Col,{children:(0,_.jsx)(n.Space,{children:(t||[{children:(0,_.jsx)(c.IntlProvider,{importMessages:a,moduleName:u,children:(0,_.jsx)(c.FormattedMessage,{id:"Cancel",moduleName:u})}),onClick:i},{type:"primary",children:(0,_.jsx)(c.IntlProvider,{importMessages:a,moduleName:u,children:(0,_.jsx)(c.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:t,onClick:n,autoClose:s=!0,display:i,...a}=e;const c=t||h.default;return(0,l.createElement)(c,{...a,key:o,onClick:async function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];const l=await Promise.resolve(n&&n(...o,d));return s&&!1!==l&&r&&r(),l}})}))})})]})},b=e=>{let{title:o,footer:t,disabledScroller:s,footerButtons:a,onClose:c,closable:m,onConfirm:h,onCancel:u,children:f,targetProps:y}=e;const g=(0,l.useRef)(null);return(0,_.jsxs)("div",{className:r["modal-outer"],"data-testid":"components-core-modal",children:[!1===m?null:(0,_.jsx)(n.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(),c&&c()}}),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!==t||a?(0,_.jsx)("div",{className:i()(r["modal-footer"],"modal-footer"),children:(0,_.jsx)(C,{footer:t,footerButtons:a,onConfirm:h,onCancel:u,onClose:c,targetProps:y})}):null]})},j=e=>{let{withDecorator:o,footerButtons:t,title:l,closable:n,onClose:s,onConfirm:i,onCancel:r,footer:a,rightOptions:c,rightSpan:d,disabledScroller:h,childrenRef:p,children:u}=e;const y=e=>(e=Object.assign({},{title:l},e),(0,_.jsx)(b,{title:m(e.title,{...e,childrenRef:p,close:s}),closable:n,onClose:s,onConfirm:i,onCancel:r,footerButtons:m(t,{...e,close:s}),disabledScroller:h,footer:m(a,{...e,childrenRef:p,close:s}),targetProps:Object.assign({},e,{childrenRef:p,close:s}),children:(0,_.jsx)(f,{rightSpan:d,options:m(c,{...e,childrenRef:p,close:s}),children:m(u,{...e,childrenRef:p,close:s})})}));return"function"===typeof o?o(y,{childrenRef:p,close:s}):y({})},x=e=>{let{children:o,rightOptions:t,rightSpan:l,footer:n,footerButtons:s,className:d,size:m,title:h,onClose:p,onConfirm:u,onCancel:f,closable:y,disabledScroller:C,withDecorator:b,childrenRef:x,...S}=e;return{...S,icon:null,centered:!0,title:null,maskClosable:!!S.hasOwnProperty("maskClosable")&&S.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:i()(d,r.modal,r[m],{[r["right-options-modal"]]:t}),...g(m,!(null===n&&!s)),children:(0,_.jsx)(c.IntlProvider,{importMessages:a,moduleName:"Modal",children:j({withDecorator:b,title:h,closable:y,onClose:p,onConfirm:u,onCancel:f,footer:n,footerButtons:s,rightOptions:t,rightSpan:l,disabledScroller:C,children:o,childrenRef:x})})}},S=e=>{const o=(0,l.useRef)(null);return(0,_.jsx)(n.Modal,{...x(Object.assign({},e,{childrenRef:o}))})};S.defaultProps={size:"default"};const w=()=>{const{modal:e}=n.App.useApp(),o=(0,l.useRef)(null);return t=>{const l={},{children:n,...s}=x({onClose:()=>l.close(),childrenRef:o,...t}),{destroy:i}=e.info({...s,content:n});return l.close=i,l}},B=()=>{const{modal:e}=n.App.useApp();return o=>{const t={},{type:l,icon:s,title:a,danger:c,wrapClassName:m,message:h,iconSetting:p={},confirmType:u="info",...f}={onClose:()=>t.close(),maskClosable:!1,...o},y=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},p);if(e[l]){const{destroy:o}=e[l]({...f,icon:null,wrapClassName:i()(r["confirm-modal-wrap"],m,{[r["is-danger"]]:c}),title:(0,_.jsx)(n.Space,{direction:"vertical",onClick:e=>{e.stopPropagation()},children:a&&(0,_.jsxs)(n.Space,{size:0,align:"start",className:r.title,children:[c?(0,_.jsx)(d.default,{className:i()("title-icon",`title-icon-${"confirm"===l?u:l}`),type:s||y["confirm"===l?u:l]}):null,a]})}),content:(0,_.jsxs)(n.Space,{size:0,align:"start",className:i()(r.content,{[r["has-title"]]:a}),children:[!a&&c?(0,_.jsx)(d.default,{className:i()("title-icon",`title-icon-${"confirm"===l?u:l}`),type:s||y["confirm"===l?u:l]}):null,h]})});t.close=o}return t}},v=S,N=e=>{let{items:o,className:t,activeKey:l,withDecorator:s,defaultActiveKey:r,onChange:a,...c}=e;return{...c,className:i()(t,"tabs-modal"),withDecorator:e=>{const t=t=>(0,_.jsx)(n.Tabs,{items:o.map((o=>{let{withDecorator:l,...n}=o;return Object.assign({},n,{children:"function"===typeof l?l((o=>e(Object.assign({},t,o,{children:n.children})))):e(Object.assign({},t,{children:n.children}))})})),destroyInactiveTabPane:!0,activeKey:l,defaultActiveKey:r,onChange:a});return"function"===typeof s?s(t):t()},children:e=>{let{children:o,...t}=e;return"function"===typeof o?o(t):o}}},k=e=>(0,_.jsx)(v,{...N(e)}),P=()=>{const e=w();return o=>e(N(o))};var q=t(73025);const Z=e=>{const o=P();return e.api?(0,_.jsx)(q.A,{...e,modalFunc:o}):(0,_.jsx)(n.Button,{...e,onClick:()=>{o(e.modalProps)}})},M=e=>{const o=w();if(!e.api){const{modalProps:t,...l}=e;return(0,_.jsx)(n.Button,{...l,onClick:()=>{o(t)}})}return(0,_.jsx)(q.A,{...e,modalFunc:o})}},46733:()=>{}}]);
2
+ //# sourceMappingURL=2517.8985bc01.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/2517.713b0d68.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,E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,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__Mz-vv\",\"large\":\"style_large__iaqVE__Mz-vv\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__Mz-vv\",\"modal-title\":\"style_modal-title__dswaw__Mz-vv\",\"modal-outer\":\"style_modal-outer__r3SkX__Mz-vv\",\"modal-body\":\"style_modal-body__jQJSI__Mz-vv\",\"right-options-modal\":\"style_right-options-modal__FajDP__Mz-vv\",\"right-options-row\":\"style_right-options-row__-mPb9__Mz-vv\",\"right-options-col\":\"style_right-options-col__3ilee__Mz-vv\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__Mz-vv\",\"content\":\"style_content__k6MIF__Mz-vv\",\"modal-footer\":\"style_modal-footer__-prbN__Mz-vv\",\"modal-close\":\"style_modal-close__Oa5Kl__Mz-vv\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__Mz-vv\",\"is-danger\":\"style_is-danger__H5110__Mz-vv\",\"title\":\"style_title__orTym__Mz-vv\",\"has-title\":\"style_has-title__qy0Wp__Mz-vv\"};","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 childrenRef,\n close: onClose,\n })\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.8985bc01.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,GAAK,GAAhC,KAGHiB,EAAUA,CAACC,EAAMlB,IACR,UAATkB,EACK,CACLC,MAAO,GAAGC,KAAKC,IAAIC,OAAOC,WAAa,GAAI,UAC3CZ,MAAO,CAAE,qBAAsBI,EAAW,IAAKf,KAGtC,UAATkB,EACK,CACLC,MAAO,QACPR,MAAO,CAAE,qBAAsBI,EAAW,IAAKf,KAG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WpF,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__+BqSZ\",\"large\":\"style_large__iaqVE__+BqSZ\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__+BqSZ\",\"modal-title\":\"style_modal-title__dswaw__+BqSZ\",\"modal-outer\":\"style_modal-outer__r3SkX__+BqSZ\",\"modal-body\":\"style_modal-body__jQJSI__+BqSZ\",\"right-options-modal\":\"style_right-options-modal__FajDP__+BqSZ\",\"right-options-row\":\"style_right-options-row__-mPb9__+BqSZ\",\"right-options-col\":\"style_right-options-col__3ilee__+BqSZ\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__+BqSZ\",\"content\":\"style_content__k6MIF__+BqSZ\",\"modal-footer\":\"style_modal-footer__-prbN__+BqSZ\",\"modal-close\":\"style_modal-close__Oa5Kl__+BqSZ\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__+BqSZ\",\"is-danger\":\"style_is-danger__H5110__+BqSZ\",\"title\":\"style_title__orTym__+BqSZ\",\"has-title\":\"style_has-title__qy0Wp__+BqSZ\"};","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 childrenRef,\n close: onClose,\n })\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,3 +1,3 @@
1
- /*! For license information please see 2716.1a3cf021.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),a=r(83136),l=r.n(a);const o={"state-tag":"style_state-tag__Kx27z__Mz-vv","state-result-tag":"style_state-result-tag__CssDz__Mz-vv","state-skill-tag":"style_state-skill-tag__k0bQE__Mz-vv","event-tag":"style_event-tag__cg6SE__Mz-vv","state-tag-filter-result-wrapper":"style_state-tag-filter-result-wrapper__QYS5z__Mz-vv","state-tag-filter-name":"style_state-tag-filter-name__iJaJd__Mz-vv","state-tag-filterResult":"style_state-tag-filterResult__KTkot__Mz-vv","show-bg":"style_show-bg__OcL+R__Mz-vv","tag-text":"style_tag-text__JHCt+__Mz-vv","state-tag-wrapper":"style_state-tag-wrapper__A-gTE__Mz-vv"};var _=r(55199),n=r(70579);const c={default:"#666666",skill:{color:"#666666",borderColor:"#EEEEEE"},result:"#666666",filterResult:"#5CB8B2",success:"#027A48",progress:"#F09700",danger:"#D14343",info:"#155ACF",other:"#6740C3"},i=t=>{let{showBorder:e,text:r,type:a,showBackground:i,className:g,filterName:u,...p}=t;const v=(0,s.useMemo)((()=>{var t,e;return{color:(null===c||void 0===c||null===(t=c[a])||void 0===t?void 0:t.color)||c[a],borderColor:(null===c||void 0===c||null===(e=c[a])||void 0===e?void 0:e.borderColor)||c[a]}}),[a]);return(0,n.jsxs)(_.Space,{"data-testid":"components-core-state-tag",className:l()(o["state-tag-wrapper"],"filterResult"===a?o["state-tag-filter-result-wrapper"]:""),align:"center",size:4,children:[u?(0,n.jsxs)("span",{className:o["state-tag-filter-name"],children:[u,":"]}):null,(0,n.jsx)(_.Tag,{color:v.color,...p,style:{background:i?v.color+"0F":"none",color:v.color,border:e?`1px solid ${v.borderColor}`:"none"},className:l()(o["state-tag"],g,"result"===a?o["state-result-tag"]:"","skill"===a?o["state-skill-tag"]:"",o[`state-tag-${a}`],i?o["show-bg"]:"",e?o["show-border"]:"",null!==p&&void 0!==p&&p.onClick?o["event-tag"]:""),children:(0,n.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),a=Symbol.for("react.element"),l=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,_=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var s,l={},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)&&!n.hasOwnProperty(s)&&(l[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===l[s]&&(l[s]=e[s]);return{$$typeof:a,type:t,key:c,ref:i,props:l,_owner:_.current}}e.Fragment=l,e.jsx=c,e.jsxs=c},70579:(t,e,r)=>{t.exports=r(51153)}}]);
3
- //# sourceMappingURL=2716.1a3cf021.chunk.js.map
1
+ /*! For license information please see 2716.ba8f83d6.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),a=r(83136),l=r.n(a);const o={"state-tag":"style_state-tag__Kx27z__+BqSZ","state-result-tag":"style_state-result-tag__CssDz__+BqSZ","state-skill-tag":"style_state-skill-tag__k0bQE__+BqSZ","event-tag":"style_event-tag__cg6SE__+BqSZ","state-tag-filter-result-wrapper":"style_state-tag-filter-result-wrapper__QYS5z__+BqSZ","state-tag-filter-name":"style_state-tag-filter-name__iJaJd__+BqSZ","state-tag-filterResult":"style_state-tag-filterResult__KTkot__+BqSZ","show-bg":"style_show-bg__OcL+R__+BqSZ","tag-text":"style_tag-text__JHCt+__+BqSZ","state-tag-wrapper":"style_state-tag-wrapper__A-gTE__+BqSZ"};var _=r(55199),n=r(70579);const c={default:"#666666",skill:{color:"#666666",borderColor:"#EEEEEE"},result:"#666666",filterResult:"#5CB8B2",success:"#027A48",progress:"#F09700",danger:"#D14343",info:"#155ACF",other:"#6740C3"},i=t=>{let{showBorder:e,text:r,type:a,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[a])||void 0===t?void 0:t.color)||c[a],borderColor:(null===c||void 0===c||null===(e=c[a])||void 0===e?void 0:e.borderColor)||c[a]}}),[a]);return(0,n.jsxs)(_.Space,{"data-testid":"components-core-state-tag",className:l()(o["state-tag-wrapper"],"filterResult"===a?o["state-tag-filter-result-wrapper"]:""),align:"center",size:4,children:[u?(0,n.jsxs)("span",{className:o["state-tag-filter-name"],children:[u,":"]}):null,(0,n.jsx)(_.Tag,{color:d.color,...p,style:{background:i?d.color+"0F":"none",color:d.color,border:e?`1px solid ${d.borderColor}`:"none"},className:l()(o["state-tag"],g,"result"===a?o["state-result-tag"]:"","skill"===a?o["state-skill-tag"]:"",o[`state-tag-${a}`],i?o["show-bg"]:"",e?o["show-border"]:"",null!==p&&void 0!==p&&p.onClick?o["event-tag"]:""),children:(0,n.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),a=Symbol.for("react.element"),l=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,_=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var s,l={},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)&&!n.hasOwnProperty(s)&&(l[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===l[s]&&(l[s]=e[s]);return{$$typeof:a,type:t,key:c,ref:i,props:l,_owner:_.current}}e.Fragment=l,e.jsx=c,e.jsxs=c},70579:(t,e,r)=>{t.exports=r(51153)}}]);
3
+ //# sourceMappingURL=2716.ba8f83d6.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/2716.1a3cf021.chunk.js","mappings":";oNACA,SAAgB,YAAY,gCAAgC,mBAAmB,uCAAuC,kBAAkB,sCAAsC,YAAY,gCAAgC,kCAAkC,sDAAsD,wBAAwB,4CAA4C,yBAAyB,6CAA6C,UAAU,8BAA8B,WAAW,+BAA+B,oBAAoB,mECKliB,MAAMA,EAAc,CAClBC,QAAS,UACTC,MAAO,CACLC,MAAO,UACPC,YAA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AA,KAAA,QAAMd,UAAWU,EAAM,YAAYG,SAAEhB,QAEjC,EAIZH,EAASyB,aAAe,CACtBlC,MAAO,UACPa,KAAM,UACNF,YAAY,EACZG,gBAAgB,EAChBF,KAAM,GACNG,UAAW,IAGb,2BC5Ea,IAAIoB,EAAEC,EAAQ,OAASC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAEV,EAAEW,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEd,EAAEoB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAEpB,aAAa,IAAIuB,KAAKF,EAAED,EAAEpB,kBAAe,IAASwB,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACK,SAASzB,EAAExB,KAAKyC,EAAEL,IAAIU,EAAET,IAAIU,EAAE3C,MAAMyC,EAAEK,OAAOlB,EAAEmB,QAAQ,CAACC,EAAQC,SAAS1B,EAAEyB,EAAQE,IAAId,EAAEY,EAAQG,KAAKf,mBCPxWgB,EAAOJ,QAAU,EAAjBI","sources":["webpack://@kne-components/components-core/./src/components/StateTag/style.module.scss?5aff","components/StateTag/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 {\"state-tag\":\"style_state-tag__Kx27z__Mz-vv\",\"state-result-tag\":\"style_state-result-tag__CssDz__Mz-vv\",\"state-skill-tag\":\"style_state-skill-tag__k0bQE__Mz-vv\",\"event-tag\":\"style_event-tag__cg6SE__Mz-vv\",\"state-tag-filter-result-wrapper\":\"style_state-tag-filter-result-wrapper__QYS5z__Mz-vv\",\"state-tag-filter-name\":\"style_state-tag-filter-name__iJaJd__Mz-vv\",\"state-tag-filterResult\":\"style_state-tag-filterResult__KTkot__Mz-vv\",\"show-bg\":\"style_show-bg__OcL+R__Mz-vv\",\"tag-text\":\"style_tag-text__JHCt+__Mz-vv\",\"state-tag-wrapper\":\"style_state-tag-wrapper__A-gTE__Mz-vv\"};","import React, { useMemo } from \"react\";\nimport classnames from \"classnames\";\n\nimport style from \"./style.module.scss\";\nimport { Space, Tag } from \"antd\";\n\nconst tagTypeEnum = {\n default: \"#666666\",\n skill: {\n color: \"#666666\",\n borderColor: \"#EEEEEE\",\n },\n result: \"#666666\",\n filterResult: \"#5CB8B2\",\n success: \"#027A48\",\n progress: \"#F09700\",\n danger: \"#D14343\",\n info: \"#155ACF\",\n other: \"#6740C3\",\n};\n\nconst StateTag = ({\n showBorder,\n text,\n type,\n showBackground,\n className,\n filterName,\n ...props\n}) => {\n const tagColor = useMemo(\n () => ({\n color: tagTypeEnum?.[type]?.color || tagTypeEnum[type],\n borderColor: tagTypeEnum?.[type]?.borderColor || tagTypeEnum[type],\n }),\n [type]\n );\n\n return (\n <Space\n data-testid={\"components-core-state-tag\"}\n className={classnames(\n style[\"state-tag-wrapper\"],\n type === \"filterResult\" ? style[\"state-tag-filter-result-wrapper\"] : \"\"\n )}\n align=\"center\"\n size={4}\n >\n {filterName ? (\n <span className={style[\"state-tag-filter-name\"]}>{filterName}:</span>\n ) : null}\n <Tag\n color={tagColor.color}\n {...props}\n style={{\n background: showBackground ? tagColor.color + \"0F\" : \"none\",\n color: tagColor.color,\n border: showBorder ? `1px solid ${tagColor.borderColor}` : \"none\",\n }}\n className={classnames(\n style[\"state-tag\"],\n className,\n type === \"result\" ? style[\"state-result-tag\"] : \"\",\n type === \"skill\" ? style[\"state-skill-tag\"] : \"\",\n style[`state-tag-${type}`],\n showBackground ? style[\"show-bg\"] : \"\",\n showBorder ? style[\"show-border\"] : \"\",\n props?.onClick ? style[\"event-tag\"] : \"\"\n )}\n >\n <span className={style[\"tag-text\"]}>{text}</span>\n </Tag>\n </Space>\n );\n};\n\nStateTag.defaultProps = {\n color: \"#666666\",\n type: \"default\",\n showBorder: false,\n showBackground: true,\n text: \"\",\n className: \"\",\n};\n\nexport default StateTag;\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":["tagTypeEnum","default","skill","color","borderColor","result","filterResult","success","progress","danger","info","other","StateTag","_ref","showBorder","text","type","showBackground","className","filterName","props","tagColor","useMemo","_tagTypeEnum$type","_tagTypeEnum$type2","_jsxs","Space","classnames","style","align","size","children","_jsx","Tag","background","border","onClick","defaultProps","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","_owner","current","exports","Fragment","jsx","jsxs","module"],"sourceRoot":""}
1
+ {"version":3,"file":"static/js/2716.ba8f83d6.chunk.js","mappings":";oNACA,SAAgB,YAAY,gCAAgC,mBAAmB,uCAAuC,kBAAkB,sCAAsC,YAAY,gCAAgC,kCAAkC,sDAAsD,wBAAwB,4CAA4C,yBAAyB,6CAA6C,UAAU,8BAA8B,WAAW,+BAA+B,oBAAoB,mECKliB,MAAMA,EAAc,CAClBC,QAAS,UACTC,MAAO,CACLC,MAAO,UACPC,YAAa,WAEfC,OAAQ,UACRC,aAAc,UACdC,QAAS,UACTC,SAAU,UACVC,OAAQ,UACRC,KAAM,UACNC,MAAO,WAGHC,EAAWC,IAQV,IARW,WAChBC,EAAU,KACVC,EAAI,KACJC,EAAI,eACJC,EAAc,UACdC,EAAS,WACTC,KACGC,GACJP,EACC,MAAMQ,GAAWC,EAAAA,EAAAA,UACf,SAAAC,EAAAC,EAAA,MAAO,CACLrB,OAAkB,OAAXH,QAAW,IAAXA,GAAmB,QAARuB,EAAXvB,EAAcgB,UAAK,IAAAO,OAAR,EAAXA,EAAqBpB,QAASH,EAAYgB,GACjDZ,aAAwB,OAAXJ,QAAW,IAAXA,GAAmB,QAARwB,EAAXxB,EAAcgB,UAAK,IAAAQ,OAAR,EAAXA,EAAqBpB,cAAeJ,EAAYgB,GAC9D,GACD,CAACA,IAGH,OACES,EAAAA,EAAAA,MAACC,EAAAA,MAAK,CACJ,cAAa,4BACbR,UAAWS,IACTC,EAAM,qBACG,iBAATZ,EAA0BY,EAAM,mCAAqC,IAEvEC,MAAM,SACNC,KAAM,EAAEC,SAAA,CAEPZ,GACCM,EAAAA,EAAAA,MAAA,QAAMP,UAAWU,EAAM,yBAAyBG,SAAA,CAAEZ,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kBAAe,IAASwB,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACK,SAASzB,EAAExB,KAAKyC,EAAEL,IAAIU,EAAET,IAAIU,EAAE3C,MAAMyC,EAAEK,OAAOlB,EAAEmB,QAAQ,CAACC,EAAQC,SAAS1B,EAAEyB,EAAQE,IAAId,EAAEY,EAAQG,KAAKf,mBCPxWgB,EAAOJ,QAAU,EAAjBI","sources":["webpack://@kne-components/components-core/./src/components/StateTag/style.module.scss?5aff","components/StateTag/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 {\"state-tag\":\"style_state-tag__Kx27z__+BqSZ\",\"state-result-tag\":\"style_state-result-tag__CssDz__+BqSZ\",\"state-skill-tag\":\"style_state-skill-tag__k0bQE__+BqSZ\",\"event-tag\":\"style_event-tag__cg6SE__+BqSZ\",\"state-tag-filter-result-wrapper\":\"style_state-tag-filter-result-wrapper__QYS5z__+BqSZ\",\"state-tag-filter-name\":\"style_state-tag-filter-name__iJaJd__+BqSZ\",\"state-tag-filterResult\":\"style_state-tag-filterResult__KTkot__+BqSZ\",\"show-bg\":\"style_show-bg__OcL+R__+BqSZ\",\"tag-text\":\"style_tag-text__JHCt+__+BqSZ\",\"state-tag-wrapper\":\"style_state-tag-wrapper__A-gTE__+BqSZ\"};","import React, { useMemo } from \"react\";\nimport classnames from \"classnames\";\n\nimport style from \"./style.module.scss\";\nimport { Space, Tag } from \"antd\";\n\nconst tagTypeEnum = {\n default: \"#666666\",\n skill: {\n color: \"#666666\",\n borderColor: \"#EEEEEE\",\n },\n result: \"#666666\",\n filterResult: \"#5CB8B2\",\n success: \"#027A48\",\n progress: \"#F09700\",\n danger: \"#D14343\",\n info: \"#155ACF\",\n other: \"#6740C3\",\n};\n\nconst StateTag = ({\n showBorder,\n text,\n type,\n showBackground,\n className,\n filterName,\n ...props\n}) => {\n const tagColor = useMemo(\n () => ({\n color: tagTypeEnum?.[type]?.color || tagTypeEnum[type],\n borderColor: tagTypeEnum?.[type]?.borderColor || tagTypeEnum[type],\n }),\n [type]\n );\n\n return (\n <Space\n data-testid={\"components-core-state-tag\"}\n className={classnames(\n style[\"state-tag-wrapper\"],\n type === \"filterResult\" ? style[\"state-tag-filter-result-wrapper\"] : \"\"\n )}\n align=\"center\"\n size={4}\n >\n {filterName ? (\n <span className={style[\"state-tag-filter-name\"]}>{filterName}:</span>\n ) : null}\n <Tag\n color={tagColor.color}\n {...props}\n style={{\n background: showBackground ? tagColor.color + \"0F\" : \"none\",\n color: tagColor.color,\n border: showBorder ? `1px solid ${tagColor.borderColor}` : \"none\",\n }}\n className={classnames(\n style[\"state-tag\"],\n className,\n type === \"result\" ? style[\"state-result-tag\"] : \"\",\n type === \"skill\" ? style[\"state-skill-tag\"] : \"\",\n style[`state-tag-${type}`],\n showBackground ? style[\"show-bg\"] : \"\",\n showBorder ? style[\"show-border\"] : \"\",\n props?.onClick ? style[\"event-tag\"] : \"\"\n )}\n >\n <span className={style[\"tag-text\"]}>{text}</span>\n </Tag>\n </Space>\n );\n};\n\nStateTag.defaultProps = {\n color: \"#666666\",\n type: \"default\",\n showBorder: false,\n showBackground: true,\n text: \"\",\n className: \"\",\n};\n\nexport default StateTag;\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":["tagTypeEnum","default","skill","color","borderColor","result","filterResult","success","progress","danger","info","other","StateTag","_ref","showBorder","text","type","showBackground","className","filterName","props","tagColor","useMemo","_tagTypeEnum$type","_tagTypeEnum$type2","_jsxs","Space","classnames","style","align","size","children","_jsx","Tag","background","border","onClick","defaultProps","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","_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([[2730,9034,8725],{18411:(e,t,a)=>{a.d(t,{A:()=>r});a(73884);const r=a.p+"static/media/defaultAvatar.b1f2a8046cc7bee36d9a404ce6a0a1d7.svg"},97211:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(87558),s=a.n(r),n=a(63908),i=a(34677),o=a.n(i),l=a(70579);const c=e=>{const t=t=>{let{id:a,url:r,error:i,apis:c,loading:d,...u}=t;const{apis:m}=(0,n.usePreset)(),p=o()({},m,c);if(!a)return null;if(!p.oss)throw new Error("\u8bf7\u5728Global\u7ec4\u4ef6\u8bbe\u7f6epreset.apis.oss\u53c2\u6570");const{paramsType:f,paramsName:g,..._}=Object.assign({paramsType:"params",paramsName:"id"},p.oss),h={};return h[f]={[g]:a},(0,l.jsx)(s(),{...Object.assign({},_,h),updateType:"refresh",error:i,loading:d,cache:"oss-file",ttl:6e6,render:t=>{let{data:r}=t;return(0,l.jsx)(e,{...u,id:a,data:r})}})};return t.defaultProps={loading:null},t}},40438:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var r=a(87558),s=a.n(r),n=a(97211),i=a(64671),o=a(83136),l=a.n(o),c=a(55199),d=a(73884);const u=e=>{let{params:t}=e;const{data:a}=t;return new Promise(((e,t)=>{const r=new window.Image;r.src=a,r.addEventListener("load",(()=>{e(a)})),r.addEventListener("error",(e=>{t(e)}))}))},m="style_img-outer__4QLY5__+BqSZ",p="style_img__PSExq__+BqSZ",f="style_loading__WCOwA__+BqSZ",g="style_error__+ECgZ__+BqSZ";var _=a(18411),h=a(63908),x=a(70579);const v=e=>{let{data:t,className:a,alt:r,innerLoading:n,loading:i,error:o,innerError:c,children:d,onClick:m,staticUrl:f}=e;const{staticUrl:g}=(0,h.usePreset)(),_=f||g||"";return(0,x.jsx)(s(),{loader:u,params:{data:/^https?:\/\//.test(t)?t:_+t},error:c||o,loading:n||i,render:e=>{let{data:t}=e;return"function"===typeof d?d({alt:r,className:l()(a,p),src:t}):(0,x.jsx)("img",{alt:r,className:l()(a,p),src:t,onClick:m})}})},j=(0,n.A)(v),y=e=>{let{loading:t,error:a,src:r,id:s,alt:n,className:i,children:o,apis:l,onClick:c}=e;const u=t&&(0,d.cloneElement)(t,{className:f}),m=a&&(0,d.cloneElement)(a,{className:g});return r?(0,x.jsx)(v,{alt:n,className:i,data:r,loading:u,error:m,onClick:c,children:o}):s?(0,x.jsx)(j,{alt:n,className:i,id:s,loading:u,innerLoading:u,error:m,innerError:m,apis:l,onClick:c,children:o}):m},N=e=>{let{id:t,src:a,alt:r,onClick:s,loading:n,error:i,className:o,apis:c,...d}=e;return(0,x.jsx)("div",{...d,"data-testid":"components-core-image",className:l()(o,m),children:y({loading:n,error:i,src:a,id:t,alt:r,className:o,apis:c,onClick:s})})};N.Avatar=e=>{let{id:t,src:a,alt:r,gender:s,loading:n,error:o,className:d,gap:u,icon:p,children:f,shape:g,size:_,width:h,height:v,defaultAvatar:j,apis:N,...b}=e;const w=(()=>{const e=h&&v?{style:{width:h,height:v}}:{size:_};if(h&&h!==v&&(g="square"),t||a)return y({loading:n,error:o,src:a,defaultAvatar:j,id:t,alt:r,className:d,apis:N,children:t=>(0,x.jsx)(c.Avatar,{...t,gap:u,shape:g,...e})});if(s){const t=s&&["F","female","f"].indexOf(s)>-1?"icon-color-touxiang-nv":"icon-color-touxiang-nan";return(0,x.jsx)(c.Avatar,{...b,src:(0,x.jsx)(i.default,{role:"touxiang",colorful:!0,type:t}),gap:u,shape:g,...e})}return(0,x.jsx)(c.Avatar,{...b,gap:u,icon:p,shape:g,size:_,src:j,...e,children:f})})();return(0,x.jsx)("div",{...b,"data-testid":"components-core-image-avatar",className:l()(d,m),style:{width:h&&v?h:_,height:h&&v?v:_},children:w})};const b={error:(0,x.jsx)(i.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),loading:(0,x.jsx)(c.Skeleton.Avatar,{shape:"square",active:!0})};N.defaultProps=Object.assign({},b),N.Avatar.defaultProps=Object.assign({},b,{size:100,defaultAvatar:_.A});const w=N},79329:(e,t,a)=>{a.r(t),a.d(t,{default:()=>E,navigationHeight:()=>S});var r=a(55199),s=a(94679),n=a(33097),i=a.n(n),o=a(73884),l=a(83136),c=a.n(l);const d=a.p+"static/media/favicon.477a5bb996fd5b367fe0dddc29f67824.svg";var u=a(40438);const m=e=>({"en-US":()=>a.e(257).then(a.bind(a,30257)),"zh-CN":()=>a.e(5671).then(a.bind(a,5671))}[e]());var p=a(58609),f=a(96418),g=a.n(f),_=a(64671);const h="style_navigation-wrap__VF8x2__+BqSZ",x="style_navigation__60RrS__+BqSZ",v="style_is-fixed__kHFWj__+BqSZ",j="style_navigation-logo__q9qHu__+BqSZ",y="style_logo__lB9RC__+BqSZ",N="style_navigation-list__EYtkg__+BqSZ",b="style_navigation-options__0BdJU__+BqSZ",w="style_more-icon__gNMnt__+BqSZ";var k=a(70579);const{Header:A}=r.Layout,S=48,C=e=>{let{name:t,mapping:a,defaultTitle:r}=e;const s=(0,o.useRef)({mapping:a,defaultTitle:r});return(0,o.useEffect)((()=>{const e=i()(s.current.mapping.get(t),"title");document.title=(e?e+"-":"")+s.current.defaultTitle}),[t]),null},q=e=>{let{onReady:t}=e;const a=g()(t);return(0,o.useEffect)((()=>{a()}),[a]),null},B=e=>{let{permissions:t,list:a,headerLogo:n,rightOptions:l,isFixed:f,showIndex:g,indexLabel:S,defaultTitle:B,overflowedIndicator:E,base:Z,onChange:O,className:L}=e;const T=(0,o.useMemo)((()=>new Map(a.map((e=>{let{key:t,...a}=e;return[t,a]})))),[a]),M=(0,s.useNavigate)(),P=(0,s.useLocation)(),R=(0,o.useRef)(),F=(0,o.useRef)(null),[z,I]=(0,o.useState)("\u66f4\u591a"),[H,U]=(0,o.useState)(!1),W=P.pathname.replace(new RegExp(`^${Z}`),"").split("/")[1],Y=W?i()(Array.from(T.entries()).find((e=>{let[a,{path:r,permission:s}]=e;return-1!==("function"===typeof r?r(s,t):r).indexOf("/"+W)})),"[0]"):"home";(0,o.useEffect)((()=>{const e=()=>{if(R.current){const e=R.current.querySelectorAll("li[data-menu-id]");let t=!1;for(let r=0;r<e.length;r++){if(-1!==e[r].getAttribute("data-menu-id").indexOf(Y)){t=!0;break}}let a=T.get(Y)&&!t?i()(T.get(Y),"title"):"";I(a)}},t={attributes:!0,childList:!0,subtree:!0};return H&&R&&R.current&&(e(),F.current&&F.current.disconnect(),F.current=new MutationObserver(e),F.current.observe(R.current,t)),()=>{F.current&&F.current.disconnect()}}),[Y,T,H]);const G=!!g&&{label:S||(0,k.jsx)(p.FormattedMessage,{id:"indexLabel",moduleName:"Navigation"}),key:"home",onClick:()=>{O&&O("/"),setTimeout((()=>{M("/")}),0)}};return(0,k.jsxs)(p.IntlProvider,{importMessages:m,moduleName:"Navigation",children:[(0,k.jsx)(p.FormattedMessage,{id:"defaultTitle",moduleName:"Navigation",children:e=>(0,k.jsx)(C,{defaultTitle:B||e,mapping:T,name:Y})}),(0,k.jsx)("div",{className:c()(h,L),children:(0,k.jsx)(A,{className:c()("navigation",x,{[v]:f}),children:(0,k.jsxs)(r.Row,{justify:"space-around",wrap:!1,children:[(0,k.jsx)(r.Col,{className:c()("navigation-logo",j),children:(0,k.jsx)(u.default,{className:c()(y),src:d,alt:"logo",...n})}),(0,k.jsxs)(r.Col,{ref:R,flex:1,className:c()("navigation-list",N),children:[(0,k.jsx)(q,{onReady:()=>{U(!0)}}),(0,k.jsx)(r.Menu,{selectedKeys:[Y],mode:"horizontal",overflowedIndicator:E||(0,k.jsxs)(r.Space,{size:4,children:[(0,k.jsx)("span",{children:z||(0,k.jsx)(p.FormattedMessage,{id:"overflowedIndicator",moduleName:"Navigation"})}),(0,k.jsx)("span",{className:w,children:(0,k.jsx)(_.default,{type:"icon-arrow-thin-down"})})]}),items:[G,...Array.from(T.entries()).filter((e=>{let[a,{permission:r}]=e;if("string"===typeof r)return t.indexOf(r)>-1;if("function"===typeof r)return r(t);if(Array.isArray(r)){for(let e of r)if(t.indexOf(e)>-1)return!0;return!1}return!0})).map((e=>{let[a,{title:r,path:s,permission:n}]=e;const i="function"===typeof s?s(n,t):s;return{label:r,key:a,onClick:()=>{O&&O(i),setTimeout((()=>{M(i)}),0)}}}))]})]}),(0,k.jsx)(r.Col,{className:b,children:l})]})})})]})};B.defaultProps={isFixed:!0,permissions:[],list:[],showIndex:!0,base:""};const E=B}}]);
2
+ //# sourceMappingURL=2730.ea7793a6.chunk.js.map