@kne-components/components-core 0.4.46 → 0.4.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +100 -96
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/1742.4c30e2d6.chunk.css +2 -0
- package/build/static/css/{1742.72826de6.chunk.css.map → 1742.4c30e2d6.chunk.css.map} +1 -1
- package/build/static/css/{1996.052f96b0.chunk.css → 1996.310f86af.chunk.css} +2 -2
- package/build/static/css/{1996.052f96b0.chunk.css.map → 1996.310f86af.chunk.css.map} +1 -1
- package/build/static/css/2004.a6b0eba7.chunk.css +2 -0
- package/build/static/css/{2004.59eeddc7.chunk.css.map → 2004.a6b0eba7.chunk.css.map} +1 -1
- package/build/static/css/2307.9184b2df.chunk.css +2 -0
- package/build/static/css/{2307.4b3df026.chunk.css.map → 2307.9184b2df.chunk.css.map} +1 -1
- package/build/static/css/254.cb221451.chunk.css +2 -0
- package/build/static/css/{254.ee7957b1.chunk.css.map → 254.cb221451.chunk.css.map} +1 -1
- package/build/static/css/3404.c1313374.chunk.css +2 -0
- package/build/static/css/{3404.f9aed7da.chunk.css.map → 3404.c1313374.chunk.css.map} +1 -1
- package/build/static/css/3625.fd2a7f91.chunk.css +2 -0
- package/build/static/css/3625.fd2a7f91.chunk.css.map +1 -0
- package/build/static/css/{3771.0b0ceea9.chunk.css → 3771.c1f85855.chunk.css} +2 -2
- package/build/static/css/{3771.0b0ceea9.chunk.css.map → 3771.c1f85855.chunk.css.map} +1 -1
- package/build/static/css/{3790.0a878038.chunk.css → 3790.35bf8e8d.chunk.css} +2 -2
- package/build/static/css/{3790.0a878038.chunk.css.map → 3790.35bf8e8d.chunk.css.map} +1 -1
- package/build/static/css/5195.ff488c6d.chunk.css +2 -0
- package/build/static/css/5195.ff488c6d.chunk.css.map +1 -0
- package/build/static/css/5674.6e43f500.chunk.css +2 -0
- package/build/static/css/5674.6e43f500.chunk.css.map +1 -0
- package/build/static/css/{6763.0df869ff.chunk.css → 6763.641c7f0c.chunk.css} +2 -2
- package/build/static/css/{6763.0df869ff.chunk.css.map → 6763.641c7f0c.chunk.css.map} +1 -1
- package/build/static/css/7227.8f746b0e.chunk.css +2 -0
- package/build/static/css/{7227.d9d1299c.chunk.css.map → 7227.8f746b0e.chunk.css.map} +1 -1
- package/build/static/css/{7589.f3c8f89b.chunk.css → 7589.8cff24aa.chunk.css} +2 -2
- package/build/static/css/7589.8cff24aa.chunk.css.map +1 -0
- package/build/static/css/{760.f8be7f84.chunk.css → 760.e5e86367.chunk.css} +2 -2
- package/build/static/css/{760.f8be7f84.chunk.css.map → 760.e5e86367.chunk.css.map} +1 -1
- package/build/static/css/7857.b4796d19.chunk.css +2 -0
- package/build/static/css/7857.b4796d19.chunk.css.map +1 -0
- package/build/static/css/833.428eb735.chunk.css +2 -0
- package/build/static/css/833.428eb735.chunk.css.map +1 -0
- package/build/static/css/{8593.7ef21cba.chunk.css → 8593.27a2f164.chunk.css} +2 -2
- package/build/static/css/{8593.7ef21cba.chunk.css.map → 8593.27a2f164.chunk.css.map} +1 -1
- package/build/static/css/9556.a2ecdc2c.chunk.css +2 -0
- package/build/static/css/{9556.3c875a41.chunk.css.map → 9556.a2ecdc2c.chunk.css.map} +1 -1
- package/build/static/js/{1742.59b24864.chunk.js → 1742.f9369a31.chunk.js} +2 -2
- package/build/static/js/{1742.59b24864.chunk.js.map → 1742.f9369a31.chunk.js.map} +1 -1
- package/build/static/js/1996.067380ac.chunk.js +2 -0
- package/build/static/js/{1996.14344c2d.chunk.js.map → 1996.067380ac.chunk.js.map} +1 -1
- package/build/static/js/{2004.d8122da2.chunk.js → 2004.211a995d.chunk.js} +3 -3
- package/build/static/js/{2004.d8122da2.chunk.js.map → 2004.211a995d.chunk.js.map} +1 -1
- package/build/static/js/2086.f37d05d4.chunk.js +3 -0
- package/build/static/js/2086.f37d05d4.chunk.js.map +1 -0
- package/build/static/js/{2242.a55a6844.chunk.js → 2242.a721c4d1.chunk.js} +2 -2
- package/build/static/js/{2242.a55a6844.chunk.js.map → 2242.a721c4d1.chunk.js.map} +1 -1
- package/build/static/js/254.322dcaa2.chunk.js +2 -0
- package/build/static/js/254.322dcaa2.chunk.js.map +1 -0
- package/build/static/js/3333.75c55b7b.chunk.js +2 -0
- package/build/static/js/3333.75c55b7b.chunk.js.map +1 -0
- package/build/static/js/{3404.1557958c.chunk.js → 3404.eaff0649.chunk.js} +3 -3
- package/build/static/js/{3404.1557958c.chunk.js.map → 3404.eaff0649.chunk.js.map} +1 -1
- package/build/static/js/{3625.23761746.chunk.js → 3625.8871d9e4.chunk.js} +2 -2
- package/build/static/js/{3625.23761746.chunk.js.map → 3625.8871d9e4.chunk.js.map} +1 -1
- package/build/static/js/3735.07f11349.chunk.js +2 -0
- package/build/static/js/3735.07f11349.chunk.js.map +1 -0
- package/build/static/js/{3771.997ccc57.chunk.js → 3771.beb7c69b.chunk.js} +2 -2
- package/build/static/js/{3771.997ccc57.chunk.js.map → 3771.beb7c69b.chunk.js.map} +1 -1
- package/build/static/js/{3790.805593bc.chunk.js → 3790.210f5aa3.chunk.js} +2 -2
- package/build/static/js/{3790.805593bc.chunk.js.map → 3790.210f5aa3.chunk.js.map} +1 -1
- package/build/static/js/3856.3009f90f.chunk.js +2 -0
- package/build/static/js/{3856.bfc95e79.chunk.js.map → 3856.3009f90f.chunk.js.map} +1 -1
- package/build/static/js/4474.42e860d2.chunk.js +2 -0
- package/build/static/js/4474.42e860d2.chunk.js.map +1 -0
- package/build/static/js/5195.c373efc4.chunk.js +2 -0
- package/build/static/js/5195.c373efc4.chunk.js.map +1 -0
- package/build/static/js/5645.6008c631.chunk.js +2 -0
- package/build/static/js/5645.6008c631.chunk.js.map +1 -0
- package/build/static/js/{5674.86bb2ec6.chunk.js → 5674.015aa0a5.chunk.js} +2 -2
- package/build/static/js/{5674.86bb2ec6.chunk.js.map → 5674.015aa0a5.chunk.js.map} +1 -1
- package/build/static/js/{5958.89468fa5.chunk.js → 5958.0f13dc94.chunk.js} +2 -2
- package/build/static/js/5958.0f13dc94.chunk.js.map +1 -0
- package/build/static/js/6116.728912fd.chunk.js +2 -0
- package/build/static/js/6116.728912fd.chunk.js.map +1 -0
- package/build/static/js/6707.2658a2e3.chunk.js +2 -0
- package/build/static/js/6707.2658a2e3.chunk.js.map +1 -0
- package/build/static/js/{6763.f0ced4ef.chunk.js → 6763.5b29790a.chunk.js} +2 -2
- package/build/static/js/{6763.f0ced4ef.chunk.js.map → 6763.5b29790a.chunk.js.map} +1 -1
- package/build/static/js/{7227.7bdd14a5.chunk.js → 7227.60b8b40c.chunk.js} +3 -3
- package/build/static/js/{7227.7bdd14a5.chunk.js.map → 7227.60b8b40c.chunk.js.map} +1 -1
- package/build/static/js/{7589.19464c85.chunk.js → 7589.5dae8029.chunk.js} +2 -2
- package/build/static/js/{7589.19464c85.chunk.js.map → 7589.5dae8029.chunk.js.map} +1 -1
- package/build/static/js/{760.93414278.chunk.js → 760.47757625.chunk.js} +2 -2
- package/build/static/js/{760.93414278.chunk.js.map → 760.47757625.chunk.js.map} +1 -1
- package/build/static/js/{7857.b3aee7e8.chunk.js → 7857.1092602e.chunk.js} +2 -2
- package/build/static/js/{7857.b3aee7e8.chunk.js.map → 7857.1092602e.chunk.js.map} +1 -1
- package/build/static/js/833.407c64f9.chunk.js +2 -0
- package/build/static/js/833.407c64f9.chunk.js.map +1 -0
- package/build/static/js/8593.0d871f1d.chunk.js +2 -0
- package/build/static/js/{8593.d3cad462.chunk.js.map → 8593.0d871f1d.chunk.js.map} +1 -1
- package/build/static/js/8795.65be995b.chunk.js +2 -0
- package/build/static/js/8795.65be995b.chunk.js.map +1 -0
- package/build/static/js/{9556.1ce5861f.chunk.js → 9556.ab9889b5.chunk.js} +3 -3
- package/build/static/js/{9556.1ce5861f.chunk.js.map → 9556.ab9889b5.chunk.js.map} +1 -1
- package/build/static/js/main.8e430531.js +2 -0
- package/build/static/js/main.8e430531.js.map +1 -0
- package/package.json +2 -2
- package/build/static/css/1742.72826de6.chunk.css +0 -2
- package/build/static/css/2004.59eeddc7.chunk.css +0 -2
- package/build/static/css/2307.4b3df026.chunk.css +0 -2
- package/build/static/css/254.ee7957b1.chunk.css +0 -2
- package/build/static/css/3404.f9aed7da.chunk.css +0 -2
- package/build/static/css/3625.de3c6911.chunk.css +0 -2
- package/build/static/css/3625.de3c6911.chunk.css.map +0 -1
- package/build/static/css/5195.841f8004.chunk.css +0 -2
- package/build/static/css/5195.841f8004.chunk.css.map +0 -1
- package/build/static/css/5674.c88fd2db.chunk.css +0 -2
- package/build/static/css/5674.c88fd2db.chunk.css.map +0 -1
- package/build/static/css/7227.d9d1299c.chunk.css +0 -2
- package/build/static/css/7589.f3c8f89b.chunk.css.map +0 -1
- package/build/static/css/7857.484072c1.chunk.css +0 -2
- package/build/static/css/7857.484072c1.chunk.css.map +0 -1
- package/build/static/css/833.e28708c8.chunk.css +0 -2
- package/build/static/css/833.e28708c8.chunk.css.map +0 -1
- package/build/static/css/9556.3c875a41.chunk.css +0 -2
- package/build/static/js/1996.14344c2d.chunk.js +0 -2
- package/build/static/js/2086.c3a0124d.chunk.js +0 -3
- package/build/static/js/2086.c3a0124d.chunk.js.map +0 -1
- package/build/static/js/254.e7805354.chunk.js +0 -2
- package/build/static/js/254.e7805354.chunk.js.map +0 -1
- package/build/static/js/3333.f302508e.chunk.js +0 -2
- package/build/static/js/3333.f302508e.chunk.js.map +0 -1
- package/build/static/js/3735.c83d4165.chunk.js +0 -2
- package/build/static/js/3735.c83d4165.chunk.js.map +0 -1
- package/build/static/js/3856.bfc95e79.chunk.js +0 -2
- package/build/static/js/4474.bf030f69.chunk.js +0 -2
- package/build/static/js/4474.bf030f69.chunk.js.map +0 -1
- package/build/static/js/5195.605db17c.chunk.js +0 -2
- package/build/static/js/5195.605db17c.chunk.js.map +0 -1
- package/build/static/js/5958.89468fa5.chunk.js.map +0 -1
- package/build/static/js/6116.11c0dc77.chunk.js +0 -2
- package/build/static/js/6116.11c0dc77.chunk.js.map +0 -1
- package/build/static/js/833.61f11966.chunk.js +0 -2
- package/build/static/js/833.61f11966.chunk.js.map +0 -1
- package/build/static/js/8593.d3cad462.chunk.js +0 -2
- package/build/static/js/8795.202999af.chunk.js +0 -2
- package/build/static/js/8795.202999af.chunk.js.map +0 -1
- package/build/static/js/main.26785b52.js +0 -2
- package/build/static/js/main.26785b52.js.map +0 -1
- /package/build/static/js/{2004.d8122da2.chunk.js.LICENSE.txt → 2004.211a995d.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2086.c3a0124d.chunk.js.LICENSE.txt → 2086.f37d05d4.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{3404.1557958c.chunk.js.LICENSE.txt → 3404.eaff0649.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7227.7bdd14a5.chunk.js.LICENSE.txt → 7227.60b8b40c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9556.1ce5861f.chunk.js.LICENSE.txt → 9556.ab9889b5.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/3735.07f11349.chunk.js","mappings":"ytBAAO,MAAMA,EAAU,CAAC,EAElBC,EAASA,CAACC,EAAQC,EAAeC,KAChCJ,EAAQE,KACXF,EAAQE,GAAU,CAAC,GAErBF,EAAQE,GAAQE,GAAa,UAAYC,OAAOC,OAAO,CAAC,EAAGN,EAAQE,GAAQE,GAAa,UAAWD,GAC5FH,GAGIO,EAAiBA,CAACC,EAAUJ,KACvCC,OAAOI,KAAKD,GAAUE,QAAQR,IACvBF,EAAQE,KACXF,EAAQE,GAAU,CAAC,GAErBF,EAAQE,GAAQE,GAAa,UAAYC,OAAOC,OAAO,CAAC,EAAGN,EAAQE,GAAQE,GAAa,UAAWI,EAASN,O,aCC1GS,EAAY,WAAa,QAAAC,EAAAC,UAAAC,OAATC,EAAI,IAAAC,MAAA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AAA,cAACC,EAAAA,aAAY,CAACvB,SAAyB,OAAjB6B,EAAErC,EAAQE,SAAO,EAAfmC,EAAkBjC,GAAa,UAAWF,OAAQA,GACxE4B,IAAAA,cAACG,EAAiBQ,EAAA,GAAKH,EAAK,CAAEF,IAAKA,OAI7C,EAIaM,EAAaC,IAA4D,IAAzDzC,OAAA0C,EAAS,QAAS5C,QAAS6C,EAAY,UAAEzC,GAAWuC,EAAK,IAAAG,EAEpF,OADAD,GAAgB5C,EAAa2C,EAAQC,EAAczC,IAC5C2C,EAAAA,EAAAA,YAAe,CAAE7C,OAAA0C,EAAQpC,SAAyB,OAAjBsC,EAAE9C,EAAQ4C,SAAO,EAAfE,EAAkB1C,GAAa,Y","sources":["../node_modules/@kne/react-intl/src/loader.js","../node_modules/@kne/react-intl/src/index.js"],"sourcesContent":["export const message = {};\n\nconst loader = (locale, localeMessage, namespace) => {\n if (!message[locale]) {\n message[locale] = {};\n }\n message[locale][namespace || 'global'] = Object.assign({}, message[locale][namespace || 'global'], localeMessage);\n return message;\n};\n\nexport const messagesLoader = (messages, namespace) => {\n Object.keys(messages).forEach(locale => {\n if (!message[locale]) {\n message[locale] = {};\n }\n message[locale][namespace || 'global'] = Object.assign({}, message[locale][namespace || 'global'], messages[locale]);\n });\n};\n\nexport default loader;\n","import React, { forwardRef } from 'react';\nimport localeLoader, { message, messagesLoader } from './loader';\nimport { IntlProvider, createIntl as createIntlBase, useIntl } from 'react-intl';\nimport { useGlobalValue } from '@kne/global-context';\n\nconst withIntlProvider = WrappedComponents =>\n forwardRef(({ locale: propsLocale, namespace, ...props }, ref) => {\n const contextLocal = useGlobalValue('locale');\n const locale = propsLocale || contextLocal || 'zh-CN';\n return (\n <IntlProvider messages={message[locale]?.[namespace || 'global']} locale={locale}>\n <WrappedComponents {...props} ref={ref} />\n </IntlProvider>\n );\n });\n\nconst argsParse = (...args) => {\n if (typeof args[0] === 'object' && typeof args[0].defaultLocale === 'string') {\n return Object.assign({}, args[0]);\n }\n\n return { defaultLocale: args[0], defaultMessage: args[1], namespace: args[2] };\n};\n\nexport const createIntlProvider = (...args) => {\n const { defaultLocale, defaultMessage, namespace, messages } = argsParse(...args);\n defaultMessage && localeLoader(defaultLocale, defaultMessage, namespace);\n messages && messagesLoader(messages, namespace);\n const InnerComponent = ({ children }) => {\n const intl = useIntl();\n return children(intl);\n };\n return ({ locale: propsLocale, children }) => {\n const contextLocal = useGlobalValue('locale');\n const locale = propsLocale || contextLocal || defaultLocale || 'zh-CN';\n return (\n <IntlProvider messages={message[locale]?.[namespace || 'global']} locale={locale}>\n {typeof children === 'function' ? <InnerComponent>{children}</InnerComponent> : children}\n </IntlProvider>\n );\n };\n};\n\nexport const createWithIntlProvider = (...args) => {\n const { defaultLocale, defaultMessage, namespace, messages } = argsParse(...args);\n defaultMessage && localeLoader(defaultLocale, defaultMessage, namespace);\n messages && messagesLoader(messages, namespace);\n return WrappedComponents =>\n forwardRef(({ locale: propsLocale, ...props }, ref) => {\n const contextLocal = useGlobalValue('locale');\n const locale = propsLocale || contextLocal || defaultLocale || 'zh-CN';\n return (\n <IntlProvider messages={message[locale]?.[namespace || 'global']} locale={locale}>\n <WrappedComponents {...props} ref={ref} />\n </IntlProvider>\n );\n });\n};\n\nexport * from 'react-intl';\n\nexport const createIntl = ({ locale = 'zh-CN', message: propsMessage, namespace }) => {\n propsMessage && localeLoader(locale, propsMessage, namespace);\n return createIntlBase({ locale, messages: message[locale]?.[namespace || 'global'] });\n};\n\nexport { localeLoader, IntlProvider };\n\nexport default createIntl;\n"],"names":["message","loader","locale","localeMessage","namespace","Object","assign","messagesLoader","messages","keys","forEach","argsParse","_len","arguments","length","args","Array","_key","defaultLocale","defaultMessage","createIntlProvider","InnerComponent","_ref","children","useIntl","_ref3","propsLocale","_message$locale2","contextLocal","useGlobalValue","React","IntlProvider","createWithIntlProvider","WrappedComponents","forwardRef","_ref2","ref","_message$locale3","props","_objectWithoutPropertiesLoose","_excluded2","_extends","createIntl","_ref4","_locale","propsMessage","_message$_locale","createIntl$1"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2908,3771],{3382(e,o,t){t.r(o),t.d(o,{ModalButton:()=>
|
|
2
|
-
//# sourceMappingURL=3771.
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2908,3771],{3382(e,o,t){t.r(o),t.d(o,{ModalButton:()=>K,TabsModal:()=>O,TabsModalButton:()=>I,default:()=>J,useConfirmModal:()=>P,useModal:()=>S,useTabsModal:()=>D});var n=t(89379),l=t(53986),s=t(73884),i=t(55199),r=t(83136),a=t.n(r);const c={modal:"style_modal__Pm3cF__TkoJL",large:"style_large__iaqVE__TkoJL","modal-body-inner":"style_modal-body-inner__4PhpA__TkoJL","modal-title":"style_modal-title__dswaw__TkoJL","modal-outer":"style_modal-outer__r3SkX__TkoJL","modal-body":"style_modal-body__jQJSI__TkoJL","right-options-modal":"style_right-options-modal__FajDP__TkoJL","right-options-row":"style_right-options-row__-mPb9__TkoJL","right-options-col":"style_right-options-col__3ilee__TkoJL","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__TkoJL",content:"style_content__k6MIF__TkoJL","modal-footer":"style_modal-footer__-prbN__TkoJL","modal-close":"style_modal-close__Oa5Kl__TkoJL","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__TkoJL","is-danger":"style_is-danger__H5110__TkoJL",title:"style_title__orTym__TkoJL","has-title":"style_has-title__qy0Wp__TkoJL"},d=e=>({"en-US":()=>t.e(4628).then(t.bind(t,74628)),"zh-CN":()=>t.e(7478).then(t.bind(t,87478))}[e]());var m=t(47458),h=t(64671);const p=(e,o)=>"function"===typeof e?e(o):e;var f=t(81014),u=t(17342),_=t(70579);const g=["ButtonComponent","onClick","autoClose","display"],y=["children","rightOptions","rightSpan","footer","footerButtons","className","size","title","onClose","onConfirm","confirmText","onCancel","cancelText","closable","disabledScroller","withDecorator","childrenRef"],C=["size"],x=["children"],A=["type","icon","title","danger","wrapClassName","message","iconSetting","confirmType"],b="Modal",j=e=>{let{options:o,rightSpan:t=6,children:n}=e;return o?(0,_.jsxs)(i.Row,{wrap:!1,className:c["right-options-row"],children:[(0,_.jsx)(i.Col,{span:24-t,className:c["right-options-col"],children:n}),(0,_.jsx)(i.Col,{span:t,className:c["right-options-col"],children:o})]}):n},k=(e,o)=>"".concat(e-48-(o?58:0),"px"),T=e=>{let{footer:o,footerButtons:t,onConfirm:r,onCancel:a,cancelText:c,onClose:h,targetProps:p}=e;return(0,_.jsxs)(i.Row,{gutter:10,wrap:!1,children:[(0,_.jsx)(i.Col,{flex:1,children:o}),Array.isArray(t)&&0===t.length?null:(0,_.jsx)(i.Col,{children:(0,_.jsx)(i.Space,{children:(t||[{children:c||(0,_.jsx)(m.IntlProvider,{importMessages:d,moduleName:b,children:(0,_.jsx)(m.FormattedMessage,{id:"Cancel",moduleName:b})}),onClick:a},{type:"primary",children:(0,_.jsx)(m.IntlProvider,{importMessages:d,moduleName:b,children:(0,_.jsx)(m.FormattedMessage,{id:"Confirm",moduleName:b})}),onClick:r}]).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:i,autoClose:r=!0,display:a}=e,c=(0,l.A)(e,g);const d=t||f.default;return(0,s.createElement)(d,(0,n.A)((0,n.A)({},c),{},{key:o,onClick:async function(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];const n=await Promise.resolve(i&&i(...o,p));return r&&!1!==n&&h&&h(),n}}))})})})]})},w=e=>{let{title:o,footer:t,disabledScroller:n,footerButtons:l,onClose:r,closable:d,onConfirm:m,onCancel:p,children:f,targetProps:g,cancelText:y,confirmText:C}=e;const x=(0,s.useRef)(null);return(0,_.jsxs)("div",{className:a()(c["modal-outer"],"modal-container"),"data-testid":"components-core-modal",children:[!1===d?null:(0,_.jsx)(i.Button,{"data-testid":"components-core-modal-close-btn",className:a()(c["modal-close"],"modal-close"),type:"text",icon:(0,_.jsx)(h.default,{type:"icon-close-thin"}),onClick:e=>{e.stopPropagation(),r&&r()}}),o&&(0,_.jsx)("div",{className:c["modal-title"],children:o}),(0,_.jsx)(u.A,{className:a()(c["modal-body"],{[c["is-disabled-scroller"]]:n},"modal-body"),ref:x,children:(0,_.jsx)("div",{className:a()(c["modal-body-inner"],"modal-body-inner"),children:f})}),null!==t||l?(0,_.jsx)("div",{className:a()(c["modal-footer"],"modal-footer"),children:(0,_.jsx)(T,{footer:t,footerButtons:l,onConfirm:m,confirmText:C,onCancel:p,cancelText:y,onClose:r,targetProps:g})}):null]})},N=e=>{let{withDecorator:o,footerButtons:t,title:l,closable:s,onClose:i,onConfirm:r,confirmText:a,onCancel:c,cancelText:d,footer:m,rightOptions:h,rightSpan:f,disabledScroller:u,childrenRef:g,children:y}=e;const C=e=>(e=Object.assign({},{title:l},e),(0,_.jsx)(w,{title:p(e.title,(0,n.A)((0,n.A)({},e),{},{childrenRef:g,close:i})),closable:s,onClose:i,onConfirm:r,confirmText:a,onCancel:c,cancelText:d,footerButtons:p(t,(0,n.A)((0,n.A)({},e),{},{close:i})),disabledScroller:u,footer:p(m,(0,n.A)((0,n.A)({},e),{},{childrenRef:g,close:i})),targetProps:Object.assign({},e,{childrenRef:g,close:i}),children:(0,_.jsx)(j,{rightSpan:f,options:p(h,(0,n.A)((0,n.A)({},e),{},{childrenRef:g,close:i})),children:p(y,(0,n.A)((0,n.A)({},e),{},{childrenRef:g,close:i}))})}));return"function"===typeof o?o(C,{childrenRef:g,close:i}):C({})},v=e=>{let{children:o,rightOptions:t,rightSpan:s,footer:i,footerButtons:r,className:h,size:p,title:f,onClose:u,onConfirm:g,confirmText:C,onCancel:x,cancelText:A,closable:b,disabledScroller:j,withDecorator:T,childrenRef:w}=e,v=(0,l.A)(e,y);return(0,n.A)((0,n.A)((0,n.A)({},v),{},{icon:null,centered:!0,title:null,maskClosable:!!v.hasOwnProperty("maskClosable")&&v.maskClosable,destroyOnHidden:!0,footer:null,closable:!1,onCancel:u,className:a()(h,c.modal,c[p],{[c["right-options-modal"]]:t})},((e,o)=>"large"===e?{width:"".concat(Math.min(window.innerWidth-64,1500),"px"),style:{"--min-modal-height":k(500,o)}}:"small"===e?{width:"600px",style:{"--min-modal-height":k(300,o)}}:{width:"1000px",style:{"--min-modal-height":k(500,o)}})(p,!(null===i&&!r))),{},{children:(0,_.jsx)(m.IntlProvider,{importMessages:d,moduleName:"Modal",children:N({withDecorator:T,title:f,closable:b,onClose:u,onConfirm:g,confirmText:C,onCancel:x,cancelText:A,footer:i,footerButtons:r,rightOptions:t,rightSpan:s,disabledScroller:j,children:o,childrenRef:w})})})},S=()=>{const{modal:e}=i.App.useApp(),o=(0,s.useRef)(null);return t=>{const s={},i=v((0,n.A)({onClose:()=>s.close(),childrenRef:o},t)),{children:r}=i,a=(0,l.A)(i,x),{destroy:c}=e.info((0,n.A)((0,n.A)({},a),{},{content:r}));return s.close=c,s}},P=()=>{const{modal:e}=i.App.useApp();return o=>{const t={},s=(0,n.A)({onClose:()=>t.close(),maskClosable:!1},o),{type:r,icon:d,title:m,danger:p,wrapClassName:f,message:u,iconSetting:g={},confirmType:y="info"}=s,C=(0,l.A)(s,A),x=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},g);if(e[r]){const{destroy:o}=e[r]((0,n.A)((0,n.A)({},C),{},{icon:null,wrapClassName:a()(c["confirm-modal-wrap"],f,{[c["is-danger"]]:p}),title:(0,_.jsx)(i.Space,{orientation:"vertical",onClick:e=>{e.stopPropagation()},children:m&&(0,_.jsxs)(i.Space,{size:0,align:"start",className:c.title,children:[p?(0,_.jsx)(h.default,{className:a()("title-icon","title-icon-".concat("confirm"===r?y:r)),type:d||x["confirm"===r?y:r]}):null,m]})}),content:(0,_.jsxs)(i.Space,{size:0,align:"start",className:a()(c.content,{[c["has-title"]]:m}),children:[!m&&p?(0,_.jsx)(h.default,{className:a()("title-icon","title-icon-".concat("confirm"===r?y:r)),type:d||x["confirm"===r?y:r]}):null,u]})}));t.close=o}return t}},J=e=>{let{size:o="default"}=e,t=(0,l.A)(e,C);const r=(0,s.useRef)(null);return(0,_.jsx)(i.Modal,(0,n.A)({},v(Object.assign({},t,{size:o,childrenRef:r}))))},L=["items","className","activeKey","withDecorator","defaultActiveKey","onChange"],R=["withDecorator"],M=["children"],B=e=>{let{items:o,className:t,activeKey:s,withDecorator:r,defaultActiveKey:c,onChange:d}=e,m=(0,l.A)(e,L);return(0,n.A)((0,n.A)({},m),{},{className:a()(t,"tabs-modal"),withDecorator:e=>{const t=t=>(0,_.jsx)(i.Tabs,{items:o.map(o=>{let{withDecorator:n}=o,s=(0,l.A)(o,R);return Object.assign({},s,{children:"function"===typeof n?n(o=>e(Object.assign({},t,o,{children:s.children}))):e(Object.assign({},t,{children:s.children}))})}),destroyInactiveTabPane:!0,activeKey:s,defaultActiveKey:c,onChange:d});return"function"===typeof r?r(t):t()},children:e=>{let{children:o}=e,t=(0,l.A)(e,M);return"function"===typeof o?o(t):o}})},O=e=>(0,_.jsx)(J,(0,n.A)({},B(e))),D=()=>{const e=S();return o=>e(B(o))};var z=t(73025);const F=["modalProps"],I=e=>{const o=D();return e.api?(0,_.jsx)(z.A,(0,n.A)((0,n.A)({},e),{},{modalFunc:o})):(0,_.jsx)(i.Button,(0,n.A)((0,n.A)({},e),{},{onClick:()=>{o(e.modalProps)}}))},K=e=>{const o=S();if(!e.api){const{modalProps:t}=e,s=(0,l.A)(e,F);return(0,_.jsx)(i.Button,(0,n.A)((0,n.A)({},s),{},{onClick:()=>{o(t)}}))}return(0,_.jsx)(z.A,(0,n.A)((0,n.A)({},e),{},{modalFunc:o}))}},17342(e,o,t){t.d(o,{A:()=>s});var n=t(34581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vD,EAAM2D,IAAK,CACd,MAAM,WAAEyC,GAA0BpG,EAAXqG,GAAMpG,EAAAA,EAAAA,GAAKD,EAAKE,GACvC,OACErC,EAAAA,EAAAA,KAAC4D,EAAAA,QAAMnB,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACD+F,GAAM,IACV/G,QAASA,KACPkE,EAAM4C,MAId,CACA,OAAOvI,EAAAA,EAAAA,KAACqI,EAAAA,GAAW5F,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAAKN,GAAK,IAAEmG,UAAW3C,K,iECf5C,QAAe1B,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__HJ3UV\",\"large\":\"style_large__iaqVE__HJ3UV\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__HJ3UV\",\"modal-title\":\"style_modal-title__dswaw__HJ3UV\",\"modal-outer\":\"style_modal-outer__r3SkX__HJ3UV\",\"modal-body\":\"style_modal-body__jQJSI__HJ3UV\",\"right-options-modal\":\"style_right-options-modal__FajDP__HJ3UV\",\"right-options-row\":\"style_right-options-row__-mPb9__HJ3UV\",\"right-options-col\":\"style_right-options-col__3ilee__HJ3UV\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__HJ3UV\",\"content\":\"style_content__k6MIF__HJ3UV\",\"modal-footer\":\"style_modal-footer__-prbN__HJ3UV\",\"modal-close\":\"style_modal-close__Oa5Kl__HJ3UV\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__HJ3UV\",\"is-danger\":\"style_is-danger__H5110__HJ3UV\",\"title\":\"style_title__orTym__HJ3UV\",\"has-title\":\"style_has-title__qy0Wp__HJ3UV\"};","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 (<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\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\", style: {\"--min-modal-height\": calcHeight(300, footer)},\n };\n }\n return {\n width: \"1000px\", style: {\"--min-modal-height\": calcHeight(500, footer)},\n };\n};\n\nconst Footer = ({\n footer, footerButtons, onConfirm, onCancel, cancelText, onClose, targetProps,\n }) => {\n return (<Row gutter={10} wrap={false}>\n <Col flex={1}>{footer}</Col>\n {Array.isArray(footerButtons) && footerButtons.length === 0 ? null : (<Col>\n <Space>\n {(footerButtons || [{\n children: cancelText || (<IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Cancel\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>), onClick: onCancel,\n }, {\n type: \"primary\", children: (<IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Confirm\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>), onClick: onConfirm,\n },])\n .filter((item) => {\n if (typeof item?.display === \"function\") {\n return item?.display();\n }\n return item?.display !== false;\n })\n .map(({\n ButtonComponent, onClick, autoClose = true, display, ...props\n }, index) => {\n const CurrentButton = ButtonComponent || LoadingButton;\n return (<CurrentButton\n {...props}\n key={index}\n onClick={async (...args) => {\n const res = await Promise.resolve(onClick && onClick(...args, targetProps));\n autoClose && res !== false && onClose && onClose();\n return res;\n }}\n />);\n })}\n </Space>\n </Col>)}\n </Row>);\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 cancelText,\n confirmText,\n }) => {\n const modalBodyRef = useRef(null);\n return (<div className={classnames(style[\"modal-outer\"], 'modal-container')} data-testid=\"components-core-modal\">\n {closable === false ? null : (<Button\n data-testid=\"components-core-modal-close-btn\"\n className={classnames(style[\"modal-close\"], \"modal-close\")}\n type=\"text\"\n icon={<Icon type=\"icon-close-thin\"/>}\n onClick={(e) => {\n e.stopPropagation();\n onClose && onClose();\n }}\n />)}\n {title && <div className={style[\"modal-title\"]}>{title}</div>}\n <SimpleBar\n className={classnames(style[\"modal-body\"], {\n [style[\"is-disabled-scroller\"]]: disabledScroller,\n }, \"modal-body\")}\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 : (<div className={classnames(style[\"modal-footer\"], \"modal-footer\")}>\n <Footer\n footer={footer}\n footerButtons={footerButtons}\n onConfirm={onConfirm}\n confirmText={confirmText}\n onCancel={onCancel}\n cancelText={cancelText}\n onClose={onClose}\n targetProps={targetProps}\n />\n </div>)}\n </div>);\n};\n\nconst runWithDecorator = ({\n withDecorator,\n footerButtons,\n title,\n closable,\n onClose,\n onConfirm,\n confirmText,\n onCancel,\n cancelText,\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 (<ModalOuter\n title={renderWithOptions(props.title, {\n ...props, childrenRef, close: onClose,\n })}\n closable={closable}\n onClose={onClose}\n onConfirm={onConfirm}\n confirmText={confirmText}\n onCancel={onCancel}\n cancelText={cancelText}\n footerButtons={renderWithOptions(footerButtons, {\n ...props, close: onClose,\n })}\n disabledScroller={disabledScroller}\n footer={renderWithOptions(footer, {\n ...props, childrenRef, close: onClose,\n })}\n targetProps={Object.assign({}, props, {childrenRef, close: onClose})}\n >\n <RightOptions\n rightSpan={rightSpan}\n options={renderWithOptions(rightOptions, {\n ...props, childrenRef, close: onClose,\n })}\n >\n {renderWithOptions(children, {\n ...props, childrenRef, close: onClose,\n })}\n </RightOptions>\n </ModalOuter>);\n };\n return typeof withDecorator === \"function\" ? withDecorator(getInner, {\n childrenRef, close: onClose,\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 confirmText,\n onCancel,\n cancelText,\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\") ? props.maskClosable : false,\n destroyOnHidden: 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 }), ...sizeMap(size, !(footer === null && !footerButtons)),\n children: (<IntlProvider importMessages={importMessages} moduleName=\"Modal\">\n {runWithDecorator({\n withDecorator,\n title,\n closable,\n onClose,\n onConfirm,\n confirmText,\n onCancel,\n cancelText,\n footer,\n footerButtons,\n rightOptions,\n rightSpan,\n disabledScroller,\n children,\n childrenRef,\n })}\n </IntlProvider>),\n };\n};\n\nconst Modal = ({size = 'default', ...props}) => {\n const childrenRef = useRef(null);\n return (<AntdModal\n {...computedCommonProps(Object.assign({}, props, {size, childrenRef}))}\n />);\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(), childrenRef, ...props,\n });\n const {destroy} = modal.info({\n ...otherProps, 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, icon, title, danger, wrapClassName, message, iconSetting = {}, confirmType = \"info\", ...otherProps\n } = {\n onClose: () => api.close(), maskClosable: false, ...props,\n };\n const typeEnum = Object.assign({}, {\n info: \"icon-xinxi-tianchong\",\n confirm: \"icon-tishi-tianchong\",\n warning: \"icon-tishi-tianchong\",\n error: \"icon-shibai\",\n success: \"icon-chenggong\",\n }, iconSetting);\n if (modal[type]) {\n const {destroy} = modal[type]({\n ...otherProps, icon: null, wrapClassName: classnames(style[\"confirm-modal-wrap\"], wrapClassName, {\n [style[\"is-danger\"]]: danger,\n }), title: (<Space\n orientation=\"vertical\"\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {title && (<Space size={0} align=\"start\" className={style[\"title\"]}>\n {danger ? (<Icon\n className={classnames(\"title-icon\", `title-icon-${type === \"confirm\" ? confirmType : type}`)}\n type={icon || typeEnum[type === \"confirm\" ? confirmType : type]}\n />) : null}\n {title}\n </Space>)}\n </Space>), content: (<Space\n size={0}\n align=\"start\"\n className={classnames(style[\"content\"], {\n [style[\"has-title\"]]: title,\n })}\n >\n {!title && danger ? (<Icon\n className={classnames(\"title-icon\", `title-icon-${type === \"confirm\" ? confirmType : type}`)}\n type={icon || typeEnum[type === \"confirm\" ? confirmType : type]}\n />) : null}\n {message}\n </Space>),\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","concat","Footer","_ref2","footerButtons","onConfirm","onCancel","cancelText","onClose","targetProps","gutter","flex","Array","isArray","length","Space","IntlProvider","importMessages","moduleName","FormattedMessage","id","onClick","type","filter","item","display","map","_ref3","index","ButtonComponent","autoClose","props","_objectWithoutProperties","_excluded","CurrentButton","LoadingButton","_createElement","_objectSpread","key","async","_len","arguments","args","_key","res","Promise","resolve","ModalOuter","_ref4","title","disabledScroller","closable","confirmText","modalBodyRef","useRef","classnames","Button","icon","Icon","e","stopPropagation","SimpleBar","ref","runWithDecorator","_ref5","withDecorator","rightOptions","childrenRef","getInner","Object","assign","close","computedCommonProps","_ref6","size","_excluded2","centered","maskClosable","hasOwnProperty","destroyOnHidden","sizeMap","width","Math","min","window","innerWidth","useModal","modal","App","useApp","api","_computedCommonProps","otherProps","_excluded4","destroy","info","content","useConfirmModal","_onClose$maskClosable","danger","wrapClassName","message","iconSetting","confirmType","_excluded5","typeEnum","confirm","warning","error","success","orientation","align","_ref7","_excluded3","AntdModal","items","activeKey","defaultActiveKey","onChange","render","innerRender","Tabs","itemWithDecorator","innerProps","destroyInactiveTabPane","Modal","useTabsModal","TabsModalButton","tabsModal","FetchButton","modalFunc","modalProps","others"],"ignoreList":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/js/3771.beb7c69b.chunk.js","mappings":"sWACA,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,iCCK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UkC,EAAKlC,gBAItDsI,wBAAsB,EACtBR,UAAWA,EACXC,iBAAkBA,EAClBC,SAAUA,IAGd,MAAgC,oBAAlBrD,EACVA,EAAcuD,GACdA,KAENlI,SAAUqC,IAA6B,IAA5B,SAAErC,GAAoBqC,EAAPI,GAAKC,EAAAA,EAAAA,GAAAL,EAAAsF,GAC7B,MAA2B,oBAAb3H,EAA0BA,EAASyC,GAASzC,MAShE,EAJmByC,IACVnC,EAAAA,EAAAA,KAACiI,GAAKxF,EAAAA,EAAAA,GAAA,GAAKmC,EAAoBzC,KAK3B+F,EAAeA,KAC1B,MAAMvC,EAAQD,IACd,OAAQvD,GAAUwD,EAAMf,EAAoBzC,K,sCCtCjCgG,EAAmBhG,IAC9B,MAAMiG,EAAYF,IAClB,OAAK/F,EAAM2D,KAUJ9F,EAAAA,EAAAA,KAACqI,EAAAA,GAAW5F,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAAKN,GAAK,IAAEmG,UAAWF,MARtCpI,EAAAA,EAAAA,KAAC4D,EAAAA,QAAMnB,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACDN,GAAK,IACTV,QAASA,KACP2G,EAAUjG,EAAMoG,iBAO1B,EA9BqBpG,IACnB,MAAMwD,EAAQD,IACd,IAAKvD,EAAM2D,IAAK,CACd,MAAM,WAAEyC,GAA0BpG,EAAXqG,GAAMpG,EAAAA,EAAAA,GAAKD,EAAKE,GACvC,OACErC,EAAAA,EAAAA,KAAC4D,EAAAA,QAAMnB,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACD+F,GAAM,IACV/G,QAASA,KACPkE,EAAM4C,MAId,CACA,OAAOvI,EAAAA,EAAAA,KAACqI,EAAAA,GAAW5F,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAAKN,GAAK,IAAEmG,UAAW3C,K,iECf5C,QAAe1B,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__TkoJL\",\"large\":\"style_large__iaqVE__TkoJL\",\"modal-body-inner\":\"style_modal-body-inner__4PhpA__TkoJL\",\"modal-title\":\"style_modal-title__dswaw__TkoJL\",\"modal-outer\":\"style_modal-outer__r3SkX__TkoJL\",\"modal-body\":\"style_modal-body__jQJSI__TkoJL\",\"right-options-modal\":\"style_right-options-modal__FajDP__TkoJL\",\"right-options-row\":\"style_right-options-row__-mPb9__TkoJL\",\"right-options-col\":\"style_right-options-col__3ilee__TkoJL\",\"is-disabled-scroller\":\"style_is-disabled-scroller__PmHyk__TkoJL\",\"content\":\"style_content__k6MIF__TkoJL\",\"modal-footer\":\"style_modal-footer__-prbN__TkoJL\",\"modal-close\":\"style_modal-close__Oa5Kl__TkoJL\",\"confirm-modal-wrap\":\"style_confirm-modal-wrap__YFImr__TkoJL\",\"is-danger\":\"style_is-danger__H5110__TkoJL\",\"title\":\"style_title__orTym__TkoJL\",\"has-title\":\"style_has-title__qy0Wp__TkoJL\"};","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 (<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\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\", style: {\"--min-modal-height\": calcHeight(300, footer)},\n };\n }\n return {\n width: \"1000px\", style: {\"--min-modal-height\": calcHeight(500, footer)},\n };\n};\n\nconst Footer = ({\n footer, footerButtons, onConfirm, onCancel, cancelText, onClose, targetProps,\n }) => {\n return (<Row gutter={10} wrap={false}>\n <Col flex={1}>{footer}</Col>\n {Array.isArray(footerButtons) && footerButtons.length === 0 ? null : (<Col>\n <Space>\n {(footerButtons || [{\n children: cancelText || (<IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Cancel\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>), onClick: onCancel,\n }, {\n type: \"primary\", children: (<IntlProvider\n importMessages={importMessages}\n moduleName={localeModuleName}\n >\n <FormattedMessage\n id={\"Confirm\"}\n moduleName={localeModuleName}\n />\n </IntlProvider>), onClick: onConfirm,\n },])\n .filter((item) => {\n if (typeof item?.display === \"function\") {\n return item?.display();\n }\n return item?.display !== false;\n })\n .map(({\n ButtonComponent, onClick, autoClose = true, display, ...props\n }, index) => {\n const CurrentButton = ButtonComponent || LoadingButton;\n return (<CurrentButton\n {...props}\n key={index}\n onClick={async (...args) => {\n const res = await Promise.resolve(onClick && onClick(...args, targetProps));\n autoClose && res !== false && onClose && onClose();\n return res;\n }}\n />);\n })}\n </Space>\n </Col>)}\n </Row>);\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 cancelText,\n confirmText,\n }) => {\n const modalBodyRef = useRef(null);\n return (<div className={classnames(style[\"modal-outer\"], 'modal-container')} data-testid=\"components-core-modal\">\n {closable === false ? null : (<Button\n data-testid=\"components-core-modal-close-btn\"\n className={classnames(style[\"modal-close\"], \"modal-close\")}\n type=\"text\"\n icon={<Icon type=\"icon-close-thin\"/>}\n onClick={(e) => {\n e.stopPropagation();\n onClose && onClose();\n }}\n />)}\n {title && <div className={style[\"modal-title\"]}>{title}</div>}\n <SimpleBar\n className={classnames(style[\"modal-body\"], {\n [style[\"is-disabled-scroller\"]]: disabledScroller,\n }, \"modal-body\")}\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 : (<div className={classnames(style[\"modal-footer\"], \"modal-footer\")}>\n <Footer\n footer={footer}\n footerButtons={footerButtons}\n onConfirm={onConfirm}\n confirmText={confirmText}\n onCancel={onCancel}\n cancelText={cancelText}\n onClose={onClose}\n targetProps={targetProps}\n />\n </div>)}\n </div>);\n};\n\nconst runWithDecorator = ({\n withDecorator,\n footerButtons,\n title,\n closable,\n onClose,\n onConfirm,\n confirmText,\n onCancel,\n cancelText,\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 (<ModalOuter\n title={renderWithOptions(props.title, {\n ...props, childrenRef, close: onClose,\n })}\n closable={closable}\n onClose={onClose}\n onConfirm={onConfirm}\n confirmText={confirmText}\n onCancel={onCancel}\n cancelText={cancelText}\n footerButtons={renderWithOptions(footerButtons, {\n ...props, close: onClose,\n })}\n disabledScroller={disabledScroller}\n footer={renderWithOptions(footer, {\n ...props, childrenRef, close: onClose,\n })}\n targetProps={Object.assign({}, props, {childrenRef, close: onClose})}\n >\n <RightOptions\n rightSpan={rightSpan}\n options={renderWithOptions(rightOptions, {\n ...props, childrenRef, close: onClose,\n })}\n >\n {renderWithOptions(children, {\n ...props, childrenRef, close: onClose,\n })}\n </RightOptions>\n </ModalOuter>);\n };\n return typeof withDecorator === \"function\" ? withDecorator(getInner, {\n childrenRef, close: onClose,\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 confirmText,\n onCancel,\n cancelText,\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\") ? props.maskClosable : false,\n destroyOnHidden: 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 }), ...sizeMap(size, !(footer === null && !footerButtons)),\n children: (<IntlProvider importMessages={importMessages} moduleName=\"Modal\">\n {runWithDecorator({\n withDecorator,\n title,\n closable,\n onClose,\n onConfirm,\n confirmText,\n onCancel,\n cancelText,\n footer,\n footerButtons,\n rightOptions,\n rightSpan,\n disabledScroller,\n children,\n childrenRef,\n })}\n </IntlProvider>),\n };\n};\n\nconst Modal = ({size = 'default', ...props}) => {\n const childrenRef = useRef(null);\n return (<AntdModal\n {...computedCommonProps(Object.assign({}, props, {size, childrenRef}))}\n />);\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(), childrenRef, ...props,\n });\n const {destroy} = modal.info({\n ...otherProps, 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, icon, title, danger, wrapClassName, message, iconSetting = {}, confirmType = \"info\", ...otherProps\n } = {\n onClose: () => api.close(), maskClosable: false, ...props,\n };\n const typeEnum = Object.assign({}, {\n info: \"icon-xinxi-tianchong\",\n confirm: \"icon-tishi-tianchong\",\n warning: \"icon-tishi-tianchong\",\n error: \"icon-shibai\",\n success: \"icon-chenggong\",\n }, iconSetting);\n if (modal[type]) {\n const {destroy} = modal[type]({\n ...otherProps, icon: null, wrapClassName: classnames(style[\"confirm-modal-wrap\"], wrapClassName, {\n [style[\"is-danger\"]]: danger,\n }), title: (<Space\n orientation=\"vertical\"\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {title && (<Space size={0} align=\"start\" className={style[\"title\"]}>\n {danger ? (<Icon\n className={classnames(\"title-icon\", `title-icon-${type === \"confirm\" ? confirmType : type}`)}\n type={icon || typeEnum[type === \"confirm\" ? confirmType : type]}\n />) : null}\n {title}\n </Space>)}\n </Space>), content: (<Space\n size={0}\n align=\"start\"\n className={classnames(style[\"content\"], {\n [style[\"has-title\"]]: title,\n })}\n >\n {!title && danger ? (<Icon\n className={classnames(\"title-icon\", `title-icon-${type === \"confirm\" ? confirmType : type}`)}\n type={icon || typeEnum[type === \"confirm\" ? confirmType : type]}\n />) : null}\n {message}\n </Space>),\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","concat","Footer","_ref2","footerButtons","onConfirm","onCancel","cancelText","onClose","targetProps","gutter","flex","Array","isArray","length","Space","IntlProvider","importMessages","moduleName","FormattedMessage","id","onClick","type","filter","item","display","map","_ref3","index","ButtonComponent","autoClose","props","_objectWithoutProperties","_excluded","CurrentButton","LoadingButton","_createElement","_objectSpread","key","async","_len","arguments","args","_key","res","Promise","resolve","ModalOuter","_ref4","title","disabledScroller","closable","confirmText","modalBodyRef","useRef","classnames","Button","icon","Icon","e","stopPropagation","SimpleBar","ref","runWithDecorator","_ref5","withDecorator","rightOptions","childrenRef","getInner","Object","assign","close","computedCommonProps","_ref6","size","_excluded2","centered","maskClosable","hasOwnProperty","destroyOnHidden","sizeMap","width","Math","min","window","innerWidth","useModal","modal","App","useApp","api","_computedCommonProps","otherProps","_excluded4","destroy","info","content","useConfirmModal","_onClose$maskClosable","danger","wrapClassName","message","iconSetting","confirmType","_excluded5","typeEnum","confirm","warning","error","success","orientation","align","_ref7","_excluded3","AntdModal","items","activeKey","defaultActiveKey","onChange","render","innerRender","Tabs","itemWithDecorator","innerProps","destroyInactiveTabPane","Modal","useTabsModal","TabsModalButton","tabsModal","FetchButton","modalFunc","modalProps","others"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2908,3790],{48731(e,n,i){i.r(n),i.d(n,{default:()=>a.a});var s=i(98919),a=i.n(s),l=i(22717),t=i.n(l);(0,s.preset)({base:t()([["gender",()=>[{value:"M",description:"\u7537"},{value:"F",description:"\u5973"}]],["marital",()=>[{description:"\u5df2\u5a5a",value:"Y"},{description:"\u672a\u5a5a",value:"N"}]],["confirm",()=>[{description:"\u662f",value:"Y"},{description:"\u5426",value:"N"}]],["political",()=>[{description:"\u4e2d\u5171\u515a\u5458",value:"\u4e2d\u5171\u515a\u5458"},{description:"\u5171\u9752\u56e2\u5458",value:"\u5171\u9752\u56e2\u5458"},{description:"\u7fa4\u4f17",value:"\u7fa4\u4f17"},{description:"\u5176\u4ed6\u515a\u6d3e",value:"\u5176\u4ed6\u515a\u6d3e"}]],["phoneStateEnum",()=>[{value:0,description:"\u7a7a\u53f7"},{value:1,description:"\u5b9e\u53f7"},{value:2,description:"\u505c\u673a"},{value:3,description:"\u5e93\u65e0"},{value:4,description:"\u6c89\u9ed8\u53f7"},{value:5,description:"\u98ce\u9669\u53f7"}]],["degreeEnum",()=>[{description:"\u521d\u4e2d",value:10},{description:"\u4e2d\u4e13",value:20},{description:"\u9ad8\u4e2d",value:30},{description:"\u5927\u4e13",value:40},{description:"\u672c\u79d1",value:50},{description:"\u7855\u58eb\u7814\u7a76\u751f",value:60},{description:"\u535a\u58eb\u7814\u7a76\u751f",value:70},{description:"\u535a\u58eb\u540e",value:75},{description:"\u5b66\u5386\u4e0d\u9650",value:999}]]],(e,n)=>{e[n[0]]=n[1]},{})})},75363(e,n,i){i.r(n),i.d(n,{default:()=>h});const s=e=>({"en-US":()=>i.e(9431).then(i.bind(i,9431)),"zh-CN":()=>i.e(1065).then(i.bind(i,81065))}[e]());var a=i(47458),l=i(64671),t=i(55199),r=i(83136),
|
|
2
|
-
//# sourceMappingURL=3790.
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[2908,3790],{48731(e,n,i){i.r(n),i.d(n,{default:()=>a.a});var s=i(98919),a=i.n(s),l=i(22717),t=i.n(l);(0,s.preset)({base:t()([["gender",()=>[{value:"M",description:"\u7537"},{value:"F",description:"\u5973"}]],["marital",()=>[{description:"\u5df2\u5a5a",value:"Y"},{description:"\u672a\u5a5a",value:"N"}]],["confirm",()=>[{description:"\u662f",value:"Y"},{description:"\u5426",value:"N"}]],["political",()=>[{description:"\u4e2d\u5171\u515a\u5458",value:"\u4e2d\u5171\u515a\u5458"},{description:"\u5171\u9752\u56e2\u5458",value:"\u5171\u9752\u56e2\u5458"},{description:"\u7fa4\u4f17",value:"\u7fa4\u4f17"},{description:"\u5176\u4ed6\u515a\u6d3e",value:"\u5176\u4ed6\u515a\u6d3e"}]],["phoneStateEnum",()=>[{value:0,description:"\u7a7a\u53f7"},{value:1,description:"\u5b9e\u53f7"},{value:2,description:"\u505c\u673a"},{value:3,description:"\u5e93\u65e0"},{value:4,description:"\u6c89\u9ed8\u53f7"},{value:5,description:"\u98ce\u9669\u53f7"}]],["degreeEnum",()=>[{description:"\u521d\u4e2d",value:10},{description:"\u4e2d\u4e13",value:20},{description:"\u9ad8\u4e2d",value:30},{description:"\u5927\u4e13",value:40},{description:"\u672c\u79d1",value:50},{description:"\u7855\u58eb\u7814\u7a76\u751f",value:60},{description:"\u535a\u58eb\u7814\u7a76\u751f",value:70},{description:"\u535a\u58eb\u540e",value:75},{description:"\u5b66\u5386\u4e0d\u9650",value:999}]]],(e,n)=>{e[n[0]]=n[1]},{})})},75363(e,n,i){i.r(n),i.d(n,{default:()=>h});const s=e=>({"en-US":()=>i.e(9431).then(i.bind(i,9431)),"zh-CN":()=>i.e(1065).then(i.bind(i,81065))}[e]());var a=i(47458),l=i(64671),t=i(55199),r=i(83136),o=i.n(r);const c="style_helper-guide__K5xFw__TkoJL",d="style_inner__bMKeU__TkoJL",u="style_content__xTfWZ__TkoJL",p="style_link__93j7O__TkoJL";var v=i(48731),_=i(70579);const h=e=>{let{name:n,className:i}=e;return(0,_.jsx)(a.IntlProvider,{importMessages:s,moduleName:"HelperGuide",children:(0,_.jsx)(v.default,{moduleName:"helperGuide",name:n,children:e=>e&&e.value&&(0,_.jsx)("div",{className:o()(c,i),children:(0,_.jsxs)(t.Space,{className:d,children:[(0,_.jsx)(l.default,{colorful:!0,type:"icon-color-bangzhuyindao"}),(0,_.jsx)("span",{className:u,children:e.content}),e.url&&(0,_.jsxs)(t.Typography.Link,{className:p,href:e.url,target:"_blank",children:["\u67e5\u770b\u5e2e\u52a9",(0,_.jsx)(l.default,{type:"icon-shuangjiantou-right"})]})]})})})})}}}]);
|
|
2
|
+
//# sourceMappingURL=3790.210f5aa3.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/3790.
|
|
1
|
+
{"version":3,"file":"static/js/3790.210f5aa3.chunk.js","mappings":"kOAyHAA,EAAAA,EAAAA,QAAO,CACLC,KAAMC,IAvHY,CAClB,CACE,SACA,IAAM,CACJ,CAAEC,MAAO,IAAKC,YAAa,UAC3B,CACED,MAAO,IACPC,YAAa,YAInB,CACE,UACA,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KM,SACtCE,GAEEA,GACAA,EAAKf,QACHS,EAAAA,EAAAA,KAAA,OAAKD,UAAWQ,IAAWC,EAAuBT,GAAWK,UAC3DK,EAAAA,EAAAA,MAACC,EAAAA,MAAK,CAACX,UAAWS,EAAeJ,SAAA,EAC/BJ,EAAAA,EAAAA,KAACW,EAAAA,QAAI,CAACC,UAAQ,EAACC,KAAK,8BACpBb,EAAAA,EAAAA,KAAA,QAAMD,UAAWS,EAAiBJ,SAAEE,EAAKQ,UACxCR,EAAKS,MACJN,EAAAA,EAAAA,MAACO,EAAAA,WAAWC,KAAI,CACdlB,UAAWS,EACXU,KAAMZ,EAAKS,IACXI,OAAO,SAAQf,SAAA,CAChB,4BAECJ,EAAAA,EAAAA,KAACW,EAAAA,QAAI,CAACE,KAAK,yC","sources":["components/Enum/index.js","components/HelperGuide/locale/index.js","webpack://@kne-components/components-core/./src/components/HelperGuide/style.module.scss?bc31","components/HelperGuide/index.js"],"sourcesContent":["import { preset } from \"@kne/react-enum\";\nimport transform from \"lodash/transform\";\n\nconst baseLoaders = [\n [\n \"gender\",\n () => [\n { value: \"M\", description: \"男\" },\n {\n value: \"F\",\n description: \"女\",\n },\n ],\n ],\n [\n \"marital\",\n () => [\n { description: \"已婚\", value: \"Y\" },\n {\n description: \"未婚\",\n value: \"N\",\n },\n ],\n ],\n [\n \"confirm\",\n () => [\n { description: \"是\", value: \"Y\" },\n {\n description: \"否\",\n value: \"N\",\n },\n ],\n ],\n [\n \"political\",\n () => [\n { description: \"中共党员\", value: \"中共党员\" },\n {\n description: \"共青团员\",\n value: \"共青团员\",\n },\n { description: \"群众\", value: \"群众\" },\n {\n description: \"其他党派\",\n value: \"其他党派\",\n },\n ],\n ],\n [\n \"phoneStateEnum\",\n () => [\n {\n value: 0,\n description: \"空号\",\n },\n {\n value: 1,\n description: \"实号\",\n },\n {\n value: 2,\n description: \"停机\",\n },\n {\n value: 3,\n description: \"库无\",\n },\n {\n value: 4,\n description: \"沉默号\",\n },\n {\n value: 5,\n description: \"风险号\",\n },\n ],\n ],\n [\n \"degreeEnum\",\n () => [\n {\n description: \"初中\",\n value: 10,\n },\n {\n description: \"中专\",\n value: 20,\n },\n {\n description: \"高中\",\n value: 30,\n },\n {\n description: \"大专\",\n value: 40,\n },\n {\n description: \"本科\",\n value: 50,\n },\n {\n description: \"硕士研究生\",\n value: 60,\n },\n {\n description: \"博士研究生\",\n value: 70,\n },\n {\n description: \"博士后\",\n value: 75,\n },\n {\n description: \"学历不限\",\n value: 999,\n },\n ],\n ],\n];\n\npreset({\n base: transform(\n baseLoaders,\n (result, value) => {\n result[value[0]] = value[1];\n },\n {}\n ),\n});\n\nexport { default } from \"@kne/react-enum\";\n","const importMessages = (locale) => {\n return {\n \"en-US\": () => import(\"./en-US\"),\n \"zh-CN\": () => import(\"./zh-CN\"),\n }[locale]();\n};\n\nexport default importMessages;\n","// extracted by mini-css-extract-plugin\nexport default {\"helper-guide\":\"style_helper-guide__K5xFw__TkoJL\",\"inner\":\"style_inner__bMKeU__TkoJL\",\"content\":\"style_content__xTfWZ__TkoJL\",\"link\":\"style_link__93j7O__TkoJL\"};","import importMessages from \"./locale\";\nimport { IntlProvider } from \"@components/Intl\";\nimport Icon from \"@components/Icon\";\nimport { Space, Typography } from \"antd\";\nimport classnames from \"classnames\";\nimport style from \"./style.module.scss\";\nimport Enum from \"@components/Enum\";\n\nconst HelperGuide = ({ name, className }) => {\n return (\n <IntlProvider importMessages={importMessages} moduleName=\"HelperGuide\">\n <Enum moduleName=\"helperGuide\" name={name}>\n {(data) => {\n return (\n data &&\n data.value && (\n <div className={classnames(style[\"helper-guide\"], className)}>\n <Space className={style[\"inner\"]}>\n <Icon colorful type=\"icon-color-bangzhuyindao\" />\n <span className={style[\"content\"]}>{data.content}</span>\n {data.url && (\n <Typography.Link\n className={style[\"link\"]}\n href={data.url}\n target=\"_blank\"\n >\n 查看帮助\n <Icon type=\"icon-shuangjiantou-right\" />\n </Typography.Link>\n )}\n </Space>\n </div>\n )\n );\n }}\n </Enum>\n </IntlProvider>\n );\n};\n\nexport default HelperGuide;\n"],"names":["preset","base","transform","value","description","result","locale","en-US","zh-CN","_ref","name","className","_jsx","IntlProvider","importMessages","moduleName","children","Enum","data","classnames","style","_jsxs","Space","Icon","colorful","type","content","url","Typography","Link","href","target"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_kne_components_components_core=self.webpackChunk_kne_components_components_core||[]).push([[3856],{3382(e,t,n){n.r(t),n.d(t,{ModalButton:()=>V,TabsModal:()=>M,TabsModalButton:()=>z,default:()=>O,useConfirmModal:()=>w,useModal:()=>T,useTabsModal:()=>R});var a=n(89379),l=n(53986),s=n(73884),o=n(55199),r=n(83136),i=n.n(r);const c={modal:"style_modal__Pm3cF__TkoJL",large:"style_large__iaqVE__TkoJL","modal-body-inner":"style_modal-body-inner__4PhpA__TkoJL","modal-title":"style_modal-title__dswaw__TkoJL","modal-outer":"style_modal-outer__r3SkX__TkoJL","modal-body":"style_modal-body__jQJSI__TkoJL","right-options-modal":"style_right-options-modal__FajDP__TkoJL","right-options-row":"style_right-options-row__-mPb9__TkoJL","right-options-col":"style_right-options-col__3ilee__TkoJL","is-disabled-scroller":"style_is-disabled-scroller__PmHyk__TkoJL",content:"style_content__k6MIF__TkoJL","modal-footer":"style_modal-footer__-prbN__TkoJL","modal-close":"style_modal-close__Oa5Kl__TkoJL","confirm-modal-wrap":"style_confirm-modal-wrap__YFImr__TkoJL","is-danger":"style_is-danger__H5110__TkoJL",title:"style_title__orTym__TkoJL","has-title":"style_has-title__qy0Wp__TkoJL"},d=e=>({"en-US":()=>n.e(4628).then(n.bind(n,74628)),"zh-CN":()=>n.e(7478).then(n.bind(n,87478))}[e]());var u=n(47458),p=n(64671);const m=(e,t)=>"function"===typeof e?e(t):e;var h=n(81014),_=n(17342),g=n(70579);const f=["ButtonComponent","onClick","autoClose","display"],x=["children","rightOptions","rightSpan","footer","footerButtons","className","size","title","onClose","onConfirm","confirmText","onCancel","cancelText","closable","disabledScroller","withDecorator","childrenRef"],A=["size"],y=["children"],v=["type","icon","title","danger","wrapClassName","message","iconSetting","confirmType"],C="Modal",j=e=>{let{options:t,rightSpan:n=6,children:a}=e;return t?(0,g.jsxs)(o.Row,{wrap:!1,className:c["right-options-row"],children:[(0,g.jsx)(o.Col,{span:24-n,className:c["right-options-col"],children:a}),(0,g.jsx)(o.Col,{span:n,className:c["right-options-col"],children:t})]}):a},b=(e,t)=>"".concat(e-48-(t?58:0),"px"),N=e=>{let{footer:t,footerButtons:n,onConfirm:r,onCancel:i,cancelText:c,onClose:p,targetProps:m}=e;return(0,g.jsxs)(o.Row,{gutter:10,wrap:!1,children:[(0,g.jsx)(o.Col,{flex:1,children:t}),Array.isArray(n)&&0===n.length?null:(0,g.jsx)(o.Col,{children:(0,g.jsx)(o.Space,{children:(n||[{children:c||(0,g.jsx)(u.IntlProvider,{importMessages:d,moduleName:C,children:(0,g.jsx)(u.FormattedMessage,{id:"Cancel",moduleName:C})}),onClick:i},{type:"primary",children:(0,g.jsx)(u.IntlProvider,{importMessages:d,moduleName:C,children:(0,g.jsx)(u.FormattedMessage,{id:"Confirm",moduleName:C})}),onClick:r}]).filter(e=>"function"===typeof(null===e||void 0===e?void 0:e.display)?null===e||void 0===e?void 0:e.display():!1!==(null===e||void 0===e?void 0:e.display)).map((e,t)=>{let{ButtonComponent:n,onClick:o,autoClose:r=!0,display:i}=e,c=(0,l.A)(e,f);const d=n||h.default;return(0,s.createElement)(d,(0,a.A)((0,a.A)({},c),{},{key:t,onClick:async function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const a=await Promise.resolve(o&&o(...t,m));return r&&!1!==a&&p&&p(),a}}))})})})]})},L=e=>{let{title:t,footer:n,disabledScroller:a,footerButtons:l,onClose:r,closable:d,onConfirm:u,onCancel:m,children:h,targetProps:f,cancelText:x,confirmText:A}=e;const y=(0,s.useRef)(null);return(0,g.jsxs)("div",{className:i()(c["modal-outer"],"modal-container"),"data-testid":"components-core-modal",children:[!1===d?null:(0,g.jsx)(o.Button,{"data-testid":"components-core-modal-close-btn",className:i()(c["modal-close"],"modal-close"),type:"text",icon:(0,g.jsx)(p.default,{type:"icon-close-thin"}),onClick:e=>{e.stopPropagation(),r&&r()}}),t&&(0,g.jsx)("div",{className:c["modal-title"],children:t}),(0,g.jsx)(_.A,{className:i()(c["modal-body"],{[c["is-disabled-scroller"]]:a},"modal-body"),ref:y,children:(0,g.jsx)("div",{className:i()(c["modal-body-inner"],"modal-body-inner"),children:h})}),null!==n||l?(0,g.jsx)("div",{className:i()(c["modal-footer"],"modal-footer"),children:(0,g.jsx)(N,{footer:n,footerButtons:l,onConfirm:u,confirmText:A,onCancel:m,cancelText:x,onClose:r,targetProps:f})}):null]})},S=e=>{let{withDecorator:t,footerButtons:n,title:l,closable:s,onClose:o,onConfirm:r,confirmText:i,onCancel:c,cancelText:d,footer:u,rightOptions:p,rightSpan:h,disabledScroller:_,childrenRef:f,children:x}=e;const A=e=>(e=Object.assign({},{title:l},e),(0,g.jsx)(L,{title:m(e.title,(0,a.A)((0,a.A)({},e),{},{childrenRef:f,close:o})),closable:s,onClose:o,onConfirm:r,confirmText:i,onCancel:c,cancelText:d,footerButtons:m(n,(0,a.A)((0,a.A)({},e),{},{close:o})),disabledScroller:_,footer:m(u,(0,a.A)((0,a.A)({},e),{},{childrenRef:f,close:o})),targetProps:Object.assign({},e,{childrenRef:f,close:o}),children:(0,g.jsx)(j,{rightSpan:h,options:m(p,(0,a.A)((0,a.A)({},e),{},{childrenRef:f,close:o})),children:m(x,(0,a.A)((0,a.A)({},e),{},{childrenRef:f,close:o}))})}));return"function"===typeof t?t(A,{childrenRef:f,close:o}):A({})},k=e=>{let{children:t,rightOptions:n,rightSpan:s,footer:o,footerButtons:r,className:p,size:m,title:h,onClose:_,onConfirm:f,confirmText:A,onCancel:y,cancelText:v,closable:C,disabledScroller:j,withDecorator:N,childrenRef:L}=e,k=(0,l.A)(e,x);return(0,a.A)((0,a.A)((0,a.A)({},k),{},{icon:null,centered:!0,title:null,maskClosable:!!k.hasOwnProperty("maskClosable")&&k.maskClosable,destroyOnHidden:!0,footer:null,closable:!1,onCancel:_,className:i()(p,c.modal,c[m],{[c["right-options-modal"]]:n})},((e,t)=>"large"===e?{width:"".concat(Math.min(window.innerWidth-64,1500),"px"),style:{"--min-modal-height":b(500,t)}}:"small"===e?{width:"600px",style:{"--min-modal-height":b(300,t)}}:{width:"1000px",style:{"--min-modal-height":b(500,t)}})(m,!(null===o&&!r))),{},{children:(0,g.jsx)(u.IntlProvider,{importMessages:d,moduleName:"Modal",children:S({withDecorator:N,title:h,closable:C,onClose:_,onConfirm:f,confirmText:A,onCancel:y,cancelText:v,footer:o,footerButtons:r,rightOptions:n,rightSpan:s,disabledScroller:j,children:t,childrenRef:L})})})},T=()=>{const{modal:e}=o.App.useApp(),t=(0,s.useRef)(null);return n=>{const s={},o=k((0,a.A)({onClose:()=>s.close(),childrenRef:t},n)),{children:r}=o,i=(0,l.A)(o,y),{destroy:c}=e.info((0,a.A)((0,a.A)({},i),{},{content:r}));return s.close=c,s}},w=()=>{const{modal:e}=o.App.useApp();return t=>{const n={},s=(0,a.A)({onClose:()=>n.close(),maskClosable:!1},t),{type:r,icon:d,title:u,danger:m,wrapClassName:h,message:_,iconSetting:f={},confirmType:x="info"}=s,A=(0,l.A)(s,v),y=Object.assign({},{info:"icon-xinxi-tianchong",confirm:"icon-tishi-tianchong",warning:"icon-tishi-tianchong",error:"icon-shibai",success:"icon-chenggong"},f);if(e[r]){const{destroy:t}=e[r]((0,a.A)((0,a.A)({},A),{},{icon:null,wrapClassName:i()(c["confirm-modal-wrap"],h,{[c["is-danger"]]:m}),title:(0,g.jsx)(o.Space,{orientation:"vertical",onClick:e=>{e.stopPropagation()},children:u&&(0,g.jsxs)(o.Space,{size:0,align:"start",className:c.title,children:[m?(0,g.jsx)(p.default,{className:i()("title-icon","title-icon-".concat("confirm"===r?x:r)),type:d||y["confirm"===r?x:r]}):null,u]})}),content:(0,g.jsxs)(o.Space,{size:0,align:"start",className:i()(c.content,{[c["has-title"]]:u}),children:[!u&&m?(0,g.jsx)(p.default,{className:i()("title-icon","title-icon-".concat("confirm"===r?x:r)),type:d||y["confirm"===r?x:r]}):null,_]})}));n.close=t}return n}},O=e=>{let{size:t="default"}=e,n=(0,l.A)(e,A);const r=(0,s.useRef)(null);return(0,g.jsx)(o.Modal,(0,a.A)({},k(Object.assign({},n,{size:t,childrenRef:r}))))},J=["items","className","activeKey","withDecorator","defaultActiveKey","onChange"],I=["withDecorator"],P=["children"],F=e=>{let{items:t,className:n,activeKey:s,withDecorator:r,defaultActiveKey:c,onChange:d}=e,u=(0,l.A)(e,J);return(0,a.A)((0,a.A)({},u),{},{className:i()(n,"tabs-modal"),withDecorator:e=>{const n=n=>(0,g.jsx)(o.Tabs,{items:t.map(t=>{let{withDecorator:a}=t,s=(0,l.A)(t,I);return Object.assign({},s,{children:"function"===typeof a?a(t=>e(Object.assign({},n,t,{children:s.children}))):e(Object.assign({},n,{children:s.children}))})}),destroyInactiveTabPane:!0,activeKey:s,defaultActiveKey:c,onChange:d});return"function"===typeof r?r(n):n()},children:e=>{let{children:t}=e,n=(0,l.A)(e,P);return"function"===typeof t?t(n):t}})},M=e=>(0,g.jsx)(O,(0,a.A)({},F(e))),R=()=>{const e=T();return t=>e(F(t))};var D=n(73025);const E=["modalProps"],z=e=>{const t=R();return e.api?(0,g.jsx)(D.A,(0,a.A)((0,a.A)({},e),{},{modalFunc:t})):(0,g.jsx)(o.Button,(0,a.A)((0,a.A)({},e),{},{onClick:()=>{t(e.modalProps)}}))},V=e=>{const t=T();if(!e.api){const{modalProps:n}=e,s=(0,l.A)(e,E);return(0,g.jsx)(o.Button,(0,a.A)((0,a.A)({},s),{},{onClick:()=>{t(n)}}))}return(0,g.jsx)(D.A,(0,a.A)((0,a.A)({},e),{},{modalFunc:t}))}},12392(e,t,n){n.d(t,{Bm:()=>B,Eo:()=>W,NR:()=>S,Ay:()=>U});var a=n(55199),l=n(83136),s=n.n(l),o=n(89379),r=n(53986),i=n(30509),c=n(25438),d=n(78784),u=n(33097),p=n.n(u),m=n(34677),h=n.n(m);const _="create-list_scroll-loader__zoaS7__TkoJL",g="create-list_is-popup__t3d-G__TkoJL",f="create-list_is-not-full__FXtX1__TkoJL",x="create-list_search-input__tV3vf__TkoJL",A="create-list_left__EXr3i__TkoJL",y="create-list_list-header__3xeJa__TkoJL",v="create-list_is-modal__BMfya__TkoJL";var C=n(73161),j=n(47458),b=n(70579);const N=["extra"],L=i.A.useContext,S=e=>{let{renderList:t,defaultProps:n}=e;const l=e=>{let{value:n,setValue:l}=e;const{fetchApi:o,searchText:r,setSearchText:i,props:u,mapping:m}=L(),N=Object.assign({},{paramsType:"data",current:"currentPage",pageSizeName:"perPage",pageSize:20},u.pagination),S=p()(o.requestParams,[N.paramsType,N.current],1),k=p()(o.requestParams,[N.paramsType,N.pageSizeName])||N.pageSize,{formatMessage:T}=(0,j.useIntl)({moduleName:"Common"}),w=u.dataFormat(o.data),{right:O,leftBottom:J,leftSpan:I=24}=u,P=1===n.length&&"all"===n[0];return(0,b.jsxs)(a.Row,{wrap:!1,className:O?s()("is-not-full",f):"",children:[(0,b.jsxs)(a.Col,{span:I,className:s()(A,"advance-select-left"),children:[u.getSearchProps?(0,b.jsx)(C.A,{isPopup:u.isPopup,className:s()(x,c.A["search-input"],{[c.A["is-popup"]]:u.isPopup}),placeholder:u.searchPlaceholder||T({id:"search"}),value:r,onSearch:e=>{o.reload(u.getSearchProps(e)),i(e)}}):null,u.single||!u.showSelectedCount&&!u.allowSelectAll?null:(0,b.jsxs)(a.Flex,{className:s()(y,{[v]:!u.isPopup}),justify:"space-between",children:[u.showSelectedCount?(0,b.jsxs)(a.Space,{children:[(0,b.jsx)(a.Typography,{children:"\u5df2\u9009:"}),(0,b.jsx)(a.Typography.Link,{children:P?u.allLabel||(0,b.jsx)(j.FormattedMessage,{id:"all",moduleName:"Common"}):"".concat(n.length).concat(u.countUnit||T({id:"items"}))})]}):(0,b.jsx)("div",{}),u.allowSelectAll?(0,b.jsx)("div",{children:(0,b.jsx)(a.Checkbox,{checked:P,onChange:e=>{l(e.target.checked?[u.allValue||"all"]:[])},children:(0,b.jsx)(j.FormattedMessage,{id:"selectAll",moduleName:"Common",values:{label:u.allLabel||(0,b.jsx)(j.FormattedMessage,{id:"all",moduleName:"Common"})}})})}):(0,b.jsx)("div",{})]}),(0,b.jsx)(d.default,{completeTips:"",isLoading:!o.isComplete,className:s()(_,{[g]:u.isPopup}),noMore:!w.total||S*k>=w.total,onLoader:async()=>{console.log("on loader"),await o.loadMore(h()({[N.paramsType]:{[N.pageSizeName]:k,[N.current]:S+1}},u.getSearchProps&&u.getSearchProps(r)),u.mergeList)},children:(()=>{const e={props:u,value:n,setValue:l,list:w.list,data:o.data,fetchApi:o,itemIsSelected:e=>n.indexOf(e.value)>-1,isSelectedAll:P,onSelect:e=>{if(u.single)return void l([e.value]);const t=n.slice(0),a=t.indexOf(e.value);a>-1?t.splice(a,1):t.push(e.value),l(t)}},a=t(e);return"function"===typeof u.dropdownRender?u.dropdownRender(Object.assign({},e,{children:a})):a})()}),J&&J({fetchApi:o,value:n,mapping:m})]}),O&&O({value:n,mapping:m,fetchApi:o})]})};return e=>{const t=Object.assign({},{isPopup:!0,pagination:{},mergeList:(e,t)=>Object.assign({},t,{pageData:e.pageData.concat(t.pageData)}),dataFormat:e=>({list:e.pageData,total:e.totalCount})},n,e),{extra:a}=t,s=(0,r.A)(t,N);return(0,b.jsx)(i.A,(0,o.A)((0,o.A)({},s),{},{extra:a,children:e=>{let{value:t,setValue:n}=e;return(0,b.jsx)(l,{value:t,setValue:n})}}))}},k="list_list__TGynD__TkoJL",T="list_list-item__WSswf__TkoJL",w="list_is-selected__6Wkgt__TkoJL",O="list_item-label__bYzhe__TkoJL",J="list_item-des__2nsEn__TkoJL",I="list_is-disabled__qxCvO__TkoJL",P="list_is-selected-all__Mp-hG__TkoJL";var F=n(40438),M=n(64671);const R="user_list-inner__V508e__TkoJL",D="user_list-info__y2nWo__TkoJL",E="user_selected-icon__9OQJL__TkoJL",z="user_item-des__o+7UR__TkoJL",V="user_is-selected-all__2q0VZ__TkoJL",W=S({renderList:e=>{let{list:t,onSelect:n,itemIsSelected:l,isSelectedAll:r}=e;return(0,b.jsx)(a.List,{size:"small",className:s()(k,{[P]:r,[V]:r}),dataSource:t,renderItem:e=>{const t=l(e);return(0,b.jsx)(a.List.Item,{className:s()(T,{[w]:t}),onClick:()=>n(e),children:(0,b.jsxs)(a.Row,{wrap:!1,align:"middle",className:R,children:[(0,b.jsx)(a.Col,{children:(0,b.jsx)(F.default.Avatar,(0,o.A)((0,o.A)({},Object.assign({},e.avatar)),{},{size:40,gender:"M"}))}),(0,b.jsx)(a.Col,{className:D,flex:1,children:(0,b.jsxs)(a.Space,{direction:"vertical",children:[(0,b.jsx)("span",{className:O,children:e.label}),e.description&&(0,b.jsx)("span",{className:z,children:e.description})]})}),(0,b.jsx)(a.Col,{children:r||t?(0,b.jsx)(M.default,{className:E,type:"icon-gouxuan"}):null})]})})}})}}),K={"is-selected-all":"table_is-selected-all__IwXUY__TkoJL"},B=S({defaultProps:{overlayWidth:"450px"},renderList:e=>{let{props:t,list:n,onSelect:l,value:o,setValue:r,itemIsSelected:i,isSelectedAll:c}=e;return(0,b.jsx)(a.Table,{className:s()(K.list,k,{[P]:c,[K["is-selected-all"]]:c}),size:"small",dataSource:n,columns:t.columns,rowClassName:e=>s()({"ant-table-row-selected":i(e)}),rowKey:t.rowKey||"value",pagination:!1,rowSelection:t.single?null:c?{selectedRowKeys:n.map(e=>{let{value:t}=e;return t}),getCheckboxProps:()=>({disabled:!0})}:{selectedRowKeys:o,onChange:e=>{r(e)}},sticky:!0,onRow:e=>({onClick:()=>l(e)})})}}),U=S({renderList:e=>{let{props:t,list:n,itemIsSelected:l,isSelectedAll:o,onSelect:r}=e;const{listClassName:i="",selectIcon:c=null}=t||{};return(0,b.jsx)(a.List,{className:s()(k,i,{[P]:o}),size:"small",dataSource:n,renderItem:e=>{var n;const i=l(e);return(0,b.jsxs)(a.List.Item,{className:s()(T,{[w]:t.single&&i,[I]:o||e.disabled}),onClick:()=>{e.disabled||r(e)},children:[(0,b.jsxs)(a.Row,{wrap:!1,children:[t.single?null:(0,b.jsx)(a.Col,{children:(0,b.jsx)(a.Checkbox,{checked:o||i,disabled:o||e.disabled})}),(0,b.jsx)(a.Col,{children:(0,b.jsxs)(a.Space,{className:null!==(n=null===e||void 0===e?void 0:e.className)&&void 0!==n?n:"",children:[(0,b.jsx)("span",{className:O,children:e.label}),e.description&&(0,b.jsx)("span",{className:J,children:e.description})]})})]}),i&&c]})}})}})},17342(e,t,n){n.d(t,{A:()=>s});var a=n(34581),l=n.n(a);n(46733);const s=l()},17508(e,t,n){n.d(t,{AG:()=>y,Ay:()=>f,FI:()=>A,Zi:()=>x,lN:()=>s.useFileUpload});var a=n(89379),l=n(53986),s=n(61323),o=n(55199),r=n(83136),i=n.n(r),c=n(70579);const d=["className","multiple","accept","onChange","children"],u=["children"],p=["children"],m=["className","multiple","accept","onChange","children"],h=["children"],_=["className","multiple","accept","onChange","children"],g=["children"],f=e=>t=>{let{className:n,multiple:o,accept:r,onChange:i,children:p}=t,m=(0,l.A)(t,d);return(0,c.jsx)(s.FileInput,{className:n,multiple:o,accept:r,onChange:i,children:t=>{let{children:n}=t,s=(0,l.A)(t,u);return(0,c.jsxs)(e,(0,a.A)((0,a.A)({},Object.assign({},m,s)),{},{children:[p,n]}))}})},x=e=>{let{children:t}=e,n=(0,l.A)(e,p);return(0,c.jsx)(s.FileInput,(0,a.A)((0,a.A)({},n),{},{buttonText:t}))},A=e=>{let{className:t,multiple:n,accept:r,onChange:i,children:d}=e,u=(0,l.A)(e,m);return(0,c.jsx)(s.FileInput,{className:t,multiple:n,accept:r,onChange:i,children:e=>{let{children:t}=e,n=(0,l.A)(e,h);return(0,c.jsxs)(o.Typography.Link,(0,a.A)((0,a.A)({},Object.assign({},u,n)),{},{children:[d,t]}))}})},y=e=>{let{className:t,multiple:n,accept:r,onChange:d,children:u}=e,p=(0,l.A)(e,_);return(0,c.jsx)(s.FileInput,{className:i()(t,"ant-btn"),multiple:n,accept:r,onChange:d,children:e=>{let{children:t}=e,n=(0,l.A)(e,g);return(0,c.jsxs)(o.Typography.Text,(0,a.A)((0,a.A)({},Object.assign({},p,n)),{},{children:[u,t]}))}})}},18411(e,t,n){n.d(t,{A:()=>a});n(73884);const a=n.p+"static/media/defaultAvatar.b1f2a8046cc7bee36d9a404ce6a0a1d7.svg"},20492(e,t,n){n.d(t,{A:()=>a});const a=e=>({"en-US":()=>n.e(3086).then(n.bind(n,13086)),"zh-CN":()=>n.e(4308).then(n.bind(n,84308))}[e]())},21485(e,t,n){n.d(t,{A:()=>p});var a=n(89379),l=n(53986),s=n(73884),o=n(71298),r=n.n(o),i=n(96418),c=n.n(i),d=n(70579);const u=["children","onScroll","options","onReady"],p=(0,s.forwardRef)((e,t)=>{let{children:n,onScroll:o,options:i,onReady:p}=e,m=(0,l.A)(e,u);const h=(0,s.useRef)(null),_=(0,s.useRef)(null),g=(0,s.useRef)(i),f=c()(p),x=c()(o);return(0,s.useImperativeHandle)(t,()=>_.current),(0,s.useEffect)(()=>{const e=new(r())(h.current,g.current);return _.current=e.getScrollElement(),_.current.addEventListener("scroll",x),f(_.current),()=>{_.current.removeEventListener("scroll",x)}},[x,f,n]),(0,d.jsx)("div",(0,a.A)((0,a.A)({},m),{},{ref:h,children:n}))})},25438(e,t,n){n.d(t,{A:()=>a});const a={"search-input":"common_search-input__P6qLg__TkoJL","is-popup":"common_is-popup__fJq+g__TkoJL",list:"common_list__TKFzS__TkoJL","list-item":"common_list-item__ASse7__TkoJL","is-selected":"common_is-selected__-PU4Y__TkoJL","item-label":"common_item-label__u+qz1__TkoJL","item-des":"common_item-des__no2z0__TkoJL"}},27047(e,t,n){n.d(t,{A:()=>o});var a=n(83694),l=n(33097),s=n.n(l);const o=()=>{const e=(0,a.useGlobalContext)();return s()(e,"preset",{apis:{}})}},30509(e,t,n){n.d(t,{A:()=>Q});var a=n(89379),l=n(53986);const s={"ant-tag":"style_ant-tag__nNp8-__TkoJL",overlay:"style_overlay__La5mO__TkoJL",input:"style_input__SpJTE__TkoJL","is-disabled":"style_is-disabled__joxdl__TkoJL","input-icon":"style_input-icon__vVd8R__TkoJL",large:"style_large__En6mL__TkoJL",small:"style_small__DY0AQ__TkoJL","input-inner":"style_input-inner__PWy27__TkoJL","input-custom":"style_input-custom__ktsWD__TkoJL","display-content":"style_display-content__hIKo+__TkoJL","overlay-footer-extra":"style_overlay-footer-extra__Q+BiR__TkoJL","selected-tag":"style_selected-tag__zXZZO__TkoJL","selected-tag-list":"style_selected-tag-list__xUIms__TkoJL","selected-tag-inner":"style_selected-tag-inner__Z5gPL__TkoJL","text-inner":"style_text-inner__H24hY__TkoJL",placeholder:"style_placeholder__x0ccE__TkoJL","is-modal":"style_is-modal__JU+uq__TkoJL","overlay-content":"style_overlay-content__WKqp+__TkoJL"};var o=n(74981);const{context:r,useContext:i,Provider:c,Consumer:d}=(0,o.A)();var u=n(73884),p=n(10986),m=n.n(p),h=n(87558),_=n(33097),g=n.n(_),f=n(55199),x=n(83136),A=n.n(x),y=n(3382),v=n(64671),C=n(79686),j=n.n(C),b=n(41740),N=n.n(b),L=n(74065),S=n.n(L),k=n(21485),T=n(96418),w=n.n(T),O=n(77964),J=n(91176),I=n(47458),P=n(20492),F=n(27047),M=n(70579);const R=["value","onChange","extra","showSelectedTag","renderSelectedContent","children"],D=["value","setValue","children","renderSelectedContent","showSelectedTag","placement","inputContent","single","extra","overlayWidth","wrapClassName","overlayClassName","disabled"],E=["setFetchApi","wrapClassName","getContentRef"],z=["api","className","displayItems","wrapClassName"],V=e=>{let{maxLength:t,single:n,setValue:a,value:l,message:s}=e;return e=>a(!n&&Number.isInteger(t)&&t>0&&e.length>t?(s(),l):e)},W=e=>{let{single:t,value:n,mapping:a,allValue:l,allLabel:o,onClose:r}=e;return n&&Array.isArray(n)&&0!==n.length?t?(0,M.jsx)("span",{className:s["text-inner"],children:g()(a.get(n[0]),"label")||n[0]}):1===n.length&&n[0]===(l||"all")?(0,M.jsx)("span",{className:s["text-inner"],children:o||(0,M.jsx)(I.FormattedMessage,{id:"all",moduleName:"Common"})}):n.map(e=>{const t=a.get(e);return(0,M.jsx)(f.Tag,{className:s["display-tag"],closable:!0,onClose:n=>{n.preventDefault(),r(e,t)},children:(0,M.jsx)("span",{className:s["tag-inner"],children:g()(t,"label")||e})},e)}):null},K=(0,u.forwardRef)((e,t)=>{let{value:n,onChange:o,extra:r,showSelectedTag:i,renderSelectedContent:c,children:d}=e,p=(0,l.A)(e,R);const[m,h]=(0,u.useState)(n),_=(0,u.useRef)(n),{formatMessage:g}=(0,I.useIntl)({moduleName:"Common"});_.current=n;const[x,A]=(0,u.useState)(!1),v=e=>{var t;A(e),null===(t=p.onOpenChange)||void 0===t||t.call(p,e)},{message:C}=f.App.useApp(),j=V({maxLength:p.maxLength,single:p.single,setValue:h,value:m,message:()=>C.error(g({id:"maxSelectedCount"},{count:p.maxLength}))});return(0,u.useEffect)(()=>{x&&h(_.current)},[x]),(0,u.useImperativeHandle)(t,()=>({modalOpen:()=>{v(!0)},close:()=>{v(!1)}})),(0,M.jsx)(y.default,(0,a.A)((0,a.A)({},p),{},{open:x,onConfirm:()=>{o(m)},onClose:()=>{v(!1)},footer:(0,M.jsxs)(f.Space,{direction:"vertical",className:s["overlay-footer"],children:[r&&(0,M.jsx)("div",{className:s["overlay-footer-extra"],children:r}),i&&c({value:m,setValue:j})]}),children:"function"===typeof d?d({value:m,setValue:j}):d}))}),B=(0,u.forwardRef)((e,t)=>{let{value:n,setValue:o,children:r,renderSelectedContent:i,showSelectedTag:c,placement:d,inputContent:p,single:m,extra:h,overlayWidth:_,wrapClassName:g,overlayClassName:x,disabled:y}=e,v=(0,l.A)(e,D);const[C,j]=(0,u.useState)(!1),b=w()(e=>{var t;j(e),null===(t=v.onOpenChange)||void 0===t||t.call(v,e)});return(0,u.useImperativeHandle)(t,()=>({close:()=>{b(!1)}}),[b]),y?(0,M.jsx)("div",{className:s["input-inner"],children:p}):(0,M.jsx)(f.Popover,(0,a.A)((0,a.A)({},v),{},{open:C,onOpenChange:b,transitionName:"ant-slide-up",overlayClassName:A()(s.overlay,x),arrow:!1,content:(0,M.jsxs)("div",{style:_?{"--overlay-width":_}:{},className:A()(s["overlay-content"],"over-content"),onClick:e=>{e.stopPropagation()},children:[(0,M.jsx)("div",{className:s["overlay-inner"],children:"function"===typeof r?r({value:n,setValue:e=>{(!m||n[0]!==e[0])&&o(e),m&&b(!1)}}):r}),(c||h)&&(0,M.jsxs)("div",{className:s["overlay-footer"],children:[h&&(0,M.jsx)("div",{className:s["overlay-footer-extra"],children:h}),c&&i({value:n,setValue:o})]})]}),trigger:"click",placement:d,children:(0,M.jsx)("div",{className:s["input-inner"],children:p})}))}),U=(0,h.withFetch)(e=>{let{setFetchApi:t,wrapClassName:n,getContentRef:a}=e,o=(0,l.A)(e,E);const[r,c]=(0,u.useState)(!1),d=(0,u.useRef)(null),p=(0,u.useRef)(null),m=i(),{valueState:h,mapping:_,props:g,inputWidth:x}=m,[y,C]=h,{formatMessage:j}=(0,I.useIntl)({moduleName:"Common"}),{single:b,placement:N,getPopupContainer:L,placeholder:S,isPopup:T,disabled:O,showSelectedTag:P,extra:F,inputContent:R,allowClear:D,overlayClassName:z}=g,V=(0,u.useRef)(o);V.current=o;const U=w()(a);(0,u.useEffect)(()=>{U(T?p:d)},[T,U]),(0,u.useEffect)(()=>{t(Object.assign({},V.current,{data:o.data,isComplete:o.isComplete}))},[o.data,t,o.isComplete]);const q=W({single:b,value:y,mapping:_,allValue:g.allValue,allLabel:g.allLabel,onClose:e=>{C(t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n})}}),Q=e=>{let{value:t,setValue:n}=e;return(0,M.jsxs)(f.Space,{className:s["selected-tag"],align:"center",wrap:!1,children:[(0,M.jsxs)("div",{children:[(0,M.jsx)(I.FormattedMessage,{id:"selectedTextAdvanced",moduleName:"Common",defaultMessage:"\u5df2\u9009"}),!g.single&&Number.isInteger(g.maxLength)&&g.maxLength>0?"(".concat(t.length,"/").concat(g.maxLength,")"):"",":"]}),(0,M.jsx)(k.A,{className:s["selected-tag-list"],children:(0,M.jsx)("div",{className:s["selected-tag-inner"],children:W({value:t,mapping:_,allValue:g.allValue,allLabel:g.allLabel,onClose:e=>{n(t=>{const n=t.slice(0),a=t.indexOf(e);return a>-1&&n.splice(a,1),n})}})})})]})},H=R?R(m):(0,M.jsxs)(f.Space,{className:s["display-content"],onMouseOver:()=>{c(!0)},onMouseOut:()=>{c(!1)},children:[(0,M.jsx)("div",{children:q||(0,M.jsx)("span",{className:s.placeholder,children:S||j({id:"pleaseSelect"})})}),r&&y&&y.length>0&&!O&&D?(0,M.jsx)(v.default,{className:A()(s.close,s["input-icon"],"close","input-icon"),type:"icon-shibai",onClick:e=>{e.stopPropagation(),C([])}}):(0,M.jsx)(v.default,{className:A()(s["input-icon"],"input-icon-arrow","input-icon"),type:"icon-arrow-thin-down"})]});return T?(0,M.jsx)(B,{ref:p,overlayWidth:(0,J.v)(Math.max(x,(0,J.j)(g.overlayWidth))),value:y,setValue:C,single:b,disabled:O,inputContent:H,onOpenChange:g.onOpenChange,overlayClassName:z,extra:"function"===typeof F?F({close:()=>p.current.close(),context:m}):F,renderSelectedContent:Q,showSelectedTag:P,trigger:"click",placement:N,getPopupContainer:L,children:g.children}):(0,M.jsxs)("div",{className:s["input-inner"],onClick:()=>{O||d.current.modalOpen()},children:[(0,M.jsx)(K,{size:g.modalSize,ref:d,single:g.single,maxLength:g.maxLength,onOpenChange:g.onOpenChange,disabledScroller:!0,wrapClassName:A()(s.overlay,s["is-modal"],n),title:g.placeholder||j({id:"pleaseSelect"}),value:y,onChange:C,extra:"function"===typeof F?F({close:()=>d.current.close(),context:m}):F,showSelectedTag:P,renderSelectedContent:Q,children:g.children}),H]})}),q=(0,I.createWithIntl)({importMessages:P.A,moduleName:"Common"})(e=>{const t=Object.assign({},{displayItems:[],extra:null,api:{loader:()=>[]},dataFormat:e=>({list:e}),placement:"bottomLeft",showSelectedTag:!0,allowClear:!0},e),{api:n,className:o,displayItems:r,wrapClassName:i}=t,d=(0,l.A)(t,z),{locale:p}=(0,F.A)(),[h,_]=(0,u.useState)(""),[x,y]=(0,u.useState)(new Map(r.map(e=>[e.value,e]))),{formatMessage:v}=(0,I.useIntl)({moduleName:"Common"}),[C,b]=(0,u.useState)(0),L=(0,O.A)(e=>{b(e.clientWidth)}),[k,T]=(0,u.useState)({}),{message:w}=f.App.useApp(),J=e=>{const t=e.filter(e=>x.get(e.value)!==e);0!==t.length&&y(e=>{const n=N()(e);return t.forEach(e=>{n.set(e.value,e)}),n})},P=e=>((e,t)=>Array.isArray(e)&&e.every(e=>e&&e.hasOwnProperty("value")&&e.hasOwnProperty("label"))?(t(e),e.map(e=>e.value)):e)(d.single?j()(e)?[]:[e]:e||[],J,d.valueType),[R,D]=m()(Object.assign({},d,{onChange:e=>{const t=((e,t,n)=>"all"!==n?e:e.map(e=>t.get(e)).filter(e=>!!e))(e,x,d.valueType);d.onChange&&d.onChange(d.single?S()(t):t)}},"value"in d?{value:P(d.value)}:{defaultValue:P(d.defaultValue)})),E=V({maxLength:d.maxLength,single:d.single,setValue:D,value:R,message:()=>w.error(v({id:"maxSelectedCount"},{count:d.maxLength}))}),W=(0,u.useRef)(null);return(0,M.jsx)(c,{value:{inputWidth:C,mapping:x,searchText:h,setSearchText:_,appendMapping:J,setItems:e=>{k.setData(e),J(g()(d.dataFormat(e,{locale:p}),"list",[]))},getContentApi:()=>W.current,fetchApi:k,valueState:[R,E],props:d},children:(0,M.jsx)("div",{ref:L,className:A()(s["input".concat(d.inputContent&&"function"===typeof d.inputContent?"-custom":"")],{"select-input-disabled":!!d.disabled},o),children:(0,M.jsx)(U,(0,a.A)((0,a.A)({},n),{},{wrapClassName:i,loading:null,setFetchApi:T,getContentRef:e=>{e.current&&(W.current=e.current)},onRequestSuccess:e=>{J(g()(d.dataFormat(e,{locale:p}),"list",[])),n.onRequestSuccess&&n.onRequestSuccess(e)}}))})})});q.useContext=i;const Q=q},40438(e,t,n){n.r(t),n.d(t,{default:()=>S});var a=n(89379),l=n(53986),s=n(87558),o=n.n(s),r=n(97211),i=n(64671),c=n(83136),d=n.n(c),u=n(55199),p=n(73884);const m=e=>{let{params:t}=e;const{data:n}=t;return new Promise((e,t)=>{const a=new window.Image;a.src=n,a.addEventListener("load",()=>{e(n)}),a.addEventListener("error",e=>{t(e)})})},h="style_img-outer__4QLY5__TkoJL",_="style_img__PSExq__TkoJL",g="style_loading__WCOwA__TkoJL",f="style_error__+ECgZ__TkoJL";var x=n(18411),A=n(72752),y=n(70579);const v=["id","src","alt","onClick","loading","error","className","apis"],C=["id","src","alt","gender","loading","error","className","gap","icon","children","shape","size","width","height","defaultAvatar","apis"],j=e=>{let{data:t,className:n,alt:a,innerLoading:l,loading:s=(0,y.jsx)(u.Skeleton.Avatar,{shape:"square",active:!0}),error:r=(0,y.jsx)(i.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),innerError:c,children:p,onClick:h,staticUrl:g}=e;const{staticUrl:f}=(0,A.usePreset)(),x=g||f||"";return(0,y.jsx)(o(),{loader:m,params:{data:/^https?:\/\//.test(t)?t:x+t},error:c||r,loading:l||s,render:e=>{let{data:t}=e;return"function"===typeof p?p({alt:a,className:d()(n,_),src:t}):(0,y.jsx)("img",{alt:a,className:d()(n,_),src:t,onClick:h})}})},b=(0,r.A)(j),N=e=>{let{loading:t,error:n,src:a,id:l,alt:s,className:o,children:r,apis:i,onClick:c}=e;const d=t&&(0,p.cloneElement)(t,{className:g}),u=n&&(0,p.cloneElement)(n,{className:f});return a?(0,y.jsx)(j,{alt:s,className:o,data:a,loading:d,error:u,onClick:c,children:r}):l?(0,y.jsx)(b,{alt:s,className:o,id:l,loading:d,innerLoading:d,error:u,innerError:u,apis:i,onClick:c,children:r}):u},L=e=>{let{id:t,src:n,alt:s,onClick:o,loading:r=(0,y.jsx)(u.Skeleton.Avatar,{shape:"square",active:!0}),error:c=(0,y.jsx)(i.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),className:p,apis:m}=e,_=(0,l.A)(e,v);return(0,y.jsx)("div",(0,a.A)((0,a.A)({},_),{},{"data-testid":"components-core-image",className:d()(p,h),children:N({loading:r,error:c,src:n,id:t,alt:s,className:p,apis:m,onClick:o})}))};L.Avatar=e=>{let{id:t,src:n,alt:s,gender:o,loading:r=(0,y.jsx)(u.Skeleton.Avatar,{shape:"square",active:!0}),error:c=(0,y.jsx)(i.default,{role:"error-icon",colorful:!0,type:"icon-color-touxiang-nan"}),className:p,gap:m,icon:_,children:g,shape:f,size:A=100,width:v,height:j,defaultAvatar:b=x.A,apis:L}=e,S=(0,l.A)(e,C);const k=(()=>{const e=v&&j?{style:{width:v,height:j}}:{size:A};if(v&&v!==j&&(f="square"),t||n)return N({loading:r,error:c,src:n,defaultAvatar:b,id:t,alt:s,className:p,apis:L,children:t=>(0,y.jsx)(u.Avatar,(0,a.A)((0,a.A)({},t),{},{gap:m,shape:f},e))});if(o){const t=o&&["F","female","f"].indexOf(o)>-1?"icon-color-touxiang-nv":"icon-color-touxiang-nan";return(0,y.jsx)(u.Avatar,(0,a.A)((0,a.A)({},S),{},{src:(0,y.jsx)(i.default,{role:"touxiang",colorful:!0,type:t}),gap:m,shape:f},e))}return(0,y.jsx)(u.Avatar,(0,a.A)((0,a.A)((0,a.A)({},S),{},{gap:m,icon:_,shape:f,size:A,src:b},e),{},{children:g}))})();return(0,y.jsx)("div",(0,a.A)((0,a.A)({},S),{},{"data-testid":"components-core-image-avatar",className:d()(p,h),style:{width:v&&j?v:A,height:v&&j?j:A},children:k}))};const S=L},41654(e,t,n){n.d(t,{A:()=>f,K:()=>g});var a=n(89379),l=n(53986),s=n(45776),o=n(27047),r=n(33097),i=n.n(r),c=n(70579);const d=["apis"],u=["apis"],p=(e,t)=>"en-US"===t?i()(e,"enName"):i()(e,"chName"),m=()=>n.e(719).then(n.t.bind(n,10719,19)).then(e=>e.__esModule?e.default:e),h={cache:"FUNCTION_DATA",isLocal:!0,ttl:864e5,loader:m},_=e=>{const t=Object.assign({},{overlayWidth:"640px",getSearchProps:e=>({data:{searchText:e}})},e),{apis:n}=t,r=(0,l.A)(t,d),{apis:i,locale:u}=(0,o.A)(),m=Object.assign({},{functionData:h},null===i||void 0===i?void 0:i.staticData,n);return(0,c.jsx)(s.Ay,(0,a.A)((0,a.A)({},r),{},{api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:n}=(0,s.ON)(new Map(t.map(e=>[e.code,(0,a.A)((0,a.A)({},e),{},{id:e.code,label:p(e,u),parentId:e.parentCode||null})])));return n}},m.functionData)}))};_.defaultData=m;const g=e=>{let{apis:t}=e,n=(0,l.A)(e,u);const{apis:r,locale:i}=(0,o.A)(),d=Object.assign({},{functionData:h},null===r||void 0===r?void 0:r.staticData,t);return(0,c.jsx)(s.yK,(0,a.A)((0,a.A)((0,a.A)({},n),d.functionData),{},{type:"function",getLabel:e=>p(e,i),transformData:e=>{let{data:t}=e;return t}}))};_.FunctionEnum=_.Enum=g;const f=_},43856(e,t,n){n.r(t),n.d(t,{AddressEnum:()=>m.qn,AddressInputField:()=>m.TM,AddressSelectField:()=>m.Ay,AdvancedSelectField:()=>h.Ay,CascaderField:()=>g.Ay,FetchButton:()=>i.A,FetchScrollLoader:()=>r.FetchScrollLoader,FunctionEnum:()=>f.K,FunctionSelectField:()=>f.A,IndustryEnum:()=>x.W,IndustrySelectField:()=>x.A,InputFileButton:()=>p.Zi,InputFileLink:()=>p.FI,InputFileText:()=>p.AG,ScrollLoader:()=>r.default,SearchInput:()=>d.A,SelectInnerInput:()=>u.A,SimpleBar:()=>c.A,SuperSelectField:()=>_.Ay,SuperSelectTableListField:()=>_.e0,SuperSelectTreeField:()=>_.ec,SuperSelectUserField:()=>_.$9,TableField:()=>h.Bm,TypeDateRangePickerField:()=>A.A,UserField:()=>h.Eo,accept:()=>v.A,changeMoneyToChinese:()=>a.A,createAddressApi:()=>m.LH,createDeferred:()=>j(),createListField:()=>h.NR,createTreeUtils:()=>g.ON,getContainerBody:()=>l.c,getPopupContainer:()=>s,getScrollEl:()=>l.h,isNotEmpty:()=>b.A,numberToPx:()=>N.v,pxToNumber:()=>N.j,useFileUpload:()=>p.lN,useResize:()=>y.A,withAddressApi:()=>m.DF,withInputFile:()=>p.Ay,withOSSFile:()=>o.A});var a=n(69484),l=n(76801);const s=e=>{const t=e=>{const n=(0,l.h)();if(!e||e===n||!e.parentElement)return n;return[].slice.call(e.classList,0).find(e=>["ant-modal-body","ant-modal-content","ant-popover-content"].indexOf(e)>-1)?e:t(e.parentElement)};return t(e)};var o=n(97211),r=n(78784),i=n(73025),c=n(17342),d=n(73161),u=n(30509),p=n(17508),m=n(93761),h=n(12392),_=n(60586),g=n(45776),f=n(41654),x=n(53392),A=n(89319),y=n(77964),v=n(81348),C=n(1582),j=n.n(C),b=n(55490),N=n(91176)},45776(e,t,n){n.d(t,{yK:()=>P,ON:()=>g,Ay:()=>z});var a=n(53986),l=n(89379),s=n(30509),o=n(73884),r=n(96418),i=n.n(r),c=n(55199),d=n(64671),u=n(73161),p=n(33097),m=n.n(p),h=n(79686),_=n.n(h);const g=e=>{const t=Array.from(e.values()),n=t.filter(e=>null===e.parentId),a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},l=t=>{const n=[],a=t=>{const l=e.get(t);l&&Array.isArray(l.children)&&l.children.length>0&&(n.push(...l.children),l.children.forEach(e=>{a(e.id)}))};return a(t),n},s=(t,n)=>{const a=t=>{const l=e.get(t);return l?n(l)?l:_()(l.parentId)?null:a(l.parentId):null};return a(t)},o=t=>{const a=e.get(t);if(!a)return[];const l=a.parentId;if(_()(l))return n;return e.get(l).children},r=(()=>{const e=n=>Array.isArray(n)&&n.length>0?n.map(n=>{const a=t.filter(e=>e.parentId===n.id);return Object.assign({},n,{children:e(a)})}):null;return e(n)})();return{mapping:e,getSelectedQueue:t=>{const n=e.get(t);if(!n)return[];const a=e=>{if(e.children&&e.children.length>0)return a(e.children.find(t=>t.children&&e.children.length>0)||m()(e.children,"0"));const t=l(e.parentId).find(e=>e.children&&e.children.length>0);return t?a(t):e},s=function(t){const n=[t,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]],a=e.get(t);return!a||_()(a.parentId)?n:s(a.parentId,n)},o=a(n);return s(m()(o,"id"))},getAllChildren:l,computedCheckboxStatus:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(s(t,e=>n.indexOf(e.id)>-1))return{checked:!0,indeterminate:!1};const a=(t=>{const a=t=>{const l=e.get(t);return l?(s=l,n.indexOf(s.id)>-1?l:Array.isArray(l.children)&&l.children.length>0?l.children.find(e=>!!a(e.id)):void 0):null;var s};return!!a(t)})(t);return a?{checked:!1,indeterminate:!0}:{checked:!1,indeterminate:!1}},getSiblingNode:o,findInParents:s,setNodeChecked:function(t){const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),s=t=>{const r=e.get(t);if(!r)return;n.push(t),l(t).forEach(e=>{a(n,e.id)});const i=o(t),c=i.every(e=>n.indexOf(e.id)>-1);r.parentId&&c&&(i.forEach(e=>{a(n,e.id)}),s(r.parentId))};return s(t),n},setNodeUnchecked:function(t){const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).slice(0),l=t=>{const s=e.get(t);if(!s)return;if(n.indexOf(s.id)>-1)return void a(n,s.id);const r=o(t);s.parentId&&(r.forEach(e=>{t!==e.id&&n.push(e.id)}),l(s.parentId))};return l(t),n},treeData:r,treeMapping:new Map(r.map(e=>[e.id,e]))}};var f=n(74065),x=n.n(f),A=n(19853),y=n.n(A),v=n(17342),C=n(83136),j=n.n(C);const b={content:"style_content__Hxlt9__TkoJL",columns:"style_columns__FmtPF__TkoJL","content-item":"style_content-item__i6HCO__TkoJL","last-level-area":"style_last-level-area__2y7jQ__TkoJL","is-popup":"style_is-popup__+r3Mn__TkoJL",menu:"style_menu__WZUVE__TkoJL","scroll-plus-box":"style_scroll-plus-box__QcTst__TkoJL","menu-label":"style_menu-label__iGt0Z__TkoJL","menu-item":"style_menu-item__hXHfm__TkoJL","checkbox-hidden":"style_checkbox-hidden__Xpx7J__TkoJL",loading:"style_loading__ZwrVe__TkoJL"};var N=n(87558),L=n(47458),S=n(25438),k=n(70579),T=n(27047);const w=["data","name","type","cache","children","getLabel"],O=new Map,J=(0,N.withFetch)(e=>{let{data:t,name:n,type:s,cache:r,children:i,getLabel:c}=e,d=(0,a.A)(e,w);const u=(0,o.useMemo)(()=>new Map(t.map(e=>[e.code,(0,l.A)((0,l.A)({},e),{},{id:e.code,label:c?c(e):e.chName,parentId:e.parentCode||null})])),[t,c]).get(n);return O.set("".concat(n,"_").concat(s),u),i(u,d)}),I=e=>{const{locale:t}=(0,T.A)(),n="".concat(t,"_").concat(e.name,"_").concat(e.type),a=O.get(n);return a&&!e.force?e.children(a):(0,k.jsx)(J,(0,l.A)({},e))};I.defaultProps={children:e=>m()(e,"label","")};const P=I,F=["maxLength","nodeFormat","dataFormat"],M=s.A.useContext,R=(0,N.withFetch)(e=>{let{data:t,computedIsChecked:n,onSelect:a}=e;return(0,k.jsx)(v.A,{className:b["scroll-plus-box"],children:(0,k.jsx)(c.List,{className:S.A.list,size:"small",dataSource:t,rowKey:"value",renderItem:e=>{const t=n(e);return(0,k.jsx)(c.List.Item,{className:j()(S.A["list-item"],{[S.A["is-selected"]]:t}),onClick:()=>a(e,t),children:(0,k.jsx)("span",{className:S.A["item-label"],children:e.label})})}})})}),D=e=>{let{value:t,setValue:n,size:a,selectLevel:s}=e;const{fetchApi:r,props:p}=M(),[h,_]=(0,o.useState)(""),f=i()(p.dataFormat),{formatMessage:A}=(0,L.useIntl)({moduleName:"Common"}),C=r.data,N=(0,o.useMemo)(()=>new Map(f(C).list.map(e=>[e.value,e])),[C,f]),T=(0,o.useMemo)(()=>g(N),[N]),w=(0,o.useRef)({});w.current={createMergeTree:p.createMergeTree,loadMore:r.loadMore,openLoadData:p.openLoadData,parentIdKey:p.parentIdKey,treeUtils:T};const[O,J]=(0,o.useState)(()=>{const e=t.find(e=>!!N.get(e));return T.getSelectedQueue(e||m()(r.data.find(e=>e.children&&e.children.length>0),"id")||m()(r.data,"[0].id"),N)});(0,o.useEffect)(()=>{const{openLoadData:e,loadMore:t,parentIdKey:n,createMergeTree:a,treeUtils:l}=w.current;if(!e)return;const s=N.get(x()(O));if(!s)return;const o=l.getSelectedQueue(s.id);y()(O,o)?s.hasOwnProperty("children")||t({data:{[n]:s.id}},a(s.id)):J(o)},[O,N]);const I=(e,l)=>{const s=(()=>{if(p.onlyAllowLastLevel&&e){const e=t.slice(0);return e.push(l),e}if(p.onlyAllowLastLevel){const e=t.slice(0);return e.splice(t.indexOf(l),1),e}return e?T.setNodeChecked(l,t):T.setNodeUnchecked(l,t)})();s.length>a?c.message.error(A({id:"maxSelectedCount"},{count:a})):n(p.single&&s.length>0?[x()(s)]:s)},P=e=>{const t=N.get(e);return!(!p.openLoadData||t.hasOwnProperty("children"))||t.children&&t.children.length>0},F=!p.openLoadData&&"function"===typeof p.onSearch,D=F&&h&&(0,k.jsx)(R,{data:{searchText:h},loader:e=>{let{data:t}=e;return p.onSearch(t.searchText,{mapping:N})},computedIsChecked:e=>t.indexOf(e.id)>-1,onSelect:(e,t)=>{I(!t,e.id),!t&&J(T.getSelectedQueue(e.id,N)),_("")}});return(0,k.jsxs)("div",{className:j()(b.content,{[b["is-popup"]]:p.isPopup,[b["has-search"]]:F}),style:{"--menu-item-width":p.menuItemWidth},children:[F&&(0,k.jsx)(u.A,{isPopup:p.isPopup,className:j()(S.A["search-input"],{[S.A["is-popup"]]:p.isPopup}),placeholder:p.searchPlaceholder||A({id:"search"}),value:h,onSearch:e=>{_(e)}}),D||(0,k.jsx)("div",{children:(0,k.jsx)(v.A,{className:b.scroller,options:{autoHide:!1},children:(0,k.jsxs)("div",{className:b.columns,children:[O.map((e,n)=>{const a=N.get(e),r=T.getSiblingNode(e),i=!P(null===a||void 0===a?void 0:a.id)&&n>0;return(0,k.jsx)(v.A,{className:j()(b["content-item"],{[b["last-level-area"]]:i}),children:i?(0,k.jsx)(c.Space,{wrap:!0,children:r.map(e=>(0,o.createElement)(c.Checkbox,(0,l.A)((0,l.A)({},T.computedCheckboxStatus(e.id,t)),{},{disabled:s>1&&(t.indexOf(e.parentCode)>-1||t.indexOf(e.code.slice(0,3))>-1),key:e.id,onChange:t=>I(t.target.checked,e.id)}),e.label))}):(0,k.jsx)(c.Menu,{className:j()(b.menu),onSelect:e=>{const n=N.get(e.key);if(n)if(P(n.id))J(T.getSelectedQueue(n.id,N));else{const{checked:e}=T.computedCheckboxStatus(n.id,t);I(!e,n.id)}},selectedKeys:n===O.length-1?[]:O,items:r.map(e=>({key:e.id,label:(0,k.jsxs)(c.Space,{className:j()(b["menu-item"],{[b["checkbox-hidden"]]:p.onlyAllowLastLevel&&P(e.id)}),children:[!p.onlyAllowLastLevel&&(0,k.jsx)(c.Checkbox,(0,l.A)((0,l.A)({},T.computedCheckboxStatus(e.id,t)),{},{disabled:s>1&&t.indexOf(e.parentCode)>-1,onChange:t=>I(t.target.checked,e.id)})),(0,k.jsx)("div",{className:b["menu-label"],children:e.label}),P(e.id)&&(0,k.jsx)(d.default,{className:b["menu-item-icon"],type:"icon-arrow-thin-right",size:12})]})}))})},m()(r,"[0].id",n))}),r.isComplete?null:(0,k.jsx)("div",{className:b.loading,children:(0,k.jsx)(c.Spin,{size:"small"})})]})})})]})},E=e=>{let{maxLength:t,nodeFormat:n,dataFormat:o}=e,r=(0,a.A)(e,F);return(0,k.jsx)(s.A,(0,l.A)((0,l.A)({},r),{},{dataFormat:e=>o(e,n),children:e=>{let{value:n,setValue:a}=e;return(0,k.jsx)(D,(0,l.A)((0,l.A)({},r),{},{size:t,value:n,setValue:a}))}}))};E.defaultProps={maxLength:Number.MAX_VALUE,size:"middle",isPopup:!0,overlayWidth:"460px",menuItemWidth:"180px",openLoadData:!1,onlyAllowLastLevel:!1,parentIdKey:"id",onSearch:(e,t)=>{let{mapping:n}=t;return Array.from(n.values()).filter(t=>t.label.indexOf(e)>-1)},dataFormat:(e,t)=>{const n=(e,a)=>{const l=[];return l.push(...(e||[]).map(e=>("function"===typeof t&&Object.assign(e,t(e)),e.children&&e.children.length>0&&l.push(...n(e.children,e.id)),Object.assign({},e,{value:e.id,parentId:a})))),l};return{list:n(e,null)}},createMergeTree:e=>(t,n)=>{const a=t=>t.map(t=>t.id===e?Object.assign({},t,{children:n&&n.map(t=>Object.assign({},t,{parentId:e}))}):Array.isArray(t.children)&&t.children.length>0?Object.assign({},t,{children:a(t.children)}):t);return a(t)}};const z=E},53392(e,t,n){n.d(t,{A:()=>g,W:()=>_});var a=n(89379),l=n(53986),s=n(45776),o=n(27047),r=n(33097),i=n.n(r),c=n(70579);const d=["apis"],u=["apis"],p=(e,t)=>"en-US"===t?i()(e,"enName"):i()(e,"chName"),m={cache:"INDUSTRY_DATA",isLocal:!0,ttl:864e5,loader:()=>n.e(7183).then(n.t.bind(n,57183,19)).then(e=>e.__esModule?e.default:e)},h=e=>{let{apis:t}=e,n=(0,l.A)(e,d);const{apis:r,locale:i}=(0,o.A)(),u=Object.assign({},{industryData:m},null===r||void 0===r?void 0:r.staticData,t);return(0,c.jsx)(s.Ay,(0,a.A)((0,a.A)({},n),{},{api:Object.assign({},{transformData:e=>{let{data:t}=e;const{treeData:n}=(0,s.ON)(new Map(t.filter(e=>"000"!==e.code).map(e=>[e.code,(0,a.A)((0,a.A)({},e),{},{id:e.code,label:p(e,i),parentId:e.parentCode||null})])));return n}},u.industryData)}))};h.defaultProps={overlayWidth:"635px"};const _=e=>{let{apis:t}=e,n=(0,l.A)(e,u);const{apis:r,locale:i}=(0,o.A)(),d=Object.assign({},{industryData:m},null===r||void 0===r?void 0:r.staticData,t);return(0,c.jsx)(s.yK,(0,a.A)((0,a.A)((0,a.A)({},n),d.industryData),{},{type:"function",getLabel:e=>p(e,i),transformData:e=>{let{data:t}=e;return t}}))};h.IndustryEnum=h.Enum=_;const g=h},55490(e,t,n){n.d(t,{A:()=>a.isNotEmpty});var a=n(39129)},60586(e,t,n){n.d(t,{e0:()=>A,ec:()=>y,$9:()=>v,Ay:()=>x});var a=n(89379),l=n(73884),s=n(98949),o=n.n(s),r=n(3382),i=n(40438),c=n(55199);const d="style_select-list-item-description__ndJSX__TkoJL",u="style_select-list-item-label__gyGnt__TkoJL",p="style_select-list-item-content__2VJnt__TkoJL";var m=n(83136),h=n.n(m),_=(n(96316),n(70579));const g=e=>{const{props:t,open:n,onOpenChange:a,value:l,onComplete:o}=e,{placeholder:i,children:c,showSelectedTag:d,onConfirm:u}=t;return(0,_.jsx)(r.default,{title:i,open:n,onClose:()=>{a(!1)},footer:d&&(0,_.jsx)(s.SelectedTagList,{}),onConfirm:()=>{if(o(),"function"===typeof u)return u(l)},children:c(e)})},f=(0,l.forwardRef)((e,t)=>{const n=Object.assign({},{children:e=>{let{components:t}=e;return(0,_.jsxs)(c.Flex,{vertical:!0,children:[t.search,t.selectedAll,t.fetchList,t.footer,!1!==n.isPopup&&t.selectedTag]})},renderModal:g},e);return(0,_.jsx)(o(),(0,a.A)((0,a.A)({},n),{},{ref:t}))}),x=f,A=(0,l.forwardRef)((e,t)=>{const n=Object.assign({},{renderModal:g},e);return(0,_.jsx)(s.SelectTableList,(0,a.A)((0,a.A)({},n),{},{ref:t}))}),y=(0,l.forwardRef)((e,t)=>{const n=Object.assign({},{renderModal:g},e);return(0,_.jsx)(s.SelectTree,(0,a.A)((0,a.A)({},n),{},{ref:t}))}),v=(0,l.forwardRef)((e,t)=>(0,_.jsx)(f,(0,a.A)((0,a.A)({},e),{},{ref:t,renderItemContent:e=>{let{item:t,props:n}=e;const{labelKey:l,avatarKey:s,descriptionKey:o}=n,r=t[s||"avatar"];return(0,_.jsxs)(c.Flex,{gap:8,children:[(0,_.jsx)(i.default.Avatar,(0,a.A)((0,a.A)({},Object.assign({},"string"===typeof r?{id:r}:r)),{},{size:32,gender:"M"})),(0,_.jsxs)(c.Flex,{vertical:!0,gap:8,className:p,align:"flex-start",children:[(0,_.jsx)("div",{className:h()(u,"select-list-item-label"),children:t[l]}),t[o||"description"]&&(0,_.jsx)("div",{className:h()(d,"select-list-item-description"),title:t[o||"description"],children:t[o||"description"]})]})]})}})))},69484(e,t,n){n.d(t,{A:()=>l,e:()=>a});const a=1e15,l=e=>{let t,n,l,s=["\u96f6","\u58f9","\u8d30","\u53c1","\u8086","\u4f0d","\u9646","\u67d2","\u634c","\u7396"],o=["","\u62fe","\u4f70","\u4edf"],r=["","\u4e07","\u4ebf","\u5146"],i=["\u89d2","\u5206","\u6beb","\u5398"],c="",d="";if(""===e)return"";if((e=parseFloat(e))>=a)return c="\u8d85\u51fa\u6700\u5927\u5904\u7406\u6570\u5b57",console.error("\u8d85\u51fa\u6700\u5927\u5904\u7406\u6570\u5b57"),c;if(0===e)return c=s[0]+"\u5143\u6574",c;if(e<0&&(e=-e,d="\u8d1f "),-1===(e=e.toString()).indexOf(".")?(t=e,n=""):(l=e.split("."),t=l[0],n=l[1].substr(0,4)),parseInt(t,10)>0){let e=0,n=t.length;for(let a=0;a<n;a++){let l=t.substr(a,1),i=n-a-1,d=i/4,u=i%4;"0"===l?e++:(e>0&&(c+=s[0]),e=0,c+=s[parseInt(l)]+o[u]),0===u&&e<4&&(c+=r[d])}c+="\u5143"}if(""!==n){let e=n.length;for(let t=0;t<e;t++){let e=n.substr(t,1);"0"!==e&&(c+=s[Number(e)]+i[t])}}return""===c?c+=s[0]+"\u5143\u6574":""===n&&(c+="\u6574"),c=d+c,c}},73161(e,t,n){n.d(t,{A:()=>_});var a=n(89379),l=n(53986),s=n(55199),o=n(83136),r=n.n(o);const i="style_search-input__8aH1G__TkoJL",c="style_is-popup__L0973__TkoJL";var d=n(64671),u=n(73884),p=n(51941),m=n(70579);const h=["value","debounce","onSearch","isPopup","placeholder","className"],_=e=>{let{value:t,debounce:n=500,onSearch:o,isPopup:_,placeholder:g,className:f}=e,x=(0,l.A)(e,h);const[A,y]=(0,u.useState)(t),v=(0,u.useRef)(t),C=(0,p.useDebouncedCallback)(o,n);return(0,u.useEffect)(()=>{t!==v.current&&(y(t),v.current=t)},[t]),(0,m.jsx)(s.Input.Search,(0,a.A)((0,a.A)({},x),{},{allowClear:!0,className:r()(f,i,{[c]:_}),value:A,placeholder:g,prefix:(0,m.jsx)(d.default,{type:"icon-sousuo"}),enterButton:(0,m.jsx)(d.default,{type:"icon-sousuo"}),onChange:e=>{const t=e.target.value;v.current=t,y(t),C(t.trim())},onSearch:e=>{C(e.trim())}}))}},74981(e,t,n){n.d(t,{A:()=>l});var a=n(73884);const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.createContext)(e),{Provider:n,Consumer:l}=t;return{context:t,Provider:n,Consumer:l,useContext:()=>(0,a.useContext)(t)}}},77964(e,t,n){n.d(t,{A:()=>d});var a=n(73884),l=n(79889),s=n.n(l),o=n(93950),r=n.n(o),i=n(96418),c=n.n(i);const d=(e,t)=>{const n=(0,a.useRef)(null);n.current=Object.assign({},{time:500,isDebounce:!1},t);const l=(0,a.useRef)(null),o=c()(e);return(0,a.useLayoutEffect)(()=>{const e=l.current,t=()=>window.requestAnimationFrame(()=>{e&&o(e)});t();const a=new ResizeObserver((n.current.isDebounce?r():s())(t,n.current.time));return e&&a.observe(e),()=>{a.disconnect()}},[o]),l}},78784(e,t,n){n.d(t,{default:()=>l.a});n(21219);var a=n(14311),l=n.n(a);n.o(a,"FetchScrollLoader")&&n.d(t,{FetchScrollLoader:function(){return a.FetchScrollLoader}})},81348(e,t,n){n.d(t,{A:()=>a.computedAccept});var a=n(61323)},89319(e,t,n){n.d(t,{A:()=>m});var a=n(89379),l=n(20454),s=n(55199),o=n(10986),r=n.n(o),i=n(57469),c=n.n(i),d=n(20492),u=n(47458),p=n(70579);const m=(0,u.createWithIntl)({importMessages:d.A,moduleName:"Common"})(e=>{let t=Object.assign({},((0,l.A)(e),e));const{formatMessage:n}=(0,u.useIntl)({moduleName:"Common"}),o=new Map([["date",n({id:"customTime"})],["month",n({id:"monthly"})],["week",n({id:"weekly"})]]),[i,d]=r()(t);return(0,p.jsxs)(s.Space.Compact,{children:[(0,p.jsx)(s.Select,{style:{width:"120px"},value:(null===i||void 0===i?void 0:i.type)||"date",onChange:e=>{d(t=>{var n;return{value:null!==t&&void 0!==t&&null!==(n=t.value)&&void 0!==n&&n.length?[c()(t.value[0]).startOf(e||"date"),c()(t.value[1]).endOf(e||"date")]:null,type:e||"date"}})},options:Array.from(o).map(e=>{let[t,n]=e;return{label:n,value:t}})}),(0,p.jsx)(s.DatePicker.RangePicker,(0,a.A)((0,a.A)({},t),{},{picker:(null===i||void 0===i?void 0:i.type)||"date",value:Array.isArray(null===i||void 0===i?void 0:i.value)&&2===i.value.length&&i.value.map(e=>e&&c()(e)),onChange:e=>{d(t=>(console.log(Object.assign({type:"date"},t,{value:e&&[e[0]&&new Date(e[0].startOf((null===t||void 0===t?void 0:t.type)||"date").valueOf()),e[1]&&new Date(e[1].endOf((null===t||void 0===t?void 0:t.type)||"date").valueOf())]})),Object.assign({type:"date"},t,{value:e&&[e[0]&&new Date(e[0].startOf((null===t||void 0===t?void 0:t.type)||"date").valueOf()),e[1]&&new Date(e[1].endOf((null===t||void 0===t?void 0:t.type)||"date").valueOf())]})))}}))]})})},91176(e,t,n){n.d(t,{j:()=>l,v:()=>a});const a=e=>"number"===typeof e?"".concat(e,"px"):e,l=e=>{if(!e)return 0;const t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}},93761(e,t,n){n.d(t,{qn:()=>V,TM:()=>ee,LH:()=>M,Ay:()=>K,NY:()=>R,DF:()=>W});var a=n(53986),l=n(89379),s=n(30509),o=n(25438),r=n(55199),i=n(27047),c=n(83136),d=n.n(c),u=n(64671),p=n(73884),m=n(21485),h=n(56434),_=n.n(h),g=n(15797),f=n.n(g),x=n(33097),A=n.n(x);const y="style_address__DIuRX__TkoJL",v="style_is-popup__tqVvp__TkoJL",C="style_title__FAe12__TkoJL",j="style_scroll-box__JWiDl__TkoJL",b="style_scroll-plus-box__lidEW__TkoJL",N="style_content__lAARZ__TkoJL",L="style_col-left__WPfeS__TkoJL",S="style_col-right__z0e9-__TkoJL";var k=n(87558),T=n.n(k);const w=e=>({"en-US":()=>n.e(3691).then(n.bind(n,83691)),"zh-CN":()=>n.e(2253).then(n.bind(n,32253))}[e]());var O=n(47458),J=n(70579);const I=["name","data","getAddressApi","children"],P=["data"],F=s.A.useContext,M=e=>{let{city:t,province:n,country:a}=e;const l=f()(()=>{const e=[];return["gangaotai","municipality"].forEach(n=>{e.push(...t.relations[n])}),["provinces","continents"].forEach(n=>{t.relations[n].forEach(n=>{e.push(n),e.push(...t.relations[n])})}),e.map(e=>t.list[e])});return{getCity:f()(e=>{const n=t.list[e];return n?{city:n,parent:n.parentCode?t.list[n.parentCode]:null}:{city:null,parent:null}}),getChinaHotCities:f()(()=>t.relations[2].map(e=>t.list[e])),getChinaCities:f()(()=>["2",...n.relations.municipality,...n.relations.provinces,"gangaotai"].map(e=>Object.assign({id:e},t.list[e]))),getCountries:f()(()=>["1",...a.relations.continents].map(e=>Object.assign({id:e},a.list[e]))),getList:f()((e,l)=>{const{showChinaQuan:s,showForeignQuan:o}=Object.assign({},l);if("gangaotai"===e)return n.relations.gangaotai.map(e=>t.list[e]);const r=Object.assign({},t.list[e]);if(n.relations.municipality.indexOf(e)>-1)return r.name="".concat(s?"\u5168":"")+r.name,[r];const i=t.relations[e].map(e=>t.list[e]);return n.relations.provinces.indexOf(e)>-1&&s&&(r.name="\u5168"+r.name,i.splice(0,0,r)),a.relations.continents.indexOf(e)>-1&&o&&(r.name="\u5168"+r.name,i.splice(0,0,r)),i}),getNationalityList:f()(e=>{let n=_()(t);return"1"===e&&n.relations[1].unshift("410"),"350"===e&&n.relations[350].unshift("410"),n.relations[e].filter(e=>n.list[e]).map(e=>n.list[e])}),getCityByName:f()(e=>{const t=l();let n;return[t=>t.name===e,t=>t.name===e.replace(/(\u7701|\u5e02)$/,""),t=>0===e.indexOf(t.name)].find(e=>(n=t.find(e),n)),n}),combineCities:f()((e,n)=>[...n.filter(n=>t.list[n].parentCode!==e&&t.list[e].parentCode!==n&&e!==n),e]),searchCities:f()(e=>{if(!e)return[];return l().filter(t=>["pinyin","name","enName","spelling"].some(n=>t[n].toUpperCase().indexOf(e.toUpperCase())>-1)).map(e=>{const n=e.parentCode?t.list[e.parentCode]:null;return{label:n?"".concat(n.name,"\xb7").concat(e.name):e.name,value:e.code}})})}},R=(e,t)=>"en-US"===t?A()(e,"enName"):A()(e,"name"),D={cache:"CITY_DATA",isLocal:!0,ttl:864e5,loader:()=>n.e(7820).then(n.t.bind(n,37820,19)).then(e=>e.__esModule?e.default:e)},E=e=>{let{value:t,setValue:n}=e;const{fetchApi:a,props:l}=F(),[s,c]=(0,p.useState)(""),[h,_]=(0,p.useState)("2"),{formatMessage:g}=(0,O.useIntl)({moduleName:"AddressSelect"}),{locale:f}=(0,i.A)(),{getCity:x,getChinaCities:A,getCountries:k,getList:T,searchCities:w}=(0,p.useMemo)(()=>M(a.data),[a.data]),I=e=>{if(l.single)return void n([e]);const a=t.slice(0),s=a.indexOf(e);s>-1?a.splice(s,1):a.push(e),n(a)},P=s&&(0,J.jsx)(m.A,{className:b,children:(0,J.jsx)(r.List,{className:o.A.list,size:"small",dataSource:w(s),rowKey:"value",renderItem:e=>(0,J.jsx)(r.List.Item,{className:o.A["list-item"],onClick:()=>{I(e.value),c("")},children:(0,J.jsx)("span",{className:o.A["item-label"],children:e.label})})})});return(0,J.jsxs)("div",{className:d()(y,{[v]:l.isPopup}),children:[(0,J.jsx)(r.Input.Search,{className:d()(o.A["search-input"],{[o.A["is-popup"]]:l.isPopup}),placeholder:l.searchPlaceholder||g({id:"searchCity"}),prefix:(0,J.jsx)(u.default,{type:"icon-sousuo"}),enterButton:(0,J.jsx)(u.default,{type:"icon-sousuo"}),value:s,allowClear:!0,onChange:e=>{const t=e.target.value;c(t)},onSearch:e=>{c(e)}}),(0,J.jsx)("div",{className:N,children:P||(0,J.jsxs)(r.Row,{wrap:!1,children:[(0,J.jsx)(r.Col,{className:L,children:(0,J.jsx)(r.Tabs,{centered:!0,onChange:e=>{_(e)},items:[{key:"2",label:(0,J.jsx)(O.FormattedMessage,{id:"domestic",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5185"}),children:(0,J.jsx)(m.A,{className:j,children:(0,J.jsx)(r.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:A().map(e=>({label:R(e,f),key:e.id}))})})},{key:"1",label:(0,J.jsx)(O.FormattedMessage,{id:"abroad",moduleName:"AddressSelect",defaultMessage:"\u56fd\u5916"}),children:(0,J.jsx)(m.A,{className:j,children:(0,J.jsx)(r.Menu,{selectedKeys:[h],onSelect:e=>{_(e.key)},items:k().map(e=>({label:R(e,f),key:e.id}))})})}]})}),(0,J.jsxs)(r.Col,{flex:1,className:S,children:[(0,J.jsx)(r.Divider,{className:C,orientation:"left",children:R(x(h).city,f)}),(0,J.jsx)(m.A,{className:j,children:(0,J.jsx)(r.Space,{wrap:!0,children:T(h,{showChinaQuan:l.showChinaQuan,showForeignQuan:l.showForeignQuan}).map(e=>(0,J.jsx)(r.Tag.CheckableTag,{checked:t.indexOf(e.code)>-1,onChange:()=>{I(e.code)},children:R(e,f)},e.code))})})]})]})})]})},z=e=>(0,J.jsx)(s.A,(0,l.A)((0,l.A)({},e),{},{children:e=>{let{value:t,setValue:n}=e;return(0,J.jsx)(O.IntlProvider,{moduleName:"AddressSelect",importMessages:w,children:(0,J.jsx)(E,{value:t,setValue:n})})}}));z.defaultProps={overlayWidth:"500px",isPopup:!0,api:D,dataFormat:(e,t)=>{let{city:n}=e;const{locale:a}=Object.assign({},t);return{list:Object.values(n.list).map(e=>Object.assign({},e,{value:e.code,label:R(e,a)}))}}};const V=(0,k.withFetch)(e=>{let{name:t,data:n,getAddressApi:l,children:s}=e,o=(0,a.A)(e,I);const{locale:r}=(0,i.A)(),c=(0,p.useMemo)(()=>M(n),[n]);return l?s(c):(0,J.jsx)(T(),{cache:"city-enum",params:{name:t},loader:e=>{let{params:t}=e;const{name:n}=t;return new Promise(e=>{setTimeout(()=>{e(c.getCity(n))},0)})},render:e=>{let{data:t}=e;return s(t,Object.assign({},o,{locale:r}))}})});V.defaultProps=(0,l.A)((0,l.A)({},D),{},{displayParent:!1,children:(e,t)=>{let{city:n,parent:a}=e,{displayParent:l,locale:s}=t;return l&&a?"".concat(R(a,s),"\xb7").concat(R(n,s)):R(n,s)}});const W=e=>{const t=(0,k.withFetch)(t=>{let{data:n}=t,s=(0,a.A)(t,P);const o=(0,p.useMemo)(()=>M(n),[n]);return(0,J.jsx)(e,(0,l.A)((0,l.A)({},s),{},{addressApi:o}))});return t.defaultProps=(0,l.A)({},D),t};z.AddressEnum=z.Enum=V,z.createAddressApi=M,z.withAddressApi=W,z.getLabelForLocal=R;const K=z;var B=n(10986),U=n.n(B),q=n(78491),Q=n.n(q),H=n(20492),X=n(22616),Z=n.n(X),Y=n(1488),G=n.n(Y);const $=["isPopup","size","disabled","inputPlaceholder","onBlur","className"],ee=(0,O.createWithIntl)({importMessages:H.A,moduleName:"Common"})(e=>{const{isPopup:t,size:n,disabled:s,inputPlaceholder:o,onBlur:i,className:c}=e,d=(0,a.A)(e,$),[u,p]=U()(e),m=["isPopup","searchPlaceholder","placeholder","overlayWidth","api","dataFormat"],{formatMessage:h}=(0,O.useIntl)({moduleName:"Common"}),_=Q()(e=>{i&&i(e)});return(0,J.jsx)("div",{ref:_,children:(0,J.jsxs)(r.Row,{gutter:10,children:[(0,J.jsx)(r.Col,{span:12,children:(0,J.jsx)(K,(0,l.A)((0,l.A)({},Z()(d,m)),{},{className:c,disabled:s,single:!0,size:n,value:A()(u,"city"),onChange:e=>{p({city:e,detail:A()(u,"detail")})}}))}),(0,J.jsx)(r.Col,{span:12,children:(0,J.jsx)(r.Input,(0,l.A)((0,l.A)({},G()(d,m)),{},{className:c,placeholder:o||h({id:"pleaseInput"}),disabled:s,size:n,value:A()(u,"detail"),onChange:e=>{p({city:A()(u,"city"),detail:e.target.value})}}))})]})})})},97211(e,t,n){n.d(t,{A:()=>a.withOSSFile});var a=n(61323)}}]);
|
|
2
|
+
//# sourceMappingURL=3856.3009f90f.chunk.js.map
|