@abtnode/blocklet-services 1.16.42-beta-20250412-084444-20b0cf19 → 1.16.42-beta-20250413-121549-22e9a196
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/api/index.js +32 -2
- package/api/libs/push-kit/index.js +16 -11
- package/api/routes/user-session.js +49 -40
- package/api/routes/user.js +16 -4
- package/api/services/auth/session.js +37 -10
- package/api/util/attach-shared-utils.js +12 -5
- package/dist/assets/{ArrowDropDown-C_E3qkPd.js → ArrowDropDown-a-C4j7Lx.js} +1 -1
- package/dist/assets/{CheckCircle-D7Ntmb2o.js → CheckCircle-CuYzdCtm.js} +1 -1
- package/dist/assets/{ChevronLeft-BIgT65EY.js → ChevronLeft-CnflXey6.js} +1 -1
- package/dist/assets/{ChevronRight-foZmiP4J.js → ChevronRight-DE7hYCb3.js} +1 -1
- package/dist/assets/{Community-Ds1NG5Zj.js → Community-C8NtUXNH.js} +1 -1
- package/dist/assets/{DeleteOutline-CKVA3PXs.js → DeleteOutline-PGhagisl.js} +1 -1
- package/dist/assets/{Done-BDrYSkZM.js → Done-BVaQae1-.js} +1 -1
- package/dist/assets/{Download-BQiSNQBP.js → Download-DNNh4N1T.js} +1 -1
- package/dist/assets/{EditIcon-Bt91o1l6.js → EditIcon-Y1U-3M09.js} +1 -1
- package/dist/assets/{Email-C7SKOpM8.js → Email-BYzCrU9G.js} +1 -1
- package/dist/assets/{Error-CK4gTMoT.js → Error-C4dVUMw4.js} +1 -1
- package/dist/assets/{ExpandLess-1B6PdCYC.js → ExpandLess-Blh1x-4z.js} +1 -1
- package/dist/assets/{Google-DimUFzIe.js → Google-CAujGJ1A.js} +1 -1
- package/dist/assets/{Holiday-Dfj3kBBI.js → Holiday-DxDxhx5X.js} +1 -1
- package/dist/assets/{InfoOutlined-CEHciuDy.js → InfoOutlined-DF9JwavD.js} +1 -1
- package/dist/assets/{Launch-DX76v5dw.js → Launch-gOz_lwLg.js} +1 -1
- package/dist/assets/{LaunchOutlined-CnOQGhu-.js → LaunchOutlined-MbSPR9qn.js} +1 -1
- package/dist/assets/{Location--4ueDivQ.js → Location-CEwgGcA5.js} +1 -1
- package/dist/assets/{LockIcon-B84lMZao.js → LockIcon-D7BH0t_p.js} +1 -1
- package/dist/assets/{Meeting-CVVnP-bH.js → Meeting-BJz5QiFc.js} +1 -1
- package/dist/assets/{MoreHoriz-THEF6D0C.js → MoreHoriz-CGWVyYh4.js} +1 -1
- package/dist/assets/{OffSick-C_2x7yDI.js → OffSick--msvqLGm.js} +1 -1
- package/dist/assets/{Phone-CaKOX2Yu.js → Phone-CDl3oDYG.js} +1 -1
- package/dist/assets/{PlayArrow-DpcMtsY5.js → PlayArrow-CxWt6459.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-5K6WR8Pc.js → QuestionMarkCircle-CPHZnM6u.js} +1 -1
- package/dist/assets/{ServerLogo-C4P-qXGV.js → ServerLogo-vX_nf8Sc.js} +1 -1
- package/dist/assets/{Timezone-Bgwxnj29.js → Timezone-uXi4_8BX.js} +1 -1
- package/dist/assets/{TuneOutlined-DHqZ7jGz.js → TuneOutlined-DcqnBMqE.js} +1 -1
- package/dist/assets/{ViewList-DOu7Co_L.js → ViewList-B6eveRY-.js} +1 -1
- package/dist/assets/{WorkingRemotely-Dm2BOs5c.js → WorkingRemotely-CK4z1-Sd.js} +1 -1
- package/dist/assets/{access-control-wqGz9JCo.js → access-control-Dxyg5dpc.js} +1 -1
- package/dist/assets/{actions-CAL1KFv7.js → actions-BAjt7G_t.js} +1 -1
- package/dist/assets/{add-component-core-DqvSoT6a.js → add-component-core-BXowXTJz.js} +1 -1
- package/dist/assets/{add-resource-DmN1IY_o.js → add-resource-BetUBTvt.js} +1 -1
- package/dist/assets/{addon-D1_etOjl.js → addon-B1aBsfOX.js} +1 -1
- package/dist/assets/{advanced-CzJgEcda.js → advanced-C8t1232G.js} +1 -1
- package/dist/assets/{appearance-Bn0kYJHu.js → appearance-BIOmTg1q.js} +1 -1
- package/dist/assets/{audit-logs-DU66CSpw.js → audit-logs-SSAqJt40.js} +1 -1
- package/dist/assets/{base32-CLGITfm-.js → base32-iVyUiizz.js} +1 -1
- package/dist/assets/{branding-C5rNAfwW.js → branding-BDuOcSfH.js} +1 -1
- package/dist/assets/{branding-CiE421Dn.js → branding-NmIAi0kv.js} +2 -2
- package/dist/assets/{bundle-avatar-vSofRY4G.js → bundle-avatar-DfAWUEqX.js} +1 -1
- package/dist/assets/button-Kk1bqv_H.js +1 -0
- package/dist/assets/{click-to-copy-C9iEVQIO.js → click-to-copy-DCUroWft.js} +1 -1
- package/dist/assets/{complete-BeWyfTmK.js → complete-R99mlHBI.js} +1 -1
- package/dist/assets/{component-CZ948vh4.js → component-By64LaLD.js} +1 -1
- package/dist/assets/{config-DzZULB-q.js → config-BHBxeyYh.js} +1 -1
- package/dist/assets/{config-CFbM7U_5.js → config-BvNNOdw8.js} +1 -1
- package/dist/assets/config-navigation-CPd_4svD.js +26 -0
- package/dist/assets/{config-space-Drp9NI7a.js → config-space-BgWEAM0m.js} +1 -1
- package/dist/assets/{confirm-B9OqaJpT.js → confirm-92J4n1RP.js} +1 -1
- package/dist/assets/{connect-CpUC5BAX.js → connect-Bq-p3hnS.js} +1 -1
- package/dist/assets/connect-D20f2K4u.js +5 -0
- package/dist/assets/{connect-to-BasQxweP.js → connect-to-bQVCrkhh.js} +1 -1
- package/dist/assets/{content-layout-Bs-vdQ_U.js → content-layout-CFHoSupA.js} +1 -1
- package/dist/assets/{dashboard-BYUKOMAe.js → dashboard-BgQFc2Pc.js} +11 -11
- package/dist/assets/{delete-confirm-CM4f-ajO.js → delete-confirm-AkwIQ5yF.js} +1 -1
- package/dist/assets/{did-address-B_VfxEC5.js → did-address-D4v6iN2l.js} +1 -1
- package/dist/assets/domain-CBdLs2D9.js +9 -0
- package/dist/assets/{domain-action-card-pHkmKFE3.js → domain-action-card-DN3KjFwP.js} +2 -2
- package/dist/assets/domains-CMJbalsn.js +1 -0
- package/dist/assets/{email-C5iUsSjP.js → email-JviRloBo.js} +1 -1
- package/dist/assets/{empty-spinner-Cia24BVr.js → empty-spinner-DlzuJxRt.js} +1 -1
- package/dist/assets/{exchange-passport-CyGvLDal.js → exchange-passport-3aXbJr-q.js} +1 -1
- package/dist/assets/{fuel-C5H_z1Ay.js → fuel-DOs3bqYm.js} +1 -1
- package/dist/assets/{get-safe-url-BOY9UAaI.js → get-safe-url-CWgEUVPT.js} +1 -1
- package/dist/assets/{get-safe-url-D_Puq_oh.js → get-safe-url-eATw6wn7.js} +1 -1
- package/dist/assets/{home-CjHQSa_8.js → home-a0RwGUp7.js} +1 -1
- package/dist/assets/{iframe-BhRKCdFb.js → iframe-DVBEjxC1.js} +1 -1
- package/dist/assets/{index-Kaq7tC6c.js → index-3q6oLa2e.js} +1 -1
- package/dist/assets/{index-C5lvlGzp.js → index-BBl5mftj.js} +3 -3
- package/dist/assets/{index-d34Q6nXR.js → index-BGeUo-5w.js} +1 -1
- package/dist/assets/{index-Cp_gD4ZQ.js → index-BJYrBMyS.js} +1 -1
- package/dist/assets/{index-B8FtPEFx.js → index-BVOsgGKh.js} +1 -1
- package/dist/assets/{index-DUU3hQpo.js → index-BxTrfRkG.js} +1 -1
- package/dist/assets/index-C3-7zmeY.js +346 -0
- package/dist/assets/{index-BTOIZL6e.js → index-CCwUSMuP.js} +1 -1
- package/dist/assets/{index-CjmXl7jW.js → index-CwdXL2a0.js} +1 -1
- package/dist/assets/{index-Ctl8J5Z5.js → index-DBLdE2lQ.js} +1 -1
- package/dist/assets/{index-CVIeQOoE.js → index-DQIxR9j5.js} +1 -1
- package/dist/assets/index-DWuuU3ta.js +113 -0
- package/dist/assets/{index-Cuoxr9xB.js → index-DjIOxw8x.js} +1 -1
- package/dist/assets/{index-CYAgDp3G.js → index-DrUxhMM5.js} +1 -1
- package/dist/assets/index-K5iSHoYm.js +224 -0
- package/dist/assets/{index-DR9nQ2tJ.js → index-KLUHbsxg.js} +1 -1
- package/dist/assets/{index-BYsXlcQC.js → index-MqiIu4kd.js} +1 -1
- package/dist/assets/{index-BjYech25.js → index-Th4BUzmb.js} +23 -23
- package/dist/assets/{index-Du2DtxVt.js → index-VvWvVQT8.js} +1 -1
- package/dist/assets/{index-DkZfhapD.js → index-sv3a1ZUw.js} +1 -1
- package/dist/assets/{invitation-C9hFp_wD.js → invitation-CwtXOXZc.js} +4 -4
- package/dist/assets/{invite-CzfqL5Tx.js → invite-CMj5995Z.js} +1 -1
- package/dist/assets/{issue-passport-D3F63x7z.js → issue-passport-DtEbcgX6.js} +1 -1
- package/dist/assets/{item-C_TigVeC.js → item-zVdGBfMR.js} +1 -1
- package/dist/assets/{landing-page-B5nKEn_3.js → landing-page-BM1TmagN.js} +1 -1
- package/dist/assets/{launch-result-message-C0Ao1hE-.js → launch-result-message-DOa3SWMR.js} +1 -1
- package/dist/assets/{layout-D5ALyxXA.js → layout-DCzN0ui5.js} +1 -1
- package/dist/assets/{list-DuzdV0Wa.js → list-BuXPrN1N.js} +8 -8
- package/dist/assets/{list-header-BibBP5t1.js → list-header-BLGbkNad.js} +1 -1
- package/dist/assets/localization-qd6O0FX9.js +1 -0
- package/dist/assets/{log-Dg8IZoeo.js → log-C0ajhie8.js} +1 -1
- package/dist/assets/{logger-Bd77RetM.js → logger-D6n4nbwy.js} +1 -1
- package/dist/assets/{login-B9XiO8eS.js → login-f1AXbIm0.js} +1 -1
- package/dist/assets/{login-oauth-callback-5AlLzjZ2.js → login-oauth-callback-C5CFUlUR.js} +1 -1
- package/dist/assets/{logo-uploader-ChABQ_cS.js → logo-uploader-DbAVW3BS.js} +3 -3
- package/dist/assets/{lost-passport-gGzRW--h.js → lost-passport-Dlmv8D-L.js} +2 -2
- package/dist/assets/{open-window-CX_mRFPs.js → open-window-DskgWqba.js} +1 -1
- package/dist/assets/{overview-ClfPLbRa.js → overview-DY9-9zrL.js} +1 -1
- package/dist/assets/{page-header-DWf5vODI.js → page-header-XbzfRkA7.js} +1 -1
- package/dist/assets/{permission-CmHMB8NK.js → permission-Bi46fqEy.js} +1 -1
- package/dist/assets/{preferences-COMN8FgJ.js → preferences-DPpwnIAs.js} +1 -1
- package/dist/assets/{profile-embed-Crj1xM6Z.js → profile-embed-DV5vno0C.js} +1 -1
- package/dist/assets/publish-resource-z2_THSz6.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-B3HYEQUw.js → react-beautiful-dnd.esm-B68lWn23.js} +1 -1
- package/dist/assets/{relative-time-CE47D6s7.js → relative-time-BeR_4mfM.js} +1 -1
- package/dist/assets/{runtime-CdKbOwQM.js → runtime-D6tESY33.js} +1 -1
- package/dist/assets/sdk-DNr-nKBq.js +1 -0
- package/dist/assets/{security-DmjkCoJ_.js → security-DmR541pi.js} +1 -1
- package/dist/assets/{session-0rF5SuCk.js → session-CJFbMNLl.js} +1 -1
- package/dist/assets/setup-BSsqBrsc.js +19 -0
- package/dist/assets/{shorten-label-DDBwv81M.js → shorten-label-BuH-7PI8.js} +1 -1
- package/dist/assets/{simple-select-vCKkiHhG.js → simple-select-DHvjqsw4.js} +1 -1
- package/dist/assets/{slicedToArray-Da5X2Yv5.js → slicedToArray-C0MW3KIe.js} +1 -1
- package/dist/assets/{spaces-CyFGYf34.js → spaces-gLUqr6Uq.js} +1 -1
- package/dist/assets/{start-CwSXw9Xs.js → start-XbVMHGiE.js} +1 -1
- package/dist/assets/{status-CgfGREVl.js → status-DmyvEkKL.js} +1 -1
- package/dist/assets/{step-actions-BNW8I1sI.js → step-actions-brdohYRv.js} +1 -1
- package/dist/assets/{studio-cLKWVbyy.js → studio-DJeZlIfF.js} +1 -1
- package/dist/assets/{switch-control-DpvMHPLC.js → switch-control-Br1YNOSB.js} +1 -1
- package/dist/assets/{traffic-ChJb5Oyl.js → traffic-LuIcK-L1.js} +1 -1
- package/dist/assets/{transfer-BHifjdxl.js → transfer-DboKwiA_.js} +1 -1
- package/dist/assets/{unsubscribe-CcyOqX8E.js → unsubscribe-C9k_L3g5.js} +1 -1
- package/dist/assets/{use-mobile-DjnNmGRG.js → use-mobile-C98e2dYy.js} +1 -1
- package/dist/assets/{use-mobile-DpXDDjat.js → use-mobile-CqLLcWbr.js} +1 -1
- package/dist/assets/useAsync-BxB2TpDl.js +1 -0
- package/dist/assets/useAsync-L7_fHBH5.js +1 -0
- package/dist/assets/useAsyncRetry-CEouAsle.js +7 -0
- package/dist/assets/{useLocalStorage-Cq9THoCr.js → useLocalStorage-0mjZfnua.js} +1 -1
- package/dist/assets/user-center-BaKv3X4J.js +77 -0
- package/dist/assets/{util-1n1Ulk5w.js → util-DLK92HF8.js} +1 -1
- package/dist/assets/{util-BmbbisPE.js → util-YnaMqM3B.js} +1 -1
- package/dist/assets/{vendor-arcblock-V3HYELzG.js → vendor-arcblock-DPMnO1AO.js} +83 -83
- package/dist/assets/{vendor-mui-core-1jJmAutq.js → vendor-mui-core-x3zpe_j_.js} +1 -1
- package/dist/assets/{vendor-mui-x-CPwlD3uT.js → vendor-mui-x-CPOc4sOK.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-DEbq97Xz.js → vendor-ux-did-connect-B1u6nvmg.js} +7 -7
- package/dist/assets/{wrap-locale-5LSB6OAr.js → wrap-locale-m_NRjq-h.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +30 -30
- package/dist/assets/button-BSJ2z68-.js +0 -1
- package/dist/assets/config-navigation-hrdLDyFZ.js +0 -26
- package/dist/assets/connect-0zFqdTRm.js +0 -5
- package/dist/assets/domain-D0xqhxvZ.js +0 -9
- package/dist/assets/domains-BrNRyjCn.js +0 -1
- package/dist/assets/index-Bee_YcJC.js +0 -113
- package/dist/assets/index-D3YZfNxX.js +0 -5
- package/dist/assets/index-DFoYVoMG.js +0 -346
- package/dist/assets/index-Dzvf3kMf.js +0 -220
- package/dist/assets/localization-WUgLuLwU.js +0 -1
- package/dist/assets/publish-resource-C6TOyrHC.js +0 -1
- package/dist/assets/sdk-j4w1A_X4.js +0 -1
- package/dist/assets/setup-DLCw2h80.js +0 -19
- package/dist/assets/useAsync-BENTIUEf.js +0 -1
- package/dist/assets/useAsyncRetry-DSYkC9r5.js +0 -7
- package/dist/assets/user-center-DfDG_giT.js +0 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,a4 as r,E as i,T as n}from"./vendor-mui-core-
|
|
1
|
+
import{j as o,a4 as r,E as i,T as n}from"./vendor-mui-core-x3zpe_j_.js";import{L as f,r as g}from"./vendor-react-DEoibe3W.js";import"./index-Th4BUzmb.js";import"./vendor-arcblock-DPMnO1AO.js";import"./vendor-ux-did-connect-B1u6nvmg.js";import"./vendor-utils-C3FZIS9A.js";import"./vendor-hooks-DN4nZ7TU.js";import"./lottie-web-jYmAQWuC.js";const l=(e,t)=>[e,...Array.isArray(t)?t:[t]],a=(e=2)=>({overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"});function c({sx:e,...t}){const s=l({display:"flex",flexWrap:"wrap",mx:-1},e);return o.jsx(r,{sx:s,...t})}c.propTypes={sx:i.object};c.defaultProps={sx:{}};function p({icon:e}){const[t,s]=g.useState(!1);return!e||t?null:typeof e=="string"?o.jsx(r,{component:"img",src:e,alt:"",sx:{width:1,height:1},onError:()=>s(!0)}):e}p.propTypes={icon:i.oneOfType([i.string,i.node]).isRequired};function w({title:e,desc:t,extra:s,cover:b,icon:d,to:x,sx:h}){const m=l({position:"relative",flexBasis:{xs:"100%",sm:"50%",md:"33.33%",lg:"25%"},maxWidth:{xs:"100%",sm:"50%",md:"33.33%",lg:"25%"},mb:{xs:2,md:6},px:1},h);return o.jsx(r,{sx:m,children:o.jsx(r,{component:f,to:x,target:"_blank",sx:{display:"flex",flexDirection:"column",gap:1,height:1,pt:0,color:"inherit",textDecoration:"none",borderRadius:1,cursor:"pointer"},children:o.jsxs(r,{children:[o.jsxs(r,{sx:{position:"relative"},children:[b,d&&o.jsx(r,{sx:{position:"absolute",top:44,left:16,zIndex:1,width:56,height:56},children:o.jsx(p,{icon:d})})]}),o.jsx(n,{sx:{mt:1,fontSize:"1.25rem",fontWeight:600,...a()},children:e}),t&&o.jsx(n,{variant:"body2",sx:{my:1,...a(),color:"text.secondary"},children:t}),s]})})})}w.propTypes={title:i.string.isRequired,desc:i.string.isRequired,extra:i.node.isRequired,cover:i.string.isRequired,icon:i.string.isRequired,to:i.string.isRequired,sx:i.object.isRequired};const k="/.well-known/service/static/assets/doc-board-bg-DWZHV9Ng.png";function u({board:e,sx:t,...s}){return o.jsx(w,{date:e.createdAt,sx:t,to:e.link,title:e.title,desc:e.desc,cover:o.jsx(r,{sx:{position:"relative",paddingTop:`${9/16*100}%`,border:1,borderColor:"divider",borderRadius:1,overflow:"hidden"},children:o.jsx(r,{component:"img",src:k,alt:"",sx:{position:"absolute",top:0,left:0,width:1}})}),icon:e.icon,...s})}u.propTypes={board:i.object.isRequired,sx:i.object.isRequired};function C(){const e=[{id:"1",title:"Blocklet Platform",desc:"Guide to understand and build on our blocklet platform",icon:"https://www.arcblock.io/favicon.ico",link:"https://www.arcblock.io/docs/blocklet-developer/en/getting-started"},{id:"2",title:"Create Blocklet",desc:"Build blocklet with just one command line.",icon:"https://www.arcblock.io/favicon.ico",link:"https://www.arcblock.io/docs/createblocklet/en/quick-start"},{id:"3",title:"Blocklet Launcher",desc:"Streamlining Blocklet Launching.",icon:"https://www.arcblock.io/docs/uploads/5a4f4716bc8061532a535fe816a9169c.png",link:"https://www.arcblock.io/docs/launcher/en/launcher-welcome"},{id:"4",title:"DID Spaces",desc:"Digital Spaces for Decentralized Identity (DID)",icon:"https://www.arcblock.io/docs/uploads/3a8b142d7c940c57eced71eddba2ff19.png",link:"https://www.arcblock.io/docs/did-spaces/en/did-spaces-getting-started"},{id:"5",title:"DID Wallet",desc:"DID Wallet Support docs",icon:"https://www.arcblock.io/docs/uploads/59ddb28f405ee670428e5fe1ff12d104.png",link:"https://www.arcblock.io/docs/did-wallet/en/get-started"},{id:"6",title:"DID Names",desc:"Naming Service based on NFT and verifiable credentials",icon:"https://www.didnames.io/favicon.ico?imageFilter=resize&w=32",link:"https://www.arcblock.io/docs/did-domain/en/did-domain-faq"},{id:"7",title:"Blockchain",desc:"The ledger for ArcBlock ecosystem",icon:"https://www.arcblock.io/docs/uploads/4a20c152faae0f104ed0815ff3b8b48b.png",link:"https://www.arcblock.io/docs/blockchain/en/blockchain-how-to-guides"},{id:"8",title:"DID Connect",desc:"The open protocol and development kit for connecting users and dapps",icon:"https://www.arcblock.io/docs/uploads/d189118f89b56e9d5b03ad5a0212a4ab.png",link:"https://www.arcblock.io/docs/did-connect/en/developer-guides"}];return o.jsx(c,{children:e.map(t=>o.jsx(u,{board:t},t.id))})}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,a3 as h,a4 as c,E as d,aa as g}from"./vendor-mui-core-
|
|
1
|
+
import{j as t,a3 as h,a4 as c,E as d,aa as g}from"./vendor-mui-core-x3zpe_j_.js";import{r as y}from"./vendor-react-DEoibe3W.js";import{a$ as v,C as w,B as m}from"./vendor-ux-did-connect-B1u6nvmg.js";import{P}from"./page-header-XbzfRkA7.js";import{C as E}from"./index-Th4BUzmb.js";import{u as T}from"./config-space-BgWEAM0m.js";import{C as B,D,a as N}from"./connect-to-bQVCrkhh.js";import{S as u}from"./step-actions-brdohYRv.js";import{S as b}from"./layout-DCzN0ui5.js";import"./vendor-utils-C3FZIS9A.js";import"./vendor-hooks-DN4nZ7TU.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-DPMnO1AO.js";import"./spaces-gLUqr6Uq.js";import"./api-kwOW9mRz.js";import"./DeleteOutline-PGhagisl.js";import"./format-error-BrmqJs5a.js";import"./use-mobile-C98e2dYy.js";import"./content-layout-CFHoSupA.js";function l({onNext:a,onPrevious:x}){var n,r,p;const{t:i}=y.useContext(v),{blocklet:e}=E(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:S,loading:o,storageEndpoint:s}=T();return o?t.jsx(w,{relative:"parent",children:t.jsx(h,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:i("setup.didSpace.title"),subTitle:i("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:S?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:C}):t.jsx(D,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(N,{onConnect:j,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:o,variant:"contained",disabled:o||!s,onClick:()=>a(),children:i("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>a("complete"),children:t.jsx(m,{className:"start-now",loading:o,variant:"contained",disabled:o,onClick:()=>a(),children:i(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const G=g(b)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
`;export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d}from"./vendor-react-DEoibe3W.js";import{E as l,j as n,a4 as g,b2 as G,M as H,I as O,a3 as J,bZ as U,aa as Y}from"./vendor-mui-core-
|
|
1
|
+
import{r as d}from"./vendor-react-DEoibe3W.js";import{E as l,j as n,a4 as g,b2 as G,M as H,I as O,a3 as J,bZ as U,aa as Y}from"./vendor-mui-core-x3zpe_j_.js";import{a$ as Z,aJ as Q,d as v}from"./vendor-ux-did-connect-B1u6nvmg.js";import{d as ee}from"./Done-BVaQae1-.js";import{C as te}from"./Google-CAujGJ1A.js";import{a7 as ne,f as re}from"./index-Th4BUzmb.js";import{R as oe,F as se,L as ie}from"./logo-uploader-DbAVW3BS.js";const S={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function _({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const k=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},C=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(G,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(te,{color:o,onChange:s=>k(s.hex)})})]});return r?f:C}_.propTypes=S;function D({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,k=d.useRef(a),{t:b}=d.useContext(Z),C=s=>{s.key==="Enter"&&c(k.current,"confirm")},f=s=>{k.current=s,c(s)};return r?n.jsx(H,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:C,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:o||p})})})}D.propTypes=S;D.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Q.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:ne({title:"Owner",issuer:re.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(_,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...S,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ae=U`
|
|
2
2
|
0%, 100% {
|
|
3
3
|
transform: scale(1) translateX(0);
|
|
4
4
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import{r as j}from"./vendor-react-DEoibe3W.js";import{j as e,E as d,a2 as Pe,a5 as vt,T as Y,a4 as w,A as ke,bn as _e,cd as et,bM as Re,br as Te,bN as Ie,x as je,b2 as De,a3 as tt,aa as oe,W as st,bf as Xe,bq as jt,bm as yt,ak as Je,bU as St}from"./vendor-mui-core-x3zpe_j_.js";import{c as ne,av as le,A as Ct}from"./vendor-utils-C3FZIS9A.js";import{Y as G,p as k,b3 as Nt,r as Fe,f as wt,u as X,bL as Rt,X as nt,B as Ee,a5 as at,bh as xe,ak as Tt,aq as It,bI as Dt}from"./vendor-ux-did-connect-B1u6nvmg.js";import{z as Et,t as $,l as At,G as Qe}from"./index-Th4BUzmb.js";import{f as ee,a as Ae}from"./vendor-hooks-DN4nZ7TU.js";import{S as pe}from"./shorten-label-BuH-7PI8.js";import{I as it}from"./index-VvWvVQT8.js";import{A as Lt,S as Ot,a as Pt,b as kt}from"./list-BuXPrN1N.js";import{R as Be}from"./relative-time-BeR_4mfM.js";import{b as ze}from"./dashboard-BgQFc2Pc.js";import{W as _t}from"./did-address-D4v6iN2l.js";import{p as ot}from"./util-DLK92HF8.js";import{D as Ft,g as Bt}from"./traffic-LuIcK-L1.js";import{i as zt,B as Wt}from"./index-BJYrBMyS.js";import{B as rt}from"./bundle-avatar-DfAWUEqX.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-DPMnO1AO.js";import"./index-DjIOxw8x.js";import"./InfoOutlined-DF9JwavD.js";import"./sdk-DNr-nKBq.js";import"./CheckCircle-CuYzdCtm.js";import"./useLocalStorage-0mjZfnua.js";import"./confirm-92J4n1RP.js";import"./format-error-BrmqJs5a.js";import"./PlayArrow-CxWt6459.js";import"./get-safe-url-CWgEUVPT.js";import"./session-CJFbMNLl.js";import"./useAsyncRetry-CEouAsle.js";import"./useAsync-BxB2TpDl.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-C98e2dYy.js";import"./base32-iVyUiizz.js";import"./iframe-DVBEjxC1.js";import"./LaunchOutlined-MbSPR9qn.js";import"./ChevronLeft-CnflXey6.js";import"./ChevronRight-DE7hYCb3.js";import"./index-sv3a1ZUw.js";import"./vendor-mui-x-CPOc4sOK.js";const lt=j.createContext({}),{Provider:Mt,Consumer:on}=lt;function qt({children:t,blocklet:s=""}){const{api:n,inService:o}=Et(),[i,r]=j.useState([]),[x,u]=j.useState({total:0,pageSize:20,pageCount:0,page:1}),b=ee(()=>{var D;return(D=s.meta)==null?void 0:D.did},[s]),[S,C]=j.useState([]),N=async({page:D=1,pageSize:O=20,...m}={})=>{if(!b)return[];try{const g={paging:{page:D,pageSize:O},...m,teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0},{dids:L,...Q}=g;let K="";L.includes("system")&&(K="system");const J=L.filter(Z=>Z!=="system"),F=await n.getNotificationSendLog({input:{...Q,source:K,componentDids:J}});return r(F.list),u(F.paging),F.list}catch(g){return G.error(g.message),[]}},E=async()=>{const D=await n.getNotificationComponents({input:{teamDid:b}});C(D.componentDids)},z=j.useCallback(D=>{const O=s.children.find(m=>{var g;return((g=m.meta)==null?void 0:g.did)===D});if(O)return O.ancestors=[s],O},[s]),A=async({notificationId:D,receivers:O,channels:m,...g})=>{await n.resendNotification({input:{teamDid:b,notificationId:D,receivers:O,channels:m.map(L=>L==="wallet"?k.NOTIFICATION_SEND_CHANNEL.WALLET:L==="pushKit"?k.NOTIFICATION_SEND_CHANNEL.PUSH:L),...g}})},P=j.useCallback(async D=>(await n.getUser({input:{teamDid:b,user:{did:D}}})).user,[n,b]),I=j.useCallback(async({page:D=1,pageSize:O=20,...m}={})=>{try{const g={paging:{page:D,pageSize:O},...m,userName:m.searchText||"",teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:g})}catch(g){throw G.error(g.message),g}},[n,b]);j.useEffect(()=>{b&&E()},[b]);const W={fetch:N,data:i,paging:x,blocklet:s,getComponent:z,resendNotification:A,getUser:P,componentDids:S,getReceivers:I,inService:o,teamDid:b};return e.jsx(Mt,{value:{notificationRecords:W},children:t})}function We(){const{notificationRecords:t}=j.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Kt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:Kt[t],children:t})}var Me={},Ht=Pe;Object.defineProperty(Me,"__esModule",{value:!0});var ct=Me.default=void 0,$t=Ht(Fe()),Ut=e;ct=Me.default=(0,$t.default)((0,Ut.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe={},Vt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var dt=qe.default=void 0,Gt=Vt(Fe()),Yt=e;dt=qe.default=(0,Gt.default)((0,Yt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ke={},Xt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var ut=Ke.default=void 0,Jt=Xt(Fe()),Qt=e;ut=Ke.default=(0,Jt.default)((0,Qt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Zt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case k.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case k.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case k.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case k.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function pt(t,s,n={}){const{status:o,updatedAt:i,reason:r="",channel:x="wallet"}=n,u=i?t("notification.sendStatus.sentTime",{date:At(i,s)}):"",b=Zt(t,x,r);return o===k.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:b}:o===k.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:b,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Oe=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:o.enabled},mt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:o.enabled},es=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:ft(t),enabled:n}},ts=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:mt(t),enabled:n}},ss=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),ns=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),he=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),as=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],ge=(t=[])=>{const s=$().startOf("day");return t.filter(n=>$(n.sendAt).isSame(s,"day")).length},is=(t,s="")=>{if(s&&Oe.includes(s)){const r=`${s}SendRecord`,x=ne(t,r,[]);return ge(x)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const r=n[s]??[];return ge(r)}const i={};return Oe.forEach(r=>{const x=`${r}SendRecord`,u=ne(t,x,[]),b=ge(u);i[r]=b}),o.length>0&&o.forEach(r=>{const x=n[r]??[],u=ge(x);i[r]=u}),i},be=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},os=t=>{switch(t){case k.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case k.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case k.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case k.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>wt({typography:{fontSize:14,button:{textTransform:"none"}},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:i,title:r="",sentTime:x="",reason:u=""}=t,b=[r,u].filter(Boolean).join(", ");return e.jsx(vt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:b}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(w,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(w,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[i],style:{opacity:.15}}),e.jsx(w,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[i]})]}),e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:n?r:o})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};te.defaultProps={enableTooltip:!0,showTitle:!1,children:null};ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};ce.defaultProps={onDelete:()=>{}};function ce({list:t,label:s,onDelete:n}){const{t:o,locale:i}=X();return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(r=>{const x=pt(o,i,{status:r});return e.jsx(ke,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,r)},r)})]})}He.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function He({filterList:t,onChange:s,index:n,column:o,filterValues:i,label:r,renderLabel:x}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:r}),e.jsx(Re,{row:!0,children:i.map(u=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(u.value??u)>-1,onChange:b=>{const S=[...t];b.target.checked?S[n]=[...S[n],u.value??u]:S[n]=S[n].filter(C=>C!==(u.value??u)),s(S[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function we(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}re.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function re({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:i}){const{t:r,locale:x}=X(),u=pt(r,x,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(te,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(je,{className:"resend-btn",size:"small",startIcon:e.jsx(ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:r("notification.resend")})]})}$e.propTypes={value:d.array.isRequired,onChange:d.func};function $e({value:t,onChange:s}){const{locale:n}=X(),o=$().toDate(),[i,r]=j.useState(null),x=j.useCallback(S=>{r(i?null:S.currentTarget)},[i]),u=!!i,b=j.useCallback(S=>{if(!S.startDate||!S.endDate){G.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){G.error("Invalid date range");return}s([S.startDate,S.endDate]),r(null)},[s]);return e.jsxs("div",{children:[e.jsx(Y,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(je,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],n)," - ",Qe(t[1],n)]})}),e.jsx(De,{open:u,anchorEl:i,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Ft,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Bt(o),onChange:b})})]})}Ue.propTypes={itemComponent:d.elementType.isRequired};function Ue({itemComponent:t,...s}){var i;const{t:n}=X();return!((i=s==null?void 0:s.filterList)!=null&&i.filter(r=>r.length).length)?null:e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Rt.TableFilterList,{...s,ItemComponent:t})})]})}function ye({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const i=s&&typeof s=="function"?s:void 0;let r=!0;return n&&typeof n=="function"&&(r=n({label:t,...o})),e.jsx(ke,{label:t,variant:"outlined",...i&&r?{onDelete:i}:{}})}ye.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};ye.defaultProps={canDelete:()=>!0};const rs=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ve.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ve.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ve({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=X(),[i,r]=j.useState(rs),[x,u]=j.useState(!0),b=(C,N)=>{N.checked=C.target.checked;const E=i.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));r(E)},S=C=>{C.stopPropagation(),n({channels:i.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:x})};return e.jsxs(w,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Y,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(w,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(C=>e.jsx(Te,{control:e.jsx(Ie,{checked:C.checked,onChange:N=>b(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(w,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:x,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(w,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(je,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(je,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:i}=X(),{getReceivers:r,inService:x,teamDid:u,getUser:b,blocklet:S}=We(),[C,N]=j.useState(!1),[E,z]=j.useState([]),A=Ae({anchorEl:null,position:null}),P=Ae({anchorEl:null,position:null}),[I,W]=j.useState(null),[D,O]=j.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,g]=j.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[L,Q]=j.useState([]),K=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],J=async()=>{if(!C&&t)try{N(!0);const a=await r({notificationId:t,...m}),l=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,u,x)}}));z(l),O(a.paging),N(!1)}catch(a){G.error(a.message),N(!1)}};j.useEffect(()=>{J()},[m]);const F=a=>{a.stopPropagation();const l=a.currentTarget;P.anchorEl=l;const c=l.getBoundingClientRect();P.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},Z=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ee,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:F,children:o("notification.resend")})}):null,M={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:D.page-1,rowsPerPage:D.pageSize,count:D.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:L,onRowSelectionChange:(a,l)=>{Q(l.map(c=>c.dataIndex))},customToolbarSelect:Z},Ce=({page:a,rowsPerPage:l,searchText:c,filterList:y})=>{const[,_=[],H=[],q=[]]=y;m.pageSize!==l?g(B=>({...B,pageSize:l,page:1})):m.page!==a+1?g(B=>({...B,page:a+1})):m.searchText!==c?g(B=>({...B,searchText:c,page:1})):le(_,m.walletSendStatus)?le(H,m.pushKitSendStatus)?le(q,m.emailSendStatus)||g(B=>({...B,emailSendStatus:q,page:1})):g(B=>({...B,pushKitSendStatus:H,page:1})):g(B=>({...B,walletSendStatus:_,page:1}))},Ne=j.useCallback(async(a,l)=>{if(!l)return!1;const c=await b(l);return c?a==="wallet"?ss(c):a==="email"?es(S,c):a==="pushKit"?ts(S,c):a==="webhook"?ns(c):!0:!1},[b,S]),me=j.useCallback(a=>as(o,a),[o]),f=()=>{A.anchorEl=null,A.position=null,W(null)},p=()=>{P.anchorEl=null,P.position=null},h=async(a,l,c=!0,y="")=>{if(!(!l.length||!a.length))try{s(a,l,c,y),P.anchorEl||(await he(.5),f())}catch(_){console.error("handleResend error",{error:_})}},v=async({channels:a,isResendFailedOnly:l})=>{const c=L.map(y=>E[y].receiver);await h(a,c,l),await he(.5),p(),Q([])},T=async(a,l=[],c=!0)=>{try{await h(["webhook"],[a.receiver],c,l)}catch(y){G.error(y.response?y.response.statusText:y.message)}},R=async(a,l,c,y=[],_=!0)=>{if(a.stopPropagation(),is(l,c)>=4){G.warning(o("notification.resendLimit"));return}if(!Oe.includes(c)){await T(l,y,_);return}if(a){const q=a.currentTarget,B=q.getBoundingClientRect();A.anchorEl=q,A.position={top:B.top+window.scrollY,left:B.left+window.scrollX}}W({channel:c});try{const q=await Ne(c,l.receiver);await he(1),W({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(B=>!!B))&&(await s([c],[l.receiver],_),P.anchorEl||(await he(.5),f()))}catch(q){G.error(q.message)}},U=a=>{g(l=>({...l,dateRange:a,page:1}))},V=(a,l,c,y)=>{a.stopPropagation();const _=c.filter(H=>H!==l);g(H=>({...H,[y]:_,page:1}))},se=ee(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:l,receiver:c}=E[a];return l?e.jsxs(w,{"data-cy":`member-name-${l.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(nt,{src:`${l.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(pe,{children:l.fullName})]},c):e.jsx(_t,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Wallet",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[1].options.filterList,"walletSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:l,index:c,column:y,filterValues:K})},customBodyRenderLite:a=>{const{walletSendStatus:l,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"wallet",onResend:_=>R(_,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:l,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"pushkit",onResend:_=>R(_,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Push Kit",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[2].options.filterList,"pushKitSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:l,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"email",onResend:_=>R(_,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Email",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[3].options.filterList,"emailSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Email",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:l}=E[a];if(!l)return null;const c=Object.entries(l)[0];if(!c)return null;const[y,_]=c,H=_[0];return e.jsx(w,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(w,{className:"webhook-item",fontSize:12,children:[e.jsx(pe,{maxLength:30,children:y},y),e.jsx(re,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>R(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:l}=E[a];return e.jsx(Be,{value:l,locale:i,shouldUpdate:!0})}}}],[E,i,m,o]),Ye=[e.jsx($e,{value:m.dateRange,onChange:U},"date-picker"),e.jsx(Ee,{variant:"contained",size:"small",color:"primary",loading:C,startIcon:e.jsx(ut,{}),onClick:()=>J(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(w,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(cs,{children:e.jsxs(st,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:i,loading:C,columns:se,data:E,onChange:Ce,options:M,customButtons:Ye,components:{TableFilterList:a=>e.jsx(Ue,{...a,itemComponent:l=>e.jsx(ye,{...l,canDelete:()=>!1})})}}),A.anchorEl&&e.jsx(De,{open:!!A.anchorEl,anchorReference:"anchorPosition",anchorPosition:A.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ds,{children:[e.jsxs(Y,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(w,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:me(I==null?void 0:I.channel).map(a=>{var _,H;const{type:l,pass:c,fail:y}=a;return!(I!=null&&I.result)||(_=I==null?void 0:I.result)!=null&&_[l]?e.jsxs(Y,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[l]?xe.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:xe.primary.main}}),e.jsx("span",{children:c})]},l):e.jsxs(Y,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:xe.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:y})]},l)})})]})}),P.anchorEl&&e.jsx(De,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ve,{loading:n,onCancel:p,onConfirm:v})})]})})})}const ls=j.memo(gt),cs=oe.div`
|
|
2
|
+
td.MuiTableCell-footer {
|
|
3
|
+
border: none !important;
|
|
4
|
+
}
|
|
5
|
+
.sent-status-cell {
|
|
6
|
+
.resend-btn {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
&:hover {
|
|
10
|
+
.resend-btn {
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`,ds=oe.div`
|
|
16
|
+
padding: 8px 16px;
|
|
17
|
+
.check-title {
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
margin-bottom: 8px;
|
|
20
|
+
&::first-letter {
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.check-item {
|
|
25
|
+
svg {
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
}
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
}
|
|
30
|
+
`,de=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function us(t){const{wallet:s,push:n,email:o,webhook:i}=t;return[{name:"Wallet",value:e.jsx(ae,{item:s})},{name:"Push",value:e.jsx(ae,{item:n})},{name:"Email",value:e.jsx(ae,{item:o})},...i.total>0?[{name:"Webhook",value:e.jsx(ae,{item:i,isWebhook:!0})}]:[]]}function ps(t,s,n){const{wallet:o,push:i,email:r,webhook:x}=t;return[{name:"Wallet",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:s})},{name:"Push",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.EMAIL,item:r,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Se.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Se.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ae.propTypes={item:d.object.isRequired,isWebhook:d.bool};ae.defaultProps={isWebhook:!1};function ae({item:t,isWebhook:s=!1}){const{t:n}=X(),o=s?t.success.length:t.success,i=t.total,r=o===i?"success":"failed";return e.jsx(w,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(w,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(te,{config:{status:r},enableTooltip:!1,children:[de(o)," / ",de(i)," ",n("notification.sendStatus.success")]})})})}ie.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};ie.defaultProps={isWebhook:!1,channel:k.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function ie({channel:t,item:s,isWebhook:n=!1,onResend:o,loading:i}){const{t:r}=X(),{success:x,failed:u,pending:b}=s,S=os(t),C=n?x.length:x,N=n?u.length:u,E=n?b.length:b,z=async W=>{W.stopPropagation();const D=n?[...new Set([...x,...u].map(O=>O))]:[];await o([t],[],!0,D)},A=C+N,P=A>0?C/A*100:0,I=A>0?N/A*100:0;return e.jsxs(fs,{successRatio:P,failedRatio:I,children:[e.jsxs(Y,{variant:"h6",children:[S," (",s.total,")"]}),e.jsxs(Y,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:de(C)}),e.jsx("small",{style:{paddingLeft:4},children:r("notification.sendStatus.success")})]}),e.jsxs(w,{className:"unsent-area",children:[e.jsxs(w,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[de(N)," ",r("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[de(E)," ",r("notification.sendStatus.pending")]})]}),N>0&&e.jsx(w,{className:"resend-btn",children:e.jsx(Ee,{size:"small",color:"primary",loading:i,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:z,children:r("notification.resend")})})]})]})}function Se({statistics:t,mode:s="simple",onResend:n,resending:o}){const i=ee(()=>s==="simple"?us(t):ps(t,n,o),[t,s]);return s==="simple"?e.jsx("div",{children:i.map(r=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:r.name,children:r.value},r.name))}):e.jsx(Xe,{container:!0,spacing:2,children:i.map(r=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:r.value},r.name))})}const fs=oe(w)`
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
padding: 16px;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
background: ${({successRatio:t,failedRatio:s})=>t===0&&s===0?"#eff3fa":`linear-gradient(to right, #dafee7 ${t}%, #fef2f2 ${t}%)`};
|
|
37
|
+
transition: 'background 0.5s ease',
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
.unsent-area {
|
|
40
|
+
width: 100%;
|
|
41
|
+
position: relative;
|
|
42
|
+
.resend-btn {
|
|
43
|
+
position: absolute;
|
|
44
|
+
right: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:s=()=>{},blocklet:n,tab:o="info"}){const{t:i,locale:r}=X(),{getComponent:x,resendNotification:u}=We(),[b,S]=j.useState(!1),C=ee(()=>x(t.componentDid)||n,[n,t.componentDid]),N=Ae({tab:o||"info"}),E=j.useCallback(async(g,L,Q=!0,K=[])=>{var Z;if(!g.length||!t.id)return;const J=L.length>0?L:(Z=t==null?void 0:t.receivers)==null?void 0:Z.map(M=>M.receiver);if(!J.length)return;let F=[...g];if(F.includes(k.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),F=F.filter(M=>M!==k.NOTIFICATION_SEND_CHANNEL.PUSH)),F.includes(k.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Email"})),F=F.filter(M=>M!==k.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!F.length)try{S(!0),await u({notificationId:t.id,receivers:J,channels:F,resendFailedOnly:Q,...F.includes("webhook")&&K.length?{webhookUrls:K}:{}}),G.success("Message has been sent!")}catch(M){console.error("handleResend error",{error:M}),G.error(M.response?M.response.statusText:M.message)}finally{S(!1)}},[n,t.id,t==null?void 0:t.receivers,u,i]),z=ee(()=>zt(t),[t]),A=ee(()=>z?t==null?void 0:t.actorInfo:[],[t]),P=ee(()=>{var g;return(n==null?void 0:n.did)||((g=n==null?void 0:n.meta)==null?void 0:g.did)||""},[n]);function I(){return[{name:i("notification.from"),value:z?e.jsx(Lt,{actors:A,teamDid:P,size:32,showName:!0}):e.jsx(Ot,{size:32,blocklet:C,showName:!0,hideDot:!0})},{name:i("notification.notificationTitle"),value:e.jsx(pe,{maxLength:50,children:t.title})},{name:i("notification.body"),value:z?e.jsx(Pt,{notification:t,blocklet:n}):e.jsx(kt,{notification:t,rows:0})},{name:i("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:i("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:r,shouldUpdate:!0})}].map(L=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:L.name,children:L.value},L.name))}const W={info:{label:i("common.basicInfo"),value:"info",component:I},receivers:{label:i("notification.receiver"),value:"receivers"},statistics:{label:i("notification.statistics"),value:"statistics"}},D=Object.values(W).map(({label:g,value:L})=>({label:g,value:L})),O=W[N.tab]||W.info,m=g=>{N.tab=g};return e.jsx(Tt,{title:i("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(hs,{children:[e.jsx(w,{mx:3,className:"tabs",children:e.jsx(It,{tabs:D,current:N.tab,onChange:m,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(ls,{notificationId:t.id,resending:b,handleResend:E}),N.tab==="statistics"&&e.jsx(Se,{statistics:t.statistics,mode:"detail",resending:b,onResend:E}),N.tab==="info"&&e.jsx(O.component,{})]})]})})}const ms=j.memo(xt),hs=oe.div`
|
|
49
|
+
& > .notification-row {
|
|
50
|
+
padding: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tabs {
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
.body {
|
|
57
|
+
margin-top: 16px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.channel-item {
|
|
61
|
+
display: flex;
|
|
62
|
+
padding: 4px;
|
|
63
|
+
justify-content: flex-start;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: 8px;
|
|
66
|
+
> p {
|
|
67
|
+
font-size: 15px;
|
|
68
|
+
}
|
|
69
|
+
.resend-btn {
|
|
70
|
+
svg {
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
}
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
&.disabled {
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
color: ${xe.text.disabled};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;ue.propTypes={blocklet:d.object,label:d.string};ue.defaultProps={blocklet:null,label:""};const gs=oe.div`
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-items: flex-start;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 8px;
|
|
88
|
+
.name {
|
|
89
|
+
display: block;
|
|
90
|
+
max-width: 260px;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
}
|
|
95
|
+
`;function ue({blocklet:t,label:s}){var n;return e.jsx(gs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((n=t.meta)==null?void 0:n.title)})]}):e.jsx("span",{className:"name",children:s})})}Ge.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ge.defaultProps={onDelete:()=>{}};function Ge({list:t,label:s,onDelete:n}){return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(o=>e.jsx(ke,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:o})}),onDelete:i=>n(i,o)},o))]})}function xs(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(fe,{severity:s})})}function bs({customTableButtons:t}){var me;const{t:s,locale:n}=X(),[o,i]=j.useState(!1),{data:r,paging:x,blocklet:u,fetch:b,getComponent:S,componentDids:C,inService:N,teamDid:E}=We(),z=j.useRef(null),[A,P]=j.useState(null),[I,W]=j.useState("info"),D=`notification-records-${(me=u.meta)==null?void 0:me.did}`,O=Dt(D),[m,g]=j.useState({pageSize:O.rowsPerPage||10,page:O.page?O.page+1:1,dids:O.dids||[],dateRange:O.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),L=ee(()=>{if(!u.children||!u.children.length)return[];const f=[];return u.children.forEach(p=>{var v;const h=p.did||((v=p.meta)==null?void 0:v.did);C.includes(h)&&(p.ancestors=[u],f.push(p))}),f},[C,u]),Q=j.useCallback(async()=>{try{i(!0),await b(m),i(!1)}finally{i(!1)}},[b,m]);j.useEffect(()=>{Q()},[]),j.useEffect(()=>{const f=setInterval(()=>{document.visibilityState==="visible"&&b(m).then(p=>{const h=p.find(v=>v.id===(A==null?void 0:A.id));A&&h&&P({...h})})},3e3);return()=>clearInterval(f)},[m,A]);const K=(f,p,h,v)=>{f.stopPropagation();const T=h.filter(R=>R!==p);g(R=>({...R,[v]:T,page:1}))},J=({page:f,rowsPerPage:p,filterList:h})=>{const[v=[],,,,T=[]]=h;m.pageSize!==p?g(R=>({...R,pageSize:p,page:1})):m.page!==f+1?g(R=>({...R,page:f+1})):le(m.dids,v)?le(m.severities,T)||g(R=>({...R,severities:T,page:1})):g(R=>({...R,dids:v,page:1}))},F=j.useCallback(()=>{P(null),W("info")},[]),Z=j.useCallback(()=>{b(m)},[b,m]),M=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((p,h)=>{var T;if(p==="system")return e.jsx("span",{children:s("notification.system")},`system-${h}`);const v=L.find(R=>{var V;return(R.did||((V=R.meta)==null?void 0:V.did))===p});return e.jsx(ue,{blocklet:v,label:(v==null?void 0:v.title)||((T=v==null?void 0:v.meta)==null?void 0:T.title)},p)}),update:(f,p,h)=>(f[h].splice(p,1),f)},filterOptions:{names:L,logic:(f,p)=>p.length?!p.includes(f):!1,display:(f,p,h,v)=>e.jsxs(_e,{style:{width:"380px"},children:[e.jsx(jt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(yt,{multiple:!0,value:f[h],renderValue:T=>e.jsx(w,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(R=>{var V;if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const U=L.find(se=>{var a;return(se.did||((a=se.meta)==null?void 0:a.did))===R});return e.jsx(ue,{blocklet:U,label:(U==null?void 0:U.title)||((V=U==null?void 0:U.meta)==null?void 0:V.title)},R)})}),onChange:T=>{f[h]=T.target.value,p(f[h],h,v)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),L.map(T=>{var U,V;const R=T.did||((U=T.meta)==null?void 0:U.did);return e.jsx(Je,{value:R,children:e.jsx(ue,{blocklet:T,label:T.title||((V=T.meta)==null?void 0:V.title)})},R)})]})]})},customBodyRenderLite:f=>{var v,T;const p=r[f],h=S(p.componentDid);return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[h?e.jsx(rt,{size:32,blocklet:h,ancestors:h.ancestors??[]}):e.jsx(Wt,{blocklet:u,size:32}),e.jsx(pe,{maxLength:50,children:((v=h==null?void 0:h.meta)==null?void 0:v.title)||((T=u==null?void 0:u.meta)==null?void 0:T.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f],{receivers:h}=p;return e.jsx(St,{total:h.length,renderSurplus:v=>v<100?e.jsxs("span",{children:["+",v]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:v=>{v.stopPropagation(),P(p),W("receivers")},children:h.map(v=>{const{receiverUser:T}=v,R=ot(T.avatar,E,N);return e.jsx(nt,{alt:T.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:v.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},v.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(w,{onClick:h=>{h.stopPropagation(),P(p),W("statistics")},children:e.jsx(Se,{statistics:p.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(pe,{maxLength:50,children:p.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const p=r[f];return e.jsx(fe,{severity:p.severity})},filter:!0,filterType:"custom",filterList:m.severities??[],customFilterListOptions:{render:f=>e.jsx(Ge,{list:f,label:s("notification.severity"),onDelete:(p,h)=>{p.stopPropagation(),K(p,h,M[4].options.filterList,"severities")}}),update:be},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(f,p,h,v)=>e.jsx(xs,{label:s("notification.severity"),filterList:f,onChange:p,index:h,column:v,filterValues:Ze})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:p}=r[f];return e.jsx(Be,{value:p,locale:n,shouldUpdate:!0})}}}],Ce=f=>{g(p=>({...p,dateRange:f,page:1}))},Ne=[...t||[]];return e.jsxs(w,{ref:z,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(vs,{children:e.jsx(st,{theme:ht(),children:e.jsx(at,{className:"main-table",verticalKeyWidth:100,loading:o,locale:n,columns:M,data:r,durable:D,onChange:J,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:x.page-1,rowsPerPage:x.pageSize,count:x.total,...O,onRowClick:(f,{dataIndex:p})=>{P(r[p])}},customPreButtons:[e.jsx($e,{value:m.dateRange,onChange:Ce})],customButtons:Ne,components:{TableFilterList:f=>e.jsx(Ue,{...f,itemComponent:p=>e.jsx(ye,{...p,canDelete:h=>{var T;const v=(T=h==null?void 0:h.columnNames)==null?void 0:T[(h==null?void 0:h.index)||0];return(v==null?void 0:v.name)==="sender"}})})}})})}),A&&e.jsx(ms,{refresh:Z,onCancel:F,notification:A,blocklet:u,tab:I})]})}const vs=oe.div`
|
|
96
|
+
td.MuiTableCell-footer {
|
|
97
|
+
border: none !important;
|
|
98
|
+
}
|
|
99
|
+
.sent-status-cell {
|
|
100
|
+
.resend-btn {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
&:hover {
|
|
104
|
+
.resend-btn {
|
|
105
|
+
display: flex;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.custom-toobar-btns {
|
|
111
|
+
gap: 4px;
|
|
112
|
+
}
|
|
113
|
+
`;bt.propTypes={blocklet:d.object.isRequired,customTableButtons:d.array};bt.defaultProps={customTableButtons:[]};function bt({blocklet:t={},customTableButtons:s}){return e.jsx(qt,{blocklet:t,children:e.jsx(bs,{customTableButtons:s})})}export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-react-DEoibe3W.js";import{j as L}from"./vendor-mui-core-
|
|
1
|
+
import"./vendor-react-DEoibe3W.js";import{j as L}from"./vendor-mui-core-x3zpe_j_.js";var t=function(e){return L.jsxs("svg",{...e,children:[L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z",fill:"url(#paint0_linear_615_426)"}),L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z",fill:"url(#paint1_linear_615_426)"}),L.jsxs("defs",{children:[L.jsxs("linearGradient",{id:"paint0_linear_615_426",x1:"31.72",y1:"95.7208",x2:"95.488",y2:"34.3249",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#0FA4B7"}),L.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),L.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]}),L.jsxs("linearGradient",{id:"paint1_linear_615_426",x1:"28.4374",y1:"99.2464",x2:"98.7613",y2:"44.9372",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#0FA4B7"}),L.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),L.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]})};t.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var s=function(e){return L.jsx("svg",{...e,children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})})};s.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};export{s as E,t as S};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lottie-react.esm-D2t-u0YU.js","assets/vendor-react-DEoibe3W.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as a,a4 as m,bf as y,T as V,M as R,
|
|
2
|
+
import{j as a,a4 as m,bf as y,T as V,M as R,bt as L,br as _,bu as U,cw as j,x as v,aa as D,ab as w,c9 as J,dm as W,dn as q,I as H,dp as X,e as Y,bY as K}from"./vendor-mui-core-x3zpe_j_.js";import{r as u}from"./vendor-react-DEoibe3W.js";import{G as Q,a as M,e as Z,i as a0,b as i0}from"./vendor-hooks-DN4nZ7TU.js";import{T as r0,bp as x0}from"./vendor-ux-did-connect-B1u6nvmg.js";import{_ as t0}from"./vendor-arcblock-DPMnO1AO.js";import{aJ as k0}from"./vendor-utils-C3FZIS9A.js";import{getAIKitComponent as s0}from"./index-BBl5mftj.js";import"./lottie-web-jYmAQWuC.js";import"./index-C1nvgBfF.js";import"./index-Th4BUzmb.js";import"./index-DVQCgvFb.js";const O=u.createContext({}),I=()=>u.useContext(O);function m0({children:i,restrictions:n,i18n:s,theme:r}){const[e,h]=Q({loading:!1}),l=x=>h(f=>({...f,loading:x})),c=u.useMemo(()=>({...e,onLoading:l,restrictions:n,i18n:s}),[e]);return a.jsx(r0,{theme:r,children:a.jsx(O.Provider,{value:c,children:i})})}const e0=["1024x1024","1024x1792","1792x1024"],o0=["256x256","512x512","1024x1024"],n0=[{label:"DALL·E 3",value:"dall-e-3"},{label:"DALL·E 2",value:"dall-e-2"}];function l0({onSubmit:i}){const{loading:n,i18n:s}=I(),r=M({model:"dall-e-3",prompt:"",size:"1024x1024",number:1}),e=()=>{const x=JSON.parse(JSON.stringify(r));Object.values(r).every(G=>!!G)&&i(x)},{run:h}=Z(e,{wait:500}),l={width:"100%",pl:"12px",pr:"16px"},c=r.model==="dall-e-2"?o0:e0;return a.jsxs(p0,{onSubmit:x=>x.preventDefault(),children:[a.jsx(m,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",m:2,mb:0},children:a.jsxs(y,{container:!0,gap:2.5,children:[a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:s("aiImagePrompt")}),a.jsx(R,{sx:{width:1,mt:1},size:"small",type:"text",required:!0,placeholder:s("aiImagePromptTip"),multiline:!0,minRows:5,maxRows:6,value:r.prompt??"",onChange:x=>{x.stopPropagation(),r.prompt=x.target.value},inputProps:{maxLength:1e3}})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageModel")}`}),a.jsx(L,{row:!0,sx:{".MuiFormControlLabel-label":{fontSize:"12px"}},value:r.model,onChange:x=>{r.number=1,r.size="1024x1024",r.model=x.target.value},children:n0.map(x=>a.jsx(_,{value:x.value,control:a.jsx(U,{size:"small"}),label:x.label},x.label))})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageSize")}: ${r.size}`}),a.jsx(y,{container:!0,sx:{gap:2.5,pt:1},children:a.jsx(m,{flex:1,children:a.jsx(m,{...l,children:a.jsx(j,{size:"small",min:0,max:c.length-1,step:1,value:c.findIndex(x=>x==r.size),onChange:(x,f)=>{r.size=c[f]}})})})})]}),r.model==="dall-e-2"&&a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageNumber")}: ${r.number}`}),a.jsx(m,{...l,children:a.jsx(j,{size:"small",defaultValue:1,valueLabelDisplay:"auto",step:1,min:1,max:10,value:r.number,onChange:(x,f)=>{x.stopPropagation(),r.number=Number(f)}})})]})]})}),a.jsx(v,{sx:{m:2,transition:"all 0.3s"},className:"submit-ai",variant:"contained",onClick:h,disabled:n,children:s(n?"aiImageGenerating":"aiImageGenerate")},n?"loading-submit":"submit")]})}const p0=D(m)`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
height: 100%;
|