@abtnode/webapp 1.16.50-beta-20250902-084222-ed7de4a8 → 1.16.51-beta-20250904-031834-c611f059
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-DPswIgNd.js → AdapterDayjs-B454wUKi.js} +1 -1
- package/dist/assets/{Add-CTkKWsbA.js → Add-CobzoIKJ.js} +1 -1
- package/dist/assets/ArrowDropDown-wCDjkm6N.js +1 -0
- package/dist/assets/{Autocomplete-BnpjHbVI.js → Autocomplete-C06SKe4H.js} +1 -1
- package/dist/assets/{Breadcrumbs-BcwyHALS.js → Breadcrumbs-BWQdjcIC.js} +1 -1
- package/dist/assets/{ButtonGroup-B8CEk0Fm.js → ButtonGroup-D2nbA04k.js} +1 -1
- package/dist/assets/{CSSTransition-CgU-qJG1.js → CSSTransition-BIUxaspZ.js} +1 -1
- package/dist/assets/{CallMerge-DG9UCIML.js → CallMerge-Dkt7zPa_.js} +1 -1
- package/dist/assets/{CardContent-DUT0SHjO.js → CardContent-B-jtI1ie.js} +1 -1
- package/dist/assets/{ChevronLeft-Mrf8wNcO.js → ChevronLeft-T8dPGT4o.js} +1 -1
- package/dist/assets/{ChevronRight-CgNj8oK3.js → ChevronRight-BmNY6NuE.js} +1 -1
- package/dist/assets/{Clear-D0eiF7LM.js → Clear-DSDAa0M4.js} +1 -1
- package/dist/assets/{DeleteOutline-BXGUPwfv.js → DeleteOutline-BRh_jEgm.js} +1 -1
- package/dist/assets/{Done-B-4ttL5E.js → Done-DQFntFgi.js} +1 -1
- package/dist/assets/{Edit-BDZJlnuz.js → Edit-CvtjYyT4.js} +1 -1
- package/dist/assets/{ErrorOutline-DM8Q-uGO.js → ErrorOutline-jpwCi-bt.js} +1 -1
- package/dist/assets/{FilterList-BnK3OcNB.js → FilterList-DcOJVDM2.js} +1 -1
- package/dist/assets/{Google-BnsccEt-.js → Google-DEgZE56h.js} +1 -1
- package/dist/assets/{HelpOutline-95P320TL.js → HelpOutline-RoslCWCH.js} +1 -1
- package/dist/assets/{Launch-C31ynKKh.js → Launch-L3zM7z2U.js} +1 -1
- package/dist/assets/{Link-DKdN2Z0q.js → Link-DHlqc6YG.js} +1 -1
- package/dist/assets/{ListItemButton-wejxtEoj.js → ListItemButton-D_ncPLiT.js} +1 -1
- package/dist/assets/{ListSubheader-B_qXJClL.js → ListSubheader-CtIfn5EF.js} +1 -1
- package/dist/assets/{LoadingButton-Zo_5FEH-.js → LoadingButton-Dw3__mtY.js} +1 -1
- package/dist/assets/{MoreVert-Bg7SRP_I.js → MoreVert-DH4Y2k9h.js} +1 -1
- package/dist/assets/{OpenInNew-C4rxt70p.js → OpenInNew-MxPsaq-U.js} +1 -1
- package/dist/assets/{Refresh-L5IK_LF1.js → Refresh-DMoyFjzc.js} +1 -1
- package/dist/assets/{Search-2a28Zd0Q.js → Search-BvWmcM2k.js} +1 -1
- package/dist/assets/{Slider-DfrL_KUv.js → Slider-CaQ4_HVa.js} +1 -1
- package/dist/assets/{Stepper-B6f7_MVS.js → Stepper-DNM_ADcd.js} +1 -1
- package/dist/assets/{Switch-iXfQHCNE.js → Switch-CAccGI-e.js} +1 -1
- package/dist/assets/{TableSearch-BfqBG8KC.js → TableSearch-BuzsZxHI.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CAU8g76h.js → ToggleButtonGroup-DuGWJmyI.js} +1 -1
- package/dist/assets/{Verified-DFAnifny.js → Verified-CfeEGfMV.js} +1 -1
- package/dist/assets/{VerifiedUser-BFvcT9A-.js → VerifiedUser-BBYo9Pc2.js} +1 -1
- package/dist/assets/{ViewList-BF_nxJjM.js → ViewList-CPmudwlq.js} +1 -1
- package/dist/assets/{_createAggregator-DTDqEyEr.js → _createAggregator-DeRGH35v.js} +1 -1
- package/dist/assets/{actions-BfeIbo_G.js → actions-DkMO_r4a.js} +1 -1
- package/dist/assets/{actions-DcrS1GhL.js → actions-N_sfYn6F.js} +1 -1
- package/dist/assets/{agreement-8NAAXeTA.js → agreement-DJUZzBc6.js} +1 -1
- package/dist/assets/api-BmtVyz86.js +1 -0
- package/dist/assets/{appearance-BiJ6lD1T.js → appearance-BHLySBfx.js} +1 -1
- package/dist/assets/{audit-logs-xPU-sDla.js → audit-logs-D-nTmyPS.js} +1 -1
- package/dist/assets/{base-chart-CPd4vePQ.js → base-chart-DQ401Lk6.js} +1 -1
- package/dist/assets/{blocklet-BwXw89V1.js → blocklet-DISJHp6B.js} +1 -1
- package/dist/assets/{chain-d11c9jLj.js → chain-H_ZkBTRb.js} +1 -1
- package/dist/assets/{click-to-copy-mqyEDC5n.js → click-to-copy-DX5jjk2s.js} +1 -1
- package/dist/assets/client-mu06Cy2w.js +1 -0
- package/dist/assets/cloneDeep-DuTUFwXr.js +1 -0
- package/dist/assets/{collapse-Co_76D-y.js → collapse-D0TcL3yf.js} +1 -1
- package/dist/assets/{config-navigation-Bxan73e2.js → config-navigation-BUN_bn5b.js} +3 -3
- package/dist/assets/{connect-to-dgAF9yLc.js → connect-to-2qqraFvt.js} +1 -1
- package/dist/assets/{cssMode-C31W-e3q.js → cssMode-Cgd7qVp_.js} +1 -1
- package/dist/assets/{delete-confirm-BBlDevSj.js → delete-confirm-B_vil0gb.js} +1 -1
- package/dist/assets/{depsEqual-BxsaWGVI.js → depsEqual-D6ZeS2iD.js} +1 -1
- package/dist/assets/{detail-DAPMqeRx.js → detail-BHQbwbfp.js} +3 -3
- package/dist/assets/{domains-24jfdV6n.js → domains-BLJOV5Qw.js} +1 -1
- package/dist/assets/{download-3kRJTAFI.js → download-C8Jsk4ZH.js} +1 -1
- package/dist/assets/{edit.svg-BHgQlE3X.js → edit.svg-C6CO_uuX.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-Cm-YvbUu.js +1 -0
- package/dist/assets/engine-0m3b2g2H.js +1 -0
- package/dist/assets/{freemarker2-JmP3cv2S.js → freemarker2-C40Z2ucU.js} +1 -1
- package/dist/assets/{get-safe-url-DG3hbVuw.js → get-safe-url-CMpu7B-v.js} +1 -1
- package/dist/assets/getValidReactChildren-CFOO2Xyb.js +1 -0
- package/dist/assets/{graphqlMode-C78Ld2Eu.js → graphqlMode-3TdkToR6.js} +2 -2
- package/dist/assets/{handlebars-CKF2hLML.js → handlebars-CsECaVWw.js} +1 -1
- package/dist/assets/{html-CBskQMFu.js → html-CSc4ZJZE.js} +1 -1
- package/dist/assets/{html-title-F0NEfYXw.js → html-title-Cx_lv4tS.js} +1 -1
- package/dist/assets/{htmlMode-DsG66HOr.js → htmlMode-BeKAEeTT.js} +1 -1
- package/dist/assets/{iframe-B5DJ8-Ji.js → iframe-DYiNwxlH.js} +1 -1
- package/dist/assets/{index-B3FIRHqC.js → index-5KlKCCpC.js} +1 -1
- package/dist/assets/{index-C-fYS2zX.js → index-B4sphWdh.js} +1 -1
- package/dist/assets/{index-g2Hjwa9j.js → index-BGD5220j.js} +1 -1
- package/dist/assets/{index-DpRx2tZw.js → index-BIgUqZXA.js} +1 -1
- package/dist/assets/{index-OGdXuzH7.js → index-BSljJZ1V.js} +3 -3
- package/dist/assets/{index-DocroCwn.js → index-BW4Ntw6W.js} +1 -1
- package/dist/assets/{index-BeVhpCa2.js → index-BWDsxii_.js} +1 -1
- package/dist/assets/{index-D-LfiN9o.js → index-Bi0nnFEo.js} +1 -1
- package/dist/assets/{index-D9XGO23S.js → index-BitxghdI.js} +3 -3
- package/dist/assets/{index-DGDUIal5.js → index-BmTUrmH1.js} +1 -1
- package/dist/assets/{index-CIOQij4h.js → index-Bo967wkH.js} +1 -1
- package/dist/assets/{index-DAw4DSiR.js → index-BpFBX3ml.js} +1 -1
- package/dist/assets/{index-OdvXHPqT.js → index-BvAtsQd5.js} +3 -3
- package/dist/assets/{index-ClLVAMtr.js → index-BynKznHT.js} +1 -1
- package/dist/assets/{index-Bj_Te32l.js → index-C1LQFMVr.js} +1 -1
- package/dist/assets/{index-Y2ocg0We.js → index-C2JKqeAe.js} +1 -1
- package/dist/assets/{index-BShBVqEp.js → index-CB69gPUu.js} +1 -1
- package/dist/assets/{index-D9nLQXCy.js → index-CDf35iqn.js} +1 -1
- package/dist/assets/{index-DCkFWlji.js → index-CKY6mjuF.js} +1 -1
- package/dist/assets/{index-CTpUEnRG.js → index-CKv8PhTc.js} +1 -1
- package/dist/assets/{index-COFGt098.js → index-CNz77lZT.js} +1 -1
- package/dist/assets/{index-C3erfPAZ.js → index-CPqsIwYV.js} +3 -3
- package/dist/assets/{index-Dsvvy8_K.js → index-CYZ78qFI.js} +1 -1
- package/dist/assets/{index-BWyeLBJr.js → index-CZ8jsJu9.js} +1 -1
- package/dist/assets/{index-CN-8L-fW.js → index-Cg9PrZFL.js} +1 -1
- package/dist/assets/index-CmKeQSLC.js +1 -0
- package/dist/assets/{index-BLMobR0e.js → index-Cn-6wztm.js} +1 -1
- package/dist/assets/{index-H1nowJu-.js → index-CqgcvSrI.js} +1 -1
- package/dist/assets/{index-CPewySJ_.js → index-Cst_GbVp.js} +1 -1
- package/dist/assets/{index-DPKaJazb.js → index-CvPFmloQ.js} +1 -1
- package/dist/assets/{index-ChZ3ki2X.js → index-CxDumZ3y.js} +9 -9
- package/dist/assets/{index-COql_jsK.js → index-DBip_c5f.js} +1 -1
- package/dist/assets/{index-BMcGNp8z.js → index-DPRVx4ek.js} +3 -3
- package/dist/assets/{index-Cx9xeHC7.js → index-Dqnz6VXa.js} +1 -1
- package/dist/assets/{index-0496i8uI.js → index-Dsoqycrd.js} +2 -2
- package/dist/assets/{index-4ozQpL9g.js → index-Dv-ACCVn.js} +1 -1
- package/dist/assets/{index-BTOhdwnt.js → index-DyeX_qg7.js} +1 -1
- package/dist/assets/{index-2hrGtHmX.js → index-JGiTsamG.js} +1 -1
- package/dist/assets/{index-BUw2Zomp.js → index-KMm33XHL.js} +1 -1
- package/dist/assets/{index-DDIG3-mk.js → index-Pr52m2qZ.js} +1 -1
- package/dist/assets/{index-R68RI5nS.js → index-S7znBZmC.js} +1 -1
- package/dist/assets/{index-Mg5Ud6gu.js → index-aJIykGoH.js} +1 -1
- package/dist/assets/{index-C1YX-486.js → index-bvnJ1qfi.js} +1 -1
- package/dist/assets/{index-DKPVTl-I.js → index-f3wFrDOj.js} +1 -1
- package/dist/assets/{index-x8ZFxnS7.js → index-hrs7Mhjt.js} +1 -1
- package/dist/assets/{index.esm-Dt7UO6Gw.js → index.esm-LjN1Hm60.js} +1 -1
- package/dist/assets/{install-from-url-DP36MlN0.js → install-from-url-CCmRaPIQ.js} +1 -1
- package/dist/assets/{invitation-Iv5T__li.js → invitation-DNn6S4p1.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DVbPRsdH.js → is-path-prefix-equal-DceJmX9J.js} +1 -1
- package/dist/assets/{item-D5nrOHxx.js → item-Bg87F2Pj.js} +1 -1
- package/dist/assets/{javascript-DwMwjVUG.js → javascript-CImnwSoz.js} +1 -1
- package/dist/assets/{jsonMode-Dw4fMRhD.js → jsonMode-Bj5PmjjW.js} +1 -1
- package/dist/assets/{liquid-9EaYCIu3.js → liquid-CmLkJX3a.js} +1 -1
- package/dist/assets/{list-header-DofW2Ftc.js → list-header-C3WTZrdD.js} +1 -1
- package/dist/assets/{log-DaGgK84T.js → log-Dy47Mxwd.js} +1 -1
- package/dist/assets/{lottie-react.esm-tNmLlP7P.js → lottie-react.esm-DxER1I_l.js} +1 -1
- package/dist/assets/{mdx-WQ_--1yL.js → mdx-BtCUya4x.js} +1 -1
- package/dist/assets/{memory-BPr31Oys.js → memory-Ca4JR3KI.js} +1 -1
- package/dist/assets/{metric-D2ucAHiH.js → metric-CDR_xfqd.js} +1 -1
- package/dist/assets/omit-Cwb_YFfu.js +1 -0
- package/dist/assets/{overview-CCPEnAHB.js → overview-Bvtmyxun.js} +1 -1
- package/dist/assets/{permission-CUvNs2Zv.js → permission-EJYXw2v1.js} +1 -1
- package/dist/assets/{preference-BN0Jy77b.js → preference-CXe14Osu.js} +3 -3
- package/dist/assets/{python-C_uQOER7.js → python-CLcFjgec.js} +1 -1
- package/dist/assets/{raf-schd.esm-DUMXV33K.js → raf-schd.esm-9isuMxk8.js} +1 -1
- package/dist/assets/{razor-Bf6ygvvd.js → razor-BgYyruii.js} +1 -1
- package/dist/assets/{rotate-session-key-BdVsr217.js → rotate-session-key-CQB3pXN4.js} +1 -1
- package/dist/assets/{runtime-B54DBemf.js → runtime-B6StkUNa.js} +1 -1
- package/dist/assets/schema-Wv54HyG9.js +1 -0
- package/dist/assets/sdk-B2qcFc0E.js +1 -0
- package/dist/assets/{service-CcQaRfy1.js → service-BAFeuouA.js} +1 -1
- package/dist/assets/{shorten-label-CPrM7klu.js → shorten-label-B0m7WWm_.js} +1 -1
- package/dist/assets/{simple-select-Y6nLlyX-.js → simple-select-D5DhspLn.js} +1 -1
- package/dist/assets/{spaces-DfU2dhr-.js → spaces-BkLlvJlV.js} +1 -1
- package/dist/assets/{status-tQggAyS9.js → status-5TKR4Tl2.js} +1 -1
- package/dist/assets/{status-DjEtZNUr.js → status-D7zoO7lM.js} +1 -1
- package/dist/assets/{switch-control-LS_NeTom.js → switch-control-BJ9fbw3I.js} +1 -1
- package/dist/assets/{table-icons-LUDdTh3T.js → table-icons-DLsn7GMI.js} +1 -1
- package/dist/assets/{team-Dyq5wP2P.js → team-16Ujfno4.js} +1 -1
- package/dist/assets/{toLower-B8SBWvWe.js → toLower-CS_hmd2O.js} +1 -1
- package/dist/assets/toUpper-BiLpQm9G.js +1 -0
- package/dist/assets/{traffic-DgBk3o2N.js → traffic-BxsvLDRQ.js} +1 -1
- package/dist/assets/{tsMode-_qFiyVuf.js → tsMode-CN8rErtn.js} +1 -1
- package/dist/assets/{typescript-BClkULc3.js → typescript-DSffZA-5.js} +1 -1
- package/dist/assets/{url-evaluation-DgbmtLnr.js → url-evaluation-DFMzofgY.js} +1 -1
- package/dist/assets/{url-join-CTs-nsh5.js → url-join-D3PSxY2b.js} +1 -1
- package/dist/assets/{use-mobile-Yz2bScih.js → use-mobile-DNj1DdUP.js} +1 -1
- package/dist/assets/{use-mobile-BeKGXAC7.js → use-mobile-fMZ70tR1.js} +1 -1
- package/dist/assets/{useAsync-DkpPqR2N.js → useAsync-BD45gcWH.js} +1 -1
- package/dist/assets/{useAsyncRetry-Xbq1Vu1J.js → useAsyncRetry-D0_e0qFz.js} +1 -1
- package/dist/assets/{useLocalStorage-BRX7xEeE.js → useLocalStorage-bjVpdIUp.js} +1 -1
- package/dist/assets/{useThemeProps-B8kKGfuj.js → useThemeProps-BqbmQYZm.js} +1 -1
- package/dist/assets/{util-Cw9ZhkhZ.js → util-DwHVn3ka.js} +1 -1
- package/dist/assets/{wait-container-CESBMuDe.js → wait-container-BI50IOrN.js} +1 -1
- package/dist/assets/{without-wallet-DfzBh9gC.js → without-wallet-CmBFe6LE.js} +1 -1
- package/dist/assets/{wrap-locale-Bz8sQEwG.js → wrap-locale-C-kUviiw.js} +1 -1
- package/dist/assets/{xml-DgLvDwTZ.js → xml-DlNxIUrd.js} +1 -1
- package/dist/assets/{yaml-CBYpsbMl.js → yaml-kJOY6oFY.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-CPMzkOwU.js +0 -1
- package/dist/assets/api-DHdVnqwS.js +0 -1
- package/dist/assets/client-CSeQ4CUw.js +0 -1
- package/dist/assets/cloneDeep-DrWSOVhF.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-DKCrrwkN.js +0 -1
- package/dist/assets/engine-Cere5Eel.js +0 -1
- package/dist/assets/getValidReactChildren-UBZRExQI.js +0 -1
- package/dist/assets/index-B_D_eWlx.js +0 -1
- package/dist/assets/omit-BPHBFoDu.js +0 -1
- package/dist/assets/schema-C8eqaAts.js +0 -1
- package/dist/assets/sdk-B2QHgBcr.js +0 -1
- package/dist/assets/toUpper-z0GOUGgF.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as d,cs as z,c0 as U,ct as F,cu as X,aG as H,j as t,s as _,o as j,F as V,aP as B,g as G,cv as O,w as D,N as p,cw as J,W as Q,v as L,b7 as q,T as I,cx as M,L as K,cy as Y,bE as Z,cz as ee,cA as te,u as se,x as ae,bw as oe,ar as ne,af as re}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-aJIykGoH.js","./index-BvAtsQd5.js","./index-DGkT7afN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as d,cs as z,c0 as U,ct as F,cu as X,aG as H,j as t,s as _,o as j,F as V,aP as B,g as G,cv as O,w as D,N as p,cw as J,W as Q,v as L,b7 as q,T as I,cx as M,L as K,cy as Y,bE as Z,cz as ee,cA as te,u as se,x as ae,bw as oe,ar as ne,af as re}from"./index-BvAtsQd5.js";import{V as ie}from"./ViewList-CPmudwlq.js";import{D as ce}from"./Done-DQFntFgi.js";import{N as le}from"./index-BpFBX3ml.js";import{w as pe}from"./wrap-locale-C-kUviiw.js";import{g as de}from"./get-safe-url-CMpu7B-v.js";import{S as ue,a as me,b as he}from"./Stepper-DNM_ADcd.js";import"./emotion-cache.browser.esm-Cm-YvbUu.js";var P=function(e){if(!e)return 0;var r=X(e).valueOf()-Date.now();return r<0?0:r},fe=function(e){return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},xe=function(e){e===void 0&&(e={});var r=e||{},l=r.leftTime,i=r.targetDate,u=r.interval,b=u===void 0?1e3:u,x=r.onEnd,g=d.useMemo(function(){return z(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in e?g:i,h=U(d.useState(function(){return P(a)}),2),f=h[0],m=h[1],o=F(x);d.useEffect(function(){if(!a){m(0);return}m(P(a));var v=setInterval(function(){var n,c=P(a);m(c),c===0&&(clearInterval(v),(n=o.current)===null||n===void 0||n.call(o))},b);return function(){return clearInterval(v)}},[a,b]);var w=d.useMemo(function(){return fe(f)},[f]);return[f,w]};const ge=H(t.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}));function E({list:e=[],width:r=300,height:l=400,cardSpace:i=40,onSelect:u=()=>{},defaultIndex:b=0}){const[x,g]=d.useState(0),[a,h]=d.useState(0),f=d.useRef(null),m=n=>{if(n<0||n>e.length-1)return;g(n);const c=f.current.clientWidth;h(n*(r+i)-(c-r)/2+i*.5),u(n)};d.useEffect(()=>{m(b);const n=c=>c.preventDefault();f.current.addEventListener("touchmove",n,{passive:!1})},[]);let o;const w=n=>{o=n.touches[0].clientX},v=n=>{const c=n.changedTouches[0],k=o-c.clientX;Math.abs(k)>60&&(k>0?m(x+1):m(x-1))};return t.jsx(ve,{ref:f,onTouchStart:w,onTouchEnd:v,children:t.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:e.map((n,c)=>t.jsx("div",{className:`card-item ${c===x?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>m(c),children:n.display?t.jsx("div",{className:"card-content",children:t.jsx(le,{data:n.display,style:{width:"100%",height:"100%"}})}):t.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ve=_.div`
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
5
5
|
overflow: hidden;
|
|
@@ -33,7 +33,7 @@ import{r as d,cs as z,c0 as U,ct as F,cu as X,aG as H,j as t,s as _,o as j,F as
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;E.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};function be({icon:e,active:r,completed:l}){const i={1:t.jsx(ie,{className:"step-icon"}),2:t.jsx(ge,{className:"step-icon"}),3:t.jsx(ce,{className:"step-icon"})},u=["step-icon-w"];return r&&u.push("step-icon-w--active"),l&&u.push("step-icon-w--completed"),t.jsx("div",{className:u.join(" "),children:i[String(e)]})}function we({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:u,teamDid:b}){const{api:x}=d.useContext(e),g=V(s=>s.breakpoints.down("sm")),a=B({user:null,passport:null,success:!1,activeStep:0}),h=d.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:m}=Y(),{t:o,locale:w}=d.useContext(G),{wallet:v}=O(),[n,c]=d.useState(0),{searchParams:k}=new URL(window.location.href),S=()=>{a.activeStep++},$=s=>{a.user=s.user},W=()=>{S()},A=(s,y)=>{s?.passportId&&f(s.passportId),s?.sessionToken&&(h.current.sessionToken=y(s.sessionToken)),s?.refreshToken&&(h.current.refreshToken=y(s.refreshToken)),a.success=!0,S()},T=async()=>{if(v&&M()){Z(()=>import("./index-
|
|
36
|
+
`;E.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};function be({icon:e,active:r,completed:l}){const i={1:t.jsx(ie,{className:"step-icon"}),2:t.jsx(ge,{className:"step-icon"}),3:t.jsx(ce,{className:"step-icon"})},u=["step-icon-w"];return r&&u.push("step-icon-w--active"),l&&u.push("step-icon-w--completed"),t.jsx("div",{className:u.join(" "),children:i[String(e)]})}function we({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:u,teamDid:b}){const{api:x}=d.useContext(e),g=V(s=>s.breakpoints.down("sm")),a=B({user:null,passport:null,success:!1,activeStep:0}),h=d.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:m}=Y(),{t:o,locale:w}=d.useContext(G),{wallet:v}=O(),[n,c]=d.useState(0),{searchParams:k}=new URL(window.location.href),S=()=>{a.activeStep++},$=s=>{a.user=s.user},W=()=>{S()},A=(s,y)=>{s?.passportId&&f(s.passportId),s?.sessionToken&&(h.current.sessionToken=y(s.sessionToken)),s?.refreshToken&&(h.current.refreshToken=y(s.refreshToken)),a.success=!0,S()},T=async()=>{if(v&&M()){Z(()=>import("./index-aJIykGoH.js").then(y=>y.i),__vite__mapDeps([0,1,2]),import.meta.url).then(y=>{y.call("arcClosePage")});return}ee(u)&&u({sessionToken:h.current.sessionToken,refreshToken:h.current.refreshToken});const s=k.get("redirect");if(s){window.location.replace(de(s));return}m(),window.location.replace("/")},R=s=>{a.passport=s.target.value},[C]=xe({leftTime:n,onEnd:()=>{T()}}),N=[{label:o("lostPassport.recoverPassport"),content:()=>{if(!a.user){const s=k.get("scope")||"passport";return t.jsx(D,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:x.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:$,locale:w,messages:{title:o("lostPassport.recoverDialog.title"),scan:o("lostPassport.recoverDialog.scan"),confirm:o("lostPassport.recoverDialog.confirm"),success:o("lostPassport.recoverDialog.success")},extraParams:{scope:s}})}return t.jsxs(p,{className:"select-passport",children:[t.jsxs(p,{className:"user-info",sx:{my:1,display:"flex",alignItems:"center"},children:[t.jsx(J,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),t.jsxs(p,{children:[t.jsx(p,{className:"name",children:a.user.fullName}),t.jsx(p,{className:"did",sx:{mt:1},children:t.jsx(Q,{responsive:!g,compact:g,did:a.user.did})})]})]}),t.jsx(p,{children:t.jsx(E,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(s=>({src:l({scope:s.scope,role:s.role,title:s.scope==="kyc"?s.name:s.title,issuer:s.issuer.name,issuerDid:s.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto",extra:s.scope==="kyc"?{key:"Email",value:s.name}:void 0}),name:s.title,id:s.id,display:s.display})),onSelect:s=>R({target:{value:a.user.passportTypes[s].id}}),defaultIndex:0})}),t.jsx(p,{sx:{textAlign:"center"},children:t.jsx(L,{variant:"contained",color:"primary",onClick:()=>W(),disabled:!a.passport,children:o("common.next")})})]})}},{label:o("lostPassport.receivePassport"),content:()=>{const s={receiverDid:a.user.did,passportId:a.passport,teamDid:b||window?.blocklet?.did};return t.jsx(D,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:x.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:A,forceConnected:!1,locale:w,messages:{title:`${o("lostPassport.receiveDialog.title")}`,scan:o("lostPassport.receiveDialog.scan"),confirm:o("lostPassport.receiveDialog.confirm"),success:o("lostPassport.receiveDialog.success")},extraParams:s})}},{label:o("common.complete"),content:()=>(n===0&&c(3e3),t.jsxs(p,{sx:{textAlign:"center"},children:[t.jsx(p,{sx:{mb:3,color:"success.main"},children:t.jsx(q,{style:{fontSize:60}})}),t.jsx(I,{component:"p",variant:"body1",className:"subheader",children:o("issuePassport.dialog.success")}),t.jsx(I,{component:"p",variant:"body2",color:"gray",children:v&&M()?o("issuePassport.dialog.autoClose",{seconds:Math.round(C/1e3)}):o("issuePassport.dialog.autoJump",{seconds:Math.round(C/1e3)})}),t.jsx(L,{style:{marginTop:40},variant:"contained",color:"primary",onClick:T,children:o("issuePassport.dialog.loginWithPassport")})]}))}];return t.jsx(ye,{children:t.jsxs(p,{className:"stepper",children:[t.jsx(ue,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:N.map(({label:s})=>t.jsx(me,{children:t.jsx(he,{slots:{stepIcon:be},children:s})},s))}),t.jsx(p,{className:"stepper-content",children:N[a.activeStep].content()}),!a.success&&t.jsx(p,{sx:{textAlign:"center",fontSize:12},children:t.jsx(K,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:o("lostPassport.return")})})]})})}const ye=_(te)`
|
|
37
37
|
padding-top: 46px;
|
|
38
38
|
padding-bottom: 46px;
|
|
39
39
|
height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,g as n,j as t,s as r}from"./index-
|
|
1
|
+
import{r as o,g as n,j as t,s as r}from"./index-BvAtsQd5.js";import{p as a}from"./index-Bo967wkH.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as O,u as W,r as i,a as R,b as D,j as e,o as y,d as H,e as Q,g as Y,f as F,W as U,L as X,p as j,h as J,i as k,T as h,G as v,k as K,l as z,s as q,C as Z}from"./index-
|
|
1
|
+
import{c as O,u as W,r as i,a as R,b as D,j as e,o as y,d as H,e as Q,g as Y,f as F,W as U,L as X,p as j,h as J,i as k,T as h,G as v,k as K,l as z,s as q,C as Z}from"./index-BvAtsQd5.js";import{f as ee}from"./index-BojVbZw0.js";import{v as $}from"./index-bvnJ1qfi.js";import{M as V}from"./metric-CDR_xfqd.js";import{C as M}from"./click-to-copy-DX5jjk2s.js";var ne=O(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const B=i.createContext({}),{Provider:se,Consumer:xe}=B;function ae({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R(D.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R(D.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R(D.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(se,{value:{users:b},children:a})}function te(){const{users:a}=i.useContext(B);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},re=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const oe=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function ie(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=H(),{users:c}=te(),t=Q(()=>oe(d)),{t:s,locale:p}=i.useContext(Y),_=F(),f=re(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:z(p)};return K(o,m)});let b=null;if(r)b=e.jsx(Z,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(U,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(U,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(U,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(X,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(J(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const L=c.length,A=c.filter(n=>n.approved).length;let P=L;A&&(P+=`<small><strong>${ne(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>n.status==="running").length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>n.status==="running").length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const G=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ee(new Date(a.createdAt).getTime(),z(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:G.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx($,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx($,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx($,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(le,{children:b})}const le=q.main`
|
|
2
2
|
.page-header {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as Ge,j as e,bn as gt,r as g,by as X,bf as K,H as q,E as D,p as xt,o as d,h as te,au as bt,az as jt,N as y,T as $,m as Q,eN as Fe,Q as Pe,ig as Ye,bj as Te,aU as Ie,V as Ee,dH as we,b3 as Ue,b1 as Ae,C as Xe,f as Qe,e$ as Je,aP as De,W as yt,at as Ze,ih as et,v as Oe,f1 as tt,fn as ye,fH as st,dB as St,s as ie,ag as pe,G as qe,av as vt,ii as Ct,ij as Nt,$ as nt,ik as wt,il as Rt,im as Tt,io as It,P as Et,bt as it,M as At,R as Dt,S as Ot,U as $e,ip as Lt,a4 as kt}from"./index-OdvXHPqT.js";import{d as Ft,H as at,g as Pt}from"./index-Y2ocg0We.js";import{R as _e,S as _t}from"./actions-BfeIbo_G.js";import{B as Bt}from"./index-ClLVAMtr.js";import{S as me}from"./shorten-label-CPrM7klu.js";import{v as ot}from"./index-C1YX-486.js";import{T as zt}from"./html-title-F0NEfYXw.js";import{R as Wt}from"./Refresh-L5IK_LF1.js";import{D as Mt,g as Ht}from"./traffic-DgBk3o2N.js";import{u as Kt}from"./use-mobile-Yz2bScih.js";import"./FilterList-BnK3OcNB.js";import"./CSSTransition-CgU-qJG1.js";import"./emotion-cache.browser.esm-DKCrrwkN.js";import"./index-2hrGtHmX.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BxsaWGVI.js";import"./index-BShBVqEp.js";import"./TableSearch-BfqBG8KC.js";import"./Search-2a28Zd0Q.js";import"./Clear-D0eiF7LM.js";import"./MoreVert-Bg7SRP_I.js";import"./useLocalStorage-BRX7xEeE.js";import"./url-evaluation-DgbmtLnr.js";import"./get-safe-url-DG3hbVuw.js";import"./ButtonGroup-B8CEk0Fm.js";import"./getValidReactChildren-UBZRExQI.js";import"./permission-CUvNs2Zv.js";import"./index.esm-Dt7UO6Gw.js";import"./collapse-Co_76D-y.js";import"./blocklet-BwXw89V1.js";import"./Switch-iXfQHCNE.js";import"./iframe-B5DJ8-Ji.js";import"./ChevronLeft-Mrf8wNcO.js";import"./ChevronRight-CgNj8oK3.js";import"./index-DBii9-f-.js";import"./base-chart-CPd4vePQ.js";import"./index-DDIG3-mk.js";import"./AdapterDayjs-DPswIgNd.js";import"./useThemeProps-B8kKGfuj.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.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"})),qt=Ge(e.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"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return q.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},U=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw q.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:U,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(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})}]:[],je=(t=[])=>{const s=K().startOf("day");return t.filter(n=>K(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(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},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({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 se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.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 ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=K().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){q.error("Please select a date range");return}if(K(f.startDate).isAfter(f.endDate)||!K(f.startDate).isValid()||!K(f.endDate).isValid()){q.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{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(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function He({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}He.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{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}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,U]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{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"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],H=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(H,h.emailSendStatus)||S(M=>({...M,emailSendStatus:H,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,U(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){q.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const H=i.currentTarget,M=H.getBoundingClientRect();P.anchorEl=H,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}U({channel:c});try{const H=await oe(c,o.receiver);await be(1),U({channel:c,result:H}),(typeof H=="boolean"&&H||St(H)&&Object.values(H).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(H){q.error(H.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{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:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:H=>R(H,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(He,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(qt,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
|
|
1
|
+
import{aG as Ge,j as e,bn as gt,r as g,by as X,bf as K,H as q,E as D,p as xt,o as d,h as te,au as bt,az as jt,N as y,T as $,m as Q,eN as Fe,Q as Pe,ig as Ye,bj as Te,aU as Ie,V as Ee,dH as we,b3 as Ue,b1 as Ae,C as Xe,f as Qe,e$ as Je,aP as De,W as yt,at as Ze,ih as et,v as Oe,f1 as tt,fn as ye,fH as st,dB as St,s as ie,ag as pe,G as qe,av as vt,ii as Ct,ij as Nt,$ as nt,ik as wt,il as Rt,im as Tt,io as It,P as Et,bt as it,M as At,R as Dt,S as Ot,U as $e,ip as Lt,a4 as kt}from"./index-BvAtsQd5.js";import{d as Ft,H as at,g as Pt}from"./index-C2JKqeAe.js";import{R as _e,S as _t}from"./actions-DkMO_r4a.js";import{B as Bt}from"./index-BynKznHT.js";import{S as me}from"./shorten-label-B0m7WWm_.js";import{v as ot}from"./index-bvnJ1qfi.js";import{T as zt}from"./html-title-Cx_lv4tS.js";import{R as Wt}from"./Refresh-DMoyFjzc.js";import{D as Mt,g as Ht}from"./traffic-BxsvLDRQ.js";import{u as Kt}from"./use-mobile-DNj1DdUP.js";import"./FilterList-DcOJVDM2.js";import"./CSSTransition-BIUxaspZ.js";import"./emotion-cache.browser.esm-Cm-YvbUu.js";import"./index-JGiTsamG.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-D6ZeS2iD.js";import"./index-CB69gPUu.js";import"./TableSearch-BuzsZxHI.js";import"./Search-BvWmcM2k.js";import"./Clear-DSDAa0M4.js";import"./MoreVert-DH4Y2k9h.js";import"./useLocalStorage-bjVpdIUp.js";import"./url-evaluation-DFMzofgY.js";import"./get-safe-url-CMpu7B-v.js";import"./ButtonGroup-D2nbA04k.js";import"./getValidReactChildren-CFOO2Xyb.js";import"./permission-EJYXw2v1.js";import"./index.esm-LjN1Hm60.js";import"./collapse-D0TcL3yf.js";import"./blocklet-DISJHp6B.js";import"./Switch-CAccGI-e.js";import"./iframe-DYiNwxlH.js";import"./ChevronLeft-T8dPGT4o.js";import"./ChevronRight-BmNY6NuE.js";import"./index-DBii9-f-.js";import"./base-chart-DQ401Lk6.js";import"./index-Pr52m2qZ.js";import"./AdapterDayjs-B454wUKi.js";import"./useThemeProps-BqbmQYZm.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.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"})),qt=Ge(e.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"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return q.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},U=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw q.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:U,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(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})}]:[],je=(t=[])=>{const s=K().startOf("day");return t.filter(n=>K(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(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},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({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 se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.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 ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=K().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){q.error("Please select a date range");return}if(K(f.startDate).isAfter(f.endDate)||!K(f.startDate).isValid()||!K(f.endDate).isValid()){q.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{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(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function He({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}He.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{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}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,U]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{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"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],H=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(H,h.emailSendStatus)||S(M=>({...M,emailSendStatus:H,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,U(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){q.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const H=i.currentTarget,M=H.getBoundingClientRect();P.anchorEl=H,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}U({channel:c});try{const H=await oe(c,o.receiver);await be(1),U({channel:c,result:H}),(typeof H=="boolean"&&H||St(H)&&Object.values(H).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(H){q.error(H.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{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:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:H=>R(H,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(He,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(qt,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
|
|
2
2
|
td.MuiTableCell-footer {
|
|
3
3
|
border: none !important;
|
|
4
4
|
}
|