@kne-components/components-core 0.3.10 → 0.3.12

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 (144) hide show
  1. package/build/asset-manifest.json +102 -102
  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/{1045.a27d9595.chunk.css → 1045.92441818.chunk.css} +2 -2
  6. package/build/static/css/{1045.a27d9595.chunk.css.map → 1045.92441818.chunk.css.map} +1 -1
  7. package/build/static/css/1153.7c03e52f.chunk.css +2 -0
  8. package/build/static/css/{1153.90136743.chunk.css.map → 1153.7c03e52f.chunk.css.map} +1 -1
  9. package/build/static/css/1554.b1fb088b.chunk.css +2 -0
  10. package/build/static/css/{1554.44072eee.chunk.css.map → 1554.b1fb088b.chunk.css.map} +1 -1
  11. package/build/static/css/2716.35257107.chunk.css +2 -0
  12. package/build/static/css/{2716.cd53ade1.chunk.css.map → 2716.35257107.chunk.css.map} +1 -1
  13. package/build/static/css/4200.2204c667.chunk.css +2 -0
  14. package/build/static/css/{4200.f3021117.chunk.css.map → 4200.2204c667.chunk.css.map} +1 -1
  15. package/build/static/css/4666.4240d7b8.chunk.css +2 -0
  16. package/build/static/css/{4666.f9e23bab.chunk.css.map → 4666.4240d7b8.chunk.css.map} +1 -1
  17. package/build/static/css/{5371.e5897832.chunk.css → 5371.cee90f2b.chunk.css} +2 -2
  18. package/build/static/css/{5371.e5897832.chunk.css.map → 5371.cee90f2b.chunk.css.map} +1 -1
  19. package/build/static/css/5422.9e5ce879.chunk.css +2 -0
  20. package/build/static/css/{5422.fd12521f.chunk.css.map → 5422.9e5ce879.chunk.css.map} +1 -1
  21. package/build/static/css/5939.7263ab81.chunk.css +2 -0
  22. package/build/static/css/{5939.6f147416.chunk.css.map → 5939.7263ab81.chunk.css.map} +1 -1
  23. package/build/static/css/{624.ffab8cdb.chunk.css → 624.eb8feb12.chunk.css} +2 -2
  24. package/build/static/css/{624.ffab8cdb.chunk.css.map → 624.eb8feb12.chunk.css.map} +1 -1
  25. package/build/static/css/6401.f143c424.chunk.css +2 -0
  26. package/build/static/css/{6401.f6e27771.chunk.css.map → 6401.f143c424.chunk.css.map} +1 -1
  27. package/build/static/css/7227.d9117ff0.chunk.css +2 -0
  28. package/build/static/css/{7227.41208dd7.chunk.css.map → 7227.d9117ff0.chunk.css.map} +1 -1
  29. package/build/static/css/{7253.51792b55.chunk.css → 7253.49c3068a.chunk.css} +2 -2
  30. package/build/static/css/{7253.51792b55.chunk.css.map → 7253.49c3068a.chunk.css.map} +1 -1
  31. package/build/static/css/7277.aacda095.chunk.css +2 -0
  32. package/build/static/css/{7277.c040bc56.chunk.css.map → 7277.aacda095.chunk.css.map} +1 -1
  33. package/build/static/css/{7334.bf6e71d8.chunk.css → 7334.e1685ffa.chunk.css} +2 -2
  34. package/build/static/css/{7334.bf6e71d8.chunk.css.map → 7334.e1685ffa.chunk.css.map} +1 -1
  35. package/build/static/css/7774.47213583.chunk.css +12 -0
  36. package/build/static/css/{7774.d7cb176e.chunk.css.map → 7774.47213583.chunk.css.map} +1 -1
  37. package/build/static/css/{7866.1a57e2cd.chunk.css → 7866.39b7ecae.chunk.css} +2 -2
  38. package/build/static/css/{7866.1a57e2cd.chunk.css.map → 7866.39b7ecae.chunk.css.map} +1 -1
  39. package/build/static/css/8278.6a9a1857.chunk.css +2 -0
  40. package/build/static/css/{8278.b6034145.chunk.css.map → 8278.6a9a1857.chunk.css.map} +1 -1
  41. package/build/static/css/{8503.68814759.chunk.css → 8503.bb359432.chunk.css} +2 -2
  42. package/build/static/css/{8503.68814759.chunk.css.map → 8503.bb359432.chunk.css.map} +1 -1
  43. package/build/static/css/9119.4f40ba0a.chunk.css +2 -0
  44. package/build/static/css/{9119.90a26b8b.chunk.css.map → 9119.4f40ba0a.chunk.css.map} +1 -1
  45. package/build/static/css/9791.2ed37437.chunk.css +2 -0
  46. package/build/static/css/{9791.0f7e373d.chunk.css.map → 9791.2ed37437.chunk.css.map} +1 -1
  47. package/build/static/js/{1045.3da9ce3a.chunk.js → 1045.9fd7ed17.chunk.js} +2 -2
  48. package/build/static/js/{1045.3da9ce3a.chunk.js.map → 1045.9fd7ed17.chunk.js.map} +1 -1
  49. package/build/static/js/{1153.1d9c7e60.chunk.js → 1153.0c476a16.chunk.js} +3 -3
  50. package/build/static/js/{1153.1d9c7e60.chunk.js.map → 1153.0c476a16.chunk.js.map} +1 -1
  51. package/build/static/js/{1489.9ae7bb96.chunk.js → 1489.8406ac67.chunk.js} +2 -2
  52. package/build/static/js/{1489.9ae7bb96.chunk.js.map → 1489.8406ac67.chunk.js.map} +1 -1
  53. package/build/static/js/1554.c017c5ee.chunk.js +3 -0
  54. package/build/static/js/{1554.9b363861.chunk.js.map → 1554.c017c5ee.chunk.js.map} +1 -1
  55. package/build/static/js/1624.e07c9f3c.chunk.js +3 -0
  56. package/build/static/js/1624.e07c9f3c.chunk.js.map +1 -0
  57. package/build/static/js/2470.4337fdd1.chunk.js +2 -0
  58. package/build/static/js/2470.4337fdd1.chunk.js.map +1 -0
  59. package/build/static/js/{2716.b720ca5f.chunk.js → 2716.11267ba7.chunk.js} +3 -3
  60. package/build/static/js/{2716.b720ca5f.chunk.js.map → 2716.11267ba7.chunk.js.map} +1 -1
  61. package/build/static/js/330.e295616a.chunk.js +2 -0
  62. package/build/static/js/330.e295616a.chunk.js.map +1 -0
  63. package/build/static/js/{3856.1ed3eae3.chunk.js → 3856.7db20e63.chunk.js} +2 -2
  64. package/build/static/js/{3856.1ed3eae3.chunk.js.map → 3856.7db20e63.chunk.js.map} +1 -1
  65. package/build/static/js/{4200.67914f35.chunk.js → 4200.5fb67653.chunk.js} +2 -2
  66. package/build/static/js/{4200.67914f35.chunk.js.map → 4200.5fb67653.chunk.js.map} +1 -1
  67. package/build/static/js/{4344.6eb45681.chunk.js → 4344.3d16a880.chunk.js} +2 -2
  68. package/build/static/js/{4344.6eb45681.chunk.js.map → 4344.3d16a880.chunk.js.map} +1 -1
  69. package/build/static/js/4474.a1d30880.chunk.js +2 -0
  70. package/build/static/js/4474.a1d30880.chunk.js.map +1 -0
  71. package/build/static/js/{4666.c8f3672a.chunk.js → 4666.ca7b58e0.chunk.js} +3 -3
  72. package/build/static/js/{4666.c8f3672a.chunk.js.map → 4666.ca7b58e0.chunk.js.map} +1 -1
  73. package/build/static/js/4671.3e874a27.chunk.js +1 -0
  74. package/build/static/js/5371.9b0411e1.chunk.js +2 -0
  75. package/build/static/js/{5371.1735b536.chunk.js.map → 5371.9b0411e1.chunk.js.map} +1 -1
  76. package/build/static/js/5422.06a0c3cc.chunk.js +2 -0
  77. package/build/static/js/{5422.4934382b.chunk.js.map → 5422.06a0c3cc.chunk.js.map} +1 -1
  78. package/build/static/js/{5939.4b63389d.chunk.js → 5939.242079a4.chunk.js} +2 -2
  79. package/build/static/js/{5939.4b63389d.chunk.js.map → 5939.242079a4.chunk.js.map} +1 -1
  80. package/build/static/js/{624.0fcb5953.chunk.js → 624.33f90a34.chunk.js} +2 -2
  81. package/build/static/js/{624.0fcb5953.chunk.js.map → 624.33f90a34.chunk.js.map} +1 -1
  82. package/build/static/js/{6617.8e83514c.chunk.js → 6617.5ab2940f.chunk.js} +1 -1
  83. package/build/static/js/7227.83a6b9e8.chunk.js +3 -0
  84. package/build/static/js/{7227.0fe2f33a.chunk.js.map → 7227.83a6b9e8.chunk.js.map} +1 -1
  85. package/build/static/js/{7253.c1fda341.chunk.js → 7253.b16ca375.chunk.js} +2 -2
  86. package/build/static/js/{7253.c1fda341.chunk.js.map → 7253.b16ca375.chunk.js.map} +1 -1
  87. package/build/static/js/7277.3245d968.chunk.js +2 -0
  88. package/build/static/js/{7277.bda0ae9c.chunk.js.map → 7277.3245d968.chunk.js.map} +1 -1
  89. package/build/static/js/{7334.1b1de1a9.chunk.js → 7334.76996baf.chunk.js} +2 -2
  90. package/build/static/js/{7334.1b1de1a9.chunk.js.map → 7334.76996baf.chunk.js.map} +1 -1
  91. package/build/static/js/{7774.d6388373.chunk.js → 7774.4b5d4dab.chunk.js} +2 -2
  92. package/build/static/js/7774.4b5d4dab.chunk.js.map +1 -0
  93. package/build/static/js/{7866.35f5ee02.chunk.js → 7866.74e6b49b.chunk.js} +2 -2
  94. package/build/static/js/{7866.35f5ee02.chunk.js.map → 7866.74e6b49b.chunk.js.map} +1 -1
  95. package/build/static/js/8278.d0d7da40.chunk.js +2 -0
  96. package/build/static/js/8278.d0d7da40.chunk.js.map +1 -0
  97. package/build/static/js/{8503.875a35bb.chunk.js → 8503.6ff5db19.chunk.js} +2 -2
  98. package/build/static/js/{8503.875a35bb.chunk.js.map → 8503.6ff5db19.chunk.js.map} +1 -1
  99. package/build/static/js/9119.cb655bed.chunk.js +2 -0
  100. package/build/static/js/{9119.25e50729.chunk.js.map → 9119.cb655bed.chunk.js.map} +1 -1
  101. package/build/static/js/9791.3881d338.chunk.js +2 -0
  102. package/build/static/js/{9791.32c9b12e.chunk.js.map → 9791.3881d338.chunk.js.map} +1 -1
  103. package/build/static/js/{main.57ef2135.js → main.5b87b1c3.js} +2 -2
  104. package/build/static/js/{main.57ef2135.js.map → main.5b87b1c3.js.map} +1 -1
  105. package/package.json +1 -1
  106. package/build/static/css/1153.90136743.chunk.css +0 -2
  107. package/build/static/css/1554.44072eee.chunk.css +0 -2
  108. package/build/static/css/2716.cd53ade1.chunk.css +0 -2
  109. package/build/static/css/4200.f3021117.chunk.css +0 -2
  110. package/build/static/css/4666.f9e23bab.chunk.css +0 -2
  111. package/build/static/css/5422.fd12521f.chunk.css +0 -2
  112. package/build/static/css/5939.6f147416.chunk.css +0 -2
  113. package/build/static/css/6401.f6e27771.chunk.css +0 -2
  114. package/build/static/css/7227.41208dd7.chunk.css +0 -2
  115. package/build/static/css/7277.c040bc56.chunk.css +0 -2
  116. package/build/static/css/7774.d7cb176e.chunk.css +0 -12
  117. package/build/static/css/8278.b6034145.chunk.css +0 -2
  118. package/build/static/css/9119.90a26b8b.chunk.css +0 -2
  119. package/build/static/css/9791.0f7e373d.chunk.css +0 -2
  120. package/build/static/js/1554.9b363861.chunk.js +0 -3
  121. package/build/static/js/1624.75c7a3d0.chunk.js +0 -3
  122. package/build/static/js/1624.75c7a3d0.chunk.js.map +0 -1
  123. package/build/static/js/2470.ea137082.chunk.js +0 -2
  124. package/build/static/js/2470.ea137082.chunk.js.map +0 -1
  125. package/build/static/js/330.5a6ba67c.chunk.js +0 -2
  126. package/build/static/js/330.5a6ba67c.chunk.js.map +0 -1
  127. package/build/static/js/4474.946f5ff9.chunk.js +0 -2
  128. package/build/static/js/4474.946f5ff9.chunk.js.map +0 -1
  129. package/build/static/js/4671.ae56180e.chunk.js +0 -1
  130. package/build/static/js/5371.1735b536.chunk.js +0 -2
  131. package/build/static/js/5422.4934382b.chunk.js +0 -2
  132. package/build/static/js/7227.0fe2f33a.chunk.js +0 -3
  133. package/build/static/js/7277.bda0ae9c.chunk.js +0 -2
  134. package/build/static/js/7774.d6388373.chunk.js.map +0 -1
  135. package/build/static/js/8278.13d1a461.chunk.js +0 -2
  136. package/build/static/js/8278.13d1a461.chunk.js.map +0 -1
  137. package/build/static/js/9119.25e50729.chunk.js +0 -2
  138. package/build/static/js/9791.32c9b12e.chunk.js +0 -2
  139. /package/build/static/js/{1153.1d9c7e60.chunk.js.LICENSE.txt → 1153.0c476a16.chunk.js.LICENSE.txt} +0 -0
  140. /package/build/static/js/{1554.9b363861.chunk.js.LICENSE.txt → 1554.c017c5ee.chunk.js.LICENSE.txt} +0 -0
  141. /package/build/static/js/{1624.75c7a3d0.chunk.js.LICENSE.txt → 1624.e07c9f3c.chunk.js.LICENSE.txt} +0 -0
  142. /package/build/static/js/{2716.b720ca5f.chunk.js.LICENSE.txt → 2716.11267ba7.chunk.js.LICENSE.txt} +0 -0
  143. /package/build/static/js/{4666.c8f3672a.chunk.js.LICENSE.txt → 4666.ca7b58e0.chunk.js.LICENSE.txt} +0 -0
  144. /package/build/static/js/{7227.0fe2f33a.chunk.js.LICENSE.txt → 7227.83a6b9e8.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1045,7766],{3382:(e,o,t)=>{t.r(o),t.d(o,{ModalButton:()=>S,TabsModal:()=>N,TabsModalButton:()=>P,default:()=>O,useConfirmModal:()=>B,useModal:()=>A,useTabsModal:()=>k});var l=t(73884),n=t(55199),s=t(83136),i=t.n(s);const r={modal:"style_modal__Pm3cF__BzOA3",large:"style_large__iaqVE__BzOA3","modal-body-inner":"style_modal-body-inner__4PhpA__BzOA3","modal-title":"style_modal-title__dswaw__BzOA3","modal-outer":"style_modal-outer__r3SkX__BzOA3","modal-body":"style_modal-body__jQJSI__BzOA3","right-options-modal":"style_right-options-modal__FajDP__BzOA3","right-options-row":"style_right-options-row__-mPb9__BzOA3","right-options-col":"style_right-options-col__3ilee__BzOA3","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__BzOA3",content:"style_content__k6MIF__BzOA3","modal-footer":"style_modal-footer__-prbN__BzOA3","modal-close":"style_modal-close__Oa5Kl__BzOA3","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__BzOA3","is-danger":"style_is-danger__H5110__BzOA3",title:"style_title__orTym__BzOA3","has-title":"style_has-title__qy0Wp__BzOA3"},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(47458),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,...w}=e;return{...w,icon:null,centered:!0,title:null,maskClosable:!!w.hasOwnProperty("maskClosable")&&w.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:i()(d,r.modal,r[m],{[r["right-options-modal"]]: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})})}},w=e=>{const o=(0,l.useRef)(null);return(0,_.jsx)(n.Modal,{...x(Object.assign({},e,{childrenRef:o}))})};w.defaultProps={size:"default"};const A=()=>{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}},O=w,v=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}}},N=e=>(0,_.jsx)(O,{...v(e)}),k=()=>{const e=A();return o=>e(v(o))};var z=t(73025);const P=e=>{const o=k();return e.api?(0,_.jsx)(z.A,{...e,modalFunc:o}):(0,_.jsx)(n.Button,{...e,onClick:()=>{o(e.modalProps)}})},S=e=>{const o=A();if(!e.api){const{modalProps:t,...l}=e;return(0,_.jsx)(n.Button,{...l,onClick:()=>{o(t)}})}return(0,_.jsx)(z.A,{...e,modalFunc:o})}},17342:(e,o,t)=>{t.d(o,{A:()=>s});var l=t(8762),n=t.n(l);t(46733);const s=n()},46733:()=>{}}]);
