@abtnode/blocklet-services 1.16.38-beta-20250123-083218-c7ea9693 → 1.16.38-beta-20250125-130409-89d4849d
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 +116 -19
- package/api/services/dashboard/index.js +10 -0
- package/api/services/notification/index.js +32 -1
- package/api/socket/channel/did.js +386 -53
- package/dist/assets/{Add-CbZXB9BN.js → Add-B2yJ7-eq.js} +1 -1
- package/dist/assets/{ArrowDropDown-CCP1plk6.js → ArrowDropDown-D34En9iv.js} +1 -1
- package/dist/assets/{CheckCircle-DhGEqk47.js → CheckCircle-BFXaMcKG.js} +1 -1
- package/dist/assets/{ChevronLeft-md-2eRHz.js → ChevronLeft-BXNAWRN5.js} +1 -1
- package/dist/assets/{ChevronRight-DAi6_yC8.js → ChevronRight-bqoO4ITE.js} +1 -1
- package/dist/assets/{DeleteOutline-mNy4Y7aW.js → DeleteOutline-_fdI9SLO.js} +1 -1
- package/dist/assets/{Done-BW0pdQ5b.js → Done-BegjCX44.js} +1 -1
- package/dist/assets/{Download-Dn7Gxwef.js → Download-ynxZ21_h.js} +1 -1
- package/dist/assets/{EditIcon-BKaoBwhT.js → EditIcon-D6Lk4OxD.js} +1 -1
- package/dist/assets/{Error-bTFr7mrN.js → Error-Dy9JDlUO.js} +1 -1
- package/dist/assets/{Google-Df86UadJ.js → Google-oUsdET4E.js} +1 -1
- package/dist/assets/{InfoOutlined-CD_kKD1R.js → InfoOutlined-CNFvZjEE.js} +1 -1
- package/dist/assets/{Launch-C4oayzSh.js → Launch-DrBfpSUO.js} +1 -1
- package/dist/assets/{LaunchOutlined-o-scAjX1.js → LaunchOutlined-BstP_JKj.js} +1 -1
- package/dist/assets/{LockIcon-CJS2b0V1.js → LockIcon-BITD3hjp.js} +1 -1
- package/dist/assets/{Loop-CgXdPi-b.js → Loop-CuBUpP_g.js} +1 -1
- package/dist/assets/{MoreHoriz-CE_TiTTu.js → MoreHoriz-jduVqLUc.js} +1 -1
- package/dist/assets/{PlayArrow-CNURzidt.js → PlayArrow-CauLC4o_.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-yIKrKrCO.js → QuestionMarkCircle-SCPzvU7T.js} +1 -1
- package/dist/assets/{ServerLogo-BtnYTJe2.js → ServerLogo-DRTZsm8x.js} +1 -1
- package/dist/assets/{ViewList-BK6mc3zl.js → ViewList-CePklU1n.js} +1 -1
- package/dist/assets/{access-control-C_TECevI.js → access-control-DMs8KTjf.js} +1 -1
- package/dist/assets/{actions-DQhRPM_-.js → actions-B31e80dT.js} +1 -1
- package/dist/assets/{add-component-core-ZKcNoEdg.js → add-component-core-BRZ3frb6.js} +1 -1
- package/dist/assets/{add-resource-DeyN_YP2.js → add-resource-CpU17Psd.js} +1 -1
- package/dist/assets/{addon-BQVku5Pw.js → addon-DTkR7c7s.js} +1 -1
- package/dist/assets/analytics-BdRFij_g.js +11 -0
- package/dist/assets/api-K65cLqol.js +1 -0
- package/dist/assets/ar-DV4YJwQy.js +3 -0
- package/dist/assets/{audit-logs-DfI45rXd.js → audit-logs-B5tzv9w6.js} +1 -1
- package/dist/assets/{base32-DwpD8kXz.js → base32-Bxy_Ng3r.js} +1 -1
- package/dist/assets/{branding-B9FP7-vo.js → branding-DEsr5kE0.js} +2 -2
- package/dist/assets/{bundle-avatar-Fs8xar2D.js → bundle-avatar-BSrkMwWG.js} +1 -1
- package/dist/assets/button-CT_SqdC_.js +1 -0
- package/dist/assets/{click-to-copy-BK1KcsDP.js → click-to-copy-DG6oCsDy.js} +1 -1
- package/dist/assets/{cloneDeep-gFMzIJP-.js → cloneDeep-BRiLvZjr.js} +1 -1
- package/dist/assets/{complete-C8dsbaZL.js → complete-B7fQAviW.js} +1 -1
- package/dist/assets/{component-CY2siZu6.js → component-L5_5YcjO.js} +38 -38
- package/dist/assets/{config-DefjxKJo.js → config-Bi4mtKrp.js} +1 -1
- package/dist/assets/{config-oy6r1Urw.js → config-DfNCVYae.js} +1 -1
- package/dist/assets/{config-navigation-D5ZGtEAj.js → config-navigation-BEXQaINe.js} +3 -3
- package/dist/assets/{config-space-B3_Fcx4w.js → config-space-C1WFdLmf.js} +1 -1
- package/dist/assets/{confirm-BoaULvDn.js → confirm-Cbx82b25.js} +1 -1
- package/dist/assets/connect-Cp12hGV2.js +1 -0
- package/dist/assets/{connect-BLZbqoZH.js → connect-kW-GMUG3.js} +1 -1
- package/dist/assets/connect-to-D5VZBQsq.js +1 -0
- package/dist/assets/{content-layout-DAGIv17a.js → content-layout-CzrxMNjA.js} +1 -1
- package/dist/assets/dashboard-uG_G13IR.js +86 -0
- package/dist/assets/de-C2Y_05d1.js +3 -0
- package/dist/assets/{did-address-lZEH-yVL.js → did-address-DhC4Z1Ef.js} +1 -1
- package/dist/assets/{domain-CL1k3ZX_.js → domain-DvrEWdQ8.js} +2 -2
- package/dist/assets/domain-list-B1J4C6ST.js +15 -0
- package/dist/assets/{email-BEAIuGC5.js → email-Cs87G5pr.js} +1 -1
- package/dist/assets/es-DPVOSPPn.js +3 -0
- package/dist/assets/{exchange-passport-mOSW3xXw.js → exchange-passport-Crhw_vMf.js} +1 -1
- package/dist/assets/{form-text-input-CKzsC-YU.js → form-text-input-COijwVFy.js} +1 -1
- package/dist/assets/fr-C8dIIOc9.js +3 -0
- package/dist/assets/{fuel-e3tdVb--.js → fuel-DxcT-75B.js} +1 -1
- package/dist/assets/{fullpage-CkKHaYU0.js → fullpage-CAAXK4pO.js} +1 -1
- package/dist/assets/{get-safe-url-C4tgGDKq.js → get-safe-url-CJIsC1HE.js} +1 -1
- package/dist/assets/{get-safe-url-C_f_ODLw.js → get-safe-url-jf8X-XpV.js} +1 -1
- package/dist/assets/hi-C5r4WQDs.js +1 -0
- package/dist/assets/{home-BNIXkVh5.js → home-Ckf42YJd.js} +1 -1
- package/dist/assets/id-BQK45J6o.js +3 -0
- package/dist/assets/{iframe-SU3hkiQZ.js → iframe-BYvZHXU-.js} +1 -1
- package/dist/assets/{index-HmBDrYyO.js → index-2NCgoG1i.js} +1 -1
- package/dist/assets/{index-B1LvzL9_.js → index-3PobA81m.js} +1 -1
- package/dist/assets/{index-D3LlfacS.js → index-B86l7aCe.js} +1 -1
- package/dist/assets/{index-XcirhJQa.js → index-BJpEKQ4d.js} +12 -12
- package/dist/assets/{index-CbOZ5xd2.js → index-BNCJw59G.js} +1 -1
- package/dist/assets/index-BUstrRo5.js +61 -0
- package/dist/assets/{index-CzV3SmGK.js → index-BvLMNAG0.js} +1 -1
- package/dist/assets/{index-Dh7hy74S.js → index-Bw3pdP7q.js} +1 -1
- package/dist/assets/{index-DwFu84UU.js → index-C0uUrAqS.js} +1 -1
- package/dist/assets/{index-Dkwa_Vhl.js → index-C2fPoxDR.js} +1 -1
- package/dist/assets/index-C7s7t2aN.js +5 -0
- package/dist/assets/{index-CV6rNC-Y.js → index-CRaD-3s4.js} +9 -9
- package/dist/assets/index-D5mFr1eo.js +1 -0
- package/dist/assets/{index-B2Tt5B_m.js → index-DBxnR425.js} +1 -1
- package/dist/assets/{index-DvtOujRp.js → index-DE_r-gh_.js} +1 -1
- package/dist/assets/{index-BDDBFVc2.js → index-Dnxf7bfY.js} +1 -1
- package/dist/assets/{index-96CXu6nL.js → index-KhsqOaMW.js} +7 -7
- package/dist/assets/{index-CV9CYyTl.js → index-PxlbAHCL.js} +36 -36
- package/dist/assets/{index-jQnnlRfC.js → index-Xsfh2QSh.js} +2 -2
- package/dist/assets/index-_ph5477y.js +291 -0
- package/dist/assets/{invitation-B0m5kk5c.js → invitation-DbGm8k25.js} +1 -1
- package/dist/assets/{invite-RA9kQH1W.js → invite-6nyN-oEv.js} +1 -1
- package/dist/assets/{issue-passport-DHpO_ACu.js → issue-passport-YNIanHYf.js} +1 -1
- package/dist/assets/{item-BieIEWMb.js → item-DvkqLmAe.js} +1 -1
- package/dist/assets/ja-DsJERrpD.js +3 -0
- package/dist/assets/ko-t760ZSCl.js +3 -0
- package/dist/assets/{launch-result-message-CeThGm85.js → launch-result-message-C_UhVRcl.js} +1 -1
- package/dist/assets/{layout-BG2jsdXo.js → layout-BVSGD29L.js} +1 -1
- package/dist/assets/list-DrMoP89n.js +160 -0
- package/dist/assets/{list-header-CiUgmzBx.js → list-header-Br_UsG2e.js} +1 -1
- package/dist/assets/localization-V7oQS6wL.js +1 -0
- package/dist/assets/{log-C6bNY6ja.js → log-DCaMhKsI.js} +1 -1
- package/dist/assets/{login-Cvj7T07b.js → login-CHKXy0wB.js} +1 -1
- package/dist/assets/{login-oauth-callback-Di8KYSE_.js → login-oauth-callback-BSX9wejc.js} +1 -1
- package/dist/assets/{logo-uploader-CdOV1A5h.js → logo-uploader-D3pYQBpx.js} +3 -3
- package/dist/assets/{lost-passport-DUSDA_sN.js → lost-passport-BDU3b7Z_.js} +1 -1
- package/dist/assets/{open-window-DF6F9kh-.js → open-window-DrK6iGmf.js} +1 -1
- package/dist/assets/{overview-16UWFtH0.js → overview-BdW7-A5w.js} +1 -1
- package/dist/assets/{page-header-D0CahNv0.js → page-header-JASV_XcR.js} +1 -1
- package/dist/assets/{permission-CKZlVSQ7.js → permission-BkijBCin.js} +1 -1
- package/dist/assets/{preferences-DHuTV8VO.js → preferences-CtlqLrD7.js} +1 -1
- package/dist/assets/pt-BkjUa7uv.js +1 -0
- package/dist/assets/publish-resource-CsuZRYMx.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CfBtdMfF.js → react-beautiful-dnd.esm-C5Uq3rbJ.js} +1 -1
- package/dist/assets/{relative-time-BMfPIJBi.js → relative-time-CQ0hJZC_.js} +1 -1
- package/dist/assets/ru-1WsQFvuL.js +1 -0
- package/dist/assets/sdk-CncrP2i9.js +1 -0
- package/dist/assets/session-ClC5u_ou.js +1 -0
- package/dist/assets/{setup-bES2Uf5W.js → setup-DdTSQTvr.js} +3 -3
- package/dist/assets/{shorten-label-B08EnqgB.js → shorten-label-CYJeMT7h.js} +1 -1
- package/dist/assets/{simple-select-mThFfFp5.js → simple-select-CAyDBkK6.js} +1 -1
- package/dist/assets/{slicedToArray-Ct1Y7NnY.js → slicedToArray-CV571vyX.js} +2 -2
- package/dist/assets/{start-MoamILfR.js → start-Byudzjg5.js} +1 -1
- package/dist/assets/{step-actions-CuwaxH_E.js → step-actions-Zk6bKoYE.js} +1 -1
- package/dist/assets/{studio-CO68-4Oq.js → studio-BGgRA_ZI.js} +1 -1
- package/dist/assets/{switch-control-BpWvMK7z.js → switch-control-BmI39UF6.js} +1 -1
- package/dist/assets/th-CecKmVWf.js +1 -0
- package/dist/assets/traffic-B70zlTcA.js +37 -0
- package/dist/assets/{transfer-DzCBkPdX.js → transfer-C-8HxdfL.js} +1 -1
- package/dist/assets/{unsubscribe-DnKJ4RoU.js → unsubscribe-CrmlZkSk.js} +1 -1
- package/dist/assets/{use-mobile-DoeLOxx6.js → use-mobile-Bk8quGt9.js} +1 -1
- package/dist/assets/{useAsync-DCGc7Pdb.js → useAsync-Ua5iss51.js} +1 -1
- package/dist/assets/{useAsyncRetry-0k7mm5ej.js → useAsyncRetry-EMRT9Ldq.js} +1 -1
- package/dist/assets/{useLocalStorage-BGtJBKln.js → useLocalStorage-CTToOZ4l.js} +1 -1
- package/dist/assets/user-center-BB2CLc7Q.js +71 -0
- package/dist/assets/{util-DQVMHOUo.js → util-BnCdSUGw.js} +1 -1
- package/dist/assets/util-DowdN-NO.js +1 -0
- package/dist/assets/vendor-arcblock-CVRRnBv2.js +3506 -0
- package/dist/assets/{vendor-hooks-DWAhU9cy.js → vendor-hooks-BKxTDk_P.js} +1 -1
- package/dist/assets/{vendor-mui-core-jh6OMVvU.js → vendor-mui-core-CCMNKHtm.js} +1 -1
- package/dist/assets/{vendor-mui-x-BRRfPRl8.js → vendor-mui-x-DmPVvZFJ.js} +1 -1
- package/dist/assets/vendor-utils-5TjOM6td.js +11 -0
- package/dist/assets/vi-CDrTp7No.js +1 -0
- package/dist/assets/wrap-locale-CNuv_qkt.js +1 -0
- package/dist/assets/zh-Bqr2c2To.js +4 -0
- package/dist/assets/zh-tw-CUyoe2CD.js +3 -0
- package/dist/index.html +5 -5
- package/dist/service-worker.js +1 -1
- package/dist/share/shared-service-worker.js +1 -123
- package/package.json +43 -43
- package/dist/assets/analytics-CABOV3VR.js +0 -47
- package/dist/assets/api-hLQrqHOJ.js +0 -1
- package/dist/assets/ar-D1VagXPW.js +0 -3
- package/dist/assets/button-DkniumtB.js +0 -1
- package/dist/assets/connect-o0-zMzhz.js +0 -1
- package/dist/assets/connect-to-CLRCxFvc.js +0 -1
- package/dist/assets/dashboard-BsuKKhWa.js +0 -86
- package/dist/assets/de-CvDV7d-6.js +0 -3
- package/dist/assets/domain-list-Hq4lMkF7.js +0 -15
- package/dist/assets/es-DGK_gDT-.js +0 -3
- package/dist/assets/fr-BuGbCF-_.js +0 -3
- package/dist/assets/hi-w7-Xo0pj.js +0 -1
- package/dist/assets/id-DfsK8869.js +0 -3
- package/dist/assets/index-ChG5I_m-.js +0 -1
- package/dist/assets/index-DZkcShk4.js +0 -2
- package/dist/assets/index-Dg_5HpPS.js +0 -5
- package/dist/assets/index-Dyaz7ZHB.js +0 -291
- package/dist/assets/ja-CQJHpvK1.js +0 -3
- package/dist/assets/ko-9oNzTJow.js +0 -3
- package/dist/assets/localization-BhAxNGA4.js +0 -1
- package/dist/assets/pt-DMLN8oh9.js +0 -1
- package/dist/assets/publish-resource-CAkJ3GaW.js +0 -1
- package/dist/assets/ru-CGG1vu9C.js +0 -1
- package/dist/assets/sdk-CBXPdpcP.js +0 -1
- package/dist/assets/session-BTTqSeVf.js +0 -1
- package/dist/assets/th-D-lApkQp.js +0 -1
- package/dist/assets/user-center-BkJieuxf.js +0 -232
- package/dist/assets/vendor-arcblock-CwZ35cSm.js +0 -3509
- package/dist/assets/vendor-utils-u2ViqIqX.js +0 -11
- package/dist/assets/vi-D45dg9B_.js +0 -1
- package/dist/assets/wrap-locale-DTfWnUqX.js +0 -1
- package/dist/assets/zh-CcLxBIl6.js +0 -4
- package/dist/assets/zh-tw-Bqy7j8qE.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,bZ as tn,bL as So,M as G,a3 as P,A as la,I as de,a2 as Ke,bM as ca,T as mt,aN as J,bJ as ft,br as Oo,ad as wo,ah as Kt,bN as Me,aO as Pe,
|
|
1
|
+
import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,bZ as tn,bL as So,M as G,a3 as P,A as la,I as de,a2 as Ke,bM as ca,T as mt,aN as J,bJ as ft,br as Oo,ad as wo,ah as Kt,bN as Me,aO as Pe,bD as Z,x as fe,ac as Le,b_ as Io,e as gt,Z as ua,a4 as le,K as ko,b$ as qo,c0 as Lo,c1 as Do,c2 as ge,bS as Re,c3 as da,c4 as kr,c5 as qr,c6 as Ao,c7 as fa,c8 as Mo,c9 as Eo,aw as qe,ca as Bo,cb as $o,cc as Wo,cd as No,ce as Ho,cf as Fo,cg as zo,ch as Uo,ci as Vo,cj as Ko,ck as Go,cl as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-CCMNKHtm.js";import{I as Xo}from"./iframe-BYvZHXU-.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{_ as vt,aE as an,e as ie,a1 as ee,j as z,b as Q,Y as va,an as ai,a5 as Ge,a0 as Te,bf as xt,aq as xa,af as Lr,bk as oi,bl as ii,am as Xt,ax as te,bm as si,bn as li,bo as ci,bp as ui,bq as di,a8 as on,aV as fi,br as Pr,bs as pi,bt as mi,aR as nr,X as hi,bu as Rr,aS as sn}from"./vendor-arcblock-CVRRnBv2.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-DfNCVYae.js";import{F as ja,d as vi}from"./form-text-input-COijwVFy.js";import{d as cn}from"./ChevronRight-bqoO4ITE.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,L as ji,M as _i}from"./index-PxlbAHCL.js";import{B as Ci}from"./bundle-avatar-BSrkMwWG.js";import{u as Pi,B as Ri}from"./index-2NCgoG1i.js";import{d as Ti}from"./Loop-CuBUpP_g.js";import{d as Si}from"./Done-BegjCX44.js";import{F as Oi,R as wi,L as et}from"./logo-uploader-D3pYQBpx.js";import{w as Ca,P as Ii}from"./permission-BkijBCin.js";import{C as Dr}from"./confirm-Cbx82b25.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-ClC5u_ou.js";import{C as Li}from"./click-to-copy-DG6oCsDy.js";import{u as Mr,a as Di}from"./dashboard-uG_G13IR.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-CAyDBkK6.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-BmI39UF6.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-B2yJ7-eq.js";import{I as $i}from"./index-Bw3pdP7q.js";import{b as Wi}from"./base32-Bxy_Ng3r.js";import"./EditIcon-D6Lk4OxD.js";import"./ArrowDropDown-D34En9iv.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-CTToOZ4l.js";import"./PlayArrow-CauLC4o_.js";import"./get-safe-url-CJIsC1HE.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useAsync-Ua5iss51.js";var Er={},Ni=U;Object.defineProperty(Er,"__esModule",{value:!0});var Ra=Er.default=void 0,Hi=Ni(vt()),Fi=e;Ra=Er.default=(0,Hi.default)((0,Fi.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var Br={},zi=U;Object.defineProperty(Br,"__esModule",{value:!0});var Ta=Br.default=void 0,Ui=zi(vt()),Vi=e;Ta=Br.default=(0,Ui.default)((0,Vi.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var $r={},Ki=U;Object.defineProperty($r,"__esModule",{value:!0});var Sa=$r.default=void 0,Gi=Ki(vt()),Yi=e;Sa=$r.default=(0,Gi.default)((0,Yi.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var Wr={},Zi=U;Object.defineProperty(Wr,"__esModule",{value:!0});var Oa=Wr.default=void 0,Ji=Zi(vt()),Xi=e;Oa=Wr.default=(0,Ji.default)((0,Xi.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");const Qi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'},es=Qi;function Nr({label:t,disabled:l,required:r,initialValue:o,onChange:u,style:i,onSubmit:m,triggers:n,options:a,formatterBeforeSubmit:s,helperText:d,placeholder:C,renderImage:y,renderLabel:j,filterKeys:S,noEmpty:O,...I}){const[T,c]=E.useState(!1),[p,v]=E.useState(!1),[f,b]=E.useState(""),_=E.useRef(null),[x,g]=E.useState(o),[h,R]=E.useState(x),q=E.useMemo(()=>{if(!a)return{};const L={};return a.forEach($=>{L[$.code]=$}),L},[a]),M=()=>{if(!a)return[];if(!f)return a.map($=>$.code);const L=new RegExp(f.toLowerCase());return a.filter($=>{var V;for(let Y=0;Y<S.length;Y++){const re=S[Y];if(L.test((V=$[re])==null?void 0:V.toLowerCase()))return!0}return!1}).map($=>$.code)},W=async()=>{v(!0);try{await m(typeof s=="function"?s(h):h)===!1?R(x):O&&!h.length?(R(o),g(o)):(R(h),g(h))}catch{R(x)}finally{v(!1),c(!1)}},A=(L,$)=>{if(!Array.isArray($)){R([]),u([]);return}const V=$.filter(Y=>q[Y]);if(!V.length){R([]),u([]);return}R(V),u(V)},w=L=>{L.stopPropagation(),c(!0),setTimeout(()=>{if(_.current){const $=_.current.querySelector("input");$&&$.focus()}},500)},B=T?e.jsx(So,{ref:_,options:a,value:h,onChange:A,inputValue:f,onInputChange:(L,$)=>{b($)},PopperComponent:rs,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:M,getOptionLabel:L=>{var $;return($=q[L])==null?void 0:$.name},renderInput:L=>e.jsx(G,{...L,label:"",placeholder:C}),renderOption:(L,$)=>{var Y;const V=h.indexOf($)!==-1;return E.createElement(ts,{component:"li",...L,key:$},y(q[$]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:V?"700":"normal"},children:j($,q[$])||((Y=q[$])==null?void 0:Y.name)}),e.jsx(P,{component:an,sx:{opacity:.5,width:18,height:18},style:{visibility:V?"visible":"hidden"}}))},...I}):e.jsx(P,{px:1,className:"form-item-input slot",onClick:w,style:{whiteSpace:"pre-wrap",cursor:"text"},children:h.filter(L=>a.some($=>$.code===L)).map(L=>e.jsx(la,{label:a.find($=>$.code===L).name,style:{marginRight:8},size:"small"},L))});return e.jsx(Oi,{className:"form",style:i,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[t,r&&e.jsx(wi,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:B}),e.jsx(P,{className:"form-item-action",children:T?e.jsxs(e.Fragment,{children:[e.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:W,disabled:l||p,size:"large",children:p?e.jsx(Ke,{size:24}):e.jsx(Si,{})}),e.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{R(x),c(!1)},disabled:l||p,size:"large",children:e.jsx(an,{})})]}):null})]}),T&&d&&e.jsx(ca,{children:d})]})})}Nr.propTypes={style:D.object,onSubmit:D.func,onChange:D.func,label:D.string,initialValue:D.string,required:D.bool,disabled:D.bool,triggers:D.array,options:D.array,helperText:D.string,formatterBeforeSubmit:D.func,placeholder:D.string,renderImage:D.func,filterKeys:D.arrayOf(D.string),noEmpty:D.bool,renderLabel:D.func};Nr.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:t=>t.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(t,l)=>"",noEmpty:!1};const ts=ht.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import{r as m}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as xe,E as x,a4 as Te,T as L,a3 as S,aa as ce,A as ue,a2 as ne,ah as De,aj as be,x as Se,R as Ae,V as Ee,bD as ke,cn as Le,cl as Ie,aN as Oe,bJ as Pe}from"./vendor-mui-core-CCMNKHtm.js";import{b as $,z as Fe,A as ze,ap as ae}from"./vendor-utils-5TjOM6td.js";import{b as W,j as V,_ as ye,ay as _,e as M,a5 as Be,bg as _e,B as Ke,aR as We,bv as qe}from"./vendor-arcblock-CVRRnBv2.js";import{y as Ue,E as K,m as $e,G as fe}from"./index-PxlbAHCL.js";import{b as re}from"./dashboard-uG_G13IR.js";import{d as Q}from"./vendor-hooks-BKxTDk_P.js";import{p as Me}from"./util-DowdN-NO.js";import{W as Ve}from"./did-address-DhC4Z1Ef.js";import{S as X}from"./shorten-label-CYJeMT7h.js";import{c as me}from"./index-DoZ2YM4T.js";import{a as He}from"./list-DrMoP89n.js";import{D as Ge,g as Je}from"./traffic-B70zlTcA.js";import{R as Qe}from"./relative-time-CQ0hJZC_.js";import{B as Xe}from"./bundle-avatar-BSrkMwWG.js";import{B as Ye}from"./index-2NCgoG1i.js";import"./useLocalStorage-CTToOZ4l.js";import"./confirm-Cbx82b25.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-CauLC4o_.js";import"./get-safe-url-CJIsC1HE.js";import"./session-ClC5u_ou.js";import"./useAsyncRetry-EMRT9Ldq.js";import"./useAsync-Ua5iss51.js";import"./useSetState-Crt4S51m.js";import"./index-DE_r-gh_.js";import"./InfoOutlined-CNFvZjEE.js";import"./iframe-BYvZHXU-.js";import"./LaunchOutlined-BstP_JKj.js";import"./ChevronLeft-BXNAWRN5.js";import"./ChevronRight-bqoO4ITE.js";import"./index-D5mFr1eo.js";import"./vendor-mui-x-DmPVvZFJ.js";const je=m.createContext({}),{Provider:Ze,Consumer:ss}=je;function et({children:t,blocklet:o=""}){const{api:i,inService:u,ws:{useSubscription:d}}=Ue(),[c,p]=m.useState([]),[b,w]=m.useState({total:0,pageSize:20,pageCount:0,page:1}),[v,E]=m.useState(!1),T=Q(()=>{var R;return(R=o.meta)==null?void 0:R.did},[o]),[F,D]=m.useState({}),z=async({page:R=1,pageSize:h=20,...C}={})=>{if(!(v||!T))try{E(!0);const j={paging:{page:R,pageSize:h},...C,userName:C.searchText||"",teamDid:T,dateRange:C.dateRange?[K(C.dateRange[0]).toISOString(),K(C.dateRange[1]).toISOString()]:void 0},O=await i.getNotificationSendLog({input:j});D(j);const P=O.list.map(B=>({...B,receiverUser:{...B.receiverUser,avatar:Me(B.receiverUser.avatar,T,u)}}));p(P),w(O.paging),E(!1)}catch(j){V.error(j.message),E(!1)}},I=m.useCallback(R=>{const h=o.children.find(C=>{var j;return((j=C.meta)==null?void 0:j.did)===R});if(h)return h.ancestors=[o],h},[o]),f=async({notificationReceiverIds:R,channels:h,...C})=>{await i.resendNotification({input:{teamDid:T,notificationReceiverIds:R,channels:h.map(j=>j==="wallet"?"app":j==="pushKit"?"pushKit":j),...C}})},y=m.useCallback(async R=>(await i.getUser({input:{teamDid:T,user:{did:R}}})).user,[i,T]);d(`${W.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,R=>{R&&z(F)},[F]);const N={loading:v,fetch:z,data:c,paging:b,blocklet:o,getComponent:I,resendNotification:f,getUser:y};return e.jsx(Ze,{value:{notificationRecords:N},children:t})}function Re(){const{notificationRecords:t}=m.useContext(je);return t}var de={},tt=xe;Object.defineProperty(de,"__esModule",{value:!0});var we=de.default=void 0,st=tt(ye()),nt=e;we=de.default=(0,st.default)((0,nt.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 pe={},at=xe;Object.defineProperty(pe,"__esModule",{value:!0});var ve=pe.default=void 0,it=at(ye()),ot=e;ve=pe.default=(0,it.default)((0,ot.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");const rt=(t,o,i="")=>{if(!i||!o)return"";switch(i){case W.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:o});case W.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:o});case W.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:o});case W.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return i}};function ee(t,o,i={}){const{status:u,updatedAt:d,reason:c="",channel:p="wallet"}=i,b=d?t("notification.sendStatus.sentTime",{date:$e(d,o)}):"",w=rt(t,p,c);return u===W.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:b,reason:w}:u===W.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:b}:{status:"unsent",title:t("notification.sendStatus.unsent"),reason:w,sentTime:b}}const he={unsent:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},le=["wallet","pushKit","email"],lt=(t,o)=>{var d,c;const{settings:i}=t,u=$(o,"extra.notifications.email",!0);return{available:(c=(d=i==null?void 0:i.notification)==null?void 0:d.email)==null?void 0:c.enabled,enabled:u}},ct=(t,o)=>{var d,c;const{settings:i}=t,u=$(o,"extra.notifications.push",!0);return{available:(c=(d=i==null?void 0:i.notification)==null?void 0:d.pushKit)==null?void 0:c.enabled,enabled:u}},ut=t=>({enabled:$(t,"extra.notifications.wallet",!0)}),dt=t=>({enabled:$(t,"extra.webhooks",[]).length>0}),ge=(t=3e3)=>new Promise(o=>{setTimeout(()=>{o()},t)}),pt=(t,o)=>o==="wallet"||o==="webhook"?[{channel:o,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:o}),fail:t("notification.sendStatus.reason.disabled",{channel:o})}]:o==="pushKit"||o==="email"?[{channel:o,type:"available",pass:t("notification.sendStatus.reason.available",{channel:o}),fail:t("notification.sendStatus.reason.unavailable",{channel:o})},{channel:o,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:o}),fail:t("notification.sendStatus.reason.disabled",{channel:o})}]:[],ft=t=>{const o={},i=K().startOf("day");le.forEach(c=>{const p=`${c}SendRecord`,w=$(t,p,[]).filter(v=>K(v.sendAt).isSame(i,"day")).length;o[c]=w});const u=$(t,"webhook",{}),d=Object.keys(u??{})??[];return d.length>0&&d.forEach(c=>{const b=(u[c]??[]).filter(w=>K(w.sendAt).isSame(i,"day")).length;o[c]=b}),o};function q({config:t,enableTooltip:o=!0}){const{status:i,title:u="",sentTime:d="",reason:c=""}=t,p=[u,c].filter(Boolean).join(", ");return e.jsx(Te,{title:o?e.jsxs(e.Fragment,{children:[e.jsx(L,{color:"inherit",sx:{fontSize:12},children:p}),e.jsx("span",{children:d})]}):null,arrow:!0,placement:"top",children:e.jsxs(S,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(S,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:he[i],style:{opacity:.15}}),e.jsx(S,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:he[i]})]})})}q.propTypes={config:x.object.isRequired,enableTooltip:x.bool};q.defaultProps={enableTooltip:!0};Ce.propTypes={notification:x.object.isRequired,onCancel:x.func,blocklet:x.object.isRequired,resendChannel:x.array,refresh:x.func};function Ce({notification:t,onCancel:o=()=>{},blocklet:i,resendChannel:u="",refresh:d=()=>{}}){const{t:c,locale:p}=M(),{getComponent:b,resendNotification:w,getUser:v}=Re(),[E,T]=m.useState([]),[F,D]=m.useState([]),[z,I]=m.useState(null),[f,y]=m.useState(null),N=m.useRef({}),R=Q(()=>b(t.componentId)||i,[i,t.componentId]),h=Q(()=>{var r;return(r=t==null?void 0:t.receivers)==null?void 0:r[0]},[t.receivers]),C=Q(()=>ft(h),[h]),j=m.useCallback(async r=>{const{receiver:s}=h??{};if(!s)return!1;const n=await v(s);return n?r==="wallet"?ut(n):r==="email"?lt(i,n):r==="pushKit"?ct(i,n):r==="webhook"?dt(n):!0:!1},[h,v,i]);m.useEffect(()=>{if(!h)T([]);else{const r=le.map(n=>{const a=h[`${n}SendStatus`],l=h[`${n}SendAt`],g=h[`${n}SendFailedReason`],A=ee(c,p,{status:a,updatedAt:l,reason:g,channel:n});return{type:n,extra:A}});T(r);const s=(h==null?void 0:h.webhook)||{};D(Object.entries(s))}},[h,p,c]);const O=m.useCallback(async(r,s="")=>{const{id:n}=h??{};if(n)try{await w({notificationReceiverIds:[n],channels:[r],...r==="webhook"&&s?{webhookUrls:[s]}:{}}),V.success("Message has been sent!"),r!=="webhook"&&(await ge(1e3),I(null))}catch(a){console.error("handleResend error",{error:a}),V.error(a.response?a.response.statusText:a.message)}},[w,h]),P=async(r,s)=>{if(s==null||s.stopPropagation(),C[r.type]>=4){V.warning(c("notification.resendLimit"));return}if(s&&I(s==null?void 0:s.currentTarget),y({channel:r.type}),!(!r||r.checking)){T(a=>a.map(l=>r.type===l.type?{...l,checking:!0}:l));try{const a=await j(r.type);await ge(),y({channel:r.type,result:a}),(typeof a=="boolean"&&a||Fe(a)&&Object.values(a).every(l=>!!l))&&(await O(r.type),d()),T(l=>l.map(g=>r.type===g.type?{...g,checking:!1}:g))}catch(a){console.error("handleResend error",{error:a})}}},B=async(r,s=null)=>{if(s==null||s.stopPropagation(),C[r]>=4){V.warning(c("notification.resendLimit"));return}D(a=>a.map(l=>r===l[0]?[...l.slice(0,2),!0]:l));try{await O("webhook",r),D(a=>a.map(l=>r===l[0]?[...l.slice(0,2),!0]:l)),d()}catch(a){console.error("handleResend error",{error:a})}};m.useEffect(()=>{u&&setTimeout(()=>{const r=N.current[u];r&&(le.includes(u)?(I(r),P({type:u})):B(u))},500)},[u]);const te=()=>{I(null)},U=m.useCallback(r=>pt(c,r),[c]),G=!!z,se=G?"check-resend-popover":void 0;return e.jsx(Be,{title:c("notification.notificationDetails"),onClose:o,open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(mt,{children:[e.jsx(He,{notification:t,blocklet:R}),E.length>0&&e.jsx(S,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,children:E.map(r=>e.jsxs(S,{className:"channel-item",children:[e.jsx(ue,{size:"small",label:e.jsxs(S,{color:"inherit",sx:{fontSize:12,display:"flex",alignItems:"center"},children:[e.jsxs(L,{component:"span",style:{display:"inline-block",fontSize:12,textTransform:"capitalize",fontWeight:500,marginRight:4},children:[r.type,":"," "]}),e.jsxs(S,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:[e.jsx(q,{config:r.extra}),e.jsx("span",{children:r.extra.title})]})]})},r.type),r.extra.status!=="success"&&e.jsxs(L,{ref:s=>{N.current[r.type]=s},component:"span",sx:{color:_.primary.main},className:me("resend-btn",{disabled:r.checking||C[r.type]>=4}),onClick:s=>P(r,s),children:[r.checking?e.jsx(ne,{size:12,sx:{color:_.primary.main}}):e.jsx(re,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]}))}),F.length>0&&e.jsxs(S,{className:"webhook-section",sx:{paddingLeft:"56px"},children:[e.jsx(De,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(S,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:F.map(([r,s,n])=>{const a=s[0],l=ee(c,p,{...a,updatedAt:a.sendAt,reason:a.failedReason,channel:"webhook"});return e.jsxs(S,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(X,{maxLength:30,children:r}),e.jsxs(S,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:[e.jsx(q,{config:l}),e.jsx("span",{children:l.title})]}),l.status!=="success"&&e.jsxs(L,{ref:g=>{N.current[r]=g},component:"span",sx:{color:_.primary.main},className:me("resend-btn",{disabled:n||C[r]>=4}),onClick:g=>B(r,g),children:[n?e.jsx(ne,{size:12,sx:{color:_.primary.main}}):e.jsx(re,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},r)})})]}),e.jsx(be,{id:se,open:G,anchorEl:z,onClose:te,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ht,{children:[e.jsxs(L,{variant:"body1",component:"div",className:"check-title",children:[f==null?void 0:f.channel," Checking"]}),e.jsx(S,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:U(f==null?void 0:f.channel).map(r=>{var l,g;const{type:s,pass:n,fail:a}=r;return!(f!=null&&f.result)||(l=f==null?void 0:f.result)!=null&&l[s]?e.jsxs(L,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(g=f==null?void 0:f.result)!=null&&g[s]?_.success.main:"inherit"},children:[f!=null&&f.result?e.jsx(ve,{}):e.jsx(ne,{size:12,sx:{color:_.primary.main}}),e.jsx("span",{children:n})]},s):e.jsxs(L,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:_.error.main},children:[e.jsx(we,{}),e.jsx("span",{children:a})]},s)})})]})})]})})}const mt=ce.div`
|
|
2
|
+
& > .notification-row {
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.notification-resend-section {
|
|
7
|
+
padding-left: 56px;
|
|
8
|
+
.channel-item {
|
|
9
|
+
display: flex;
|
|
10
|
+
padding: 4px;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
> p {
|
|
15
|
+
font-size: 15px;
|
|
16
|
+
}
|
|
17
|
+
.resend-btn {
|
|
18
|
+
svg {
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
}
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
&.disabled {
|
|
26
|
+
cursor: not-allowed;
|
|
27
|
+
color: ${_.text.disabled};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`,ht=ce.div`
|
|
33
|
+
padding: 8px 16px;
|
|
34
|
+
.check-title {
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
&::first-letter {
|
|
38
|
+
text-transform: uppercase;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.check-item {
|
|
42
|
+
svg {
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
}
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
}
|
|
47
|
+
`;Ne.propTypes={value:x.array.isRequired,onChange:x.func};function Ne({value:t,onChange:o}){const{locale:i}=M(),u=K().toDate(),[d,c]=m.useState(null),p=v=>{c(d?null:v.currentTarget)},b=!!d,w=v=>{o([v.startDate,v.endDate]),c(null)};return e.jsxs("div",{children:[e.jsx(L,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(Se,{onClick:p,variant:"outlined",size:"small",color:"inherit",children:[fe(t[0],i)," - ",fe(t[1],i)]})}),e.jsx(be,{open:b,anchorEl:d,onClose:()=>{c(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Ge,{open:!0,maxDate:u,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:p,definedRanges:Je(u),onChange:w})})]})}const gt=["receiver","data","createdAt","walletSendStatus","pushKitSendStatus","emailSendStatus"],xt=()=>Ae({components:{MuiPopover:{styleOverrides:{root:{"& .MuiPaper-root:has(.filter-container)":{width:"420rpx"}}}}}}),ie=(t,o,i)=>(t[i].splice(o,1),t),oe=(t,o)=>o.length?!o.includes(t):!1;function bt({label:t}){return e.jsx(ue,{label:t,variant:"outlined"})}function St(t){var u;const{t:o}=M();return!((u=t==null?void 0:t.filterList)!=null&&u.filter(d=>d.length).length)?null:e.jsxs(S,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:o("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(qe.TableFilterList,{...t,ItemComponent:bt})})]})}H.propTypes={status:x.number.isRequired,updatedAt:x.string.isRequired,reason:x.string,channel:x.string,onResend:x.func};function H({status:t,updatedAt:o,reason:i="",channel:u="wallet",onResend:d}){const{t:c,locale:p}=M(),b=ee(c,p,{status:t,updatedAt:o,reason:i,channel:u});return e.jsxs(S,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(q,{config:b}),e.jsx(L,{color:"inherit",sx:{fontSize:12},children:b.title}),b.status!=="success"&&e.jsx(Se,{className:"resend-btn",size:"small",startIcon:e.jsx(re,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2rpx"}},onClick:d,children:c("notification.resend")})]})}Y.propTypes={filterList:x.array.isRequired,onChange:x.func.isRequired,index:x.number.isRequired,column:x.object.isRequired,statusFilterValues:x.array.isRequired,label:x.string.isRequired};function Y({filterList:t,onChange:o,index:i,column:u,statusFilterValues:d,label:c}){return e.jsxs(ke,{className:"filter-container",children:[e.jsx(Le,{component:"legend",children:c}),e.jsx(Ie,{row:!0,children:d.map(p=>{const b={status:p.status};return e.jsx(Oe,{control:e.jsx(Pe,{checked:t[i].indexOf(p.value)>-1,onChange:w=>{w.target.checked?t[i].push(p.value):t[i]=t[i].filter(v=>v!==p.value),o(t[i],i,u)},name:p.value}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center"},children:[e.jsx(q,{enableTooltip:!1,config:b}),p.label]})},p.value)})})]})}Z.propTypes={list:x.array.isRequired,label:x.string.isRequired,onDelete:x.func.isRequired};function Z({list:t,label:o,onDelete:i}){const{t:u,locale:d}=M();return e.jsxs(S,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(L,{children:[o,": "]}),t.map(c=>{const p=ee(u,d,{status:c});return e.jsx(ue,{size:"small",label:e.jsxs(S,{display:"flex",alignItems:"center",sx:{gap:"4rpx"},children:[e.jsx(q,{config:p,enableTooltip:!1}),e.jsx("span",{children:p.title})]}),onDelete:b=>i(b,c)},c)})]})}function yt(){var r;const{t,locale:o}=M(),{data:i,paging:u,loading:d,blocklet:c,fetch:p,getComponent:b}=Re(),w=m.useRef(null),[v,E]=m.useState(null),[T,F]=m.useState([]),[D,z]=m.useState(gt),I=`notification-records-${(r=c.meta)==null?void 0:r.did}`,f=_e(I),[y,N]=m.useState({searchText:f.searchText||"",pageSize:f.rowsPerPage||10,page:f.page?f.page+1:1,walletSendStatus:f.walletSendStatus||[],pushKitSendStatus:f.pushKitSendStatus||[],emailSendStatus:f.emailSendStatus||[],dateRange:f.dateRange||[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),R=m.useCallback(s=>{const{notification:n}=s,a=ze(s,"notification");return a.read=!0,n.receivers=[a],n},[]),h=m.useCallback(s=>{const n=R(s);E(n)},[R]);m.useEffect(()=>{p(y)},[y]),m.useEffect(()=>{E(s=>{if(!s)return null;const n=i.find(a=>a.notification.id===s.id);return n?h(n):s})},[i,h]);const C=({page:s,rowsPerPage:n,searchText:a,filterList:l})=>{const[,,,g=[],A=[],J=[]]=l;y.pageSize!==n?N(k=>({...k,pageSize:n,page:1})):y.page!==s+1?N(k=>({...k,page:s+1})):y.searchText!==a?N(k=>({...k,searchText:a,page:1})):ae(y.walletSendStatus,g)?ae(y.pushKitSendStatus,A)?ae(y.emailSendStatus,J)||N(k=>({...k,emailSendStatus:J,page:1})):N(k=>({...k,pushKitSendStatus:A,page:1})):N(k=>({...k,walletSendStatus:g,page:1}))},j=[{label:t("notification.sendStatus.unsent"),value:0,status:"unsent"},{label:t("notification.sendStatus.success"),value:1,status:"success"},{label:t("notification.sendStatus.failed"),value:2,status:"failed"}],O=(s,n,a,l)=>{s.stopPropagation();const g=a.filter(A=>A!==n);N(A=>({...A,[l]:g,page:1}))},P=(s,n,a)=>{s.stopPropagation();const l=R(n);E(l),F(a)},B=()=>{E(null),F("")},te=m.useCallback(()=>{p(y)},[p,y]),U=[{label:t("notification.receiver"),name:"receiver",width:200,options:{filter:!1,display:D.includes("receiver"),customBodyRenderLite:s=>{const{receiverUser:n,receiver:a}=i[s];return n?e.jsxs(S,{"data-cy":`member-name-${n.fullName}`,display:"flex",alignItems:"center",gap:2,justifyContent:"flex-start",children:[e.jsx(Ke,{src:`${n.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:a,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(X,{children:n.fullName})]},a):e.jsx(Ve,{size:14,responsive:!1,compact:!0,copyable:!1,did:a})}}},{label:t("notification.notificationPreview"),name:"data",width:300,options:{filter:!1,display:D.includes("data"),customBodyRenderLite:s=>{const n=i[s],{notification:a}=n,l=b(a.componentDid);return e.jsxs(S,{display:"flex",alignItems:"center",gap:1,onClick:g=>{g.stopPropagation(),h(n)},children:[l?e.jsx(Xe,{size:32,blocklet:l,ancestors:l.ancestors??[]}):e.jsx(Ye,{blocklet:c,size:32}),e.jsx(X,{maxLength:50,children:a.title})]})}}},{label:t("common.createdAt"),name:"createdAt",width:200,options:{filter:!1,display:D.includes("createdAt"),customBodyRenderLite:s=>{const{createdAt:n}=i[s];return e.jsx(Qe,{value:n,locale:o,shouldUpdate:!0})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{display:D.includes("walletSendStatus"),setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:y.walletSendStatus??[],customFilterListOptions:{render:s=>e.jsx(Z,{list:s,label:"Wallet",onDelete:(n,a)=>{n.stopPropagation(),O(n,a,U[3].options.filterList,"walletSendStatus")}}),update:ie},filterOptions:{names:j,fullWidth:!0,logic:oe,display:(s,n,a,l)=>e.jsx(Y,{label:"Wallet",filterList:s,onChange:n,index:a,column:l,statusFilterValues:j})},customBodyRenderLite:s=>{const{walletSendStatus:n,walletSendAt:a,walletSendFailedReason:l}=i[s];return e.jsx(H,{status:n,updatedAt:a,reason:l,channel:"wallet",onResend:g=>P(g,i[s],"wallet")})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{display:D.includes("pushKitSendStatus"),setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:s=>{const{pushKitSendStatus:n,pushKitSendAt:a,pushKitSendFailedReason:l}=i[s];return e.jsx(H,{status:n,updatedAt:a,reason:l,channel:"pushkit",onResend:g=>P(g,i[s],"pushKit")})},filter:!0,filterType:"custom",filterList:y.pushKitSendStatus??[],customFilterListOptions:{render:s=>e.jsx(Z,{list:s,label:"PushKit",onDelete:(n,a)=>{n.stopPropagation(),O(n,a,U[4].options.filterList,"pushKitSendStatus")}}),update:ie},filterOptions:{names:j,fullWidth:!0,logic:oe,display:(s,n,a,l)=>e.jsx(Y,{label:"PushKit",filterList:s,onChange:n,index:a,column:l,statusFilterValues:j})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),display:D.includes("emailSendStatus"),customBodyRenderLite:s=>{const{emailSendStatus:n,emailSendAt:a,emailSendFailedReason:l}=i[s];return e.jsx(H,{status:n,updatedAt:a,reason:l,channel:"email",onResend:g=>P(g,i[s],"email")})},filter:!0,filterType:"custom",filterList:y.emailSendStatus??[],customFilterListOptions:{render:s=>e.jsx(Z,{list:s,label:"Email",onDelete:(n,a)=>{n.stopPropagation(),O(n,a,U[5].options.filterList,"emailSendStatus")}}),update:ie},filterOptions:{names:j,fullWidth:!0,logic:oe,display:(s,n,a,l)=>e.jsx(Y,{label:"Email",filterList:s,onChange:n,index:a,column:l,statusFilterValues:j})}}},{label:"Webhook",name:"webhook",width:200,options:{display:D.includes("webhook"),filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:s=>{const{webhook:n}=i[s];if(!n)return null;const a=Object.entries(n)[0];if(!a)return null;const[l,g]=a,A=g[0];return e.jsx(S,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(S,{className:"webhook-item",fontSize:12,children:[e.jsx(X,{maxLength:30,children:l},l),e.jsx(H,{status:A.status,updatedAt:A.sendAt,reason:A.failedReason,channel:"webhook",onResend:J=>P(J,i[s],l)})]},l)})}}}],G=s=>{N(n=>({...n,dateRange:s,page:1}))},se=[e.jsx(Ne,{value:y.dateRange,onChange:G})];return e.jsxs(S,{ref:w,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(jt,{children:e.jsx(Ee,{theme:xt(),children:e.jsx(We,{className:"main-data",verticalKeyWidth:100,loading:d,locale:o,columns:U,data:i,durable:I,onChange:C,options:{sort:!1,download:!1,print:!1,responsive:!1,expandableRowsOnClick:!0,searchPlaceholder:t("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:u.page-1,rowsPerPage:u.pageSize,count:u.total,...f,searchText:y.searchText,onViewColumnsChange:(s,n)=>{z(n==="add"?a=>[...a,s]:a=>a.filter(l=>l!==s))}},customButtons:se,components:{TableFilterList:St}})})}),v&&e.jsx(Ce,{refresh:te,onCancel:B,notification:v,blocklet:c,resendChannel:T})]})}const jt=ce.div`
|
|
48
|
+
td.MuiTableCell-footer {
|
|
49
|
+
border: none !important;
|
|
50
|
+
}
|
|
51
|
+
.sent-status-cell {
|
|
52
|
+
.resend-btn {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
&:hover {
|
|
56
|
+
.resend-btn {
|
|
57
|
+
display: flex;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;Rt.propTypes={blocklet:x.object.isRequired};function Rt({blocklet:t={}}){return e.jsx(et,{blocklet:t,children:e.jsx(yt,{})})}export{Rt as default,xt as getMuiTheme};
|