@abtnode/blocklet-services 1.16.43-beta-20250509-094134-34c76f98 → 1.16.43-beta-20250510-123357-65a2988c
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/emails/_components/activity.js +1 -1
- package/api/emails/_components/footer.js +12 -4
- package/api/emails/_components/token.js +3 -1
- package/api/emails/_templates/activity-notification.js +2 -2
- package/api/emails/_templates/kyc-code-verify.js +2 -2
- package/api/emails/_templates/new-user-session.js +2 -2
- package/api/emails/_templates/notification.js +2 -2
- package/api/emails/_templates/verify-code.js +2 -2
- package/api/libs/email.js +8 -3
- package/dist/assets/{AdapterDayjs-DWoymUZR.js → AdapterDayjs-BiPHzcUP.js} +1 -1
- package/dist/assets/{ArrowDropDown-oIFrKvRQ.js → ArrowDropDown-Dghek9CI.js} +1 -1
- package/dist/assets/{CheckCircle-DKTlmPGr.js → CheckCircle-Dvhgeo9j.js} +1 -1
- package/dist/assets/{ChevronLeft-CFwnl5kG.js → ChevronLeft-DE33N57i.js} +1 -1
- package/dist/assets/{ChevronRight-8T5vdE8C.js → ChevronRight-BfbPIE2b.js} +1 -1
- package/dist/assets/{Community-BUrh_Kqh.js → Community-2MKVAbIk.js} +1 -1
- package/dist/assets/{DeleteOutline-1ZpdOBb4.js → DeleteOutline-B6efX_Fy.js} +1 -1
- package/dist/assets/{Done-1iBqzwts.js → Done-Ct5slWpT.js} +1 -1
- package/dist/assets/{Download-BZiCoF-V.js → Download-DKQGRFHf.js} +1 -1
- package/dist/assets/{Edit-BGameSEw.js → Edit-BLsIdIOp.js} +1 -1
- package/dist/assets/{EditIcon-Tb4i_lkD.js → EditIcon-CwTCQzs9.js} +1 -1
- package/dist/assets/{Email-DVjqqt2m.js → Email-DOy8vL0N.js} +1 -1
- package/dist/assets/{Error-DmLM9r9y.js → Error-wpqrAfUT.js} +1 -1
- package/dist/assets/{ExpandLess-mzw0LYV7.js → ExpandLess-CJXkgMMr.js} +1 -1
- package/dist/assets/{Google-DknSY4FA.js → Google-BbAgcDQ_.js} +1 -1
- package/dist/assets/{Holiday-Aqm_6mkn.js → Holiday-DT-VjgQP.js} +1 -1
- package/dist/assets/{InfoOutlined-BMdv5FNj.js → InfoOutlined-Dy7jTc7H.js} +1 -1
- package/dist/assets/{Launch-BGXBIBAE.js → Launch-DBKe0gh0.js} +1 -1
- package/dist/assets/{LaunchOutlined-C1cAhHQM.js → LaunchOutlined-BIq6YUU8.js} +1 -1
- package/dist/assets/{Location-9D-5nMVA.js → Location-C__VfR4D.js} +1 -1
- package/dist/assets/{LockIcon-DJgkKDXB.js → LockIcon-DIGiHKHl.js} +1 -1
- package/dist/assets/{Meeting-Drc_0V1u.js → Meeting-Cn2X2Ix7.js} +1 -1
- package/dist/assets/{MoreHoriz-KJHmH0lv.js → MoreHoriz-BxJelL2A.js} +1 -1
- package/dist/assets/{OffSick-C991mOvw.js → OffSick-Cnicwu8x.js} +1 -1
- package/dist/assets/{Phone-BfBgFKKG.js → Phone-CoX1qzAs.js} +1 -1
- package/dist/assets/{PlayArrow-CY4IxSfG.js → PlayArrow-C9IFmc-j.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-dkY86QWO.js → QuestionMarkCircle-DCM9zW3a.js} +1 -1
- package/dist/assets/{ServerLogo-BTwLn5Zv.js → ServerLogo-CfbYjQbP.js} +1 -1
- package/dist/assets/{Timezone-BWB21Pdc.js → Timezone-CCdgxxpv.js} +1 -1
- package/dist/assets/{TuneOutlined-BEZh1SVU.js → TuneOutlined-CB7t_nGq.js} +1 -1
- package/dist/assets/{ViewList-BwVW4Mbn.js → ViewList-B4hmqizo.js} +1 -1
- package/dist/assets/{WorkingRemotely-DHNo6euv.js → WorkingRemotely-DWT54kH1.js} +1 -1
- package/dist/assets/{access-control-BULUPRVa.js → access-control-RJu7xYI3.js} +1 -1
- package/dist/assets/{actions-7FcWNRsN.js → actions-BCWb2ez1.js} +1 -1
- package/dist/assets/{add-component-core-BMiZ7LE5.js → add-component-core-DRAzXCeg.js} +2 -2
- package/dist/assets/add-resource-BDJuVU8K.js +1 -0
- package/dist/assets/{addon-vARTsq3u.js → addon-ygDS7Fug.js} +1 -1
- package/dist/assets/{advanced-u-DAzAIF.js → advanced-CFME3Vrl.js} +3 -3
- package/dist/assets/{appearance-DROrcrHA.js → appearance-BqJwEmtt.js} +1 -1
- package/dist/assets/ar-Blzb8h2o.js +7 -0
- package/dist/assets/{audit-logs-CcVb9ghw.js → audit-logs-CtFZQHby.js} +3 -3
- package/dist/assets/{authorize-ChpWebj3.js → authorize-WekjQ3_M.js} +1 -1
- package/dist/assets/{base32-HzVjc8tz.js → base32-BbrXtXL6.js} +1 -1
- package/dist/assets/{branding-BbyygUCZ.js → branding-BTfb8_b4.js} +2 -2
- package/dist/assets/{branding-Be5nWHmr.js → branding-CS-f1gMT.js} +3 -3
- package/dist/assets/{bundle-avatar-CkhAjy4c.js → bundle-avatar-Db5l8MQ4.js} +1 -1
- package/dist/assets/button-DotKXyjc.js +1 -0
- package/dist/assets/click-to-copy-BxhgzyYL.js +1 -0
- package/dist/assets/collapse-Bn_BDlF9.js +1 -0
- package/dist/assets/{complete-B8pYAeSZ.js → complete-BRApuFsV.js} +1 -1
- package/dist/assets/{component-B79RqFMg.js → component-C7g4FGFm.js} +1 -1
- package/dist/assets/{config-Cr_HvxTH.js → config-C8AXD1JH.js} +1 -1
- package/dist/assets/{config-navigation-BEcY6Wrz.js → config-navigation-B7r4dV5S.js} +4 -4
- package/dist/assets/{config-zGEZcVMw.js → config-qG8JCIJ_.js} +1 -1
- package/dist/assets/{config-space-CxYC75c6.js → config-space-CSKkMgqX.js} +1 -1
- package/dist/assets/{confirm-qyOtSX3L.js → confirm-BvUfAlkx.js} +1 -1
- package/dist/assets/{connect-D3ZxLXkG.js → connect-B2HOOYzS.js} +1 -1
- package/dist/assets/{connect-sAGOXOYo.js → connect-DGPdKMcu.js} +1 -1
- package/dist/assets/{connect-to-DjFFSoXW.js → connect-to-BBtnljQ-.js} +1 -1
- package/dist/assets/{content-layout-HQq6mBBk.js → content-layout-DzqMXifY.js} +1 -1
- package/dist/assets/dashboard-C124DXmc.js +279 -0
- package/dist/assets/de-BxI5dM9K.js +7 -0
- package/dist/assets/{delete-confirm-DQ_YJQpj.js → delete-confirm-BBaXcAXg.js} +1 -1
- package/dist/assets/{did-address-Dd9R3pkY.js → did-address-BKBBjFqv.js} +1 -1
- package/dist/assets/{domain-B2_scx4B.js → domain-DTrwCkop.js} +1 -1
- package/dist/assets/{domain-action-card-DE7xLk29.js → domain-action-card-D-WETV-f.js} +1 -1
- package/dist/assets/domains-BxkmGeZE.js +1 -0
- package/dist/assets/{dot-B5LFAb8e.js → dot-C05enzim.js} +1 -1
- package/dist/assets/{email-CWYkPTia.js → email-Bc5KLu5Q.js} +1 -1
- package/dist/assets/{empty-spinner-g1Jw7iuj.js → empty-spinner-BZlBh4vA.js} +1 -1
- package/dist/assets/{es-BUCdgg9a.js → es-BuUaHPig.js} +3 -3
- package/dist/assets/{exchange-passport-BbC_bBga.js → exchange-passport-DbNEDTaa.js} +1 -1
- package/dist/assets/fr-DezMACmP.js +7 -0
- package/dist/assets/{fuel-BdagEU33.js → fuel-DzWcrU-I.js} +1 -1
- package/dist/assets/{gen-access-key-Cf76OFN7.js → gen-access-key-D-ftFU9F.js} +1 -1
- package/dist/assets/get-safe-url-2RcRY8gU.js +1 -0
- package/dist/assets/get-safe-url-CEvgWyL5.js +1 -0
- package/dist/assets/hi-ClbEozhq.js +5 -0
- package/dist/assets/{home-BSxVGonp.js → home-DXj5oFeO.js} +1 -1
- package/dist/assets/id-CXYm-1K3.js +7 -0
- package/dist/assets/{iframe-DXRYs3PX.js → iframe-CIVgAJuH.js} +1 -1
- package/dist/assets/{index-Djpx18Tz.js → index--HbH1n1_.js} +1 -1
- package/dist/assets/index-9ixwCOkw.js +113 -0
- package/dist/assets/{index-CzGXBMFc.js → index-BMD-pSqT.js} +1 -1
- package/dist/assets/{index-Cc-_2bD1.js → index-BMPpz8ni.js} +1 -1
- package/dist/assets/{index-aMtQhU6T.js → index-BVU8_1Ed.js} +3 -3
- package/dist/assets/index-B_fwtN9z.js +55 -0
- package/dist/assets/{index-DEsvwKlq.js → index-BemEiFHE.js} +1 -1
- package/dist/assets/{index-Cy1Hvxt0.js → index-BmWVfEGP.js} +1 -1
- package/dist/assets/{index-C-RHInKj.js → index-Bxd86KLJ.js} +4 -4
- package/dist/assets/{index-DF0z_zii.js → index-C0SLCehH.js} +1 -1
- package/dist/assets/index-CHDiquXf.js +62 -0
- package/dist/assets/{index-BQJa9ZJC.js → index-CKheO_aT.js} +1 -1
- package/dist/assets/{index-TE82Z_py.js → index-CUfP1M2j.js} +1 -1
- package/dist/assets/{index-mbuQZLIX.js → index-Ce2NSVmU.js} +1 -1
- package/dist/assets/index-CyUXddLG.js +284 -0
- package/dist/assets/index-D09AfnR1.js +11 -0
- package/dist/assets/index-D64RNKdt.js +99 -0
- package/dist/assets/{index-BSuIcvk6.js → index-DF3gHUuW.js} +4 -4
- package/dist/assets/{index-BPuJmMx-.js → index-DjLLC6N3.js} +1 -1
- package/dist/assets/index-DsT9i24r.js +141 -0
- package/dist/assets/{index-DpW-Ik8u.js → index-g0L_1foA.js} +8 -8
- package/dist/assets/{index-BFsMuPKK.js → index-u-w3iMC9.js} +9 -9
- package/dist/assets/{index-yiU4BWrm.js → index-wXCx8TFU.js} +1 -1
- package/dist/assets/{invitation-B8tJTJsE.js → invitation-CKfllvl5.js} +1 -1
- package/dist/assets/{invite-EdScAUQO.js → invite-CCCSmPiy.js} +1 -1
- package/dist/assets/{issue-passport-CStwxDqe.js → issue-passport-C3zUptls.js} +1 -1
- package/dist/assets/{item-B4NAOVBY.js → item-CkcpHBHM.js} +1 -1
- package/dist/assets/ja-B5V7b8Cm.js +7 -0
- package/dist/assets/ko-DP9up1nF.js +7 -0
- package/dist/assets/{landing-page-CBb5_s7o.js → landing-page-q-KgqE9Q.js} +1 -1
- package/dist/assets/{launch-result-message-mW7oxgKT.js → launch-result-message-BaU6oEsi.js} +1 -1
- package/dist/assets/{layout-uc9mKcbg.js → layout-CyCulQBn.js} +1 -1
- package/dist/assets/list-D1dIr8Je.js +2 -0
- package/dist/assets/list-TP-VNuzL.js +236 -0
- package/dist/assets/{list-header-D4MXeBc7.js → list-header-CU9W30JD.js} +1 -1
- package/dist/assets/localization-BXLZxF1J.js +1 -0
- package/dist/assets/{log-BdBIH8S_.js → log-DNpJdgp3.js} +1 -1
- package/dist/assets/{logger-DCttRmHI.js → logger-CQ50TnpL.js} +1 -1
- package/dist/assets/{login-CKa2oQPz.js → login-BKaJnfFX.js} +1 -1
- package/dist/assets/{login-oauth-callback-DVRZRaip.js → login-oauth-callback-LJsgXC8E.js} +1 -1
- package/dist/assets/{logo-uploader-DRH-fnyc.js → logo-uploader-BYnd80uu.js} +3 -3
- package/dist/assets/{lost-passport-ClMglNv0.js → lost-passport-Bk0k4I4s.js} +1 -1
- package/dist/assets/{open-window-Cu3fShwR.js → open-window-DV0D-Mov.js} +1 -1
- package/dist/assets/{overview-D5q1KD9x.js → overview-UIMGVO1S.js} +1 -1
- package/dist/assets/{page-header-C1NOmuYB.js → page-header-CpNMTtn_.js} +1 -1
- package/dist/assets/{passport-item-CjxzZUKR.js → passport-item-BxfGrDcE.js} +1 -1
- package/dist/assets/{permission-DzaDpKIW.js → permission-BkNXA8B5.js} +1 -1
- package/dist/assets/{preferences-Dmcgwjhp.js → preferences-_jTjKHvU.js} +1 -1
- package/dist/assets/{profile-embed-DsYLFLkt.js → profile-embed-8w4_vg5a.js} +1 -1
- package/dist/assets/pt-CG45pWr4.js +5 -0
- package/dist/assets/publish-resource-CcM3RwPR.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CrdGz16R.js → react-beautiful-dnd.esm-Cq_dOQ2z.js} +1 -1
- package/dist/assets/{relative-time-tY0x-ayF.js → relative-time-Cl7lOTkO.js} +1 -1
- package/dist/assets/ru-0VhRQc7t.js +5 -0
- package/dist/assets/runtime-BVDdcpyT.js +1 -0
- package/dist/assets/sdk-7yPC_DtN.js +1 -0
- package/dist/assets/{security-fwRPOvQx.js → security-BQbSLSOe.js} +3 -3
- package/dist/assets/{session-xl6Fb2Wm.js → session-6XaVDQaE.js} +1 -1
- package/dist/assets/setup-CifjXQIf.js +30 -0
- package/dist/assets/{shorten-label-srsBvHNw.js → shorten-label-Dq7bVuNa.js} +1 -1
- package/dist/assets/{simple-select-DyL9G1FX.js → simple-select-C-wGUGQR.js} +1 -1
- package/dist/assets/{slicedToArray-B3Jznk0w.js → slicedToArray-vWe02CJE.js} +1 -1
- package/dist/assets/{spaces-BtThOmfG.js → spaces-Cp7TgoZP.js} +1 -1
- package/dist/assets/{start-DNZ-ulwN.js → start-CHmWCQE9.js} +1 -1
- package/dist/assets/{starting-progress-CN1sTPnO.js → starting-progress-CdpkXOrK.js} +1 -1
- package/dist/assets/{status-kLLmMBy7.js → status-46dMQnxA.js} +1 -1
- package/dist/assets/{step-actions-DSriMOaL.js → step-actions-Bu3Q5M4V.js} +1 -1
- package/dist/assets/{studio-CqjHflyE.js → studio-BbeHx14I.js} +1 -1
- package/dist/assets/{switch-control-DsHfwUN7.js → switch-control-D6CqAlDY.js} +1 -1
- package/dist/assets/th-DwH8cjcw.js +5 -0
- package/dist/assets/{traffic-38eCC37i.js → traffic-CY9Vj6w7.js} +1 -1
- package/dist/assets/{transfer-zdDZ9_KG.js → transfer-CSeo2FaW.js} +1 -1
- package/dist/assets/{unsubscribe-DiFsgDJ8.js → unsubscribe-BLaMmgbM.js} +1 -1
- package/dist/assets/use-blocklet-logo-sEJnYyNL.js +2 -0
- package/dist/assets/{use-mobile-B-WdQWoB.js → use-mobile-BAjFH6d8.js} +1 -1
- package/dist/assets/{use-mobile-PBkFclTq.js → use-mobile-Bh8CHBbH.js} +1 -1
- package/dist/assets/{useLocalStorage-DeyICx-h.js → useLocalStorage-C6U1Aqya.js} +1 -1
- package/dist/assets/user-center-BHyd-rRF.js +76 -0
- package/dist/assets/{util-CZd-jYUF.js → util-Bg0WSJ-t.js} +1 -1
- package/dist/assets/{util-DStpLP3f.js → util-RWes6RwK.js} +1 -1
- package/dist/assets/{vendor-arcblock-CORkwLwW.js → vendor-arcblock-CN2B_oTr.js} +80 -80
- package/dist/assets/{vendor-mui-core-DMvlMpwf.js → vendor-mui-core-UZpb7wT7.js} +1 -1
- package/dist/assets/{vendor-mui-x-mcVodcG2.js → vendor-mui-x-whuSO90H.js} +1 -1
- package/dist/assets/vendor-ux-did-connect-TEE6cGq6.js +2296 -0
- package/dist/assets/vi-CcmTJggB.js +5 -0
- package/dist/assets/wrap-locale-DZ79GW_G.js +1 -0
- package/dist/assets/{zh-BQbRU3Dp.js → zh-C2MKZFZw.js} +3 -3
- package/dist/assets/zh-tw-mW-UVEHx.js +7 -0
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +43 -43
- package/dist/assets/add-resource-j8u2ovZD.js +0 -1
- package/dist/assets/ar-5Vd7BsNt.js +0 -7
- package/dist/assets/button-Bk6R99H4.js +0 -1
- package/dist/assets/click-to-copy-CzMRt9dA.js +0 -1
- package/dist/assets/dashboard-CuF4binC.js +0 -280
- package/dist/assets/de-oCaVyGvF.js +0 -7
- package/dist/assets/domains-bZXw9tDX.js +0 -1
- package/dist/assets/fr-BDos80TL.js +0 -7
- package/dist/assets/get-safe-url-Dh8rhVin.js +0 -1
- package/dist/assets/get-safe-url-_fT029s-.js +0 -1
- package/dist/assets/hi-DwEZmyg8.js +0 -5
- package/dist/assets/id-BVUMyK9S.js +0 -7
- package/dist/assets/index-B9xM_Hng.js +0 -11
- package/dist/assets/index-CXDRY0Gs.js +0 -99
- package/dist/assets/index-DW75AsWb.js +0 -55
- package/dist/assets/index-aQxEawZE.js +0 -345
- package/dist/assets/index-cs-08BqN.js +0 -113
- package/dist/assets/index-m_po8k60.js +0 -141
- package/dist/assets/ja-CFMQ-LyA.js +0 -7
- package/dist/assets/ko-NIkLevaH.js +0 -7
- package/dist/assets/list-BK68Cxh8.js +0 -236
- package/dist/assets/localization-CJlgb0T8.js +0 -1
- package/dist/assets/pt-CDHE_zWG.js +0 -5
- package/dist/assets/publish-resource--xDHKiTt.js +0 -1
- package/dist/assets/ru-l1raGUU5.js +0 -5
- package/dist/assets/runtime-CRViKGyG.js +0 -1
- package/dist/assets/sdk-D0dqnQoQ.js +0 -1
- package/dist/assets/setup-KZaDiyeL.js +0 -30
- package/dist/assets/th-BBE2_3AB.js +0 -5
- package/dist/assets/use-blocklet-logo-OwFyCoUV.js +0 -1
- package/dist/assets/user-center-D-0-UOTc.js +0 -76
- package/dist/assets/vendor-ux-did-connect-akcz-Ldw.js +0 -2296
- package/dist/assets/vi-CVeuRNnr.js +0 -5
- package/dist/assets/wrap-locale-NyChvVhT.js +0 -1
- package/dist/assets/zh-tw-Ca0tJhqz.js +0 -7
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import{r as j}from"./vendor-react-DEoibe3W.js";import{j as e,H as d,a9 as Pe,ad as jt,T as J,aa as C,E as _e,bp as Fe,bA as et,bR as Te,bt as Re,bS as Ie,y as Se,b4 as Ee,ab as tt,ah as ce,a1 as st,m as yt,bc as Xe,bs as vt,bo as St,q as Ze,c0 as Ct}from"./vendor-mui-core-UZpb7wT7.js";import{e as ie,aB as ue,C as Nt}from"./vendor-utils-rHXShPKm.js";import{_ as Z,j as P,b8 as wt,r as ke,A as Tt,u as te,bR as Rt,Z as nt,B as De,a7 as at,bo as je,am as It,as as Et,bv as Dt}from"./vendor-ux-did-connect-TEE6cGq6.js";import{z as At,t as V,l as Ot,I as Je}from"./index-u-w3iMC9.js";import{f as ee,a as Ae}from"./vendor-hooks-rDgu5KV9.js";import{S as he}from"./shorten-label-Dq7bVuNa.js";import{I as it}from"./index-C0SLCehH.js";import{A as Lt,S as Pt,a as _t,b as Ft,B as kt}from"./list-TP-VNuzL.js";import{R as Be}from"./relative-time-Cl7lOTkO.js";import{a as ze}from"./dashboard-C124DXmc.js";import{W as Bt}from"./did-address-BKBBjFqv.js";import{p as ot}from"./util-Bg0WSJ-t.js";import{D as zt,g as Wt}from"./traffic-CY9Vj6w7.js";import{i as Mt,e as qt}from"./use-blocklet-logo-sEJnYyNL.js";import{B as rt}from"./bundle-avatar-Db5l8MQ4.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CN2B_oTr.js";import"./index-DjLLC6N3.js";import"./InfoOutlined-Dy7jTc7H.js";import"./CheckCircle-Dvhgeo9j.js";import"./index-Ce2NSVmU.js";import"./Phone-CoX1qzAs.js";import"./Location-C__VfR4D.js";import"./Email-DOy8vL0N.js";import"./Timezone-CCdgxxpv.js";import"./useLocalStorage-C6U1Aqya.js";import"./confirm-BvUfAlkx.js";import"./format-error-BrmqJs5a.js";import"./PlayArrow-C9IFmc-j.js";import"./get-safe-url-CEvgWyL5.js";import"./session-6XaVDQaE.js";import"./collapse-Bn_BDlF9.js";import"./dot-C05enzim.js";import"./useAsync-DV3NyLhI.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-Bh8CHBbH.js";import"./base32-BbrXtXL6.js";import"./iframe-CIVgAJuH.js";import"./LaunchOutlined-BIq6YUU8.js";import"./ChevronLeft-DE33N57i.js";import"./ChevronRight-BfbPIE2b.js";import"./index-wXCx8TFU.js";import"./vendor-mui-x-whuSO90H.js";import"./AdapterDayjs-BiPHzcUP.js";const lt=j.createContext({}),{Provider:Kt,Consumer:mn}=lt;function $t({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=At(),[a,x]=j.useState([]),[u,R]=j.useState({total:0,pageSize:20,pageCount:0,page:1}),m=ee(()=>{var h;return(h=s.meta)==null?void 0:h.did},[s]),[v,S]=j.useState([]),[I,M]=j.useState({}),E=ee(()=>a.length?new Set(a.map(h=>h.id)):new Set,[a]),L=async({page:h=1,pageSize:O=20,...A}={})=>{if(!m)return[];try{const _={paging:{page:h,pageSize:O},...A,teamDid:m,dateRange:A.dateRange?[V(A.dateRange[0]).toISOString(),V(A.dateRange[1]).toISOString()]:void 0},{dids:B,...q}=_;let Q="";B&&B.includes("system")&&(Q="system");const z=B?B.filter(f=>f!=="system"):[],oe={...q,source:Q,componentDids:z},se=await n.getNotificationSendLog({input:oe});return M(oe),x(se.list),R(se.paging),se.list}catch(_){return Z.error(_.message),[]}},D=async()=>{const h=await n.getNotificationComponents({input:{teamDid:m}});S(h.componentDids)},G=j.useCallback(h=>{const O=s.children.find(A=>{var _;return((_=A.meta)==null?void 0:_.did)===h});if(O)return O.ancestors=[s],O},[s]),$=async({notificationId:h,receivers:O,channels:A,..._})=>{await n.resendNotification({input:{teamDid:m,notificationId:h,receivers:O,channels:A.map(B=>B==="wallet"?P.NOTIFICATION_SEND_CHANNEL.WALLET:B==="pushKit"?P.NOTIFICATION_SEND_CHANNEL.PUSH:B),..._}})},H=j.useCallback(async h=>(await n.getUser({input:{teamDid:m,user:{did:h}}})).user,[n,m]),N=j.useCallback(async({page:h=1,pageSize:O=20,...A}={})=>{try{const _={paging:{page:h,pageSize:O},...A,userName:A.searchText||"",teamDid:m,dateRange:A.dateRange?[V(A.dateRange[0]).toISOString(),V(A.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:_})}catch(_){throw Z.error(_.message),_}},[n,m]);j.useEffect(()=>{m&&D()},[m]),o(P.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{E.has(h.notificationId)&&L(I)},[E,I]),o(P.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{E.has(h.id)||L(I)},[E,I]);const k={fetch:L,data:a,paging:u,blocklet:s,getComponent:G,resendNotification:$,getUser:H,componentDids:v,getReceivers:N,inService:r,teamDid:m};return e.jsx(Kt,{value:{notificationRecords:k},children:t})}function We(){const{notificationRecords:t}=j.useContext(lt);return t}ge.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Ht={info:"primary",success:"success",error:"error",warning:"warning"};function ge({severity:t="info"}){return e.jsx(wt,{type:Ht[t],children:t})}var Me={},Ut=Pe;Object.defineProperty(Me,"__esModule",{value:!0});var ct=Me.default=void 0,Vt=Ut(ke()),Gt=e;ct=Me.default=(0,Vt.default)((0,Gt.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={},Yt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var dt=qe.default=void 0,Xt=Yt(ke()),Zt=e;dt=qe.default=(0,Xt.default)((0,Zt.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={},Jt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var ut=Ke.default=void 0,Qt=Jt(ke()),es=e;ut=Ke.default=(0,Qt.default)((0,es.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 ts=(t,s,n="")=>{if(!n||!s)return"";switch(n){case P.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case P.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case P.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case P.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function pt(t,s,n={}){const{status:r,updatedAt:o,reason:a="",channel:x="wallet"}=n,u=o?t("notification.sendStatus.sentTime",{date:Ot(o,s)}):"",R=ts(t,x,a);return r===P.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:R}:r===P.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:R,sentTime:u}}const Oe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Le=["wallet","pushKit","email"],Qe=["info","success","error","warning"],ft=t=>{var n,r;const{settings:s}=t;return(r=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:r.enabled},mt=t=>{var n,r;const{settings:s}=t;return(r=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:r.enabled},ss=(t,s)=>{const n=ie(s,"extra.notifications.email",!0);return{available:ft(t),enabled:n}},ns=(t,s)=>{const n=ie(s,"extra.notifications.push",!0);return{available:mt(t),enabled:n}},as=t=>({enabled:ie(t,"extra.notifications.wallet",!0)}),is=t=>({enabled:ie(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),os=(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})}]:[],be=(t=[])=>{const s=V().startOf("day");return t.filter(n=>V(n.sendAt).isSame(s,"day")).length},rs=(t,s="")=>{if(s&&Le.includes(s)){const a=`${s}SendRecord`,x=ie(t,a,[]);return be(x)}const n=ie(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const a=n[s]??[];return be(a)}const o={};return Le.forEach(a=>{const x=`${a}SendRecord`,u=ie(t,x,[]),R=be(u);o[a]=R}),r.length>0&&r.forEach(a=>{const x=n[a]??[],u=be(x);o[a]=u}),o},ye=(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},ls=t=>{switch(t){case P.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case P.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case P.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case P.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>Tt({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 ne({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r}){const{status:o,title:a="",sentTime:x="",reason:u=""}=t,R=[a,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(J,{color:"inherit",sx:{fontSize:12},children:R}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(C,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Oe[o],style:{opacity:.15}}),e.jsx(C,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Oe[o]})]}),e.jsx(J,{color:"inherit",sx:{fontSize:12},children:n?a:r})]})})}ne.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ne.defaultProps={enableTooltip:!0,showTitle:!1,children:null};pe.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};pe.defaultProps={onDelete:()=>{}};function pe({list:t,label:s,onDelete:n}){const{t:r,locale:o}=te();return e.jsxs(C,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(J,{children:[s,": "]}),t.map(a=>{const x=pt(r,o,{status:a});return e.jsx(_e,{size:"small",label:e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ne,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,a)},a)})]})}$e.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 $e({filterList:t,onChange:s,index:n,column:r,filterValues:o,label:a,renderLabel:x}){return e.jsxs(Fe,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:a}),e.jsx(Te,{row:!0,children:o.map(u=>e.jsx(Re,{control:e.jsx(Ie,{checked:t[n].indexOf(u.value??u)>-1,onChange:R=>{const m=[...t];R.target.checked?m[n]=[...m[n],u.value??u]:m[n]=m[n].filter(v=>v!==(u.value??u)),s(m[n],n,r)},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($e,{...t,renderLabel:s=>e.jsx(ne,{enableTooltip:!1,config:{status:s.status},children:s.label})})}de.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function de({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:o}){const{t:a,locale:x}=te(),u=pt(a,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(ne,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(Se,{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:o,children:a("notification.resend")})]})}He.propTypes={value:d.array.isRequired,onChange:d.func};function He({value:t,onChange:s}){const{locale:n}=te(),r=V().toDate(),[o,a]=j.useState(null),x=j.useCallback(m=>{a(o?null:m.currentTarget)},[o]),u=!!o,R=j.useCallback(m=>{if(!m.startDate||!m.endDate){Z.error("Please select a date range");return}if(V(m.startDate).isAfter(m.endDate)||!V(m.startDate).isValid()||!V(m.endDate).isValid()){Z.error("Invalid date range");return}s([m.startDate,m.endDate]),a(null)},[s]);return e.jsxs("div",{children:[e.jsx(J,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(Se,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Je(t[0],n)," - ",Je(t[1],n)]})}),e.jsx(Ee,{open:u,anchorEl:o,onClose:()=>{a(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(zt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Wt(r),onChange:R})})]})}Ue.propTypes={itemComponent:d.elementType.isRequired};function Ue({itemComponent:t,...s}){var o;const{t:n}=te();return!((o=s==null?void 0:s.filterList)!=null&&o.filter(a=>a.length).length)?null:e.jsxs(C,{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 Ce({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let a=!0;return n&&typeof n=="function"&&(a=n({label:t,...r})),e.jsx(_e,{label:t,variant:"outlined",...o&&a?{onDelete:o}:{}})}Ce.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Ce.defaultProps={canDelete:()=>!0};const cs=[{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:r}=te(),[o,a]=j.useState(cs),[x,u]=j.useState(!0),R=(v,S)=>{S.checked=v.target.checked;const I=o.map(M=>({...M,checked:M.value===S.value?S.checked:M.checked}));a(I)},m=v=>{v.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(J,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{className:"choose-channel",children:e.jsxs(Fe,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(v=>e.jsx(Re,{control:e.jsx(Ie,{checked:v.checked,onChange:S=>R(S,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Re,{control:e.jsx(Ie,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(Se,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Se,{onClick:m,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),r("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:r,locale:o}=te(),{getReceivers:a,inService:x,teamDid:u,getUser:R,blocklet:m}=We(),[v,S]=j.useState(!1),[I,M]=j.useState([]),E=Ae({anchorEl:null,position:null}),L=Ae({anchorEl:null,position:null}),[D,G]=j.useState(null),[$,H]=j.useState({total:0,pageSize:10,pageCount:0,page:1}),[N,k]=j.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[V().subtract(1,"month").startOf("day").toDate(),V().endOf("day").toDate()]}),[h,O]=j.useState([]),A=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!v&&t)try{S(!0);const i=await a({notificationId:t,...N}),l=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,u,x)}}));M(l),H(i.paging),S(!1)}catch(i){Z.error(i.message),S(!1)}};j.useEffect(()=>{_()},[N]);const B=i=>{i.stopPropagation();const l=i.currentTarget;L.anchorEl=l;const c=l.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},q=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(De,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,Q={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:$.page-1,rowsPerPage:$.pageSize,count:$.total,searchText:N.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:h,onRowSelectionChange:(i,l)=>{O(l.map(c=>c.dataIndex))},customToolbarSelect:q},z=({page:i,rowsPerPage:l,searchText:c,filterList:y})=>{const[,F=[],U=[],K=[]]=y;N.pageSize!==l?k(W=>({...W,pageSize:l,page:1})):N.page!==i+1?k(W=>({...W,page:i+1})):N.searchText!==c?k(W=>({...W,searchText:c,page:1})):ue(F,N.walletSendStatus)?ue(U,N.pushKitSendStatus)?ue(K,N.emailSendStatus)||k(W=>({...W,emailSendStatus:K,page:1})):k(W=>({...W,pushKitSendStatus:U,page:1})):k(W=>({...W,walletSendStatus:F,page:1}))},oe=j.useCallback(async(i,l)=>{if(!l)return!1;const c=await R(l);return c?i==="wallet"?as(c):i==="email"?ss(m,c):i==="pushKit"?ns(m,c):i==="webhook"?is(c):!0:!1},[R,m]),se=j.useCallback(i=>os(r,i),[r]),f=()=>{E.anchorEl=null,E.position=null,G(null)},p=()=>{L.anchorEl=null,L.position=null},g=async(i,l,c=!0,y="")=>{if(!(!l.length||!i.length))try{s(i,l,c,y),L.anchorEl||(await xe(.5),f())}catch(F){console.error("handleResend error",{error:F})}},b=async({channels:i,isResendFailedOnly:l})=>{const c=h.map(y=>I[y].receiver);await g(i,c,l),await xe(.5),p(),O([])},T=async(i,l=[],c=!0)=>{try{await g(["webhook"],[i.receiver],c,l)}catch(y){Z.error(y.response?y.response.statusText:y.message)}},w=async(i,l,c,y=[],F=!0)=>{if(i.stopPropagation(),rs(l,c)>=4){Z.warning(r("notification.resendLimit"));return}if(!Le.includes(c)){await T(l,y,F);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();E.anchorEl=K,E.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}G({channel:c});try{const K=await oe(c,l.receiver);await xe(1),G({channel:c,result:K}),(typeof K=="boolean"&&K||Nt(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[l.receiver],F),L.anchorEl||(await xe(.5),f()))}catch(K){Z.error(K.message)}},Y=i=>{k(l=>({...l,dateRange:i,page:1}))},X=(i,l,c,y)=>{i.stopPropagation();const F=c.filter(U=>U!==l);k(U=>({...U,[y]:F,page:1}))},ae=ee(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:l,receiver:c}=I[i];return l?e.jsxs(C,{"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(he,{children:l.fullName})]},c):e.jsx(Bt,{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:N.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(pe,{list:i,label:"Wallet",onDelete:(l,c)=>{l.stopPropagation(),X(l,c,ae[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:A,fullWidth:!0,logic:ve,display:(i,l,c,y)=>e.jsx(we,{label:"Wallet",filterList:i,onChange:l,index:c,column:y,filterValues:A})},customBodyRenderLite:i=>{const{walletSendStatus:l,walletSendAt:c,walletSendFailedReason:y}=I[i];return e.jsx(de,{status:l,updatedAt:c,reason:y,channel:"wallet",onResend:F=>w(F,I[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:l,pushKitSendAt:c,pushKitSendFailedReason:y}=I[i];return e.jsx(de,{status:l,updatedAt:c,reason:y,channel:"pushkit",onResend:F=>w(F,I[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:N.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(pe,{list:i,label:"Push Kit",onDelete:(l,c)=>{l.stopPropagation(),X(l,c,ae[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:A,fullWidth:!0,logic:ve,display:(i,l,c,y)=>e.jsx(we,{label:"Push Kit",filterList:i,onChange:l,index:c,column:y,filterValues:A})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:l,emailSendAt:c,emailSendFailedReason:y}=I[i];return e.jsx(de,{status:l,updatedAt:c,reason:y,channel:"email",onResend:F=>w(F,I[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:N.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(pe,{list:i,label:"Email",onDelete:(l,c)=>{l.stopPropagation(),X(l,c,ae[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:A,fullWidth:!0,logic:ve,display:(i,l,c,y)=>e.jsx(we,{label:"Email",filterList:i,onChange:l,index:c,column:y,filterValues:A})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:l}=I[i];if(!l)return null;const c=Object.entries(l)[0];if(!c)return null;const[y,F]=c,U=F[0];return e.jsx(C,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(C,{className:"webhook-item",fontSize:12,children:[e.jsx(he,{maxLength:30,children:y},y),e.jsx(de,{status:U.status,updatedAt:U.sendAt,reason:U.failedReason,channel:"webhook",onResend:K=>w(K,I[i],"webhook",[y],!1)})]},y)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:l}=I[i];return e.jsx(Be,{value:l,locale:o,shouldUpdate:!0})}}}],[I,o,N,r]),Ye=[e.jsx(He,{value:N.dateRange,onChange:Y},"date-picker"),e.jsx(De,{variant:"contained",size:"small",color:"primary",loading:v,startIcon:e.jsx(ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(us,{children:e.jsxs(st,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:o,loading:v,columns:ae,data:I,onChange:z,options:Q,customButtons:Ye,components:{TableFilterList:i=>e.jsx(Ue,{...i,itemComponent:l=>e.jsx(Ce,{...l,canDelete:()=>!1})})}}),E.anchorEl&&e.jsx(Ee,{open:!!E.anchorEl,anchorReference:"anchorPosition",anchorPosition:E.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ps,{children:[e.jsxs(J,{variant:"body1",component:"div",className:"check-title",children:[D==null?void 0:D.channel," Checking"]}),e.jsx(C,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:se(D==null?void 0:D.channel).map(i=>{var F,U;const{type:l,pass:c,fail:y}=i;return!(D!=null&&D.result)||(F=D==null?void 0:D.result)!=null&&F[l]?e.jsxs(J,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(U=D==null?void 0:D.result)!=null&&U[l]?je.success.main:"inherit"},children:[D!=null&&D.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},l):e.jsxs(J,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:je.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:y})]},l)})})]})}),L.anchorEl&&e.jsx(Ee,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ve,{loading:n,onCancel:p,onConfirm:b})})]})})})}const ds=j.memo(gt),us=ce.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
|
+
`,ps=ce.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
|
+
`,fe=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function fs(t){const{wallet:s,push:n,email:r,webhook:o}=t;return[{name:"Wallet",value:e.jsx(re,{item:s})},{name:"Push",value:e.jsx(re,{item:n})},{name:"Email",value:e.jsx(re,{item:r})},...o.total>0?[{name:"Webhook",value:e.jsx(re,{item:o,isWebhook:!0})}]:[]]}function ms(t,s,n){const{wallet:r,push:o,email:a,webhook:x}=t;return[{name:"Wallet",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.PUSH,item:o,onResend:s})},{name:"Email",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.EMAIL,item:a,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Ne.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Ne.defaultProps={mode:"simple",onResend:()=>{},resending:!1};re.propTypes={item:d.object.isRequired,isWebhook:d.bool};re.defaultProps={isWebhook:!1};function re({item:t,isWebhook:s=!1}){const{t:n}=te(),r=s?t.success.length:t.success,o=t.total,a=r===o?"success":"failed";return e.jsx(C,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(C,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(ne,{config:{status:a},enableTooltip:!1,children:[fe(r)," / ",fe(o)," ",n("notification.sendStatus.success")]})})})}le.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};le.defaultProps={isWebhook:!1,channel:P.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function le({channel:t,item:s,isWebhook:n=!1,onResend:r,loading:o}){const{t:a}=te(),{success:x,failed:u,pending:R}=s,m=ls(t),v=n?x.length:x,S=n?u.length:u,I=n?R.length:R,M=async G=>{G.stopPropagation();const $=n?[...new Set([...x,...u].map(H=>H))]:[];await r([t],[],!0,$)},E=v+S,L=E>0?v/E*100:0,D=E>0?S/E*100:0;return e.jsxs(hs,{successRatio:L,failedRatio:D,children:[e.jsxs(J,{variant:"h6",children:[m," (",s.total,")"]}),e.jsxs(J,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Oe.success,fontWeight:600,fontSize:24},children:fe(v)}),e.jsx("small",{style:{paddingLeft:4},children:a("notification.sendStatus.success")})]}),e.jsxs(C,{className:"unsent-area",children:[e.jsxs(C,{children:[e.jsxs(ne,{config:{status:"failed"},enableTooltip:!1,children:[fe(S)," ",a("notification.sendStatus.failed")]}),e.jsxs(ne,{config:{status:"pending"},enableTooltip:!1,children:[fe(I)," ",a("notification.sendStatus.pending")]})]}),S>0&&e.jsx(C,{className:"resend-btn",children:e.jsx(De,{size:"small",color:"primary",loading:o,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:M,children:a("notification.resend")})})]})]})}function Ne({statistics:t,mode:s="simple",onResend:n,resending:r}){const o=ee(()=>s==="simple"?fs(t):ms(t,n,r),[t,s]);return s==="simple"?e.jsx("div",{children:o.map(a=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:a.name,children:a.value},a.name))}):e.jsx(Xe,{container:!0,spacing:2,children:o.map(a=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:a.value},a.name))})}const hs=ce(C)`
|
|
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,theme:n})=>t===0&&s===0?n.palette.grey[300]:`linear-gradient(to right, ${yt(n.palette.success.light,.4)} ${t}%, ${n.palette.grey[100]} ${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:r="info"}){const{t:o,locale:a}=te(),{getComponent:x,resendNotification:u}=We(),[R,m]=j.useState(!1),v=ee(()=>x(t.componentDid)||n,[n,t.componentDid]),S=Ae({tab:r||"info"}),I=j.useCallback(async(h,O,A=!0,_=[])=>{var Q;if(!h.length||!t.id)return;const B=O.length>0?O:(Q=t==null?void 0:t.receivers)==null?void 0:Q.map(z=>z.receiver);if(!B.length)return;let q=[...h];if(q.includes(P.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(n)&&(Z.warning(o("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),q=q.filter(z=>z!==P.NOTIFICATION_SEND_CHANNEL.PUSH)),q.includes(P.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(n)&&(Z.warning(o("notification.sendStatus.reason.unavailable",{channel:"Email"})),q=q.filter(z=>z!==P.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!q.length)try{m(!0),await u({notificationId:t.id,receivers:B,channels:q,resendFailedOnly:A,...q.includes("webhook")&&_.length?{webhookUrls:_}:{}}),Z.success("Message has been sent!")}catch(z){console.error("handleResend error",{error:z}),Z.error(z.response?z.response.statusText:z.message)}finally{m(!1)}},[n,t.id,t==null?void 0:t.receivers,u,o]),M=ee(()=>Mt(t),[t]),E=ee(()=>qt(t),[t]),L=ee(()=>M?t==null?void 0:t.actorInfo:[],[t]),D=ee(()=>{var h;return(n==null?void 0:n.did)||((h=n==null?void 0:n.meta)==null?void 0:h.did)||""},[n]);function G(){return[{name:o("notification.from"),value:M&&E?e.jsx(Lt,{actors:L,teamDid:D,size:32,showName:!0}):e.jsx(Pt,{size:32,blocklet:v,showName:!0,hideDot:!0})},{name:o("notification.notificationTitle"),value:e.jsx(he,{maxLength:50,children:t.title})},{name:o("notification.body"),value:M?e.jsx(_t,{notification:t,blocklet:n}):e.jsx(Ft,{notification:t,rows:0})},{name:o("notification.severity"),value:e.jsx(ge,{severity:t.severity})},{name:o("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:a,shouldUpdate:!0})}].map(O=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:O.name,children:O.value},O.name))}const $={info:{label:o("common.basicInfo"),value:"info",component:G},receivers:{label:o("notification.receiver"),value:"receivers"},statistics:{label:o("notification.statistics"),value:"statistics"}},H=Object.values($).map(({label:h,value:O})=>({label:h,value:O})),N=$[S.tab]||$.info,k=h=>{S.tab=h};return e.jsx(It,{title:o("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{S.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(xs,{children:[e.jsx(C,{mx:3,className:"tabs",children:e.jsx(Et,{tabs:H,current:S.tab,onChange:k,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[S.tab==="receivers"&&e.jsx(ds,{notificationId:t.id,resending:R,handleResend:I}),S.tab==="statistics"&&e.jsx(Ne,{statistics:t.statistics,mode:"detail",resending:R,onResend:I}),S.tab==="info"&&e.jsx(N.component,{})]})]})})}const gs=j.memo(xt),xs=ce.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: ${je.text.disabled};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;me.propTypes={blocklet:d.object,label:d.string};me.defaultProps={blocklet:null,label:""};const bs=ce.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 me({blocklet:t,label:s}){var n;return e.jsx(bs,{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(C,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(J,{children:[s,": "]}),t.map(r=>e.jsx(_e,{size:"small",label:e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ge,{severity:r})}),onDelete:o=>n(o,r)},r))]})}function js(t){return e.jsx($e,{...t,renderLabel:s=>e.jsx(ge,{severity:s})})}function ys({customTableButtons:t}){var se;const{t:s,locale:n}=te(),[r,o]=j.useState(!1),{data:a,paging:x,blocklet:u,fetch:R,getComponent:m,componentDids:v,inService:S,teamDid:I}=We(),M=j.useRef(null),[E,L]=j.useState(null),[D,G]=j.useState("info"),$=`notification-records-${(se=u.meta)==null?void 0:se.did}`,H=Dt($),[N,k]=j.useState({pageSize:H.rowsPerPage||10,page:H.page?H.page+1:1,dids:H.dids||[],dateRange:H.dateRange||[V().subtract(1,"month").startOf("day").toDate(),V().endOf("day").toDate()]}),h=ee(()=>{if(!u.children||!u.children.length)return[];const f=[];return u.children.forEach(p=>{var b;const g=p.did||((b=p.meta)==null?void 0:b.did);v.includes(g)&&(p.ancestors=[u],f.push(p))}),f},[v,u]),O=async f=>{try{o(!0),await R(f),o(!1)}finally{o(!1)}};j.useEffect(()=>{O(N)},[N]),j.useEffect(()=>{const f=a.find(p=>p.id===(E==null?void 0:E.id));E&&f&&L({...f})},[a]);const A=(f,p,g,b)=>{f.stopPropagation();const T=g.filter(w=>w!==p);k(w=>({...w,[b]:T,page:1}))},_=({page:f,rowsPerPage:p,filterList:g})=>{const[b=[],,,,T=[]]=g;N.pageSize!==p?k(w=>({...w,pageSize:p,page:1})):N.page!==f+1?k(w=>({...w,page:f+1})):ue(N.dids,b)?ue(N.severities,T)||k(w=>({...w,severities:T,page:1})):k(w=>({...w,dids:b,page:1}))},B=j.useCallback(()=>{L(null),G("info")},[]),q=j.useCallback(()=>{R(N)},[R,N]),Q=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((p,g)=>{var T;if(p==="system")return e.jsx("span",{children:s("notification.system")},`system-${g}`);const b=h.find(w=>{var X;return(w.did||((X=w.meta)==null?void 0:X.did))===p});return e.jsx(me,{blocklet:b,label:(b==null?void 0:b.title)||((T=b==null?void 0:b.meta)==null?void 0:T.title)},p)}),update:(f,p,g)=>(f[g].splice(p,1),f)},filterOptions:{names:h,logic:(f,p)=>p.length?!p.includes(f):!1,display:(f,p,g,b)=>e.jsxs(Fe,{style:{width:"380px"},children:[e.jsx(vt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(St,{multiple:!0,value:f[g],renderValue:T=>e.jsx(C,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(w=>{var X;if(w==="system")return e.jsx("span",{children:s("notification.system")},w);const Y=h.find(ae=>{var i;return(ae.did||((i=ae.meta)==null?void 0:i.did))===w});return e.jsx(me,{blocklet:Y,label:(Y==null?void 0:Y.title)||((X=Y==null?void 0:Y.meta)==null?void 0:X.title)},w)})}),onChange:T=>{f[g]=T.target.value,p(f[g],g,b)},children:[e.jsx(Ze,{value:"system",children:s("notification.system")}),h.map(T=>{var Y,X;const w=T.did||((Y=T.meta)==null?void 0:Y.did);return e.jsx(Ze,{value:w,children:e.jsx(me,{blocklet:T,label:T.title||((X=T.meta)==null?void 0:X.title)})},w)})]})]})},customBodyRenderLite:f=>{var b,T;const p=a[f],g=m(p.componentDid);return e.jsxs(C,{display:"flex",alignItems:"center",gap:1,children:[g?e.jsx(rt,{size:32,blocklet:g,ancestors:g.ancestors??[]}):e.jsx(kt,{blocklet:u,size:32}),e.jsx(he,{maxLength:50,children:((b=g==null?void 0:g.meta)==null?void 0:b.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=a[f],{receivers:g}=p;return e.jsx(Ct,{total:g.length,renderSurplus:b=>b<100?e.jsxs("span",{children:["+",b]}):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:b=>{b.stopPropagation(),L(p),G("receivers")},children:g.map(b=>{const{receiverUser:T}=b,w=ot(T.avatar,I,S);return e.jsx(nt,{alt:T.fullName,src:`${w}?imageFilter=resize&w=48&h=48`,size:32,did:b.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},b.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const p=a[f];return e.jsx(C,{onClick:g=>{g.stopPropagation(),L(p),G("statistics")},children:e.jsx(Ne,{statistics:p.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const p=a[f];return e.jsx(he,{maxLength:50,children:p.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const p=a[f];return e.jsx(ge,{severity:p.severity})},filter:!0,filterType:"custom",filterList:N.severities??[],customFilterListOptions:{render:f=>e.jsx(Ge,{list:f,label:s("notification.severity"),onDelete:(p,g)=>{p.stopPropagation(),A(p,g,Q[4].options.filterList,"severities")}}),update:ye},filterOptions:{names:Qe,fullWidth:!0,logic:ve,display:(f,p,g,b)=>e.jsx(js,{label:s("notification.severity"),filterList:f,onChange:p,index:g,column:b,filterValues:Qe})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:p}=a[f];return e.jsx(Be,{value:p,locale:n,shouldUpdate:!0})}}}],z=f=>{k(p=>({...p,dateRange:f,page:1}))},oe=[...t||[]];return e.jsxs(C,{ref:M,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:r,locale:n,columns:Q,data:a,durable:$,onChange:_,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:x.page-1,rowsPerPage:x.pageSize,count:x.total,...H,onRowClick:(f,{dataIndex:p})=>{L(a[p])}},customPreButtons:[e.jsx(He,{value:N.dateRange,onChange:z})],customButtons:oe,components:{TableFilterList:f=>e.jsx(Ue,{...f,itemComponent:p=>e.jsx(Ce,{...p,canDelete:g=>{var T;const b=(T=g==null?void 0:g.columnNames)==null?void 0:T[(g==null?void 0:g.index)||0];return(b==null?void 0:b.name)==="sender"}})})}})})}),E&&e.jsx(gs,{refresh:q,onCancel:B,notification:E,blocklet:u,tab:D})]})}const vs=ce.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($t,{blocklet:t,children:e.jsx(ys,{customTableButtons:s})})}export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as A,v as R,p as w,e as p}from"./index-
|
|
1
|
+
import{d as A,v as R,p as w,e as p}from"./index-CKheO_aT.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,ab as S,aa as c,H as d,ah as g}from"./vendor-mui-core-
|
|
1
|
+
import{j as t,ab as S,aa as c,H as d,ah as g}from"./vendor-mui-core-UZpb7wT7.js";import{r as y}from"./vendor-react-DEoibe3W.js";import{b2 as v,C as w,B as m}from"./vendor-ux-did-connect-TEE6cGq6.js";import{P}from"./page-header-CpNMTtn_.js";import{C as T}from"./index-u-w3iMC9.js";import{u as B}from"./config-space-CSKkMgqX.js";import{C as E,D as b,a as D}from"./connect-to-BBtnljQ-.js";import{S as u}from"./step-actions-Bu3Q5M4V.js";import{S as N}from"./layout-CyCulQBn.js";import"./vendor-utils-rHXShPKm.js";import"./vendor-hooks-rDgu5KV9.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CN2B_oTr.js";import"./spaces-Cp7TgoZP.js";import"./api-BjteVZFg.js";import"./DeleteOutline-B6efX_Fy.js";import"./format-error-BrmqJs5a.js";import"./use-mobile-Bh8CHBbH.js";import"./content-layout-DzqMXifY.js";function l({onNext:a,onPrevious:x}){var n,r,p;const{t:i}=y.useContext(v),{blocklet:e}=T(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:h,loading:o,storageEndpoint:s}=B();return o?t.jsx(w,{relative:"parent",children:t.jsx(S,{})}):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:h?t.jsx(E,{spaceGateway:f,settingStorageEndpoint:C}):t.jsx(b,{})}),((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(D,{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(N)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
`;export{l as default};
|