2
- //# sourceMappingURL=1045.3da9ce3a.chunk.js.map
1
+ "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1045,7766],{3382:(e,o,t)=>{t.r(o),t.d(o,{ModalButton:()=>M,TabsModal:()=>P,TabsModalButton:()=>S,default:()=>T,useConfirmModal:()=>N,useModal:()=>v,useTabsModal:()=>E});var l=t(73884),n=t(55199),s=t(83136),i=t.n(s);const r={modal:"style_modal__Pm3cF__T-HtE",large:"style_large__iaqVE__T-HtE","modal-body-inner":"style_modal-body-inner__4PhpA__T-HtE","modal-title":"style_modal-title__dswaw__T-HtE","modal-outer":"style_modal-outer__r3SkX__T-HtE","modal-body":"style_modal-body__jQJSI__T-HtE","right-options-modal":"style_right-options-modal__FajDP__T-HtE","right-options-row":"style_right-options-row__-mPb9__T-HtE","right-options-col":"style_right-options-col__3ilee__T-HtE","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__T-HtE",content:"style_content__k6MIF__T-HtE","modal-footer":"style_modal-footer__-prbN__T-HtE","modal-close":"style_modal-close__Oa5Kl__T-HtE","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__T-HtE","is-danger":"style_is-danger__H5110__T-HtE",title:"style_title__orTym__T-HtE","has-title":"style_has-title__qy0Wp__T-HtE"},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(47458),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,...w}=e;return{...w,icon:null,centered:!0,title:null,maskClosable:!!w.hasOwnProperty("maskClosable")&&w.maskClosable,destroyOnClose:!0,footer:null,closable:!1,onCancel:p,className:i()(d,r.modal,r[m],{[r["right-options-modal"]]: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})})}},w=e=>{const o=(0,l.useRef)(null);return(0,_.jsx)(n.Modal,{...x(Object.assign({},e,{childrenRef:o}))})};w.defaultProps={size:"default"};const v=()=>{const{modal:e}=n.App.useApp(),o=(0,l.useRef)(null);return t=>{const l={},{children:n,...s}=x({onClose:()=>l.close(),childrenRef:o,...t}),{destroy:i}=e.info({...s,content:n});return l.close=i,l}},N=()=>{const{modal:e}=n.App.useApp();return o=>{const t={},{type:l,icon:s,title:a,danger:c,wrapClassName:m,message:h,iconSetting: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}},T=w,k=e=>{let{items:o,className:t,activeKey:l,withDecorator:s,defaultActiveKey:r,onChange:a,...c}=e;return{...c,className:i()(t,"tabs-modal"),withDecorator:e=>{const t=t=>(0,_.jsx)(n.Tabs,{items:o.map((o=>{let{withDecorator:l,...n}=o;return Object.assign({},n,{children:"function"===typeof l?l((o=>e(Object.assign({},t,o,{children:n.children})))):e(Object.assign({},t,{children:n.children}))})})),destroyInactiveTabPane:!0,activeKey:l,defaultActiveKey:r,onChange:a});return"function"===typeof s?s(t):t()},children:e=>{let{children:o,...t}=e;return"function"===typeof o?o(t):o}}},P=e=>(0,_.jsx)(T,{...k(e)}),E=()=>{const e=v();return o=>e(k(o))};var H=t(73025);const S=e=>{const o=E();return e.api?(0,_.jsx)(H.A,{...e,modalFunc:o}):(0,_.jsx)(n.Button,{...e,onClick:()=>{o(e.modalProps)}})},M=e=>{const o=v();if(!e.api){const{modalProps:t,...l}=e;return(0,_.jsx)(n.Button,{...l,onClick:()=>{o(t)}})}return(0,_.jsx)(H.A,{...e,modalFunc:o})}},17342:(e,o,t)=>{t.d(o,{A:()=>s});var l=t(8762),n=t.n(l);t(46733);const s=n()},46733:()=>{}}]);
2
+ //# sourceMappingURL=1045.9fd7ed17.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/1045.3da9ce3a.chunk.js","mappings":"mVACA,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,EANwBA,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,G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KP,EAAoBrC,KAK3B+E,EAAeA,KAC1B,MAAM/B,EAAQD,IACd,OAAQ/C,GAAUgD,EAAMX,EAAoBrC,GAAO,E,eCtDrD,MAgBagF,EAAmBhF,IAC9B,MAAMiF,EAAYF,IAClB,OAAK/E,EAAMmD,KAUJ1F,EAAAA,EAAAA,KAACyH,EAAAA,EAAW,IAAKlF,EAAOmF,UAAWF,KARtCxH,EAAAA,EAAAA,KAAC2D,EAAAA,OAAM,IACDpB,EACJT,QAASA,KACP0F,EAAUjF,EAAMoF,WAAW,GAKoB,EAEzD,EA9BqBpF,IACnB,MAAMgD,EAAQD,IACd,IAAK/C,EAAMmD,IAAK,CACd,MAAM,WAAEiC,KAAeC,GAAWrF,EAClC,OACEvC,EAAAA,EAAAA,KAAC2D,EAAAA,OAAM,IACDiE,EACJ9F,QAASA,KACPyD,EAAMoC,EAAW,GAIzB,CACA,OAAO3H,EAAAA,EAAAA,KAACyH,EAAAA,EAAW,IAAKlF,EAAOmF,UAAWnC,GAAS,C,mECfrD,QAAevB,G","sources":["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","common/components/SimpleBar.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"style_modal__Pm3cF__BzOA3\",\"large\":\"style_large__iaqVE__BzOA3\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__BzOA3\",\"modal-title\":\"style_modal-title__dswaw__BzOA3\",\"modal-outer\":\"style_modal-outer__r3SkX__BzOA3\",\"modal-body\":\"style_modal-body__jQJSI__BzOA3\",\"right-options-modal\":\"style_right-options-modal__FajDP__BzOA3\",\"right-options-row\":\"style_right-options-row__-mPb9__BzOA3\",\"right-options-col\":\"style_right-options-col__3ilee__BzOA3\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__BzOA3\",\"content\":\"style_content__k6MIF__BzOA3\",\"modal-footer\":\"style_modal-footer__-prbN__BzOA3\",\"modal-close\":\"style_modal-close__Oa5Kl__BzOA3\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__BzOA3\",\"is-danger\":\"style_is-danger__H5110__BzOA3\",\"title\":\"style_title__orTym__BzOA3\",\"has-title\":\"style_has-title__qy0Wp__BzOA3\"};","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","import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n"],"names":["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","SimpleBar","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/1045.9fd7ed17.chunk.js","mappings":"mVACA,SAAgB,MAA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A,EAAW,IAAKlF,EAAOmF,UAAWnC,GAAS,C,mECfrD,QAAevB,G","sources":["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","common/components/SimpleBar.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"style_modal__Pm3cF__T-HtE\",\"large\":\"style_large__iaqVE__T-HtE\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__T-HtE\",\"modal-title\":\"style_modal-title__dswaw__T-HtE\",\"modal-outer\":\"style_modal-outer__r3SkX__T-HtE\",\"modal-body\":\"style_modal-body__jQJSI__T-HtE\",\"right-options-modal\":\"style_right-options-modal__FajDP__T-HtE\",\"right-options-row\":\"style_right-options-row__-mPb9__T-HtE\",\"right-options-col\":\"style_right-options-col__3ilee__T-HtE\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__T-HtE\",\"content\":\"style_content__k6MIF__T-HtE\",\"modal-footer\":\"style_modal-footer__-prbN__T-HtE\",\"modal-close\":\"style_modal-close__Oa5Kl__T-HtE\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__T-HtE\",\"is-danger\":\"style_is-danger__H5110__T-HtE\",\"title\":\"style_title__orTym__T-HtE\",\"has-title\":\"style_has-title__qy0Wp__T-HtE\"};","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","import SimpleBar from \"simplebar-react\";\nimport \"simplebar-react/dist/simplebar.min.css\";\n\nexport default SimpleBar;\n"],"names":["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","SimpleBar","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 1153.1d9c7e60.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1153],{41153:(e,t,r)=>{r.r(t),r.d(t,{HighlightProvider:()=>a,default:()=>_});var n=r(73884);const o="style_high-color__-DN7m__BzOA3";var s=r(70579);const l=(0,n.createContext)({}),{Provider:i}=l,a=e=>{let{list:t,children:r,highlightClassName:n}=e;return(0,s.jsx)(i,{value:{list:t,highlightClassName:n},children:(0,s.jsx)("span",{"data-testid":"components-core-highlight",children:r})})};a.defaultProps={caseSensitive:!1,list:[],highlightClassName:""};const c=e=>{let{tagName:t,children:r}=e;const{list:s,caseSensitive:i,highlightClassName:a}=(0,n.useContext)(l),c=(0,n.useMemo)((()=>{if(!r)return;let e=null===r||void 0===r?void 0:r.toString();if(!s||0===s.length)return e;const t=s.map((function(e){return"("+(e.replace(/[`+~!@#_$%^*()=|{}':;,\\[\].<>/?\uff01\uffe5\u2026&\uff08\uff09\u2014\u3010\u3011\u2018\uff1b\uff1a\u201d\u201c\u3002\uff0c\u3001\uff1f\s]/g,(e=>"\\"+e))+")")})).join("|"),n=new RegExp(t,i?"gm":"gim");return e.replace(n,(e=>`<font class="${o} ${a}">${e}</font>`))}),[s,i,r,a]);return(0,n.createElement)(t,{dangerouslySetInnerHTML:{__html:c}})};c.defaultProps={tagName:"span",children:""};const _=c},51153:(e,t,r)=>{var n=r(73884),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,i=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,r){var n,s={},c=null,_=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(_=t.ref),t)l.call(t,n)&&!a.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:_,props:s,_owner:i.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},70579:(e,t,r)=>{e.exports=r(51153)}}]);
3
- //# sourceMappingURL=1153.1d9c7e60.chunk.js.map
1
+ /*! For license information please see 1153.0c476a16.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[1153],{41153:(e,t,r)=>{r.r(t),r.d(t,{HighlightProvider:()=>a,default:()=>_});var n=r(73884);const o="style_high-color__-DN7m__T-HtE";var s=r(70579);const l=(0,n.createContext)({}),{Provider:i}=l,a=e=>{let{list:t,children:r,highlightClassName:n}=e;return(0,s.jsx)(i,{value:{list:t,highlightClassName:n},children:(0,s.jsx)("span",{"data-testid":"components-core-highlight",children:r})})};a.defaultProps={caseSensitive:!1,list:[],highlightClassName:""};const c=e=>{let{tagName:t,children:r}=e;const{list:s,caseSensitive:i,highlightClassName:a}=(0,n.useContext)(l),c=(0,n.useMemo)((()=>{if(!r)return;let e=null===r||void 0===r?void 0:r.toString();if(!s||0===s.length)return e;const t=s.map((function(e){return"("+(e.replace(/[`+~!@#_$%^*()=|{}':;,\\[\].<>/?\uff01\uffe5\u2026&\uff08\uff09\u2014\u3010\u3011\u2018\uff1b\uff1a\u201d\u201c\u3002\uff0c\u3001\uff1f\s]/g,(e=>"\\"+e))+")")})).join("|"),n=new RegExp(t,i?"gm":"gim");return e.replace(n,(e=>`<font class="${o} ${a}">${e}</font>`))}),[s,i,r,a]);return(0,n.createElement)(t,{dangerouslySetInnerHTML:{__html:c}})};c.defaultProps={tagName:"span",children:""};const _=c},51153:(e,t,r)=>{var n=r(73884),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,i=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,r){var n,s={},c=null,_=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(_=t.ref),t)l.call(t,n)&&!a.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:_,props:s,_owner:i.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},70579:(e,t,r)=>{e.exports=r(51153)}}]);
3
+ //# sourceMappingURL=1153.0c476a16.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/js/1153.1d9c7e60.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,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AMU,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__BzOA3\"};","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.0c476a16.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,QADT,+IAC2BC,GAAU,KAAOA,IAyBI,IAC9C,IACCC,KAAK,KAEFC,EAAS,IAAIC,OAAOP,EAAYV,EAAgB,KAAO,OAE7D,OAAOO,EAAOM,QAAQG,GAASE,GACtB,gBAAgBC,KAAuBvB,MAAuBsB,YACrE,GACD,CAACxB,EAAMM,EAAeL,EAAUC,IAEnC,OAAOwB,EAAAA,EAAAA,eAAcjB,EAAS,CAC5BkB,wBAAyB,CAAEC,OAAQjB,IACnC,EAEJJ,EAAUF,aAAe,CACvBI,QAAS,OACTR,SAAU,IAMZ,2BChDa,IAAI4B,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,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__T-HtE\"};","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":""}