@regenbio/regenbio-components-react 1.3.71 → 1.3.73

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.
@@ -1,6 +1,5 @@
1
1
  import { PageContainerProps } from "@ant-design/pro-layout/es/components/PageContainer";
2
2
  import { Ref } from "react";
3
- import { SizeInfo } from "rc-resize-observer";
4
3
  /**
5
4
  * 页面容器属性
6
5
  */
@@ -18,7 +17,12 @@ export type RbPageContainerProps = {
18
17
  * 尺寸改变回调
19
18
  * @param offset 尺寸
20
19
  */
21
- onResize?: (offset: SizeInfo) => void;
20
+ onResize?: (offset: {
21
+ width: number;
22
+ height: number;
23
+ offsetWidth: number;
24
+ offsetHeight: number;
25
+ }) => void;
22
26
  /**
23
27
  * 水印内容
24
28
  */
package/build/index.js CHANGED
@@ -25,4 +25,4 @@
25
25
  }
26
26
  }
27
27
  }
28
- `}))),JIe=e=>{const{setTableLoading:t,responsive:n,styles:r,tableLoading:a,restProps:i,actionRef:o}=(e=>{const[t,n]=(0,u.useState)(),[r,a]=(0,u.useState)(!1),i=(0,u.useRef)(void 0),{request:o,loading:c,columns:s,...l}=e,{styles:f}=QIe();return(0,u.useImperativeHandle)(e.actionRef,(()=>({startLoading:()=>{a(!0)},finishLoading:()=>{a(!1)},...i.current}))),(0,u.useEffect)((()=>{n(e.responsive)}),[e.responsive]),(0,u.useEffect)((()=>{e.loadChange&&e.loadChange.call(void 0,r)}),[r]),{setTableLoading:a,responsive:t,styles:f,tableLoading:r,restProps:l,actionRef:i}})(e);return(0,l.jsx)(ZIe,{tableClassName:r.customTable,scroll:{x:1300},rowKey:"guid",search:{labelWidth:120},loading:a,columns:e.columns.map((e=>{const t={...e};return t.fixed=!n&&t.fixed,e})),request:async(n,r,a)=>{let i;t(!0);try{i=await e.request.call(void 0,n,r,a)}finally{t(!1)}return i},...i,actionRef:o},"dragTable"+n)},eNe=f().forwardRef((({fieldProps:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,options:c,...s},f)=>{const d={options:c,mode:a||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label",...e},h=(0,u.useContext)(uAe.FieldContext);return(0,l.jsx)(uAe.ProFormField,{valueEnum:ARe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:{getPopupContainer:h.getPopupContainer,...d},ref:f,proFieldProps:r,...s,children:t})})),tNe=f().forwardRef((({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c},s)=>{const{setKeywords:f,onFuzzy:d,start:p,loading:m,context:g,data:y,intl:b,keywords:w}=(({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c})=>{const{intl:s}=v(),l=(0,u.useContext)(uAe.FieldContext),[f,d]=(0,u.useState)([]),[h,p]=(0,u.useState)(),[m,g]=(0,u.useState)(!1),[y,b]=(0,u.useState)(!1),w=async e=>{g(!0);const t=l.formRef?.current?.getFieldValue(c.name);let n;n=H.isNotNull(t)?await o(e,Array.isArray(t)?t:[t]):await o(e,[]),1===n.code?d(n.data):d([]),g(!1)};return(0,u.useEffect)((()=>{(async()=>{b(!0),await w(null),b(!1)})()}),[]),(0,u.useEffect)((()=>{if(e){const e=document.getElementsByClassName("ant-form-item-control");for(const t of e){const e=t.getElementsByClassName("ant-col ant-form-item-control");for(const t of e)t.style.maxWidth="none"}}}),[y,e]),{setKeywords:p,onFuzzy:w,start:y,loading:m,context:l,data:f,intl:s,keywords:h}})({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c});return(0,l.jsx)(uAe.ProFormField,{valueEnum:ARe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:p?{value:null,loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.title,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,value:e.guid,label:e.name,title:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]})}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})}:{loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.label,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,value:e.guid,label:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]}),title:e.name}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})},ref:s,proFieldProps:r,...c,children:t})}));tNe.SearchSelect=eNe,tNe.displayName="ProFormComponent";const nNe=tNe,rNe=e=>{const{intl:t,globalFunctions:n,inputRef:r}=(()=>{const{intl:e,globalFunctions:t}=v();return{intl:e,globalFunctions:t,inputRef:(0,u.useRef)(null)}})();return(0,l.jsxs)(d.ProCard,{style:{width:"100%"},bodyStyle:{padding:10},bordered:!0,onClick:()=>{r&&r.current.focus()},children:[(0,l.jsx)(h.Input.TextArea,{showCount:!0,autoSize:!0,maxLength:e.maxLength,ref:r,variant:"borderless",placeholder:e.placeholder,onChange:t=>{e.onInputChange.call(void 0,t.target.value)}}),(0,l.jsx)(h.Upload,{maxCount:e.maxFile,action:n.getUploadUrl.call(void 0,e.configCode),listType:"picture",defaultFileList:e.defaultFileList,headers:{Authorization:e.accessToken},onRemove:t=>{e.onFileRemove.call(void 0,t)},onChange:({file:t})=>{t&&e.onFileChange.call(void 0,t)},children:(0,l.jsx)(h.Tooltip,{title:t.formatMessage({id:"components.attachment-text.appendix",defaultMessage:"点击上传附件"}),children:(0,l.jsx)(h.Button,{type:"text",icon:(0,l.jsx)(_ve,{})})})})]})},aNe=_He,iNe=e=>{const{mode:t,loading:n,initialState:r,headerHeight:a,token:i}=(()=>{const{initialState:e}=v(),t="mix"!==e.settings.layout?0:e?.settings?.token?.header?.heightLayoutHeader??56,{token:n}=h.theme.useToken(),[r,a]=(0,u.useState)(Gt.getThemeMode()),[i,o]=(0,u.useState)(!0);return(0,u.useEffect)((()=>{const e=e=>{e="light"===e?"light":"realDark",Gt.setThemeMode(e),a(void 0),setTimeout((()=>{a(e)}),1)};return setTimeout((()=>{o(!1)}),800),Bt.eventEmitter.on(Nt.THEME_MODE,e),()=>{Bt.eventEmitter.off(Nt.THEME_MODE,e)}}),[]),{mode:r,loading:i,initialState:e,headerHeight:t,token:n}})();return t&&(0,l.jsx)(h.Watermark,{content:e.watermark,children:(0,l.jsx)(aNe,{onResize:t=>{e.onResponsive?.call(void 0,t.width<(e.responsiveWidth??i.screenSM)),e.onResize?.call(void 0,t)},children:(0,l.jsx)("div",{ref:e.scrollbarsRef,style:{height:0===a?"100vh":`calc(100vh - ${a}px)`,overflow:"auto"},children:(0,l.jsxs)(d.PageContainer,{...e,children:[(0,l.jsx)(d.ProCard,{ghost:!(!1!==e.animate&&e.loadDuringAnimate&&n||e.loading),className:!1===e.animate?"":`animate__animated animate__${e.animate??"fadeInRight"} animate__fast`,loading:!1!==e.animate&&e.loadDuringAnimate&&n||e.loading,children:e.children}),r?.currentTheme?.copyright&&(0,l.jsx)(d.DefaultFooter,{copyright:r?.currentTheme?.copyright,links:r?.currentTheme?.links.map(((e,t)=>({key:`${t}`,title:e.key,href:e.value,blankTarget:!0}))),style:{background:"none"}})]})})})})},oNe=e=>{const{isChild:t}=(e=>{const[t,n]=(0,u.useState)(!0);return(0,u.useLayoutEffect)((()=>{n(!e.location.endsWith(e.path))}),[e.location]),{isChild:t}})(e);return t?e.children:e.home};var cNe=n(8365),sNe=n(1552),lNe=n(5072),uNe=n.n(lNe),fNe=n(7825),dNe=n.n(fNe),hNe=n(7659),pNe=n.n(hNe),vNe=n(5056),mNe=n.n(vNe),gNe=n(540),yNe=n.n(gNe),bNe=n(1113),wNe=n.n(bNe),xNe=n(2795),MNe={};MNe.styleTagTransform=wNe(),MNe.setAttributes=mNe(),MNe.insert=pNe().bind(null,"head"),MNe.domAPI=dNe(),MNe.insertStyleElement=yNe(),uNe()(xNe.A,MNe),xNe.A&&xNe.A.locals&&xNe.A.locals;const kNe=new sNe.Converter({tables:!0,simplifiedAutoLink:!0,strikethrough:!0,tasklists:!0}),ONe=e=>{const{intl:t,selectedTab:n,setSelectedTab:r}=(()=>{const{intl:e}=v(),[t,n]=(0,u.useState)("write");return{intl:e,selectedTab:t,setSelectedTab:n}})();return(0,l.jsx)(cNe.default,{childProps:{writeButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},previewButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},textArea:{style:{color:"black",minHeight:"400px"}}},value:e.value,onChange:e.onChange,selectedTab:n,onTabChange:r,l18n:{write:t.formatMessage({id:"components.markdown-editor.write",defaultMessage:"编辑"}),preview:t.formatMessage({id:"components.markdown-editor.preview",defaultMessage:"预览"}),uploadingImage:t.formatMessage({id:"components.markdown-editor.uploading-image",defaultMessage:"上传图片"}),pasteDropSelect:t.formatMessage({id:"components.markdown-editor.paste-drop-select",defaultMessage:"粘贴下拉选择"})},generateMarkdownPreview:e=>Promise.resolve(kNe.makeHtml(e))})},zNe=f().forwardRef(d.ProFormUploadButton),_Ne=e=>{const{intl:t,globalFunctions:n,onFileChange:r}=(e=>{const{intl:t,globalFunctions:n}=v(),r=(0,u.useCallback)((({file:t})=>{t&&"done"===t.status&&(t.response&&1===t.response.code?(e.afterSuccess?.call(void 0),e.onChange?.call(void 0,[{uid:t.response.data.guid,name:t.name,status:"done",url:n.getPreviewUrl.call(void 0,t.response.data.guid)}])):e.afterFail?.call(void 0,t.response.message))}),[e.afterSuccess,e.onChange,n]);return{intl:t,globalFunctions:n,onFileChange:r}})(e);return(0,l.jsx)(zNe,{title:t.formatMessage({id:"components.single-image-uploader.upload-button",defaultMessage:"单击上传"}),name:e.name,label:e.label,rules:e.rules,max:1,fieldProps:{name:"file",listType:"picture-card",headers:{Authorization:e.headers?.accessToken,Language:e.headers?.locale,"Client-Id":e.headers?.clientId},onChange:r,onRemove:()=>{e.onChange?.call(void 0,void 0)}},action:n.getUploadUrl.call(void 0,e.fileCode)})},SNe=e=>(0,l.jsx)(uAe.ProForm.Item,{name:e.name,style:{marginBottom:0},children:(0,l.jsx)(_Ne,{...e})}),ENe=e=>(0,l.jsxs)(p.Provider,{value:{...e.globalState},children:[(0,l.jsx)(f().Fragment,{children:e.messageHolder},"message"),(0,l.jsx)(f().Fragment,{children:e.notificationHolder},"notification"),e.childrenRender?e.childrenRender(e.children):(0,l.jsx)(l.Fragment,{children:e.children})]}),CNe=(e,t)=>e.map((({path:e,guid:n,icon:r,children:a,hideStatus:i,i18n:o,...c})=>{const s=o.filter((e=>e.locale===t));let u;return u=s.length>0?s[0].name:o[0].name,{...c,name:u,hideInMenu:0===i,icon:r&&(0,l.jsx)(sAe,{name:r}),children:a&&CNe(a,t),key:n,path:e}})),TNe=(e,t,n)=>{e&&t&&e.forEach((e=>{t.includes(e.key)&&!e.hideInMenu&&n.push(e),e.children&&TNe(e.children,t,n)}))},LNe=(e,t)=>{const n=Gt.getQuickMethod(t),r=[];return TNe(e,n,r),r.map(((e,t)=>({key:t,icon:e.icon,title:e.name,url:e.path})))},ANe=async e=>{const t=async()=>{let t;try{t=await e.getUserInitDetail.call(void 0)}catch(t){return void RNe.executeLogout(e.history,e.loginLoadPath)}if(1===t.code&&t.data){const n=t.data;return n.menuList&&(n.menuList=CNe(n.menuList,e.locale)),n.avatar&&(n.avatar=e.getPreviewUrl.call(void 0,n.avatar)),n}RNe.executeLogout(e.history,e.loginLoadPath)},n=async()=>{const t=await e.getCurrentThemeDetail.call(void 0);if(1===t.code&&t.data){if(t.data.favicons){const n=document.querySelector("link[rel*='icon']")||document.createElement("link");n.type="image/x-icon",n.rel="shortcut icon",n.href=e.getPreviewUrl.call(void 0,t.data.favicons),document.getElementsByTagName("head")[0].appendChild(n)}return t.data}},{location:r}=e.history,a=Gt.getThemeMode(),i=e.defaultSettings;return i.navTheme=a,r.pathname.endsWith(e.loginLoadPath)?{settings:i,currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}:{settings:i,currentUser:await t(),currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}},PNe=e=>{const[t,n]=h.message.useMessage(),[r,a]=h.notification.useNotification(),{layout:i,splitMenus:o,title:c,logo:s,...d}=e.globalState.initialState?.settings??{},p=window.__POWERED_BY_QIANKUN__?"side":i;return(0,u.useEffect)((()=>{const n=Gt.getThemeMode();e.globalState.initialState?.settings.navTheme&&e.globalState.initialState?.settings.navTheme!==n&&e.setInitialState.call(void 0,(t=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=n,{...t,settings:r}}));const a=({level:e,content:n})=>{t[e](n)},i=({level:e,config:t})=>{r[e](t)},o=t=>{e.setInitialState.call(void 0,(n=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=t,{...n,settings:r}}))};return Bt.eventEmitter.on(Nt.MESSAGE,a),Bt.eventEmitter.on(Nt.NOTIFICATION,i),Bt.eventEmitter.on(Nt.THEME_MODE,o),()=>{Bt.eventEmitter.off(Nt.MESSAGE,a),Bt.eventEmitter.off(Nt.NOTIFICATION,i),Bt.eventEmitter.off(Nt.THEME_MODE,o)}}),[e.globalState.initialState?.settings.navTheme]),{menu:{locale:!1,request:()=>e.globalState.initialState.currentUser.menuList},actionsRender:()=>window.__POWERED_BY_QIANKUN__?[]:[(0,l.jsx)(Ut,{},"DarkModeChange"),f().cloneElement(e.selectLang,{key:"localeChange"})],avatarProps:{src:e.globalState.initialState?.currentUser?.avatar,title:f().cloneElement(e.avatarName,{key:"avatarName"}),render:(t,n)=>f().cloneElement(e.avatarDropdown,{key:"avatarDropdown"},n)},footerRender:void 0,onPageChange:t=>{e.globalState.initialState?.currentUser||t.pathname.endsWith(e.loginLoadPath)||e.history.push(e.loginLoadPath)},bgLayoutImgList:[{src:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.backgroundImg),bottom:0,left:0,height:"100%"}],appList:LNe(e.globalState.initialState?.currentUser?.menuList,e.clientId),links:[],menuHeaderRender:void 0,childrenRender:t=>(0,l.jsx)(ENe,{...e,currentLayout:p,messageHolder:n,notificationHolder:a,children:t}),layout:p,splitMenus:!window.__POWERED_BY_QIANKUN__&&o,title:e.globalState.initialState?.currentTheme?.title??c,logo:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.icon)??s,...d}};var jNe=n(7186);const RNe={convertPageParam:async(e,t,n,r)=>{const a={...t};void 0!==a.current&&(a.pageNum=a.current,a.current=void 0),n&&(a.sort=n),a.filter=r;for(const e in a)Array.isArray(a[e])&&(a[e]=String(a[e]));const i=await e(a);return 1===i.code?{data:i.data,success:!0,total:i.total}:{data:i.message,success:!1,total:i.total}},downloadFile:(e,t)=>{if(!e)return;const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},executeLogout:(e,t)=>{const{search:n,pathname:r}=window.location,a=new URL(window.location.href).searchParams.get("redirect");window.location.pathname.endsWith(t)||a||e.replace({pathname:t,search:(0,jNe.stringify)({redirect:r+n})})},getOAuth2Url:(e,t,n,r,a)=>{const i=new URL(`${n}/authorization/oauth2/authorize?`);for(const e in r)"client_secret"!==e&&i.searchParams.set(e,r[e]);let o;const c=new URL(window.location.href);return c.searchParams.delete("code"),c.searchParams.delete("state"),a&&c.searchParams.set("redirect",a),o=c.toString(),i.searchParams.set("redirect_uri",o),i.searchParams.set("state",JSON.stringify({locale:e,theme:t})),i.toString()},getExternalAuthUrl:(e,t,n,r,a,i)=>{const o=new URL(e),c=new URL(window.location.href);return c.search="",c.pathname=a,o.searchParams.set("redirect_uri",c.toString()),o.searchParams.set("state",JSON.stringify({locale:t,theme:n,external_guid:r,user_guid:i})),o.toString().replace(/%3A/g,":")},getExternalAuthUrl4Auth:function(e,t,n,r,a){const i=new URL(t),o=new URL(e);return i.searchParams.set("redirect_uri",o.toString()),i.searchParams.set("state",JSON.stringify({locale:n,theme:r,external_guid:a})),i.toString().replace(/%3A/g,":")}},HNe=e=>{const{intl:t,initialState:n}=v(),[r,a]=(0,u.useState)(void 0),i=async()=>{const t=await(n?.fetchUserInfo?.call(void 0));t&&(0,URe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentUser:t})))}));const r=await(n?.fetchThemeInfo?.call(void 0));r&&(0,URe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentTheme:r})))}))},o=async(t,n)=>{if(1===t.code){if(L.getDb().delete(),Gt.setToken(t.data),await i(),window.__POWERED_BY_QIANKUN__){const{pathname:t}=window.location,r=t.replace(e.loginLoadPath,"");r&&n.redirect.startsWith(r)&&(n.redirect=n.redirect.replace(new RegExp(`^${r}`),""))}e.onFinish.call(void 0,n.redirect,void 0)}else a(t.message)},c=(e,t)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,document.body.appendChild(n)};return(0,u.useEffect)((()=>{(async()=>{const t=(()=>{const t=e.searchParams.get("code"),n=e.searchParams.get("state"),r=e.searchParams.get("redirect")??"/";let a=null,i=null,o=null,c=null;if(n){let e;try{e=JSON.parse(n)}catch{e=null}e&&(a=e.locale,i=e.theme,o=e.external_guid,c=e.user_guid)}return{code:t,state:n,redirect:r,locale:a,theme:i,externalGuid:o,userGuid:c}})();t.locale&&e.setLocale.call(void 0,t.locale,!1),t.theme&&Gt.setThemeMode("realDark"===t.theme?"realDark":"light"),t.code?t.externalGuid&&t.userGuid?(async t=>{const n=new URL(window.location.href);n.search="";const r=await e.bindExternalData.call(void 0,{guid:t.externalGuid,code:t.code,redirectUrl:n.toString()}),a=Gt.getBeforeExternalBindPathname();if(1===r.code){await i();const t=r.data.i18n.filter((t=>e.locale===t.locale));e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:t[0].title,externalBindResult:!0})}else e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:r.message,externalBindResult:!1})})(t):(async t=>{let n;if(t.externalGuid){const r=new URL(window.location.href),a=new URLSearchParams;r.searchParams.has("redirect")&&a.set("redirect",r.searchParams.get("redirect")),r.search=a.toString(),n=await e.getTokenByCode.call(void 0,{code:t.code,external_guid:t.externalGuid,external_redirect_uri:encodeURIComponent(r.toString())})}else n=await e.getTokenByCode.call(void 0,{code:t.code});await o(n,t)})(t):(t=>{if(Gt.getActiveLogout())window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect);else if(!e.externalIntegrationConfig||e.externalIntegrationConfig.length<1)window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect);else for(const n of e.externalIntegrationConfig)"feishu"===n.platform&&c("https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.26.js",(()=>{window.h5sdk&&window.tt.requestAccess?window.tt.requestAccess({appID:n.appId,scopeList:[],success:async({code:r})=>{const a=new URL(window.location.href);a.search="";const i=await e.getTokenByCode.call(void 0,{code:r,external_client_id:n.appId,external_redirect_uri:a.toString(),platform:n.platform});await o(i,t)},fail:({errString:e})=>{a(e)}}):window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect)}))})(t)})()}),[]),{setExceptionMsg:a,exceptionMsg:r,intl:t}},BNe=h.Result,VNe=e=>{const{setExceptionMsg:t,exceptionMsg:n,intl:r}=HNe(e);return(0,l.jsx)(l.Fragment,{children:void 0===n?(0,l.jsx)(h.Spin,{percent:"auto",size:"large"}):(0,l.jsx)(BNe,{status:"500",title:n,extra:(0,l.jsx)(h.Button,{type:"primary",onClick:()=>{t(void 0),window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig)},children:r.formatMessage({id:"components.auth-frame.operation.back-auth",defaultMessage:"返回授权页面"})})})})},INe=e=>{const{setCurrent:t,setLoading:n,steps:r,mailStep:a,externalStep:i,current:o,loading:c,externalBind:s}=(e=>{const{intl:t}=v(),[n,r]=(0,u.useState)(!1),[a,i]=(0,u.useState)({}),[o,c]=(0,u.useState)([]),[s,f]=(0,u.useState)(0),[d,h]=(0,u.useState)(),[p,m]=(0,u.useState)(),[g,y]=(0,u.useState)();return(0,u.useEffect)((()=>{(async()=>{const n=await e.getUserForceBind.call(void 0),r=[];1===n.code?(n.data&&(n.data.mailForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.mail-force",defaultMessage:"绑定邮箱"}),icon:(0,l.jsx)(Nq,{})}),h(r.length-1)),n.data.passwordForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.password-force",defaultMessage:"重置密码"}),icon:(0,l.jsx)(wde,{})}),m(r.length-1)),n.data.externalForceList&&n.data.externalForceList.length>0&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.external-force",defaultMessage:"绑定外部授权"}),icon:(0,l.jsx)(CJ,{})}),y(r.length-1),i(n.data.externalForceList))),c(r)):i([]),r.length<1&&e.onFinish.call(void 0)})()}),[]),{setCurrent:f,setLoading:r,steps:o,mailStep:d,externalStep:g,current:s,loading:n,externalBind:a}})(e);return(0,l.jsx)(l.Fragment,{children:r&&r.length>0?(0,l.jsxs)(JX,{style:{maxWidth:"36rem"},hoverable:!e.responsive,bordered:!e.responsive,children:[(0,l.jsx)(h.Steps,{size:"small",items:r,current:o}),(0,l.jsx)(h.Divider,{dashed:!0}),void 0!==a&&a===o&&(0,l.jsx)(l.Fragment,{children:f().cloneElement(e.mailBindFrame,{key:"mail-bind-frame",onFinish:n=>{o+1>=r.length?e.onFinish.call(void 0):t(o+1)}})}),void 0!==i&&i===o&&(0,l.jsx)(h.Spin,{spinning:c,children:f().cloneElement(e.externalAuthFrame,{key:"external-auth-frame",externalFilterList:s,onLoadChange:e=>{n(e)}})})]}):(0,l.jsx)(h.Spin,{percent:"auto",size:"large"})})},NNe={setScale:(e,t=2)=>{const n=Math.pow(10,t);return Math.round(e*n)/n}},FNe={randomStr:e=>{let t="";for(let n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(62*Math.random())];return t}},DNe={fromUnicode:e=>e.replace(/\\u([\dA-Fa-f]{4})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))),toUnicode:e=>encodeURIComponent(e).replace(/%/g,"\\u").replace(/\\u([0-9a-fA-F]{2})/g,((e,t)=>"\\u00"+t))},$Ne={generateUploadFile:(e,t,n,r)=>{if(e[t]&&e[n])return[{uid:e[n],name:e[t],status:"done",url:r.call(void 0,e[n])}]}},WNe=()=>{const{locale:e,globalFunctions:t}=v(),n=async n=>{const r=L.getDb();r.version(1).stores({sys_dict:"++id, type, name, enName, value, color, sort"});let a=await r.sys_dict.where("type").equals(n).sortBy("sort");if(0===a.length){const e=await(t?.getDictDataByType.call(void 0,n));1===e.code&&(a=e.data,a.length>0&&r.sys_dict.bulkPut(a.map((e=>({...e,type:n})))))}return a.map((t=>{const r=t.i18n.filter((t=>t.locale===e));let a;return a=r.length>0?r[0].name:t.i18n[0].name,{type:n,label:a,value:t.value,color:t.color,sort:t.sort}}))};return{getDataByType:n,getTagDataByType:async e=>(await n(e)).map((e=>({label:(0,l.jsx)(h.Tag,{style:{maxWidth:"100%"},bordered:!0,color:e.color,children:(0,l.jsx)(h.Typography.Text,{ellipsis:{tooltip:e.label},children:e.label})}),value:Number(e.value),title:e.label})))}},qNe=()=>({info:e=>Bt.pushMessageEvent("info",e),success:e=>Bt.pushMessageEvent("success",e),error:e=>Bt.pushMessageEvent("error",e),warning:e=>Bt.pushMessageEvent("warning",e),loading:e=>Bt.pushMessageEvent("loading",e)}),GNe=()=>({info:e=>Bt.pushNotificationEvent("info",e),success:e=>Bt.pushNotificationEvent("success",e),error:e=>Bt.pushNotificationEvent("error",e),warning:e=>Bt.pushNotificationEvent("warning",e),loading:e=>Bt.pushNotificationEvent("loading",e)}),UNe={outlinedConstants:["StepBackwardOutlined","StepForwardOutlined","FastBackwardOutlined","FastForwardOutlined","ShrinkOutlined","ArrowsAltOutlined","DownOutlined","UpOutlined","LeftOutlined","RightOutlined","CaretUpOutlined","CaretDownOutlined","CaretLeftOutlined","CaretRightOutlined","UpCircleOutlined","DownCircleOutlined","LeftCircleOutlined","RightCircleOutlined","DoubleRightOutlined","DoubleLeftOutlined","VerticalLeftOutlined","VerticalRightOutlined","VerticalAlignTopOutlined","VerticalAlignMiddleOutlined","VerticalAlignBottomOutlined","ForwardOutlined","BackwardOutlined","RollbackOutlined","EnterOutlined","RetweetOutlined","SwapOutlined","SwapLeftOutlined","SwapRightOutlined","ArrowUpOutlined","ArrowDownOutlined","ArrowLeftOutlined","ArrowRightOutlined","PlayCircleOutlined","UpSquareOutlined","DownSquareOutlined","LeftSquareOutlined","RightSquareOutlined","LoginOutlined","LogoutOutlined","MenuFoldOutlined","MenuUnfoldOutlined","BorderBottomOutlined","BorderHorizontalOutlined","BorderInnerOutlined","BorderOuterOutlined","BorderLeftOutlined","BorderRightOutlined","BorderTopOutlined","BorderVerticleOutlined","PicCenterOutlined","PicLeftOutlined","PicRightOutlined","RadiusBottomleftOutlined","RadiusBottomrightOutlined","RadiusUpleftOutlined","RadiusUprightOutlined","FullscreenOutlined","FullscreenExitOutlined","QuestionOutlined","QuestionCircleOutlined","PlusOutlined","PlusCircleOutlined","PauseOutlined","PauseCircleOutlined","MinusOutlined","MinusCircleOutlined","PlusSquareOutlined","MinusSquareOutlined","InfoOutlined","InfoCircleOutlined","ExclamationOutlined","ExclamationCircleOutlined","CloseOutlined","CloseCircleOutlined","CloseSquareOutlined","CheckOutlined","CheckCircleOutlined","CheckSquareOutlined","ClockCircleOutlined","WarningOutlined","IssuesCloseOutlined","StopOutlined","EditOutlined","FormOutlined","CopyOutlined","ScissorOutlined","DeleteOutlined","SnippetsOutlined","DiffOutlined","HighlightOutlined","AlignCenterOutlined","AlignLeftOutlined","AlignRightOutlined","BgColorsOutlined","BoldOutlined","ItalicOutlined","UnderlineOutlined","StrikethroughOutlined","RedoOutlined","UndoOutlined","ZoomInOutlined","ZoomOutOutlined","FontColorsOutlined","FontSizeOutlined","LineHeightOutlined","DashOutlined","SmallDashOutlined","SortAscendingOutlined","SortDescendingOutlined","DragOutlined","OrderedListOutlined","UnorderedListOutlined","RadiusSettingOutlined","ColumnWidthOutlined","ColumnHeightOutlined","AreaChartOutlined","PieChartOutlined","BarChartOutlined","DotChartOutlined","LineChartOutlined","RadarChartOutlined","HeatMapOutlined","FallOutlined","RiseOutlined","StockOutlined","BoxPlotOutlined","FundOutlined","SlidersOutlined","AndroidOutlined","AppleOutlined","WindowsOutlined","IeOutlined","ChromeOutlined","GithubOutlined","AliwangwangOutlined","DingdingOutlined","WeiboSquareOutlined","WeiboCircleOutlined","TaobaoCircleOutlined","Html5Outlined","WeiboOutlined","TwitterOutlined","WechatOutlined","WhatsAppOutlined","YoutubeOutlined","AlipayCircleOutlined","TaobaoOutlined","DingtalkOutlined","SkypeOutlined","QqOutlined","MediumWorkmarkOutlined","GitlabOutlined","MediumOutlined","LinkedinOutlined","GooglePlusOutlined","DropboxOutlined","FacebookOutlined","CodepenOutlined","CodeSandboxOutlined","AmazonOutlined","GoogleOutlined","CodepenCircleOutlined","AlipayOutlined","AntDesignOutlined","AntCloudOutlined","AliyunOutlined","ZhihuOutlined","SlackOutlined","SlackSquareOutlined","BehanceOutlined","BehanceSquareOutlined","DribbbleOutlined","DribbbleSquareOutlined","InstagramOutlined","YuqueOutlined","AlibabaOutlined","YahooOutlined","RedditOutlined","SketchOutlined","AccountBookOutlined","AimOutlined","AlertOutlined","ApartmentOutlined","ApiOutlined","AppstoreAddOutlined","AppstoreOutlined","AudioOutlined","AudioMutedOutlined","AuditOutlined","BankOutlined","BarcodeOutlined","BarsOutlined","BellOutlined","BlockOutlined","BookOutlined","BorderOutlined","BorderlessTableOutlined","BranchesOutlined","BugOutlined","BuildOutlined","BulbOutlined","CalculatorOutlined","CalendarOutlined","CameraOutlined","CarOutlined","CarryOutOutlined","CiCircleOutlined","CiOutlined","ClearOutlined","CloudDownloadOutlined","CloudOutlined","CloudServerOutlined","CloudSyncOutlined","CloudUploadOutlined","ClusterOutlined","CodeOutlined","CoffeeOutlined","CommentOutlined","CompassOutlined","CompressOutlined","ConsoleSqlOutlined","ContactsOutlined","ContainerOutlined","ControlOutlined","CopyrightOutlined","CreditCardOutlined","CrownOutlined","CustomerServiceOutlined","DashboardOutlined","DatabaseOutlined","DeleteColumnOutlined","DeleteRowOutlined","DeliveredProcedureOutlined","DeploymentUnitOutlined","DesktopOutlined","DisconnectOutlined","DislikeOutlined","DollarOutlined","DownloadOutlined","EllipsisOutlined","EnvironmentOutlined","EuroCircleOutlined","EuroOutlined","ExceptionOutlined","ExpandAltOutlined","ExpandOutlined","ExperimentOutlined","ExportOutlined","EyeOutlined","EyeInvisibleOutlined","FieldBinaryOutlined","FieldNumberOutlined","FieldStringOutlined","FieldTimeOutlined","FileAddOutlined","FileDoneOutlined","FileExcelOutlined","FileExclamationOutlined","FileOutlined","FileGifOutlined","FileImageOutlined","FileJpgOutlined","FileMarkdownOutlined","FilePdfOutlined","FilePptOutlined","FileProtectOutlined","FileSearchOutlined","FileSyncOutlined","FileTextOutlined","FileUnknownOutlined","FileWordOutlined","FileZipOutlined","FilterOutlined","FireOutlined","FlagOutlined","FolderAddOutlined","FolderOutlined","FolderOpenOutlined","FolderViewOutlined","ForkOutlined","FormatPainterOutlined","FrownOutlined","FunctionOutlined","FundProjectionScreenOutlined","FundViewOutlined","FunnelPlotOutlined","GatewayOutlined","GifOutlined","GiftOutlined","GlobalOutlined","GoldOutlined","GroupOutlined","HddOutlined","HeartOutlined","HistoryOutlined","HolderOutlined","HomeOutlined","HourglassOutlined","IdcardOutlined","ImportOutlined","InboxOutlined","InsertRowAboveOutlined","InsertRowBelowOutlined","InsertRowLeftOutlined","InsertRowRightOutlined","InsuranceOutlined","InteractionOutlined","KeyOutlined","LaptopOutlined","LayoutOutlined","LikeOutlined","LineOutlined","LinkOutlined","Loading3QuartersOutlined","LoadingOutlined","LockOutlined","MacCommandOutlined","MailOutlined","ManOutlined","MedicineBoxOutlined","MehOutlined","MenuOutlined","MergeCellsOutlined","MessageOutlined","MobileOutlined","MoneyCollectOutlined","MonitorOutlined","MoreOutlined","NodeCollapseOutlined","NodeExpandOutlined","NodeIndexOutlined","NotificationOutlined","NumberOutlined","OneToOneOutlined","PaperClipOutlined","PartitionOutlined","PayCircleOutlined","PercentageOutlined","PhoneOutlined","PictureOutlined","PlaySquareOutlined","PoundCircleOutlined","PoundOutlined","PoweroffOutlined","PrinterOutlined","ProfileOutlined","ProjectOutlined","PropertySafetyOutlined","PullRequestOutlined","PushpinOutlined","QrcodeOutlined","ReadOutlined","ReconciliationOutlined","RedEnvelopeOutlined","ReloadOutlined","RestOutlined","RobotOutlined","RocketOutlined","RotateLeftOutlined","RotateRightOutlined","SafetyCertificateOutlined","SafetyOutlined","SaveOutlined","ScanOutlined","ScheduleOutlined","SearchOutlined","SecurityScanOutlined","SelectOutlined","SendOutlined","SettingOutlined","ShakeOutlined","ShareAltOutlined","ShopOutlined","ShoppingCartOutlined","ShoppingOutlined","SisternodeOutlined","SkinOutlined","SmileOutlined","SolutionOutlined","SoundOutlined","SplitCellsOutlined","StarOutlined","SubnodeOutlined","SwitcherOutlined","SyncOutlined","TableOutlined","TabletOutlined","TagOutlined","TagsOutlined","TeamOutlined","ThunderboltOutlined","ToTopOutlined","ToolOutlined","TrademarkCircleOutlined","TrademarkOutlined","TransactionOutlined","TranslationOutlined","TrophyOutlined","UngroupOutlined","UnlockOutlined","UploadOutlined","UsbOutlined","UserAddOutlined","UserDeleteOutlined","UserOutlined","UserSwitchOutlined","UsergroupAddOutlined","UsergroupDeleteOutlined","VerifiedOutlined","VideoCameraAddOutlined","VideoCameraOutlined","WalletOutlined","WifiOutlined","WomanOutlined"]},KNe={"components.data-table.pagination.total":"总","components.file-tag.operation.preview-pdf":"预览PDF","components.file-tag.operation.download":"下载","components.user-card.unknown":"未知用户","components.user-card.is-me":"(我)","components.user-card.phone":"手机号码","components.user-card.email":"邮箱地址","components.user-card.sex":"性别","components.user-card.status":"状态","components.user-card.role":"角色","components.user-selector.placeholder":"请输入关键字","components.user-selector.search":"搜索","components.attachment-text.appendix":"点击上传附件","components.markdown-editor.write":"编辑","components.markdown-editor.preview":"预览","components.markdown-editor.uploading-image":"上传图片","components.markdown-editor.paste-drop-select":"粘贴下拉选择","components.single-image-uploader.upload-button":"单击上传","components.auth-frame.operation.back-auth":"返回授权页面","components.bind-frame.title.mail-force":"绑定邮箱","components.bind-frame.title.password-force":"重置密码","components.bind-frame.title.external-force":"绑定外部授权","components.constants.status-list.enable":"启用","components.constants.status-list.disable":"停用","components.constants.sex-list.secret":"保密","components.constants.sex-list.male":"男","components.constants.sex-list.female":"女"},YNe={"components.data-table.pagination.total":"Total","components.file-tag.operation.preview-pdf":"Preview PDF","components.file-tag.operation.download":"Download","components.user-card.unknown":"Unknown user","components.user-card.is-me":"(Me)","components.user-card.phone":"Phone number","components.user-card.email":"Email address","components.user-card.sex":"Gender","components.user-card.status":"Status","components.user-card.role":"Role","components.user-selector.placeholder":"Please enter keywords","components.user-selector.search":"Search","components.attachment-text.appendix":"Click to upload attachment","components.markdown-editor.write":"Edit","components.markdown-editor.preview":"Preview","components.markdown-editor.uploading-image":"Upload image","components.markdown-editor.paste-drop-select":"Paste drop-down selection","components.single-image-uploader.upload-button":"Click Upload","components.auth-frame.operation.back-auth":"Return to Authorization Page","components.bind-frame.title.mail-force":"Bind Email","components.bind-frame.title.password-force":"Reset Password","components.bind-frame.title.external-force":"Bind External Authorization","components.constants.status-list.enable":"Enable","components.constants.status-list.disable":"disable","components.constants.sex-list.secret":"Secret","components.constants.sex-list.male":"Male","components.constants.sex-list.female":"female"},XNe={RbDataTable:W,RbActionBarItem:G,RbActionBar:U,RbThemeSetter:Ut,RbDataChart:KW,RbFileTag:Lq,RbUserCard:nZ,RbIconRender:sAe,RbHtmlRender:lAe,RbDragTable:JIe,RbUserSelector:nNe,RbAttachmentText:rNe,RbPageContainer:iNe,RbHomePage:oNe,RbMarkdownConverter:kNe,RbMarkdownEditor:ONe,RbSingleImageUploader:SNe,RbAuthFrame:VNe,RbBindFrame:INe,RbGlobalContext:p}})(),module.exports=r})();
28
+ `}))),JIe=e=>{const{setTableLoading:t,responsive:n,styles:r,tableLoading:a,restProps:i,actionRef:o}=(e=>{const[t,n]=(0,u.useState)(),[r,a]=(0,u.useState)(!1),i=(0,u.useRef)(void 0),{request:o,loading:c,columns:s,...l}=e,{styles:f}=QIe();return(0,u.useImperativeHandle)(e.actionRef,(()=>({startLoading:()=>{a(!0)},finishLoading:()=>{a(!1)},...i.current}))),(0,u.useEffect)((()=>{n(e.responsive)}),[e.responsive]),(0,u.useEffect)((()=>{e.loadChange&&e.loadChange.call(void 0,r)}),[r]),{setTableLoading:a,responsive:t,styles:f,tableLoading:r,restProps:l,actionRef:i}})(e);return(0,l.jsx)(ZIe,{tableClassName:r.customTable,scroll:{x:1300},rowKey:"guid",search:{labelWidth:120},loading:a,columns:e.columns.map((e=>{const t={...e};return t.fixed=!n&&t.fixed,e})),request:async(n,r,a)=>{let i;t(!0);try{i=await e.request.call(void 0,n,r,a)}finally{t(!1)}return i},...i,actionRef:o},"dragTable"+n)},eNe=f().forwardRef((({fieldProps:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,options:c,...s},f)=>{const d={options:c,mode:a||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label",...e},h=(0,u.useContext)(uAe.FieldContext);return(0,l.jsx)(uAe.ProFormField,{valueEnum:ARe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:{getPopupContainer:h.getPopupContainer,...d},ref:f,proFieldProps:r,...s,children:t})})),tNe=f().forwardRef((({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c},s)=>{const{setKeywords:f,onFuzzy:d,start:p,loading:m,context:g,data:y,intl:b,keywords:w}=(({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c})=>{const{intl:s}=v(),l=(0,u.useContext)(uAe.FieldContext),[f,d]=(0,u.useState)([]),[h,p]=(0,u.useState)(),[m,g]=(0,u.useState)(!1),[y,b]=(0,u.useState)(!1),w=async e=>{g(!0);const t=l.formRef?.current?.getFieldValue(c.name);let n;n=H.isNotNull(t)?await o(e,Array.isArray(t)?t:[t]):await o(e,[]),1===n.code?d(n.data):d([]),g(!1)};return(0,u.useEffect)((()=>{(async()=>{b(!0),await w(null),b(!1)})()}),[]),(0,u.useEffect)((()=>{if(e){const e=document.getElementsByClassName("ant-form-item-control");for(const t of e){const e=t.getElementsByClassName("ant-col ant-form-item-control");for(const t of e)t.style.maxWidth="none"}}}),[y,e]),{setKeywords:p,onFuzzy:w,start:y,loading:m,context:l,data:f,intl:s,keywords:h}})({widthControl:e,children:t,params:n,proFieldProps:r,mode:a,valueEnum:i,request:o,...c});return(0,l.jsx)(uAe.ProFormField,{valueEnum:ARe(i),params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:p?{value:null,loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.title,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,value:e.guid,label:e.name,title:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]})}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})}:{loading:m,mode:a,getPopupContainer:g.getPopupContainer,defaultActiveFirstOption:!1,labelRender:e=>e.label,optionRender:e=>{const t=e.data;return(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"default",src:c.avatarPreview(t.avatar),children:t.name[0]}),(0,l.jsxs)(h.Space,{direction:"vertical",size:0,children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:t.name}),t.alias&&(0,l.jsx)("span",{children:"("+t.alias+")"})]}),(0,l.jsx)("span",{style:{fontSize:"0.875rem"},children:t.phone})]})]})},options:(y||[]).map((e=>({...e,value:e.guid,label:(0,l.jsxs)(h.Space,{children:[(0,l.jsx)(h.Avatar,{size:"small",src:c.avatarPreview(e.avatar),children:e.name[0]}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.name})})]}),title:e.name}))),dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(h.Divider,{style:{marginTop:"0.5rem",marginBottom:"0.5rem",marginLeft:"0rem",marginRight:"0rem"}}),(0,l.jsxs)(h.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(h.Input,{placeholder:b.formatMessage({id:"components.user-selector.placeholder",defaultMessage:"请输入关键字"}),value:w,onChange:e=>{f(e.target.value)}}),(0,l.jsx)(h.Button,{loading:m,type:"primary",onClick:()=>{d(w)},children:b.formatMessage({id:"components.user-selector.search",defaultMessage:"搜索"})})]})]})},ref:s,proFieldProps:r,...c,children:t})}));tNe.SearchSelect=eNe,tNe.displayName="ProFormComponent";const nNe=tNe,rNe=e=>{const{intl:t,globalFunctions:n,inputRef:r}=(()=>{const{intl:e,globalFunctions:t}=v();return{intl:e,globalFunctions:t,inputRef:(0,u.useRef)(null)}})();return(0,l.jsxs)(d.ProCard,{style:{width:"100%"},bodyStyle:{padding:10},bordered:!0,onClick:()=>{r&&r.current.focus()},children:[(0,l.jsx)(h.Input.TextArea,{showCount:!0,autoSize:!0,maxLength:e.maxLength,ref:r,variant:"borderless",placeholder:e.placeholder,onChange:t=>{e.onInputChange.call(void 0,t.target.value)}}),(0,l.jsx)(h.Upload,{maxCount:e.maxFile,action:n.getUploadUrl.call(void 0,e.configCode),listType:"picture",defaultFileList:e.defaultFileList,headers:{Authorization:e.accessToken},onRemove:t=>{e.onFileRemove.call(void 0,t)},onChange:({file:t})=>{t&&e.onFileChange.call(void 0,t)},children:(0,l.jsx)(h.Tooltip,{title:t.formatMessage({id:"components.attachment-text.appendix",defaultMessage:"点击上传附件"}),children:(0,l.jsx)(h.Button,{type:"text",icon:(0,l.jsx)(_ve,{})})})})]})},aNe=_He,iNe=e=>{const{mode:t,loading:n,initialState:r,headerHeight:a,token:i}=(()=>{const{initialState:e}=v(),t="mix"!==e.settings.layout?0:e?.settings?.token?.header?.heightLayoutHeader??56,{token:n}=h.theme.useToken(),[r,a]=(0,u.useState)(Gt.getThemeMode()),[i,o]=(0,u.useState)(!0);return(0,u.useEffect)((()=>{const e=e=>{e="light"===e?"light":"realDark",Gt.setThemeMode(e),a(void 0),setTimeout((()=>{a(e)}),1)};return setTimeout((()=>{o(!1)}),800),Bt.eventEmitter.on(Nt.THEME_MODE,e),()=>{Bt.eventEmitter.off(Nt.THEME_MODE,e)}}),[]),{mode:r,loading:i,initialState:e,headerHeight:t,token:n}})();return t&&(0,l.jsx)(h.Watermark,{content:e.watermark,children:(0,l.jsx)(aNe,{onResize:t=>{e.onResponsive?.call(void 0,t.width<(e.responsiveWidth??i.screenSM)),e.onResize?.call(void 0,t)},children:(0,l.jsx)("div",{ref:e.scrollbarsRef,style:{height:0===a?"100vh":`calc(100vh - ${a}px)`,overflow:"auto"},children:(0,l.jsxs)(d.PageContainer,{...e,children:[(0,l.jsx)(d.ProCard,{ghost:!(!1!==e.animate&&e.loadDuringAnimate&&n||e.loading),className:!1===e.animate?"":`animate__animated animate__${e.animate??"fadeInRight"} animate__fast`,loading:!1!==e.animate&&e.loadDuringAnimate&&n||e.loading,children:e.children}),r?.currentTheme?.copyright&&(0,l.jsx)(d.DefaultFooter,{copyright:r?.currentTheme?.copyright,links:r?.currentTheme?.links.map(((e,t)=>({key:`${t}`,title:e.key,href:e.value,blankTarget:!0}))),style:{background:"none"}})]})})})})},oNe=e=>{const{isChild:t}=(e=>{const[t,n]=(0,u.useState)(!0);return(0,u.useLayoutEffect)((()=>{n(!e.location.endsWith(e.path))}),[e.location]),{isChild:t}})(e);return t?e.children:e.home};var cNe=n(8365),sNe=n(1552),lNe=n(5072),uNe=n.n(lNe),fNe=n(7825),dNe=n.n(fNe),hNe=n(7659),pNe=n.n(hNe),vNe=n(5056),mNe=n.n(vNe),gNe=n(540),yNe=n.n(gNe),bNe=n(1113),wNe=n.n(bNe),xNe=n(2795),MNe={};MNe.styleTagTransform=wNe(),MNe.setAttributes=mNe(),MNe.insert=pNe().bind(null,"head"),MNe.domAPI=dNe(),MNe.insertStyleElement=yNe(),uNe()(xNe.A,MNe),xNe.A&&xNe.A.locals&&xNe.A.locals;const kNe=new sNe.Converter({tables:!0,simplifiedAutoLink:!0,strikethrough:!0,tasklists:!0}),ONe=e=>{const{intl:t,selectedTab:n,setSelectedTab:r}=(()=>{const{intl:e}=v(),[t,n]=(0,u.useState)("write");return{intl:e,selectedTab:t,setSelectedTab:n}})();return(0,l.jsx)(cNe.default,{childProps:{writeButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},previewButton:{style:{color:"black",paddingRight:4,paddingLeft:4}},textArea:{style:{color:"black",minHeight:"400px"}}},value:e.value,onChange:e.onChange,selectedTab:n,onTabChange:r,l18n:{write:t.formatMessage({id:"components.markdown-editor.write",defaultMessage:"编辑"}),preview:t.formatMessage({id:"components.markdown-editor.preview",defaultMessage:"预览"}),uploadingImage:t.formatMessage({id:"components.markdown-editor.uploading-image",defaultMessage:"上传图片"}),pasteDropSelect:t.formatMessage({id:"components.markdown-editor.paste-drop-select",defaultMessage:"粘贴下拉选择"})},generateMarkdownPreview:e=>Promise.resolve(kNe.makeHtml(e))})},zNe=f().forwardRef(((e,t)=>(0,l.jsx)(d.ProFormUploadButton,{...e,ref:t}))),_Ne=e=>{const{intl:t,globalFunctions:n,onFileChange:r}=(e=>{const{intl:t,globalFunctions:n}=v(),r=(0,u.useCallback)((({file:t})=>{t&&"done"===t.status&&(t.response&&1===t.response.code?(e.afterSuccess?.call(void 0),e.onChange?.call(void 0,[{uid:t.response.data.guid,name:t.name,status:"done",url:n.getPreviewUrl.call(void 0,t.response.data.guid)}])):e.afterFail?.call(void 0,t.response.message))}),[e.afterSuccess,e.onChange,n]);return{intl:t,globalFunctions:n,onFileChange:r}})(e);return(0,l.jsx)(zNe,{title:t.formatMessage({id:"components.single-image-uploader.upload-button",defaultMessage:"单击上传"}),name:e.name,label:e.label,rules:e.rules,max:1,fieldProps:{name:"file",listType:"picture-card",headers:{Authorization:e.headers?.accessToken,Language:e.headers?.locale,"Client-Id":e.headers?.clientId},onChange:r,onRemove:()=>{e.onChange?.call(void 0,void 0)}},action:n.getUploadUrl.call(void 0,e.fileCode)})},SNe=e=>(0,l.jsx)(uAe.ProForm.Item,{name:e.name,style:{marginBottom:0},children:(0,l.jsx)(_Ne,{...e})}),ENe=e=>(0,l.jsxs)(p.Provider,{value:{...e.globalState},children:[(0,l.jsx)(f().Fragment,{children:e.messageHolder},"message"),(0,l.jsx)(f().Fragment,{children:e.notificationHolder},"notification"),e.childrenRender?e.childrenRender(e.children):(0,l.jsx)(l.Fragment,{children:e.children})]}),CNe=(e,t)=>e.map((({path:e,guid:n,icon:r,children:a,hideStatus:i,i18n:o,...c})=>{const s=o.filter((e=>e.locale===t));let u;return u=s.length>0?s[0].name:o[0].name,{...c,name:u,hideInMenu:0===i,icon:r&&(0,l.jsx)(sAe,{name:r}),children:a&&CNe(a,t),key:n,path:e}})),TNe=(e,t,n)=>{e&&t&&e.forEach((e=>{t.includes(e.key)&&!e.hideInMenu&&n.push(e),e.children&&TNe(e.children,t,n)}))},LNe=(e,t)=>{const n=Gt.getQuickMethod(t),r=[];return TNe(e,n,r),r.map(((e,t)=>({key:t,icon:e.icon,title:e.name,url:e.path})))},ANe=async e=>{const t=async()=>{let t;try{t=await e.getUserInitDetail.call(void 0)}catch(t){return void RNe.executeLogout(e.history,e.loginLoadPath)}if(1===t.code&&t.data){const n=t.data;return n.menuList&&(n.menuList=CNe(n.menuList,e.locale)),n.avatar&&(n.avatar=e.getPreviewUrl.call(void 0,n.avatar)),n}RNe.executeLogout(e.history,e.loginLoadPath)},n=async()=>{const t=await e.getCurrentThemeDetail.call(void 0);if(1===t.code&&t.data){if(t.data.favicons){const n=document.querySelector("link[rel*='icon']")||document.createElement("link");n.type="image/x-icon",n.rel="shortcut icon",n.href=e.getPreviewUrl.call(void 0,t.data.favicons),document.getElementsByTagName("head")[0].appendChild(n)}return t.data}},{location:r}=e.history,a=Gt.getThemeMode(),i=e.defaultSettings;return i.navTheme=a,r.pathname.endsWith(e.loginLoadPath)?{settings:i,currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}:{settings:i,currentUser:await t(),currentTheme:await n(),fetchUserInfo:t,fetchThemeInfo:n}},PNe=e=>{const[t,n]=h.message.useMessage(),[r,a]=h.notification.useNotification(),{layout:i,splitMenus:o,title:c,logo:s,...d}=e.globalState.initialState?.settings??{},p=window.__POWERED_BY_QIANKUN__?"side":i;return(0,u.useEffect)((()=>{const n=Gt.getThemeMode();e.globalState.initialState?.settings.navTheme&&e.globalState.initialState?.settings.navTheme!==n&&e.setInitialState.call(void 0,(t=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=n,{...t,settings:r}}));const a=({level:e,content:n})=>{t[e](n)},i=({level:e,config:t})=>{r[e](t)},o=t=>{e.setInitialState.call(void 0,(n=>{const r=(0,D.cloneDeep)(e.globalState.initialState.settings);return r.navTheme=t,{...n,settings:r}}))};return Bt.eventEmitter.on(Nt.MESSAGE,a),Bt.eventEmitter.on(Nt.NOTIFICATION,i),Bt.eventEmitter.on(Nt.THEME_MODE,o),()=>{Bt.eventEmitter.off(Nt.MESSAGE,a),Bt.eventEmitter.off(Nt.NOTIFICATION,i),Bt.eventEmitter.off(Nt.THEME_MODE,o)}}),[e.globalState.initialState?.settings.navTheme]),{menu:{locale:!1,request:()=>e.globalState.initialState.currentUser.menuList},actionsRender:()=>window.__POWERED_BY_QIANKUN__?[]:[(0,l.jsx)(Ut,{},"DarkModeChange"),f().cloneElement(e.selectLang,{key:"localeChange"})],avatarProps:{src:e.globalState.initialState?.currentUser?.avatar,title:f().cloneElement(e.avatarName,{key:"avatarName"}),render:(t,n)=>f().cloneElement(e.avatarDropdown,{key:"avatarDropdown"},n)},footerRender:void 0,onPageChange:t=>{e.globalState.initialState?.currentUser||t.pathname.endsWith(e.loginLoadPath)||e.history.push(e.loginLoadPath)},bgLayoutImgList:[{src:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.backgroundImg),bottom:0,left:0,height:"100%"}],appList:LNe(e.globalState.initialState?.currentUser?.menuList,e.clientId),links:[],menuHeaderRender:void 0,childrenRender:t=>(0,l.jsx)(ENe,{...e,currentLayout:p,messageHolder:n,notificationHolder:a,children:t}),layout:p,splitMenus:!window.__POWERED_BY_QIANKUN__&&o,title:e.globalState.initialState?.currentTheme?.title??c,logo:e.globalState.globalFunctions.getPreviewUrl(e.globalState.initialState?.currentTheme?.icon)??s,...d}};var jNe=n(7186);const RNe={convertPageParam:async(e,t,n,r)=>{const a={...t};void 0!==a.current&&(a.pageNum=a.current,a.current=void 0),n&&(a.sort=n),a.filter=r;for(const e in a)Array.isArray(a[e])&&(a[e]=String(a[e]));const i=await e(a);return 1===i.code?{data:i.data,success:!0,total:i.total}:{data:i.message,success:!1,total:i.total}},downloadFile:(e,t)=>{if(!e)return;const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},executeLogout:(e,t)=>{const{search:n,pathname:r}=window.location,a=new URL(window.location.href).searchParams.get("redirect");window.location.pathname.endsWith(t)||a||e.replace({pathname:t,search:(0,jNe.stringify)({redirect:r+n})})},getOAuth2Url:(e,t,n,r,a)=>{const i=new URL(`${n}/authorization/oauth2/authorize?`);for(const e in r)"client_secret"!==e&&i.searchParams.set(e,r[e]);let o;const c=new URL(window.location.href);return c.searchParams.delete("code"),c.searchParams.delete("state"),a&&c.searchParams.set("redirect",a),o=c.toString(),i.searchParams.set("redirect_uri",o),i.searchParams.set("state",JSON.stringify({locale:e,theme:t})),i.toString()},getExternalAuthUrl:(e,t,n,r,a,i)=>{const o=new URL(e),c=new URL(window.location.href);return c.search="",c.pathname=a,o.searchParams.set("redirect_uri",c.toString()),o.searchParams.set("state",JSON.stringify({locale:t,theme:n,external_guid:r,user_guid:i})),o.toString().replace(/%3A/g,":")},getExternalAuthUrl4Auth:function(e,t,n,r,a){const i=new URL(t),o=new URL(e);return i.searchParams.set("redirect_uri",o.toString()),i.searchParams.set("state",JSON.stringify({locale:n,theme:r,external_guid:a})),i.toString().replace(/%3A/g,":")}},HNe=e=>{const{intl:t,initialState:n}=v(),[r,a]=(0,u.useState)(void 0),i=async()=>{const t=await(n?.fetchUserInfo?.call(void 0));t&&(0,URe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentUser:t})))}));const r=await(n?.fetchThemeInfo?.call(void 0));r&&(0,URe.flushSync)((()=>{e.setInitialState.call(void 0,(e=>({...e,currentTheme:r})))}))},o=async(t,n)=>{if(1===t.code){if(L.getDb().delete(),Gt.setToken(t.data),await i(),window.__POWERED_BY_QIANKUN__){const{pathname:t}=window.location,r=t.replace(e.loginLoadPath,"");r&&n.redirect.startsWith(r)&&(n.redirect=n.redirect.replace(new RegExp(`^${r}`),""))}e.onFinish.call(void 0,n.redirect,void 0)}else a(t.message)},c=(e,t)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,document.body.appendChild(n)};return(0,u.useEffect)((()=>{(async()=>{const t=(()=>{const t=e.searchParams.get("code"),n=e.searchParams.get("state"),r=e.searchParams.get("redirect")??"/";let a=null,i=null,o=null,c=null;if(n){let e;try{e=JSON.parse(n)}catch{e=null}e&&(a=e.locale,i=e.theme,o=e.external_guid,c=e.user_guid)}return{code:t,state:n,redirect:r,locale:a,theme:i,externalGuid:o,userGuid:c}})();t.locale&&e.setLocale.call(void 0,t.locale,!1),setTimeout((()=>{t.theme&&Gt.setThemeMode("realDark"===t.theme?"realDark":"light"),t.code?t.externalGuid&&t.userGuid?(async t=>{const n=new URL(window.location.href);n.search="";const r=await e.bindExternalData.call(void 0,{guid:t.externalGuid,code:t.code,redirectUrl:n.toString()}),a=Gt.getBeforeExternalBindPathname();if(1===r.code){await i();const t=r.data.i18n.filter((t=>e.locale===t.locale));e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:t[0].title,externalBindResult:!0})}else e.onFinish.call(void 0,void 0!==a?a:"/user-center",{external:r.message,externalBindResult:!1})})(t):(async t=>{let n;if(t.externalGuid){const r=new URL(window.location.href),a=new URLSearchParams;r.searchParams.has("redirect")&&a.set("redirect",r.searchParams.get("redirect")),r.search=a.toString(),n=await e.getTokenByCode.call(void 0,{code:t.code,external_guid:t.externalGuid,external_redirect_uri:encodeURIComponent(r.toString())})}else n=await e.getTokenByCode.call(void 0,{code:t.code});await o(n,t)})(t):(t=>{if(Gt.getActiveLogout())window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect);else if(!e.externalIntegrationConfig||e.externalIntegrationConfig.length<1)window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect);else for(const n of e.externalIntegrationConfig)"feishu"===n.platform&&c("https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.26.js",(()=>{window.h5sdk&&window.tt.requestAccess?window.tt.requestAccess({appID:n.appId,scopeList:[],success:async({code:r})=>{const a=new URL(window.location.href);a.search="";const i=await e.getTokenByCode.call(void 0,{code:r,external_client_id:n.appId,external_redirect_uri:a.toString(),platform:n.platform});await o(i,t)},fail:({errString:e})=>{a(e)}}):window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig,t.redirect)}))})(t)}),1)})()}),[]),{setExceptionMsg:a,exceptionMsg:r,intl:t}},BNe=h.Result,VNe=e=>{const{setExceptionMsg:t,exceptionMsg:n,intl:r}=HNe(e);return(0,l.jsx)(l.Fragment,{children:void 0===n?(0,l.jsx)(h.Spin,{percent:"auto",size:"large"}):(0,l.jsx)(BNe,{status:"500",title:n,extra:(0,l.jsx)(h.Button,{type:"primary",onClick:()=>{t(void 0),window.location.href=RNe.getOAuth2Url(e.locale,Gt.getThemeMode(),e.gatewayUrl,e.clientConfig)},children:r.formatMessage({id:"components.auth-frame.operation.back-auth",defaultMessage:"返回授权页面"})})})})},INe=e=>{const{setCurrent:t,setLoading:n,steps:r,mailStep:a,externalStep:i,current:o,loading:c,externalBind:s}=(e=>{const{intl:t}=v(),[n,r]=(0,u.useState)(!1),[a,i]=(0,u.useState)({}),[o,c]=(0,u.useState)([]),[s,f]=(0,u.useState)(0),[d,h]=(0,u.useState)(),[p,m]=(0,u.useState)(),[g,y]=(0,u.useState)();return(0,u.useEffect)((()=>{(async()=>{const n=await e.getUserForceBind.call(void 0),r=[];1===n.code?(n.data&&(n.data.mailForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.mail-force",defaultMessage:"绑定邮箱"}),icon:(0,l.jsx)(Nq,{})}),h(r.length-1)),n.data.passwordForce&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.password-force",defaultMessage:"重置密码"}),icon:(0,l.jsx)(wde,{})}),m(r.length-1)),n.data.externalForceList&&n.data.externalForceList.length>0&&(r.push({title:t.formatMessage({id:"components.bind-frame.title.external-force",defaultMessage:"绑定外部授权"}),icon:(0,l.jsx)(CJ,{})}),y(r.length-1),i(n.data.externalForceList))),c(r)):i([]),r.length<1&&e.onFinish.call(void 0)})()}),[]),{setCurrent:f,setLoading:r,steps:o,mailStep:d,externalStep:g,current:s,loading:n,externalBind:a}})(e);return(0,l.jsx)(l.Fragment,{children:r&&r.length>0?(0,l.jsxs)(JX,{style:{maxWidth:"36rem"},hoverable:!e.responsive,bordered:!e.responsive,children:[(0,l.jsx)(h.Steps,{size:"small",items:r,current:o}),(0,l.jsx)(h.Divider,{dashed:!0}),void 0!==a&&a===o&&(0,l.jsx)(l.Fragment,{children:f().cloneElement(e.mailBindFrame,{key:"mail-bind-frame",onFinish:n=>{o+1>=r.length?e.onFinish.call(void 0):t(o+1)}})}),void 0!==i&&i===o&&(0,l.jsx)(h.Spin,{spinning:c,children:f().cloneElement(e.externalAuthFrame,{key:"external-auth-frame",externalFilterList:s,onLoadChange:e=>{n(e)}})})]}):(0,l.jsx)(h.Spin,{percent:"auto",size:"large"})})},NNe={setScale:(e,t=2)=>{const n=Math.pow(10,t);return Math.round(e*n)/n}},FNe={randomStr:e=>{let t="";for(let n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(62*Math.random())];return t}},DNe={fromUnicode:e=>e.replace(/\\u([\dA-Fa-f]{4})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))),toUnicode:e=>encodeURIComponent(e).replace(/%/g,"\\u").replace(/\\u([0-9a-fA-F]{2})/g,((e,t)=>"\\u00"+t))},$Ne={generateUploadFile:(e,t,n,r)=>{if(e[t]&&e[n])return[{uid:e[n],name:e[t],status:"done",url:r.call(void 0,e[n])}]}},WNe=()=>{const{locale:e,globalFunctions:t}=v(),n=async n=>{const r=L.getDb();r.version(1).stores({sys_dict:"++id, type, name, enName, value, color, sort"});let a=await r.sys_dict.where("type").equals(n).sortBy("sort");if(0===a.length){const e=await(t?.getDictDataByType.call(void 0,n));1===e.code&&(a=e.data,a.length>0&&r.sys_dict.bulkPut(a.map((e=>({...e,type:n})))))}return a.map((t=>{const r=t.i18n.filter((t=>t.locale===e));let a;return a=r.length>0?r[0].name:t.i18n[0].name,{type:n,label:a,value:t.value,color:t.color,sort:t.sort}}))};return{getDataByType:n,getTagDataByType:async e=>(await n(e)).map((e=>({label:(0,l.jsx)(h.Tag,{style:{maxWidth:"100%"},bordered:!0,color:e.color,children:(0,l.jsx)(h.Typography.Text,{ellipsis:{tooltip:e.label},children:e.label})}),value:/^\d+$/.test(e.value)?Number(e.value):e.value,title:e.label})))}},qNe=()=>({info:e=>Bt.pushMessageEvent("info",e),success:e=>Bt.pushMessageEvent("success",e),error:e=>Bt.pushMessageEvent("error",e),warning:e=>Bt.pushMessageEvent("warning",e),loading:e=>Bt.pushMessageEvent("loading",e)}),GNe=()=>({info:e=>Bt.pushNotificationEvent("info",e),success:e=>Bt.pushNotificationEvent("success",e),error:e=>Bt.pushNotificationEvent("error",e),warning:e=>Bt.pushNotificationEvent("warning",e),loading:e=>Bt.pushNotificationEvent("loading",e)}),UNe={outlinedConstants:["StepBackwardOutlined","StepForwardOutlined","FastBackwardOutlined","FastForwardOutlined","ShrinkOutlined","ArrowsAltOutlined","DownOutlined","UpOutlined","LeftOutlined","RightOutlined","CaretUpOutlined","CaretDownOutlined","CaretLeftOutlined","CaretRightOutlined","UpCircleOutlined","DownCircleOutlined","LeftCircleOutlined","RightCircleOutlined","DoubleRightOutlined","DoubleLeftOutlined","VerticalLeftOutlined","VerticalRightOutlined","VerticalAlignTopOutlined","VerticalAlignMiddleOutlined","VerticalAlignBottomOutlined","ForwardOutlined","BackwardOutlined","RollbackOutlined","EnterOutlined","RetweetOutlined","SwapOutlined","SwapLeftOutlined","SwapRightOutlined","ArrowUpOutlined","ArrowDownOutlined","ArrowLeftOutlined","ArrowRightOutlined","PlayCircleOutlined","UpSquareOutlined","DownSquareOutlined","LeftSquareOutlined","RightSquareOutlined","LoginOutlined","LogoutOutlined","MenuFoldOutlined","MenuUnfoldOutlined","BorderBottomOutlined","BorderHorizontalOutlined","BorderInnerOutlined","BorderOuterOutlined","BorderLeftOutlined","BorderRightOutlined","BorderTopOutlined","BorderVerticleOutlined","PicCenterOutlined","PicLeftOutlined","PicRightOutlined","RadiusBottomleftOutlined","RadiusBottomrightOutlined","RadiusUpleftOutlined","RadiusUprightOutlined","FullscreenOutlined","FullscreenExitOutlined","QuestionOutlined","QuestionCircleOutlined","PlusOutlined","PlusCircleOutlined","PauseOutlined","PauseCircleOutlined","MinusOutlined","MinusCircleOutlined","PlusSquareOutlined","MinusSquareOutlined","InfoOutlined","InfoCircleOutlined","ExclamationOutlined","ExclamationCircleOutlined","CloseOutlined","CloseCircleOutlined","CloseSquareOutlined","CheckOutlined","CheckCircleOutlined","CheckSquareOutlined","ClockCircleOutlined","WarningOutlined","IssuesCloseOutlined","StopOutlined","EditOutlined","FormOutlined","CopyOutlined","ScissorOutlined","DeleteOutlined","SnippetsOutlined","DiffOutlined","HighlightOutlined","AlignCenterOutlined","AlignLeftOutlined","AlignRightOutlined","BgColorsOutlined","BoldOutlined","ItalicOutlined","UnderlineOutlined","StrikethroughOutlined","RedoOutlined","UndoOutlined","ZoomInOutlined","ZoomOutOutlined","FontColorsOutlined","FontSizeOutlined","LineHeightOutlined","DashOutlined","SmallDashOutlined","SortAscendingOutlined","SortDescendingOutlined","DragOutlined","OrderedListOutlined","UnorderedListOutlined","RadiusSettingOutlined","ColumnWidthOutlined","ColumnHeightOutlined","AreaChartOutlined","PieChartOutlined","BarChartOutlined","DotChartOutlined","LineChartOutlined","RadarChartOutlined","HeatMapOutlined","FallOutlined","RiseOutlined","StockOutlined","BoxPlotOutlined","FundOutlined","SlidersOutlined","AndroidOutlined","AppleOutlined","WindowsOutlined","IeOutlined","ChromeOutlined","GithubOutlined","AliwangwangOutlined","DingdingOutlined","WeiboSquareOutlined","WeiboCircleOutlined","TaobaoCircleOutlined","Html5Outlined","WeiboOutlined","TwitterOutlined","WechatOutlined","WhatsAppOutlined","YoutubeOutlined","AlipayCircleOutlined","TaobaoOutlined","DingtalkOutlined","SkypeOutlined","QqOutlined","MediumWorkmarkOutlined","GitlabOutlined","MediumOutlined","LinkedinOutlined","GooglePlusOutlined","DropboxOutlined","FacebookOutlined","CodepenOutlined","CodeSandboxOutlined","AmazonOutlined","GoogleOutlined","CodepenCircleOutlined","AlipayOutlined","AntDesignOutlined","AntCloudOutlined","AliyunOutlined","ZhihuOutlined","SlackOutlined","SlackSquareOutlined","BehanceOutlined","BehanceSquareOutlined","DribbbleOutlined","DribbbleSquareOutlined","InstagramOutlined","YuqueOutlined","AlibabaOutlined","YahooOutlined","RedditOutlined","SketchOutlined","AccountBookOutlined","AimOutlined","AlertOutlined","ApartmentOutlined","ApiOutlined","AppstoreAddOutlined","AppstoreOutlined","AudioOutlined","AudioMutedOutlined","AuditOutlined","BankOutlined","BarcodeOutlined","BarsOutlined","BellOutlined","BlockOutlined","BookOutlined","BorderOutlined","BorderlessTableOutlined","BranchesOutlined","BugOutlined","BuildOutlined","BulbOutlined","CalculatorOutlined","CalendarOutlined","CameraOutlined","CarOutlined","CarryOutOutlined","CiCircleOutlined","CiOutlined","ClearOutlined","CloudDownloadOutlined","CloudOutlined","CloudServerOutlined","CloudSyncOutlined","CloudUploadOutlined","ClusterOutlined","CodeOutlined","CoffeeOutlined","CommentOutlined","CompassOutlined","CompressOutlined","ConsoleSqlOutlined","ContactsOutlined","ContainerOutlined","ControlOutlined","CopyrightOutlined","CreditCardOutlined","CrownOutlined","CustomerServiceOutlined","DashboardOutlined","DatabaseOutlined","DeleteColumnOutlined","DeleteRowOutlined","DeliveredProcedureOutlined","DeploymentUnitOutlined","DesktopOutlined","DisconnectOutlined","DislikeOutlined","DollarOutlined","DownloadOutlined","EllipsisOutlined","EnvironmentOutlined","EuroCircleOutlined","EuroOutlined","ExceptionOutlined","ExpandAltOutlined","ExpandOutlined","ExperimentOutlined","ExportOutlined","EyeOutlined","EyeInvisibleOutlined","FieldBinaryOutlined","FieldNumberOutlined","FieldStringOutlined","FieldTimeOutlined","FileAddOutlined","FileDoneOutlined","FileExcelOutlined","FileExclamationOutlined","FileOutlined","FileGifOutlined","FileImageOutlined","FileJpgOutlined","FileMarkdownOutlined","FilePdfOutlined","FilePptOutlined","FileProtectOutlined","FileSearchOutlined","FileSyncOutlined","FileTextOutlined","FileUnknownOutlined","FileWordOutlined","FileZipOutlined","FilterOutlined","FireOutlined","FlagOutlined","FolderAddOutlined","FolderOutlined","FolderOpenOutlined","FolderViewOutlined","ForkOutlined","FormatPainterOutlined","FrownOutlined","FunctionOutlined","FundProjectionScreenOutlined","FundViewOutlined","FunnelPlotOutlined","GatewayOutlined","GifOutlined","GiftOutlined","GlobalOutlined","GoldOutlined","GroupOutlined","HddOutlined","HeartOutlined","HistoryOutlined","HolderOutlined","HomeOutlined","HourglassOutlined","IdcardOutlined","ImportOutlined","InboxOutlined","InsertRowAboveOutlined","InsertRowBelowOutlined","InsertRowLeftOutlined","InsertRowRightOutlined","InsuranceOutlined","InteractionOutlined","KeyOutlined","LaptopOutlined","LayoutOutlined","LikeOutlined","LineOutlined","LinkOutlined","Loading3QuartersOutlined","LoadingOutlined","LockOutlined","MacCommandOutlined","MailOutlined","ManOutlined","MedicineBoxOutlined","MehOutlined","MenuOutlined","MergeCellsOutlined","MessageOutlined","MobileOutlined","MoneyCollectOutlined","MonitorOutlined","MoreOutlined","NodeCollapseOutlined","NodeExpandOutlined","NodeIndexOutlined","NotificationOutlined","NumberOutlined","OneToOneOutlined","PaperClipOutlined","PartitionOutlined","PayCircleOutlined","PercentageOutlined","PhoneOutlined","PictureOutlined","PlaySquareOutlined","PoundCircleOutlined","PoundOutlined","PoweroffOutlined","PrinterOutlined","ProfileOutlined","ProjectOutlined","PropertySafetyOutlined","PullRequestOutlined","PushpinOutlined","QrcodeOutlined","ReadOutlined","ReconciliationOutlined","RedEnvelopeOutlined","ReloadOutlined","RestOutlined","RobotOutlined","RocketOutlined","RotateLeftOutlined","RotateRightOutlined","SafetyCertificateOutlined","SafetyOutlined","SaveOutlined","ScanOutlined","ScheduleOutlined","SearchOutlined","SecurityScanOutlined","SelectOutlined","SendOutlined","SettingOutlined","ShakeOutlined","ShareAltOutlined","ShopOutlined","ShoppingCartOutlined","ShoppingOutlined","SisternodeOutlined","SkinOutlined","SmileOutlined","SolutionOutlined","SoundOutlined","SplitCellsOutlined","StarOutlined","SubnodeOutlined","SwitcherOutlined","SyncOutlined","TableOutlined","TabletOutlined","TagOutlined","TagsOutlined","TeamOutlined","ThunderboltOutlined","ToTopOutlined","ToolOutlined","TrademarkCircleOutlined","TrademarkOutlined","TransactionOutlined","TranslationOutlined","TrophyOutlined","UngroupOutlined","UnlockOutlined","UploadOutlined","UsbOutlined","UserAddOutlined","UserDeleteOutlined","UserOutlined","UserSwitchOutlined","UsergroupAddOutlined","UsergroupDeleteOutlined","VerifiedOutlined","VideoCameraAddOutlined","VideoCameraOutlined","WalletOutlined","WifiOutlined","WomanOutlined"]},KNe={"components.data-table.pagination.total":"总","components.file-tag.operation.preview-pdf":"预览PDF","components.file-tag.operation.download":"下载","components.user-card.unknown":"未知用户","components.user-card.is-me":"(我)","components.user-card.phone":"手机号码","components.user-card.email":"邮箱地址","components.user-card.sex":"性别","components.user-card.status":"状态","components.user-card.role":"角色","components.user-selector.placeholder":"请输入关键字","components.user-selector.search":"搜索","components.attachment-text.appendix":"点击上传附件","components.markdown-editor.write":"编辑","components.markdown-editor.preview":"预览","components.markdown-editor.uploading-image":"上传图片","components.markdown-editor.paste-drop-select":"粘贴下拉选择","components.single-image-uploader.upload-button":"单击上传","components.auth-frame.operation.back-auth":"返回授权页面","components.bind-frame.title.mail-force":"绑定邮箱","components.bind-frame.title.password-force":"重置密码","components.bind-frame.title.external-force":"绑定外部授权","components.constants.status-list.enable":"启用","components.constants.status-list.disable":"停用","components.constants.sex-list.secret":"保密","components.constants.sex-list.male":"男","components.constants.sex-list.female":"女"},YNe={"components.data-table.pagination.total":"Total","components.file-tag.operation.preview-pdf":"Preview PDF","components.file-tag.operation.download":"Download","components.user-card.unknown":"Unknown user","components.user-card.is-me":"(Me)","components.user-card.phone":"Phone number","components.user-card.email":"Email address","components.user-card.sex":"Gender","components.user-card.status":"Status","components.user-card.role":"Role","components.user-selector.placeholder":"Please enter keywords","components.user-selector.search":"Search","components.attachment-text.appendix":"Click to upload attachment","components.markdown-editor.write":"Edit","components.markdown-editor.preview":"Preview","components.markdown-editor.uploading-image":"Upload image","components.markdown-editor.paste-drop-select":"Paste drop-down selection","components.single-image-uploader.upload-button":"Click Upload","components.auth-frame.operation.back-auth":"Return to Authorization Page","components.bind-frame.title.mail-force":"Bind Email","components.bind-frame.title.password-force":"Reset Password","components.bind-frame.title.external-force":"Bind External Authorization","components.constants.status-list.enable":"Enable","components.constants.status-list.disable":"disable","components.constants.sex-list.secret":"Secret","components.constants.sex-list.male":"Male","components.constants.sex-list.female":"female"},XNe={RbDataTable:W,RbActionBarItem:G,RbActionBar:U,RbThemeSetter:Ut,RbDataChart:KW,RbFileTag:Lq,RbUserCard:nZ,RbIconRender:sAe,RbHtmlRender:lAe,RbDragTable:JIe,RbUserSelector:nNe,RbAttachmentText:rNe,RbPageContainer:iNe,RbHomePage:oNe,RbMarkdownConverter:kNe,RbMarkdownEditor:ONe,RbSingleImageUploader:SNe,RbAuthFrame:VNe,RbBindFrame:INe,RbGlobalContext:p}})(),module.exports=r})();
@@ -7,7 +7,7 @@ declare const useRbDictionary: () => {
7
7
  getDataByType: (type: string) => Promise<DictListItem[]>;
8
8
  getTagDataByType: (type: string) => Promise<{
9
9
  label: React.ReactNode;
10
- value: number;
10
+ value: any;
11
11
  }[]>;
12
12
  };
13
13
  export default useRbDictionary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regenbio/regenbio-components-react",
3
- "version": "1.3.71",
3
+ "version": "1.3.73",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },