@abtnode/blocklet-services 1.17.8-beta-20260119-034126-467341b7 → 1.17.8-beta-20260121-102603-f9d0176f
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/dist/assets/{AdapterDayjs-CYW0YvmK.js → AdapterDayjs-QqQc9YbA.js} +1 -1
- package/dist/assets/{Google-DKRt92nm.js → Google-PffSpBc2.js} +1 -1
- package/dist/assets/{LottiePlayer.modern-CeQuigIa.js → LottiePlayer.modern-CE8erevJ.js} +1 -1
- package/dist/assets/access-control-B6JglGtO.js +14 -0
- package/dist/assets/actions-Do5Z9cxZ.js +64 -0
- package/dist/assets/{add-component-core-nc1ps0ni.js → add-component-core-CLOpD7CB.js} +21 -21
- package/dist/assets/add-resource-ipDE-D6W.js +1 -0
- package/dist/assets/{addon-DfWedLEC.js → addon-CrVdMlFe.js} +1 -1
- package/dist/assets/advanced-C3qjZMWH.js +14 -0
- package/dist/assets/{aigne-6nMSoyeQ.js → aigne-CeD5Xo7t.js} +1 -1
- package/dist/assets/api-BMcHDEnt.js +1 -0
- package/dist/assets/appearance-BJuIABu8.js +1 -0
- package/dist/assets/{ar-DOhYGTlW.js → ar-xXK-6slW.js} +1 -1
- package/dist/assets/audit-logs-DxVzMUJK.js +35 -0
- package/dist/assets/authorize-BxQgoA5F.js +1 -0
- package/dist/assets/{base-chart-DcZV4ZCI.js → base-chart-CQOyckBN.js} +1 -1
- package/dist/assets/{base32-7iZvvdX8.js → base32-CyUpiYTu.js} +1 -1
- package/dist/assets/bind-account-D5gBazop.js +1 -0
- package/dist/assets/branding-CDPvtKJm.js +40 -0
- package/dist/assets/{branding-CwSyd5WC.js → branding-CtbvPvdK.js} +3 -3
- package/dist/assets/branding-Dv3-0Q39.js +1 -0
- package/dist/assets/bundle-avatar-2ugE80w1.js +1 -0
- package/dist/assets/button-d8gvZuHP.js +1 -0
- package/dist/assets/{click-to-copy-BgIYUMoo.js → click-to-copy-CgakrWoh.js} +1 -1
- package/dist/assets/{cloneDeep-YxES7wNt.js → cloneDeep-q2Jbqwkh.js} +1 -1
- package/dist/assets/complete-B_lyTPVv.js +39 -0
- package/dist/assets/{component-CuKviNC8.js → component-pjnMydek.js} +37 -37
- package/dist/assets/config-BcCR6bUQ.js +1 -0
- package/dist/assets/config-BsWCoWa6.js +32 -0
- package/dist/assets/{config-D1OcHGlN.js → config-CyDF6KG9.js} +6 -6
- package/dist/assets/{config-navigation-hDihVsjx.js → config-navigation-B36NPLt0.js} +11 -11
- package/dist/assets/{config-space-DfstlHnF.js → config-space-DUkjNtdL.js} +1 -1
- package/dist/assets/{confirm-CdVn5WdC.js → confirm-CoDiNrSj.js} +1 -1
- package/dist/assets/{connect-CT2vMz6l.js → connect--GxmDNr3.js} +3 -3
- package/dist/assets/{connect-Dy0Y8HRB.js → connect-SOuN9k8I.js} +1 -1
- package/dist/assets/connect-ULEL84iL.js +1 -0
- package/dist/assets/connect-to-DnBUF-KE.js +1 -0
- package/dist/assets/{create-passport-svg-hldNORaB.js → create-passport-svg-BSRyjG0k.js} +1 -1
- package/dist/assets/{createClass-CgfWUrk8.js → createClass-DKvdNmc_.js} +1 -1
- package/dist/assets/dashboard-CkDdshHQ.js +93 -0
- package/dist/assets/{de-CtKPdGk6.js → de-CzlQlDUl.js} +1 -1
- package/dist/assets/{delete-confirm-CkiUXocp.js → delete-confirm-Cq9MJasT.js} +1 -1
- package/dist/assets/{did-address-CG36eCOx.js → did-address-CtvTDc_I.js} +1 -1
- package/dist/assets/{domain-CDTeLbkZ.js → domain-BOIdkJ_V.js} +1 -1
- package/dist/assets/domain-action-card-DuiLZ6sE.js +28 -0
- package/dist/assets/domains-C5GLc_A-.js +1 -0
- package/dist/assets/email-DN8lH7fV.js +17 -0
- package/dist/assets/engine-Crd5Z3lP.js +1 -0
- package/dist/assets/{es-BSYtSZPg.js → es-BpsyeJfJ.js} +1 -1
- package/dist/assets/exchange-passport-BvS_8Ud6.js +1 -0
- package/dist/assets/{fallback-D-IHOW-7.js → fallback-CuXkR699.js} +1 -1
- package/dist/assets/{form-Co-tgocU.js → form-CZjONW3r.js} +3 -3
- package/dist/assets/{form-text-input-CPLafaTk.js → form-text-input-BT3t62-a.js} +1 -1
- package/dist/assets/{fr-C35fi7h9.js → fr-BawgvFA1.js} +1 -1
- package/dist/assets/{fuel-BFx1ShM2.js → fuel-dijAR437.js} +1 -1
- package/dist/assets/gen-access-key-DaJCt-T5.js +1 -0
- package/dist/assets/gen-simple-access-key-DLZy8UKi.js +1 -0
- package/dist/assets/get-safe-url-czY77v8f.js +1 -0
- package/dist/assets/hi-ClGNxnSL.js +5 -0
- package/dist/assets/home-ChU7yi5l.js +1 -0
- package/dist/assets/{id-DoVb0JYr.js → id-_HQ0of3E.js} +1 -1
- package/dist/assets/{iframe-DUzp97tk.js → iframe-CYVXxx1r.js} +1 -1
- package/dist/assets/index-5RRpshJe.js +200 -0
- package/dist/assets/index-5Sys1Zsb.js +6 -0
- package/dist/assets/{index-Di2nSesc.js → index-B4A3W4qJ.js} +1 -1
- package/dist/assets/index-B4EOqUNT.js +1 -0
- package/dist/assets/{index-D1Fa760B.js → index-B5VPb4FA.js} +1 -1
- package/dist/assets/{index-C_kNXHsF.js → index-B9YNNXOw.js} +1 -1
- package/dist/assets/index-BDSBuO5S.js +7 -0
- package/dist/assets/{index-2M4w6J9r.js → index-BOoRVhLj.js} +3 -3
- package/dist/assets/{index-Bo9KtpTY.js → index-BVTsYhIX.js} +1 -1
- package/dist/assets/index-Boc2cNQ7.js +150 -0
- package/dist/assets/{index-D6pCyJv8.js → index-C2O2gJSR.js} +1 -1
- package/dist/assets/{index-8RHrVCC6.js → index-C3UXSk-k.js} +1 -1
- package/dist/assets/index-C6vJzTmT.js +81 -0
- package/dist/assets/index-CD7hq5dy.js +124 -0
- package/dist/assets/{index-3H6a5edM.js → index-CNlJloMN.js} +1 -1
- package/dist/assets/{index-D3BuekEe.js → index-CVuESID5.js} +5 -5
- package/dist/assets/{index-CEJb82tA.js → index-CZ-qZTKi.js} +1 -1
- package/dist/assets/{index-VKjWmvRV.js → index-Ci7zZ36D.js} +1 -1
- package/dist/assets/{index-CfvGuvbD.js → index-D7Er4cge.js} +1 -1
- package/dist/assets/{index-C1fKsLzf.js → index-D8oCzSQW.js} +1 -1
- package/dist/assets/{index-BUhEyicQ.js → index-DF1j89BT.js} +1 -1
- package/dist/assets/{index-DH4rC-7M.js → index-DGZbt7_m.js} +1 -1
- package/dist/assets/index-DKeuwD_Y.js +242 -0
- package/dist/assets/{index-DFUM0Pvk.js → index-Dn9eNAe6.js} +1 -1
- package/dist/assets/index-DswHt4-F.js +88 -0
- package/dist/assets/{index-DqcciDRh.js → index-Dvc-Bpkc.js} +2 -2
- package/dist/assets/index-NHiSMvgy.js +120 -0
- package/dist/assets/{index-Cx0E03Bs.js → index-WzGP4BGm.js} +1 -1
- package/dist/assets/{index-CqCXPf7W.js → index-Zxy2t-7f.js} +1 -1
- package/dist/assets/index-iOa1BVMr.js +280 -0
- package/dist/assets/index-s8xAfo-W.js +1 -0
- package/dist/assets/index-tRQj1y79.js +6 -0
- package/dist/assets/{index-ZzcJ7eKO.js → index-uUS1eXYF.js} +1 -1
- package/dist/assets/index-yoaLEniz.js +832 -0
- package/dist/assets/info-outline-rounded-DovRYvXo.js +1 -0
- package/dist/assets/{invitation-BP8hOEFv.js → invitation-DAWt0g1f.js} +3 -3
- package/dist/assets/{invitations-C8aZLxdl.js → invitations-B18y415k.js} +2 -2
- package/dist/assets/invite-DNSyQ-zG.js +1 -0
- package/dist/assets/issue-passport-Dd43b9Se.js +1 -0
- package/dist/assets/item-Cr70mAvV.js +1 -0
- package/dist/assets/{ja-DZPUwZ9l.js → ja-LErFaY57.js} +1 -1
- package/dist/assets/{ko-q4i4r9g6.js → ko-D4ub28je.js} +1 -1
- package/dist/assets/{landing-page-JLA-ZD1t.js → landing-page-CZoTtLnc.js} +1 -1
- package/dist/assets/layout-U4Obhm5w.js +29 -0
- package/dist/assets/list-BD3g0v2E.js +2 -0
- package/dist/assets/{list-3MUy-8Ol.js → list-D-9AeBju.js} +3 -3
- package/dist/assets/localization-ByZI4mSj.js +1 -0
- package/dist/assets/{log-Bq445Z1e.js → log-BWxaKOTA.js} +1 -1
- package/dist/assets/logger-B962sOsB.js +1 -0
- package/dist/assets/login-BWZaWrBW.js +1 -0
- package/dist/assets/login-method-item-aEisznLn.js +1 -0
- package/dist/assets/{login-oauth-callback-Bext19kc.js → login-oauth-callback-CB-osgdG.js} +1 -1
- package/dist/assets/{logo-uploader-CyZuvhwV.js → logo-uploader-DOPycN59.js} +1 -1
- package/dist/assets/{lost-passport-BiYg3QQI.js → lost-passport-H1fCptmJ.js} +2 -2
- package/dist/assets/metadata-DftwYKum.js +55 -0
- package/dist/assets/{nav-menu-DSdXRbfg.js → nav-menu-D7Sf6VZj.js} +1 -1
- package/dist/assets/{omit-Dq0FLBY8.js → omit-vVhnMpHQ.js} +1 -1
- package/dist/assets/{open-window-Dyu79ome.js → open-window-By98Pw1o.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-DzUsy6q0.js → over-due-invoice-payment-DeFNS-Us.js} +1 -1
- package/dist/assets/overview-DEkktSML.js +116 -0
- package/dist/assets/passport-BxMVp3TG.js +1 -0
- package/dist/assets/passport-item-CIv8Q8Ng.js +1 -0
- package/dist/assets/{permission-CvrrGfG6.js → permission-B22pCnUb.js} +1 -1
- package/dist/assets/preferences-BY_s4EkY.js +1 -0
- package/dist/assets/profile-embed-DUKyv_oX.js +1 -0
- package/dist/assets/provider-icon-DbnLu_85.js +1 -0
- package/dist/assets/pt-BU7pvSz6.js +5 -0
- package/dist/assets/{publish-resource-CMuHIOUf.js → publish-resource-Be5Gs98x.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-CWJ5I9Zv.js → react-beautiful-dnd.esm-D7zp9L4b.js} +1 -1
- package/dist/assets/ru-CtjyU-qF.js +5 -0
- package/dist/assets/{runtime-B_ZLP4FF.js → runtime-MjoLSEeg.js} +1 -1
- package/dist/assets/{sanitize-Bzl4lTuH.js → sanitize-BHeUjEo7.js} +1 -1
- package/dist/assets/sdk-Dy-R7tw7.js +1 -0
- package/dist/assets/security-BtD9TnGk.js +22 -0
- package/dist/assets/session-UEzmH-IS.js +1 -0
- package/dist/assets/setup-Bts0WUxD.js +24 -0
- package/dist/assets/simple-select-C6gRUbia.js +1 -0
- package/dist/assets/{spaces-ix8u0ZiI.js → spaces-DtMVp8Fn.js} +1 -1
- package/dist/assets/start-Dabk9waT.js +187 -0
- package/dist/assets/{starting-progress-CWp5fTY0.js → starting-progress-Ds2lnMge.js} +1 -1
- package/dist/assets/{status-Dn_LKaNp.js → status-CicPnfGJ.js} +1 -1
- package/dist/assets/{step-actions-DIZRcnXf.js → step-actions-CnJCnymc.js} +1 -1
- package/dist/assets/{studio-CVIa8-XY.js → studio-D7qZJqJ7.js} +1 -1
- package/dist/assets/{switch-control-BRjXGc1d.js → switch-control-C5gj6NIz.js} +1 -1
- package/dist/assets/{switch-BbyTGEOo.js → switch-qh9YpwMi.js} +1 -1
- package/dist/assets/{table-tips-Dvmdodc5.js → table-tips-BSl1oNMX.js} +1 -1
- package/dist/assets/team-Djzt5BWc.js +146 -0
- package/dist/assets/th-C0DkNnMF.js +5 -0
- package/dist/assets/theme-mode-toggle-Jvn37gNg.js +1 -0
- package/dist/assets/traffic-BtuX1qMz.js +1 -0
- package/dist/assets/transfer-UdrQjD9F.js +16 -0
- package/dist/assets/unsubscribe-Bj2S8OkH.js +1 -0
- package/dist/assets/{use-app-logo-IRizt64R.js → use-app-logo-DyU2iSXF.js} +1 -1
- package/dist/assets/{use-blocklet-logo-Cf1j7pQz.js → use-blocklet-logo-ys-h-CV_.js} +1 -1
- package/dist/assets/{use-window-close-Dpj5UcYT.js → use-window-close-CT9brY7I.js} +1 -1
- package/dist/assets/{useAsync-CkKfnulP.js → useAsync-DbIyJl2v.js} +1 -1
- package/dist/assets/{useAsync-DfiOQMQ_.js → useAsync-WuOY1bFS.js} +1 -1
- package/dist/assets/{useAsyncRetry-C4R9ufi-.js → useAsyncRetry-cAGDIsw4.js} +1 -1
- package/dist/assets/{useLocalStorage-BQfIniHX.js → useLocalStorage-D8kgfBAn.js} +1 -1
- package/dist/assets/{user-center-6K47tx8j.js → user-center-DLgnUI1s.js} +5 -5
- package/dist/assets/{user-follower-BwzTutxU.js → user-follower-BbQfOSyh.js} +4 -4
- package/dist/assets/util-BCpVIbwL.js +1 -0
- package/dist/assets/util-tg9hB6_c.js +1 -0
- package/dist/assets/{vendor-arcblock-Dll6qxMT.js → vendor-arcblock-Xw2zMy0D.js} +1 -1
- package/dist/assets/{vendor-hooks-DAZ1H6Va.js → vendor-hooks-164oA5kM.js} +1 -1
- package/dist/assets/vendor-utils-BbcnEeJI.js +23 -0
- package/dist/assets/{vendor-ux-CLT2i3Pv.js → vendor-ux-BGqHwkOM.js} +10 -10
- package/dist/assets/vi-nXB9zTif.js +5 -0
- package/dist/assets/wait-connect-BED_xYYA.js +1 -0
- package/dist/assets/wallet-hidden-topbar-dnCLvPpW.js +68 -0
- package/dist/assets/wizard-C6DvqdjM.js +8 -0
- package/dist/assets/wizard-components-1u7l8zuE.js +52 -0
- package/dist/assets/wrap-locale-C2lxMNe7.js +1 -0
- package/dist/assets/{zh-G2I44gfs.js → zh-DK-_Edsp.js} +1 -1
- package/dist/assets/zh-QEwKQjt8.js +1 -0
- package/dist/assets/{zh-tw-C4Juvs-i.js → zh-tw-Us2SjBNr.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +24 -24
- package/dist/assets/access-control-RI6LQbSm.js +0 -14
- package/dist/assets/actions-BlWED76c.js +0 -64
- package/dist/assets/add-resource-BVOdOQSW.js +0 -1
- package/dist/assets/advanced-CuKHqbLO.js +0 -14
- package/dist/assets/api-B8JXuhVp.js +0 -1
- package/dist/assets/appearance-C9TkbSjV.js +0 -1
- package/dist/assets/audit-logs-DKGke9hI.js +0 -35
- package/dist/assets/authorize-DkSqywe8.js +0 -1
- package/dist/assets/bind-account-DOwM9Nhe.js +0 -1
- package/dist/assets/branding-Cak2s8bn.js +0 -1
- package/dist/assets/branding-lcfxmmPp.js +0 -40
- package/dist/assets/bundle-avatar-DwiOyeMO.js +0 -1
- package/dist/assets/button-uUU4Wycr.js +0 -1
- package/dist/assets/complete-Udiv_yFp.js +0 -39
- package/dist/assets/config-6IwEgT3b.js +0 -32
- package/dist/assets/config-CJwxv2uK.js +0 -1
- package/dist/assets/connect-DA7RO2yv.js +0 -1
- package/dist/assets/connect-to-CQMUbQkH.js +0 -1
- package/dist/assets/dashboard-BvI3ii8Z.js +0 -93
- package/dist/assets/domain-action-card-kMPYS2Nj.js +0 -28
- package/dist/assets/domains-TI6o1CvX.js +0 -1
- package/dist/assets/email-DHRHueET.js +0 -17
- package/dist/assets/engine-D_fEFx9_.js +0 -1
- package/dist/assets/exchange-passport-Cc872mjQ.js +0 -1
- package/dist/assets/gen-access-key-DrgLVRbm.js +0 -1
- package/dist/assets/gen-simple-access-key-B24d6k7g.js +0 -1
- package/dist/assets/get-safe-url-beob4f2C.js +0 -1
- package/dist/assets/hi-5fpYJkiW.js +0 -5
- package/dist/assets/home-Dw18IODa.js +0 -1
- package/dist/assets/index--WQuhwJL.js +0 -6
- package/dist/assets/index-B-8044Gs.js +0 -280
- package/dist/assets/index-B6l4xGy5.js +0 -7
- package/dist/assets/index-BOPR4Iyc.js +0 -88
- package/dist/assets/index-BeunkI-Z.js +0 -242
- package/dist/assets/index-Bpic07NM.js +0 -200
- package/dist/assets/index-C4ZzROeE.js +0 -120
- package/dist/assets/index-CXp5SI_f.js +0 -832
- package/dist/assets/index-DKzBOJCu.js +0 -81
- package/dist/assets/index-DL0wTcgx.js +0 -1
- package/dist/assets/index-DWHFecw2.js +0 -150
- package/dist/assets/index-DcW3jqfL.js +0 -6
- package/dist/assets/index-Vf51dp11.js +0 -124
- package/dist/assets/index-bEFOmVth.js +0 -1
- package/dist/assets/info-outline-rounded-DlgANjBB.js +0 -1
- package/dist/assets/invite-Cd5zEHFb.js +0 -1
- package/dist/assets/issue-passport-D7zqv3Al.js +0 -1
- package/dist/assets/item-DNj7ORqk.js +0 -1
- package/dist/assets/layout-Cwvm7lmD.js +0 -29
- package/dist/assets/list-BSXHuqLM.js +0 -2
- package/dist/assets/localization-Dond4H78.js +0 -1
- package/dist/assets/logger-CCAAJ2Xo.js +0 -1
- package/dist/assets/login-dc2t9Qyo.js +0 -1
- package/dist/assets/login-method-item-CyTsqz88.js +0 -1
- package/dist/assets/metadata-B2-Ltdko.js +0 -55
- package/dist/assets/overview-0TBmi-_i.js +0 -116
- package/dist/assets/passport-BhEaZ-sr.js +0 -1
- package/dist/assets/passport-item-DHwif94N.js +0 -1
- package/dist/assets/preferences-BBSWzZiT.js +0 -1
- package/dist/assets/profile-embed-shcOdRUI.js +0 -1
- package/dist/assets/provider-icon-DO2PqSth.js +0 -1
- package/dist/assets/pt-BFCHl6F1.js +0 -5
- package/dist/assets/ru-CSTl62kK.js +0 -5
- package/dist/assets/sdk-CktKu_IW.js +0 -1
- package/dist/assets/security-DHRU8k0u.js +0 -22
- package/dist/assets/session-Bp3LV7zJ.js +0 -1
- package/dist/assets/setup-B6-Ei_3X.js +0 -24
- package/dist/assets/simple-select-nI-W90c_.js +0 -1
- package/dist/assets/start-oRp78RMQ.js +0 -187
- package/dist/assets/team-BTz28XqK.js +0 -146
- package/dist/assets/th-D75Dlluo.js +0 -5
- package/dist/assets/theme-mode-toggle-D3bcd10D.js +0 -1
- package/dist/assets/traffic-Cea69sMW.js +0 -1
- package/dist/assets/transfer-BydXCVCg.js +0 -16
- package/dist/assets/unsubscribe-BjAjx-Fl.js +0 -1
- package/dist/assets/util-DkTwHdRu.js +0 -1
- package/dist/assets/util-DySzCymV.js +0 -1
- package/dist/assets/vendor-utils-BzQg432x.js +0 -23
- package/dist/assets/vi-D1mKYrmb.js +0 -5
- package/dist/assets/wait-connect-q0_7mz_u.js +0 -1
- package/dist/assets/wallet-hidden-topbar-joIVZ1nl.js +0 -68
- package/dist/assets/wizard-C5Kl-g70.js +0 -8
- package/dist/assets/wizard-components-DQrlaeeW.js +0 -52
- package/dist/assets/wrap-locale-5DJTJTXP.js +0 -1
- package/dist/assets/zh-CJ9vCpmv.js +0 -1
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import{r as b,g as We,a as $e}from"./vendor-react-DX7tU9aY.js";import{i as qe,r as Z}from"./vendor-hooks-DAZ1H6Va.js";import{j as e,al as t,aT as $,b3 as Y,a7 as F,b4 as Ue,an as G,bd as He,V as Ge,T as E,a4 as Ye,X as S,A as O,M as Q,I as _,d_ as ge,ct as ye,C as Ke,y as Ve,cp as Ze,cq as ee,c3 as Qe,F as Xe,bN as Je,s as es}from"./vendor-mui-core-CV-FnYH_.js";import{W as A,aO as W,bc as ss,aR as ae,bm as se,Q as D,b5 as N,aQ as re,bY as je,bX as ts,n as as,ba as rs,bE as os}from"./vendor-ux-CLT2i3Pv.js";import{W as P,B as ns,M as be,c as M,F as J,V as is,o as ls,G as cs,f as V,c1 as ds}from"./index-CXp5SI_f.js";import{W as oe}from"./did-address-CG36eCOx.js";import{b as z}from"./team-BTz28XqK.js";import{r as ne,a as ie,b as le,c as ve,d as X,e as ps,u as us,f as ms}from"./passport-item-DHwif94N.js";import{p as Se}from"./util-DkTwHdRu.js";import{u as fs}from"./use-mobile-DwGMuJlg.js";import{O as H}from"./index-Bo9KtpTY.js";import{w as q,P as xs}from"./permission-CvrrGfG6.js";import{C as hs}from"./Google-DKRt92nm.js";import{c as gs}from"./create-passport-svg-hldNORaB.js";import{A as ys}from"./vendor-arcblock-Dll6qxMT.js";import{C as K,aC as js}from"./vendor-utils-BzQg432x.js";import{e as Ce}from"./edit.svg-BGhTyO6h.js";import{h as ce,b as bs}from"./index-BOPR4Iyc.js";import{C as Te}from"./confirm-CdVn5WdC.js";import{L as we}from"./list-header-BEZSwSji.js";import{f as te}from"./index-DBs9Ljax.js";import{u as vs}from"./useSetState-CUbypYGT.js";import"./session-Bp3LV7zJ.js";import"./purify.es-HRjpPm7y.js";import"./wallet-hidden-topbar-joIVZ1nl.js";import"./theme-mode-toggle-D3bcd10D.js";import"./use-mobile-CyUZDIaX.js";import"./index-CEJb82tA.js";import"./isURL-CpQHQuaa.js";import"./isIP-BBY240SU.js";import"./use-blocklet-logo-Cf1j7pQz.js";import"./use-app-logo-IRizt64R.js";import"./ua-parser-D6QF1h5N.js";import"./base32-7iZvvdX8.js";import"./cloneDeep-YxES7wNt.js";import"./lock.svg-BOhdQlHW.js";const me="info";function Ie({createPassportSvg:c,passport:s,onCancel:p,onSwitchPassport:u=()=>{}}){const{t:f}=A(),i=qe({tab:me}),d={info:{label:f("common.basicInfo"),value:me,component:()=>e.jsx(De,{passport:s,createPassportSvg:c})},logs:{label:f("common.logs"),value:"logs",component:()=>e.jsx(ke,{passport:s})},related:{label:f("team.passport.related"),value:"related",component:()=>e.jsx(Ae,{passport:s,onSwitchPassport:u})}},l=Object.values(d).map(({label:h,value:m})=>({label:h,value:m})).filter(h=>h.value==="related"?s.parentDid:!0),r=d[i.tab]||d.info,n=h=>{i.tab=h};return e.jsx(W,{title:f("common.passport"),onClose:p,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(Ss,{children:[e.jsx(t,{className:"tabs",children:e.jsx(ss,{tabs:l,current:i.tab,onChange:n,scrollButtons:"auto"})}),e.jsx(t,{className:"body",children:e.jsx(r.component,{})})]})})}Ie.propTypes={createPassportSvg:S.func.isRequired,passport:S.object.isRequired,onCancel:S.func.isRequired,onSwitchPassport:S.func};const Ss=$(t)`
|
|
2
|
-
margin-top: -16px;
|
|
3
|
-
|
|
4
|
-
.tabs {
|
|
5
|
-
margin-left: 0;
|
|
6
|
-
margin-right: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.body {
|
|
10
|
-
margin-top: 24px;
|
|
11
|
-
}
|
|
12
|
-
`;function De({createPassportSvg:c,passport:s}){const{t:p,locale:u}=A(),{teamDid:f}=z(),{inService:i}=P(),d=fs(),l=[{items:[{label:p("common.role"),content:ne(s.title)},{label:p("common.did"),content:e.jsx(oe,{did:s.id})},{label:p("team.passport.status"),content:le(s.status)},{label:p("common.type"),content:e.jsx(t,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:(s.type||[]).map(n=>e.jsx(Ge,{label:n,variant:"outlined",size:"small",sx:{borderRadius:1}},n))})}]}],r=[{title:p("team.passport.owner"),items:[{label:p("team.passport.owner"),content:e.jsx(t,{children:ie(s.user,i)})}]},{title:p("common.timeInfo"),items:[{label:p("team.passport.issuanceTime"),content:s.issuanceDate?e.jsx(se,{value:s.issuanceDate,type:"all",locale:u}):"-"},{label:p("team.member.lastLogin"),content:s.lastLoginAt?e.jsx(se,{value:s.lastLoginAt,type:"all",locale:u}):"-"},{label:p("common.expires"),content:s.expirationDate?e.jsx(se,{value:s.expirationDate,type:"all",locale:u}):"-"}]},{title:p("blocklet.overview.source"),items:[{label:p("blocklet.overview.source"),content:X(s.source)}]}];return e.jsxs(Cs,{gap:3,children:[e.jsxs(t,{sx:{display:"flex",flexDirection:d?"column":"row",alignItems:d?"flex-start":"center",justifyContent:d?"center":"flex-start",width:"100%",overflow:"hidden",gap:d?2:4},children:[e.jsx(t,{sx:{display:"flex",width:"180px"},className:"passport-image",dangerouslySetInnerHTML:{__html:c({scope:s.scope,role:s.role,title:s.scope==="kyc"?s.name:s.title,issuer:s.issuer&&s.issuer.name,issuerDid:s.issuer&&s.issuer.id,ownerName:s.user?.fullName,ownerDid:s.user?.did,ownerAvatarUrl:s.user?.avatar?Se(s.user?.avatar,f,i):"",revoked:s.revoked,extra:s?.expirationDate?{key:"Exp",value:be(s.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}),e.jsx(t,{className:"info-area",children:l.map(n=>e.jsxs(t,{children:[n.title&&e.jsx(E,{variant:"h6",sx:{mb:2},children:n.title}),e.jsx(t,{className:"info-grid",sx:{gap:"12px !important"},children:n.items.map(h=>e.jsxs(t,{className:"info-item",children:[e.jsx(t,{className:"info-label",sx:{maxWidth:40},children:e.jsx(E,{variant:"subtitle2",color:"textSecondary",children:h.label})}),e.jsx(t,{sx:{display:"flex",flexWrap:"wrap",gap:.5,minWidth:0},children:h.content})]},h.label))})]},n.title))})]}),e.jsx(Ye,{}),e.jsx(t,{className:"info-area",children:r.map(n=>e.jsxs(t,{children:[e.jsx(E,{variant:"h5",sx:{mb:1.5},children:n.title}),e.jsx(t,{className:"info-grid",children:n.items.map(h=>e.jsxs(t,{className:"info-item",children:[e.jsx(t,{className:"info-label",children:e.jsx(E,{variant:"subtitle2",color:"textSecondary",children:h.label})}),e.jsx(t,{sx:{minWidth:500},children:h.content})]},h.label))})]},n.title))})]})}De.propTypes={passport:S.object.isRequired,createPassportSvg:S.func.isRequired};const Cs=$(Y)`
|
|
13
|
-
.info-card {
|
|
14
|
-
margin-bottom: 24px;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.card-content {
|
|
19
|
-
display: flex;
|
|
20
|
-
gap: 32px;
|
|
21
|
-
padding: 24px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.passport-image {
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
transition: transform 0.2s ease-in-out;
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
|
|
29
|
-
&:hover {
|
|
30
|
-
transform: scale(1.05);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.info-area {
|
|
35
|
-
flex: 1;
|
|
36
|
-
width: 100%;
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
gap: 16px;
|
|
40
|
-
overflow: auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.info-header {
|
|
44
|
-
padding-bottom: 16px;
|
|
45
|
-
border-bottom: 1px solid;
|
|
46
|
-
border-color: ${({theme:c})=>c.palette.divider};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.info-grid {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
gap: 8px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.info-item {
|
|
56
|
-
display: flex;
|
|
57
|
-
gap: 8px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.info-label {
|
|
61
|
-
flex-shrink: 0;
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
gap: 8px;
|
|
65
|
-
width: 100px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.logs-card {
|
|
69
|
-
.card-header {
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
gap: 8px;
|
|
73
|
-
padding: 16px 24px;
|
|
74
|
-
border-bottom: 1px solid;
|
|
75
|
-
border-color: ${({theme:c})=>c.palette.divider};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.MuiTimeline-root {
|
|
79
|
-
padding: 24px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.MuiTimelineContent-root {
|
|
83
|
-
padding: 0px 16px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.MuiTimelineDot-root {
|
|
87
|
-
margin: 0;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
`,Pe=10,Re=1;function ke({passport:c}){const{api:s}=P(),{teamDid:p}=z(),{t:u,locale:f}=A(),[i,d]=b.useState({pageSize:Pe,page:Re}),{data:l,loading:r}=Z(async()=>{const x={teamDid:p,query:{passportId:c.id},paging:{page:i.page,pageSize:i.pageSize}},a=await s.getPassportLogs({input:x});return{logs:a.passportLogs||[],total:a.paging.total}},{refreshDeps:[i.page,i.pageSize],onError:x=>D.error(x.message)}),n=b.useMemo(()=>l?.logs||[],[l?.logs]),h=x=>x.action===M.PASSPORT_LOG_ACTION.APPROVE||x.action===M.PASSPORT_LOG_ACTION.REVOKE?x?.metadata?.operator?.fullName?`${u("common.operator")}: ${x?.metadata?.operator?.fullName}`:null:x.action===M.PASSPORT_LOG_ACTION.ISSUE&&x.metadata?.action===M.PASSPORT_ISSUE_ACTION.ISSUE_ON_INVITE?x?.metadata?.inviter?.fullName?`${u("common.inviter")}: ${x?.metadata?.inviter?.fullName}`:null:`passportId: ${x.passportId}`,m=b.useMemo(()=>[{label:u("common.action"),name:"action",options:{customBodyRender:(x,{rowIndex:a})=>{const o=n[a];return e.jsx(G,{title:h(o),children:`${x} ${o.metadata?.action?`(${o.metadata.action})`:""}`})}}},{label:"IP",name:"operatorIp",options:{customBodyRender:x=>e.jsx(t,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:x||"-"})})}},{label:"UA",width:250,name:"operatorUa",options:{customBodyRender:(x,{rowIndex:a})=>{const o=n[a];return e.jsxs(t,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.operatorUa&&e.jsx(t,{children:ps(o.operatorUa)}),o.operatorUa&&e.jsx(G,{title:o.operatorUa,children:e.jsx(He,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]})}}},{label:u("common.createdAt"),name:"createdAt",options:{customBodyRender:x=>ns(x,f)}}],[u,f,n]),g=({page:x,rowsPerPage:a})=>{i.pageSize!==a?d(o=>({...o,pageSize:a,page:1})):i.page!==x+1&&d(o=>({...o,page:x+1}))},w={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:i.page-1,rowsPerPage:i.pageSize,count:l?.total||0};return r?e.jsx(t,{sx:{py:2},children:e.jsx(Y,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(F,{})})}):e.jsx(t,{children:e.jsx(ae,{className:"logs-table",verticalKeyWidth:100,locale:f,data:n,columns:m,options:w,loading:r,onChange:g})})}ke.propTypes={passport:S.object.isRequired};function Ae({passport:c,onSwitchPassport:s}){const{api:p}=P(),{teamDid:u}=z(),{t:f,locale:i}=A(),[d,l]=b.useState({pageSize:Pe,page:Re}),{data:r,loading:n}=Z(async()=>{const a={teamDid:u,passportId:c.parentDid,paging:{page:d.page,pageSize:d.pageSize}},o=await p.getRelatedPassports({input:a});return{passports:o.passports||[],total:o.paging.total}},{refreshDeps:[d.page,d.pageSize],onError:a=>D.error(a.message)}),h=b.useMemo(()=>r?.passports||[],[r?.passports]),m=b.useMemo(()=>[{label:f("team.passport.role"),name:"role",options:{customBodyRender:ne}},{label:f("team.passport.owner"),name:"user",options:{customBodyRender:ie}},{label:f("team.passport.status"),name:"status",options:{customBodyRender:le}},{label:f("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:a=>ve(a,i)}},{label:f("blocklet.overview.source"),name:"source",options:{customBodyRender:X}}],[f,i]),g=({page:a,rowsPerPage:o})=>{d.pageSize!==o?l(v=>({...v,pageSize:o,page:1})):d.page!==a+1&&l(v=>({...v,page:a+1}))},w=b.useRef(null),x={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:d.page-1,rowsPerPage:d.pageSize,count:r?.total||0,onRowClick(a,{dataIndex:o},v){if(w.current?.contains(v.target)){const j=h[o];s(j)}}};return n?e.jsx(t,{sx:{py:2},children:e.jsx(Y,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(F,{})})}):e.jsxs(Y,{spacing:1,children:[e.jsx(Ue,{severity:"warning",children:f("team.passport.relatedDescription")}),e.jsx(t,{ref:w,sx:{".MuiTableRow-root":{cursor:"pointer"}},children:e.jsx(ae,{className:"related-table",verticalKeyWidth:100,locale:i,data:h.filter(a=>a.id!==c.id),columns:m,options:x,loading:n,onChange:g})})]})}Ae.propTypes={passport:S.object.isRequired,onSwitchPassport:S.func.isRequired};function de({onCancel:c,onSuccess:s}){const{api:p}=P(),{blocklet:u}=is(),{t:f}=A(),[i,d]=b.useState(!1),l=(u.environments.find(g=>g.key==="BLOCKLET_PASSPORT_COLOR")||{}).value||"auto",r=l==="auto"?ys(u.appDid):l,[n,h]=b.useState(r),m=async()=>{const g=[{key:cs.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,value:n}];try{d(!0),await p.configBlocklet({input:{did:u.meta.did,configs:g}}),s()}catch(w){D.error(w.message)}finally{d(!1)}};return e.jsx(W,{title:f("team.passport.color"),onClose:c,open:!0,fullWidth:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(N,{onClick:c,color:"inherit",children:f("common.cancel")}),e.jsxs(N,{onClick:m,color:"primary",disabled:i,variant:"contained",autoFocus:!0,"data-cy":"color-btn-confirm",children:[i&&e.jsx(F,{size:16}),f("common.save")]})]}),children:e.jsxs(t,{className:"dialog-content",sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:[e.jsx(hs,{disableAlpha:!0,color:n,onChange:g=>h(g.hex)}),e.jsx("div",{style:{width:220,marginLeft:24},dangerouslySetInnerHTML:{__html:gs({scope:"passport",role:"owner",title:"Owner",issuer:ls.getDisplayName(u),issuerDid:u.appDid,ownerName:"Your Name",ownerDid:u.appDid,preferredColor:n})}})]})})}const Ts=q(de,"mutate_team"),ws=q(de,"",J);function Is(c){const{inService:s}=P();return s?e.jsx(ws,{...c}):e.jsx(Ts,{...c})}de.propTypes={onCancel:S.func.isRequired,onSuccess:S.func.isRequired};var Le=function(s){return e.jsx("svg",{...s,children:e.jsx("path",{d:"M64.707 8.707a1 1 0 0 0 0-1.414L58.343.929a1 1 0 1 0-1.414 1.414L62.586 8l-5.657 5.657a1 1 0 0 0 1.414 1.414l6.364-6.364ZM0 9h64V7H0v2Z",fill:"#666"})})};Le.defaultProps={width:"65",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Ds=(c,s)=>c?!s.some(p=>!p.from.passport||!p.to.role):!1;function Ne({onCancel:c,onSuccess:s,data:p={},trustedPassports:u=[]}){const{api:f}=P(),{roles:i,teamDid:d}=z(),{t:l}=A(),[r,n]=b.useState(!1),[h,m]=b.useState(p.issuerDid||""),[g,w]=b.useState(p.remark||""),[x,a]=b.useState(K(p.mappings)||[]),o=u.findIndex(j=>j.issuerDid===p.issuerDid),v=async()=>{if(r)return;const j={issuerDid:h,remark:g,mappings:x.map(T=>({...T,to:{...T.to,ttl:T.to.ttl||0}}))},C=[...u];o===-1?C.unshift(j):C[o]=j;try{n(!0),await f.configTrustedPassports({input:{teamDid:d,trustedPassports:C}}),await V(800),n(!1),D.success(l("common.saveSuccess")),s()}catch(T){n(!1),D.error(te(T))}};return e.jsx(W,{title:l("team.passport.trustedIssuers"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(_,{onClick:c,"data-cy":"trusted-issuer-close",size:"large",children:e.jsx(ge,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(N,{onClick:c,color:"inherit",children:l("common.cancel")}),e.jsxs(N,{onClick:()=>v(),color:"primary",disabled:!Ds(h,x)||!g||r,variant:"contained",autoFocus:!0,"data-cy":"save-mapping",children:[r&&e.jsx(F,{size:16}),l("common.save")]})]}),children:e.jsx(Ps,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(O,{fullWidth:!0,"data-cy":"input-issuer-did",placeholder:l("team.passport.issuerDid"),value:h,onChange:j=>{m(j.target.value)}}),e.jsx(O,{style:{marginTop:16},fullWidth:!0,"data-cy":"input-issuer-remark",placeholder:l("common.remark"),value:g,onChange:j=>{w(j.target.value)}}),e.jsxs(t,{sx:{mt:"30px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(t,{className:"dialog-h1",children:l("team.passport.mappingRule")}),e.jsx(t,{children:e.jsx(N,{variant:"outlined",color:"primary","data-cy":"add-mapping",onClick:()=>{a(j=>{const C=[...j];return C.unshift({from:{passport:""},to:{role:M.ROLES.GUEST}}),C})},children:l("team.add")})})]}),e.jsxs(t,{className:"list",sx:{mt:-.5},children:[x.map((j,C)=>e.jsxs(t,{className:"mapping-item",sx:{display:"flex",alignItems:"center",justifyContent:"space-between",my:1},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[e.jsx(t,{sx:{flexGrow:1,flexBasis:1},children:e.jsx(O,{fullWidth:!0,size:"small","data-cy":`input-${C}-from`,placeholder:"Issuer’s Passport Name/ID *",value:j.from.passport,onChange:T=>{const{value:R}=T.target;a(L=>{const U=[...L];return U[C].from.passport=R,U})},sx:{"& .MuiInputBase-input::placeholder":{fontSize:14},"& .Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"primary.main"}}})}),e.jsx(t,{sx:{flexShrink:0,mx:1,width:65,height:16},children:e.jsx(Le,{})}),e.jsx(t,{sx:{flexGrow:1,flexBasis:1},children:e.jsx(O,{fullWidth:!0,size:"small",select:!0,value:j.to.role,onChange:T=>{a(R=>{const L=[...R];return L[C].to.role=T.target.value,L})},variant:"outlined",children:i.filter(T=>T.name!=="owner").map(T=>e.jsx(Q,{value:T.name,"data-cy":`passport-mapping-select-option-${T.name}`,children:e.jsx("span",{children:T.title||T.name})},T.name))})})]}),e.jsx(t,{sx:{flexShrink:0},children:e.jsx(_,{onClick:()=>{a(T=>{const R=[...T];return R.splice(C,1),R})},size:"large",children:e.jsx(ce,{})})})]},`mapping-${C}`)),!x.length&&e.jsx(t,{sx:{my:2,color:"text.secondary",fontSize:"16px"},children:e.jsx(re,{children:l("common.empty")})})]})]})})})}Ne.propTypes={onCancel:S.func.isRequired,onSuccess:S.func.isRequired,trustedPassports:S.array,data:S.object};const Ps=$.div`
|
|
91
|
-
.dialog-h1 {
|
|
92
|
-
font-size: 18px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.list {
|
|
96
|
-
.MuiIconButton-root {
|
|
97
|
-
svg {
|
|
98
|
-
fill: #bfbfbf;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
`;function pe({onCancel:c,hasPermission:s=!1}){const{api:p}=P(),{teamDid:u,trustedPassports:f}=z(),{t:i}=A(),[d,l]=b.useState(null),[r,n]=b.useState(!1),[h,m]=b.useState(!1),[g,w]=b.useState(""),x=async o=>{if(r)return;const v=f.findIndex(C=>C.issuerDid===o);v===-1&&D.error("Cannot find passports");const j=[...f];j.splice(v,1);try{n(!0),await p.configTrustedPassports({input:{teamDid:u,trustedPassports:j}}),await V(800),n(!1),D.success(i("common.saveSuccess")),l(!1)}catch(C){n(!1),D.error(C.message)}},a=f.filter(o=>!g||o.issuerDid.toLowerCase().includes(g.toLowerCase()));return e.jsxs(W,{title:i("team.passport.trustedIssuers"),open:!0,onClose:c,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(Ls,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:i("team.passport.trustedPassportIssuers")}),e.jsx(we,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(je,{options:{searchPlaceholder:i("team.passport.searchIssuerDid"),searchDebounceTime:600},search:g,searchText:g,searchTextUpdate:w,searchClose:()=>w(""),onSearchOpen:()=>{}}),s&&e.jsxs(N,{variant:"contained",color:"primary","data-cy":"add-trusted-issuer",onClick:()=>m({mode:"add"}),children:[e.jsx(ye,{style:{fontSize:16,marginRight:4}}),i("team.add")]})]})}),e.jsxs("div",{className:"list",children:[a.map(o=>e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px"},children:[e.jsxs(t,{sx:{flexShrink:0},children:[e.jsx(oe,{copyable:!1,size:16,did:ts(o.issuerDid),showDidLogo:!1}),!!o.remark&&e.jsx(t,{sx:{fontSize:12,maxWidth:"300px"},children:o.remark})]}),e.jsx(t,{sx:{color:"gray",ml:"28px",flexGrow:1},children:o.mappings&&o.mappings.length?`${o.mappings.length} ${i("team.passport.mappingRule")}`:i("team.passport.defaultRule")}),e.jsxs(t,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:[e.jsx(_,{onClick:()=>m({mode:"update",data:K(o)}),"data-cy":"edit-mapping-rule",size:"large",children:e.jsx(Ce,{})}),e.jsx(_,{"data-cy":"delete-mapping-rule",onClick:()=>l({title:i("common.delete"),description:i("common.delConfirmDescription",{data:o.issuerDid}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:()=>x(o.issuerDid),onCancel:()=>{n(!1),l(null)}}),size:"large",children:e.jsx(ce,{})})]})]},o.issuerDid)),!f.length&&e.jsx(re,{children:i("common.empty")})]})]})}),h&&e.jsx(Ne,{mode:h.mode,data:h.data,trustedPassports:K(f),onCancel:()=>m(null),onSuccess:()=>{m(null)}}),d&&e.jsx(Te,{title:d.title,description:d.description,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}pe.propTypes={onCancel:S.func.isRequired,hasPermission:S.bool};const Rs=q(pe,"mutate_team"),ks=q(pe,"",J);function As(c){const{inService:s}=P();return s?e.jsx(ks,{...c}):e.jsx(Rs,{...c})}const Ls=$.div`
|
|
103
|
-
.list {
|
|
104
|
-
.MuiIconButton-root {
|
|
105
|
-
svg {
|
|
106
|
-
fill: #bfbfbf;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
`;var Ns=js();const fe=We(Ns);function ze({onCancel:c,onSuccess:s,data:p={},trustedFactories:u=[]}){const{api:f}=P(),{roles:i,teamDid:d}=z(),{t:l}=A(),[r,n]=vs({loading:!1,fetching:!1,fetched:[],errored:[],factoryAddress:p.factoryAddress||"",remark:p.remark||"",role:p.passport?.role||"member",ttlPolicy:p.passport?.ttlPolicy||"never",ttl:fe(+p.passport?.ttl||365*24*60*60*1e3),error:""}),h=u.findIndex(a=>a.factoryAddress===p.factoryAddress),m=async()=>{if(r.loading)return;const{factoryAddress:a,remark:o,role:v,ttlPolicy:j,ttl:C}=r,T={factoryAddress:a,remark:o,passport:{role:v,ttlPolicy:j,ttl:j==="never"?0:fe(C)}},R=[...u];h===-1?R.unshift(T):R[h]=T;try{n({loading:!0}),await f.configTrustedFactories({input:{teamDid:d,trustedFactories:R}}),await V(800),D.success(l("common.saveSuccess")),s()}catch(L){console.error(L),D.error(te(L))}finally{n({loading:!1})}};b.useEffect(()=>{const a=r.fetched.find(v=>v.address===r.factoryAddress),o=r.errored.find(v=>v.address===r.factoryAddress);as(r.factoryAddress)&&!r.fetching&&!a&&!o&&(n({fetching:!0}),ds(M.MAIN_CHAIN_ENDPOINT).getFactoryState({address:r.factoryAddress}).then(j=>{j.state?n({fetching:!1,fetched:[...r.fetched.filter(C=>C.address!==r.factoryAddress),j.state],remark:j.state.name}):n({fetching:!1,errored:[...r.errored.filter(C=>C.address!==r.factoryAddress),{address:r.factoryAddress}],error:l("team.passport.factory404",r)})}).catch(j=>{console.error(j),n({fetching:!1,error:te(j)})}))},[r.factoryAddress,r.fetching]);let g=r.error;const w=r.factoryAddress?r.errored.find(a=>a.address===r.factoryAddress):null;!g&&w&&(g=l("team.passport.factory404",r));const x=r.factoryAddress?r.fetched.find(a=>a.address===r.factoryAddress):null;return!g&&x&&(g=x.description),g||(g=l("team.passport.factoryAddressTip")),e.jsx(W,{title:l("team.passport.trustedFactories"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(_,{onClick:c,"data-cy":"close-trusted-factory",size:"large",children:e.jsx(ge,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(N,{onClick:c,color:"inherit",children:l("common.cancel")}),e.jsxs(N,{onClick:()=>m(),color:"primary",disabled:!r.factoryAddress||!r.remark||!r.role||r.loading||r.error||w,variant:"contained",autoFocus:!0,"data-cy":"save-trusted-factory",children:[r.loading&&e.jsx(F,{size:16}),l("common.save")]})]}),children:e.jsx(zs,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(O,{fullWidth:!0,error:!!r.error||!!w,"data-cy":"input-factory-address",label:l("team.passport.factoryAddress"),helperText:g,value:r.factoryAddress,onChange:a=>{n({factoryAddress:a.target.value,error:""})},slotProps:{input:{endAdornment:r.fetching?e.jsx(Ke,{position:"end",children:e.jsx(F,{size:16})}):null}}}),e.jsx(O,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-factory-remark",label:l("common.remark"),value:r.remark,onChange:a=>{n({remark:a.target.value})}}),e.jsx(O,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-passport-role",label:l("team.passport.role"),select:!0,value:r.role,onChange:a=>{n({role:a.target.value})},variant:"outlined",children:i.filter(a=>a.name!=="owner").map(a=>e.jsx(Q,{value:a.name,"data-cy":`passport-role-select-option-${a.name}`,children:e.jsx("span",{children:a.title||a.name})},a.name))}),e.jsxs("div",{style:{marginTop:32},children:[e.jsx(Ve,{children:l("team.passport.ttl")}),e.jsxs(Ze,{color:"primary",size:"small",value:r.ttlPolicy,exclusive:!0,style:{marginTop:16},onChange:(a,o)=>n({ttlPolicy:o}),"data-cy":"input-passport-ttl-since","aria-label":"Expire Policy",children:[e.jsx(ee,{value:"never","data-cy":"input-passport-ttl-never",children:e.jsx(G,{title:l("team.passport.ttlNeverTip"),children:e.jsx(E,{children:l("team.passport.ttlNever")})})}),e.jsx(ee,{value:"mint","data-cy":"input-passport-ttl-mint",children:e.jsx(G,{title:l("team.passport.ttlMintTip"),children:e.jsx(E,{children:l("team.passport.ttlMint")})})}),e.jsx(ee,{value:"exchange","data-cy":"input-passport-ttl-exchange",children:e.jsx(G,{title:l("team.passport.ttlExchangeTip"),children:e.jsx(E,{children:l("team.passport.ttlExchange")})})})]}),r.ttlPolicy!=="never"&&e.jsxs(e.Fragment,{children:[e.jsx(Qe,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-passport-ttl",value:r.ttl,onChange:a=>{n({ttl:a.target.value})}}),e.jsx(Xe,{children:l("team.passport.ttlTip")})]})]})]})})})}ze.propTypes={onCancel:S.func.isRequired,onSuccess:S.func.isRequired,trustedFactories:S.array,data:S.object};const zs=$.div`
|
|
111
|
-
.dialog-h1 {
|
|
112
|
-
font-size: 18px;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.list {
|
|
116
|
-
.MuiIconButton-root {
|
|
117
|
-
svg {
|
|
118
|
-
fill: #bfbfbf;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
`;function ue({onCancel:c,hasPermission:s=!1}){const{api:p}=P(),{teamDid:u,trustedFactories:f}=z(),{t:i}=A(),[d,l]=b.useState(null),[r,n]=b.useState(!1),[h,m]=b.useState(null),[g,w]=b.useState(""),x=async o=>{if(!r)try{n(!0),await p.configTrustedFactories({input:{teamDid:u,trustedFactories:f.filter(v=>v.factoryAddress!==o)}}),await V(800),n(!1),D.success(i("common.saveSuccess")),l(null)}catch(v){n(!1),D.error(v.message)}},a=f.filter(o=>!g||o.factoryAddress.toLowerCase().includes(g.toLowerCase()));return e.jsxs(W,{title:i("team.passport.trustedFactories"),open:!0,onClose:c,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(Os,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:i("team.passport.trustedFactoriesTip")}),e.jsx(we,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(je,{options:{searchPlaceholder:i("team.passport.searchFactoryAddress"),searchDebounceTime:600},search:g,searchText:g,searchTextUpdate:w,searchClose:()=>w(""),onSearchOpen:()=>{}}),s&&e.jsxs(N,{variant:"contained",color:"primary",size:"small","data-cy":"add-trusted-factory",onClick:()=>m({mode:"add"}),children:[e.jsx(ye,{style:{fontSize:16,marginRight:4}}),i("team.add")]})]})}),e.jsxs("div",{className:"list",children:[a.map(o=>e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px"},children:[e.jsxs(t,{sx:{flexGrow:1},children:[e.jsx(oe,{copyable:!1,did:o.factoryAddress,size:16,showDidLogo:!1}),!!o.remark&&e.jsx(t,{sx:{fontSize:12,maxWidth:"300px"},children:o.remark})]}),e.jsx(t,{sx:{color:"gray",mr:"24px"},children:e.jsx(rs,{type:"success",children:o.passport.role})}),e.jsxs(t,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:[e.jsx(_,{onClick:()=>m({mode:"update",data:K(o)}),"data-cy":"edit-trusted-factory",size:"large",children:e.jsx(Ce,{})}),e.jsx(_,{"data-cy":"delete-trusted-factory",onClick:()=>l({title:i("common.delete"),description:i("common.delConfirmDescription",{data:o.factoryAddress}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:()=>x(o.factoryAddress),onCancel:()=>{n(!1),l(null)}}),size:"large",children:e.jsx(ce,{})})]})]},o.factoryAddress)),!f.length&&e.jsx(re,{children:i("common.empty")})]})]})}),h&&e.jsx(ze,{data:h.data,trustedFactories:K(f),onCancel:()=>m(null),onSuccess:()=>{m(null)}}),d&&e.jsx(Te,{title:d.title,description:d.description,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}ue.propTypes={onCancel:S.func.isRequired,hasPermission:S.bool};const Fs=q(ue,"mutate_team"),Bs=q(ue,"",J);function Es(c){const{inService:s}=P();return s?e.jsx(Bs,{...c}):e.jsx(Fs,{...c})}const Os=$.div`
|
|
123
|
-
.list {
|
|
124
|
-
.MuiIconButton-root {
|
|
125
|
-
svg {
|
|
126
|
-
fill: #bfbfbf;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
`;function Fe({createPassportSvg:c}){const{t:s}=A(),{api:p,inService:u}=P(),{teamDid:f,refresh:i,enablePassportIssuance:d,isNodeTeam:l}=z(),[r,n]=b.useState(!1),[h,m]=b.useState(!1),[g,w]=b.useState(!1),[x,a]=b.useState(!1),[o,v]=b.useState(!1),j=async C=>{if(C.stopPropagation(),!x){a(!0);try{await p.configPassportIssuance({input:{teamDid:f,enable:!d}}),i(),await V(800),D.success(s("common.configSuccess"))}catch(T){D.error(T.message)}finally{a(!1)}}};return e.jsxs(t,{sx:{display:"flex",alignItems:"center",gap:1,ml:1},children:[e.jsx(xs,{permission:u?"":"mutate_team",role:u?J:[],children:e.jsx(H,{variant:"outlined",menuButtonProps:{"data-cy":"trusted-issuers-more"},menu:e.jsxs(e.Fragment,{children:[e.jsx(H.Item,{onClick:()=>m(!0),"data-cy":"config-trusted-issuers",children:e.jsxs(t,{children:[s("team.passport.trustedPassportIssuers"),e.jsx(t,{sx:{fontSize:12,color:"#888"},children:s("team.passport.trustedPassportIssuersTip")})]})}),e.jsx(H.Item,{onClick:()=>w(!0),"data-cy":"config-show-trusted-factories",children:e.jsxs(t,{children:[s("team.passport.configFactories"),e.jsx(t,{sx:{fontSize:12,color:"#888"},children:s("team.passport.configFactoriesTip")})]})}),e.jsx(H.Item,{"data-cy":"config-show-issue-passport",onClick:j,children:e.jsxs(t,{sx:{display:"flex",alignItems:"center"},children:[x&&e.jsx(F,{size:16,style:{marginRight:8}}),e.jsxs(t,{children:[s(d?"team.passport.disableIssuance":"team.passport.enableIssuance"),e.jsx(t,{sx:{fontSize:12,color:"#888"},children:s(d?"team.passport.disableIssuanceTip":"team.passport.enableIssuanceTip")})]})]})}),!l&&e.jsx(H.Item,{onClick:()=>n(!0),"data-cy":"config-passport-color",children:e.jsxs(t,{children:[s("team.passport.configColor"),e.jsx(t,{sx:{fontSize:12,color:"#888"},children:s("team.passport.configColorTip")})]})})]}),children:()=>e.jsx(N,{variant:"outlined",onClick:()=>{v(!0)},children:s("team.passport.view")})})}),h&&e.jsx(As,{onCancel:()=>m(!1)}),g&&e.jsx(Es,{onCancel:()=>w(!1)}),r&&e.jsx(Is,{onCancel:()=>n(!1),onSuccess:()=>n(!1)}),o&&e.jsx(W,{open:!0,maxWidth:"lg",onClose:()=>v(!1),onBackdropClick:()=>v(!1),onEscapeKeyDown:()=>v(!1),title:s("team.passport.view"),children:e.jsx(bs,{createPassportSvg:c,onCancel:()=>v(!1)})})]})}Fe.propTypes={createPassportSvg:S.func.isRequired};const xe="$all",he="",Be=$e.memo(({createPassportSvg:c,passport:s,teamDid:p,inService:u})=>e.jsx(t,{sx:{display:"flex"},dangerouslySetInnerHTML:{__html:c({scope:s.scope,role:s.role,title:s.scope==="kyc"?s.name:s.title,issuer:s.issuer&&s.issuer.name,issuerDid:s.issuer&&s.issuer.id,ownerName:s.user?.fullName,ownerDid:s.user?.did,ownerAvatarUrl:s.user?.avatar?Se(s.user?.avatar,p,u):"",revoked:s.revoked,width:"36px",extra:s?.expirationDate?{key:"Exp",value:be(s.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}));Be.propTypes={passport:S.object.isRequired,createPassportSvg:S.func.isRequired,teamDid:S.string.isRequired,inService:S.bool.isRequired};function Ms({createPassportSvg:c}){const{api:s}=P(),{teamDid:p}=z(),{t:u,locale:f}=A(),{SYSTEM_ROLES:i}=us(),{inService:d}=P(),[l,r]=b.useState(!1),n=`passports-${p}`,h=os(n),[m,g]=b.useState({role:xe,status:he,searchText:h.searchText||"",pageSize:h.rowsPerPage||10,page:h.page?h.page+1:1}),{data:w,loading:x}=Z(async()=>(await s.getPassportRoleCounts({input:{teamDid:p}})).counts||[],{refreshDeps:[p]}),{data:a,loading:o}=Z(async()=>{const y={};m.role!==xe&&(y.role=m.role),m.status&&(y.status=m.status);const I=await s.getPassportsByRole({input:{teamDid:p,query:y,paging:{page:m.page,pageSize:m.pageSize}}});return{passports:I.passports||[],total:I.paging.total}},{refreshDeps:[m.role,m.status,m.page,m.pageSize],onError:y=>D.error(y.message)}),v=y=>w?.find(k=>k.key===y)?.value||0,j=b.useMemo(()=>Object.keys(i).map(y=>({name:y,title:i[y],num:v(y)})),[w,v]),C=b.useMemo(()=>[{label:u("team.passport.role"),name:"role",options:{customBodyRender:(y,{rowIndex:I})=>{const k=a?.passports[I];return e.jsxs(t,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Be,{createPassportSvg:c,passport:k,teamDid:p}),e.jsx(t,{children:ne(k.title)})]})}}},{label:u("team.passport.owner"),name:"user",options:{customBodyRender:y=>ie(y,d)}},{label:u("team.passport.status"),name:"status",options:{customBodyRender:le}},{label:u("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:y=>ve(y,f)}},{label:u("common.address"),name:"id",options:{customBodyRender:ms}},{label:u("blocklet.overview.source"),name:"source",options:{customBodyRender:(y,{rowIndex:I})=>{const k=a?.passports[I];return k.parentDid?X("recover"):X(k.source)}}}],[u,f,a?.passports,p,c,d]),T=y=>{g(I=>({...I,role:y,page:1}))},R=({page:y,rowsPerPage:I,searchText:k})=>{m.pageSize!==I?g(B=>({...B,searchText:"",pageSize:I,page:1})):m.page!==y+1?g(B=>({...B,searchText:"",page:y+1})):m.searchText!==k&&g(B=>({...B,searchText:k,page:1}))},L=b.useRef(null),U=a?.passports||[],Ee=m.searchText?U.filter(y=>y.id.includes(m.searchText)||(y?.user?.fullName||"").includes(m.searchText)):U,Oe={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,onRowClick(y,{dataIndex:I},k){if(L.current?.contains(k.target)){const B=a?.passports[I];r(B)}},page:m.page-1,rowsPerPage:m.pageSize,count:a?.total||0,searchDebounceTime:600},Me=y=>{g(I=>({...I,status:y.target.value,page:1}))},_e=e.jsxs(t,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsxs(t,{sx:{fontSize:16,fontWeight:400},children:[u("team.passport.status"),":"]}),e.jsxs(Je,{size:"small",value:m.status,onChange:Me,displayEmpty:!0,sx:{minWidth:120,height:36,".MuiSelect-select":{py:.5,px:1.5}},children:[e.jsx(Q,{value:he,children:u("common.all")}),Object.values(M.PASSPORT_STATUS).map(y=>e.jsx(Q,{value:y,sx:{py:1},children:u(`team.passport.statusMap.${y}`)},y))]})]});return x?e.jsx(t,{sx:{py:2},children:e.jsx(Y,{direction:"row",spacing:1,sx:{justifyContent:"center",alignItems:"center",position:"relative",pb:2},children:e.jsx(F,{})})}):e.jsxs(_s,{children:[e.jsxs(t,{className:"main",sx:{display:"flex",mt:0,gap:3},children:[e.jsx(t,{className:"left",children:e.jsx(t,{className:"tabs",children:j.map(y=>e.jsxs(t,{className:`tab ${m.role===y.name?"active":""}`,onClick:()=>T(y.name),children:[e.jsx("span",{className:"text",children:y.title}),e.jsx(t,{sx:{color:"text.secondary"},children:y.num})]},y.name))})}),e.jsx(t,{ref:L,className:"right",children:e.jsx(ae,{className:"main-table",verticalKeyWidth:100,locale:f,durable:n,durableKeys:["page","rowsPerPage"],data:Ee,columns:C,options:Oe,loading:o,onChange:R,customButtons:[e.jsx(Fe,{createPassportSvg:c})],title:_e})})]}),l&&e.jsx(Ie,{createPassportSvg:c,onCancel:()=>r(null),passport:l,onSwitchPassport:r})]})}Ms.propTypes={createPassportSvg:S.func.isRequired};const _s=es(t)`
|
|
131
|
-
.main {
|
|
132
|
-
.left {
|
|
133
|
-
width: 256px;
|
|
134
|
-
flex-shrink: 0;
|
|
135
|
-
|
|
136
|
-
.tabs {
|
|
137
|
-
padding-top: 16px;
|
|
138
|
-
.tab {
|
|
139
|
-
display: flex;
|
|
140
|
-
justify-content: space-between;
|
|
141
|
-
align-items: center;
|
|
142
|
-
padding: 8px 16px;
|
|
143
|
-
transition: background 0.4s;
|
|
144
|
-
|
|
145
|
-
width: 256px;
|
|
146
|
-
height: 36px;
|
|
147
|
-
border-radius: 8px;
|
|
148
|
-
|
|
149
|
-
cursor: pointer;
|
|
150
|
-
user-select: none;
|
|
151
|
-
|
|
152
|
-
&:nth-child(n + 2) {
|
|
153
|
-
margin-top: 24px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
&.active {
|
|
157
|
-
background-color: ${({theme:c})=>c.palette.grey[100]};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
&:hover {
|
|
161
|
-
background-color: ${({theme:c})=>c.palette.grey[100]};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.text {
|
|
165
|
-
font-weight: 400;
|
|
166
|
-
font-size: 16px;
|
|
167
|
-
line-height: 19px;
|
|
168
|
-
color: ${({theme:c})=>c.palette.text.primary};
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.badge {
|
|
172
|
-
display: flex;
|
|
173
|
-
flex-shrink: 0;
|
|
174
|
-
justify-content: center;
|
|
175
|
-
align-items: center;
|
|
176
|
-
width: 20px;
|
|
177
|
-
height: 20px;
|
|
178
|
-
border-radius: 100%;
|
|
179
|
-
color: #fff;
|
|
180
|
-
background: #666666;
|
|
181
|
-
font-size: 10px;
|
|
182
|
-
font-weight: 400;
|
|
183
|
-
&.is-rect {
|
|
184
|
-
width: auto;
|
|
185
|
-
border-radius: 8px;
|
|
186
|
-
padding: 0 4px;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
@media (max-width: ${c=>c.theme.breakpoints.values.md}px) {
|
|
192
|
-
display: none;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
.right {
|
|
196
|
-
flex: 1;
|
|
197
|
-
overflow: auto;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
`;export{Ms as default};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import{r as x}from"./vendor-react-DX7tU9aY.js";import{j as e,X as d,an as mt,al as N,T as X,V as ke,z as Fe,b5 as Ve,bP as Re,bK as Te,a6 as Ie,R as Ce,dH as Pe,aL as Ee,a7 as Ge,G as Xe,cC as ht,ae as Ye,e6 as gt,e7 as xt,aT as ae,a_ as He,n as bt,L as yt,y as jt,bN as St,M as qe,cA as vt}from"./vendor-mui-core-CV-FnYH_.js";import{e as ee,l as Ct,w as pe}from"./vendor-utils-BzQg432x.js";import{Q as q,ba as Nt,W as Q,ds as wt,m as Qe,U as Je,b5 as Ae,aR as Ze,bR as be,aO as Rt,bc as Tt,bm as It,bE as Et}from"./vendor-ux-CLT2i3Pv.js";import{W as At,M as H,c as E,B as Dt,_ as Ue}from"./index-CXp5SI_f.js";import{a as Y,i as De}from"./vendor-hooks-DAZ1H6Va.js";import{S as me}from"./shorten-label-CuBHsWUR.js";import{v as et}from"./index-Di2nSesc.js";import{R as tt,A as Ot,S as Lt,a as kt,B as Ft}from"./list-3MUy-8Ol.js";import{i as Pt,e as _t,N as Bt}from"./team-BTz28XqK.js";import{W as zt}from"./did-address-CG36eCOx.js";import{p as st}from"./util-DkTwHdRu.js";import{D as Wt,g as Mt}from"./traffic-Cea69sMW.js";import{B as nt}from"./bundle-avatar-DwiOyeMO.js";import"./vendor-arcblock-Dll6qxMT.js";import"./server-logo-notext.svg-CtPRYaCm.js";import"./session-Bp3LV7zJ.js";import"./purify.es-HRjpPm7y.js";import"./wallet-hidden-topbar-joIVZ1nl.js";import"./theme-mode-toggle-D3bcd10D.js";import"./use-mobile-CyUZDIaX.js";import"./index-CEJb82tA.js";import"./isURL-CpQHQuaa.js";import"./isIP-BBY240SU.js";import"./use-blocklet-logo-Cf1j7pQz.js";import"./use-app-logo-IRizt64R.js";import"./base32-7iZvvdX8.js";import"./useAsyncRetry-C4R9ufi-.js";import"./useAsync-DfiOQMQ_.js";import"./iframe-DUzp97tk.js";import"./index-DFUM0Pvk.js";import"./index-DBs9Ljax.js";import"./base-chart-DcZV4ZCI.js";import"./index-D1Fa760B.js";import"./vendor-mui-x-DwN6dcQH.js";import"./AdapterDayjs-CYW0YvmK.js";const at=x.createContext({}),{Provider:Kt,Consumer:Xs}=at;function Ht({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:i}}=At(),[l,b]=x.useState([]),[m,S]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Y(()=>s.meta?.did,[s]),[y,v]=x.useState([]),[P,F]=x.useState({}),w=Y(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),U=async({page:p=1,pageSize:g=20,...T}={})=>{if(!h)return[];try{const D={paging:{page:p,pageSize:g},...T,teamDid:h,dateRange:T.dateRange?[H(T.dateRange[0]).toISOString(),H(T.dateRange[1]).toISOString()]:void 0},{dids:O,...z}=D;let _="";O&&O.includes("system")&&(_="system");const ie=O?O.filter(oe=>oe!=="system"):[],se={...z,source:_,componentDids:ie},Z=await n.getNotificationSendLog({input:se});return F(se),b(Z.list),S(Z.paging),Z.list}catch(D){return q.error(D.message),[]}},M=async()=>{const p=await n.getNotificationComponents({input:{teamDid:h}});v(p.componentDids)},L=x.useCallback(p=>{const g=s.children.find(T=>T.meta?.did===p);if(g)return g.ancestors=[s],g},[s]),k=async({notificationId:p,receivers:g,channels:T,...D})=>{await n.resendNotification({input:{teamDid:h,notificationId:p,receivers:g,channels:T.map(O=>O==="wallet"?E.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?E.NOTIFICATION_SEND_CHANNEL.PUSH:O),...D}})},$=x.useCallback(async p=>(await n.getUser({input:{teamDid:h,user:{did:p},options:{enableConnectedAccount:!0}}})).user,[n,h]),V=x.useCallback(async({page:p=1,pageSize:g=20,...T}={})=>{try{const D={paging:{page:p,pageSize:g},...T,userName:T.searchText||"",teamDid:h,dateRange:T.dateRange?[H(T.dateRange[0]).toISOString(),H(T.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:D})}catch(D){throw q.error(D.message),D}},[n,h]);x.useEffect(()=>{h&&M()},[h]),i(E.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{w.has(p.notificationId)&&U(P)},[w,P]),i(E.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{w.has(p.id)||U(P)},[w,P]);const J={fetch:U,data:l,paging:m,blocklet:s,getComponent:L,resendNotification:k,getUser:$,componentDids:y,getReceivers:V,inService:r,teamDid:h};return e.jsx(Kt,{value:{notificationRecords:J},children:t})}function _e(){const{notificationRecords:t}=x.useContext(at);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const qt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(Nt,{type:qt[t],children:t})}const Ut=(t,s,n="")=>{if(!n||!s)return"";switch(n){case E.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function it(t,s,n={}){const{status:r,updatedAt:i,reason:l="",channel:b="wallet"}=n,m=i?t("notification.sendStatus.sentTime",{date:Dt(i,s)}):"",S=Ut(t,b,l);return r===E.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:m,reason:S}:r===E.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:m}:{status:"pending",title:t("notification.sendStatus.pending"),reason:S,sentTime:m}}const Oe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Le=["wallet","pushKit","email"],$e=["info","success","error","warning"],ot=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},rt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},$t=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ot(t),enabled:n}},Vt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:rt(t),enabled:n}},Gt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),Xt=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),Yt=(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})}]:[],xe=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},Qt=(t,s="")=>{if(s&&Le.includes(s)){const l=`${s}SendRecord`,b=ee(t,l,[]);return xe(b)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return xe(l)}const i={};return Le.forEach(l=>{const b=`${l}SendRecord`,m=ee(t,b,[]),S=xe(m);i[l]=S}),r.length>0&&r.forEach(l=>{const b=n[l]??[],m=xe(b);i[l]=m}),i},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},je=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},Jt=t=>{switch(t){case E.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case E.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case E.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case E.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},lt=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:i,title:l="",sentTime:b="",reason:m=""}=t,S=[l,m].filter(Boolean).join(", ");return e.jsx(mt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(X,{color:"inherit",sx:{fontSize:12},children:S}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(N,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(N,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(N,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Oe[i]}}),e.jsx(N,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Oe[i]}})]}),e.jsx(X,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Se.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Se({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:i}=Q();return e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(X,{children:[s,": "]}),t.map(l=>{const b=it(r,i,{status:l});return e.jsx(ke,{size:"small",label:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:b,enableTooltip:!1,children:b.title})}),onDelete:m=>n(m,l)},l)})]})}Be.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 Be({filterList:t,onChange:s,index:n,column:r,filterValues:i,label:l,renderLabel:b}){return e.jsxs(Fe,{className:"filter-container",children:[e.jsx(Ve,{component:"legend",children:l}),e.jsx(Re,{row:!0,children:i.map(m=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(m.value??m)>-1,onChange:S=>{const h=[...t];S.target.checked?h[n]=[...h[n],m.value??m]:h[n]=h[n].filter(y=>y!==(m.value??m)),s(h[n],n,r)},name:m.value??m}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(m)})},m.value??m))})]})}function we(t){return e.jsx(Be,{...t,renderLabel:s=>e.jsx(te,{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:i}){const{t:l,locale:b}=Q(),m=it(l,b,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:m,showTitle:!0}),m.status!=="success"&&e.jsx(Ce,{className:"resend-btn",size:"small",startIcon:e.jsx(Pe,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:l("notification.resend")})]})}ze.propTypes={value:d.array.isRequired,onChange:d.func};function ze({value:t,onChange:s}){const{locale:n}=Q(),r=H().toDate(),[i,l]=x.useState(null),b=x.useCallback(h=>{l(i?null:h.currentTarget)},[i]),m=!!i,S=x.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(X,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ce,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ee,{open:m,anchorEl:i,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Wt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Mt(r),onChange:S})})]})}We.propTypes={itemComponent:d.elementType.isRequired};function We({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(i=>i.length).length?null:e.jsxs(N,{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(wt.TableFilterList,{...s,ItemComponent:t})})]})}function Me({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const i=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(ke,{label:t,variant:"outlined",...i&&l?{onDelete:i}:{}})}Me.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const Zt=[{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}];ct.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function ct({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[i,l]=x.useState(Zt),[b,m]=x.useState(!0),S=(y,v)=>{v.checked=y.target.checked;const P=i.map(F=>({...F,checked:F.value===v.value?v.checked:F.checked}));l(P)},h=y=>{y.stopPropagation(),n({channels:i.filter(v=>v.checked).map(v=>v.value),isResendFailedOnly:b})};return e.jsxs(N,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(X,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(N,{className:"choose-channel",children:e.jsxs(Fe,{component:"fieldset",variant:"standard",children:[e.jsx(Ve,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(y=>e.jsx(Te,{control:e.jsx(Ie,{checked:y.checked,onChange:v=>S(v,y),name:y.value}),label:y.label},y.value))})]})}),e.jsx(N,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:b,onChange:y=>m(y.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(N,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ce,{onClick:y=>{y.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ce,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Ge,{size:16}),r("common.confirm")]})]})]})}dt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function dt({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:i}=Q(),l=Xe(),b=x.useMemo(()=>Qe(l,lt()),[l]),{getReceivers:m,inService:S,teamDid:h,getUser:y,blocklet:v}=_e(),[P,F]=x.useState(!1),[w,U]=x.useState([]),M=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[k,$]=x.useState(null),[V,J]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,g]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[T,D]=x.useState([]),O=[{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"}],z=async()=>{if(!P&&t)try{F(!0);const a=await m({notificationId:t,...p}),o=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,S)}}));U(o),J(a.paging),F(!1)}catch(a){q.error(a.message),F(!1)}};x.useEffect(()=>{z()},[p]);const _=a=>{a.stopPropagation();const o=a.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ie=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(Pe,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:V.page-1,rowsPerPage:V.pageSize,count:V.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:T,onRowSelectionChange:(a,o)=>{D(o.map(c=>c.dataIndex))},customToolbarSelect:ie},Z=({page:a,rowsPerPage:o,searchText:c,filterList:C})=>{const[,B=[],G=[],K=[]]=C;p.pageSize!==o?g(W=>({...W,pageSize:o,page:1})):p.page!==a+1?g(W=>({...W,page:a+1})):p.searchText!==c?g(W=>({...W,searchText:c,page:1})):pe(B,p.walletSendStatus)?pe(G,p.pushKitSendStatus)?pe(K,p.emailSendStatus)||g(W=>({...W,emailSendStatus:K,page:1})):g(W=>({...W,pushKitSendStatus:G,page:1})):g(W=>({...W,walletSendStatus:B,page:1}))},oe=x.useCallback(async(a,o)=>{if(!o)return!1;const c=await y(o);return c?a==="wallet"?Gt(c):a==="email"?$t(v,c):a==="pushKit"?Vt(v,c):a==="webhook"?Xt(c):!0:!1},[y,v]),Ne=x.useCallback(a=>Yt(r,a),[r]),f=()=>{M.anchorEl=null,M.position=null,$(null)},u=()=>{L.anchorEl=null,L.position=null},j=async(a,o,c=!0,C="")=>{if(!(!o.length||!a.length))try{s(a,o,c,C),L.anchorEl||(await ge(.5),f())}catch(B){console.error("handleResend error",{error:B})}},I=async({channels:a,isResendFailedOnly:o})=>{const c=T.map(C=>w[C].receiver);await j(a,c,o),await ge(.5),u(),D([])},A=async(a,o=[],c=!0)=>{try{await j(["webhook"],[a.receiver],c,o)}catch(C){q.error(C.response?C.response.statusText:C.message)}},R=async(a,o,c,C=[],B=!0)=>{if(a.stopPropagation(),Qt(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!Le.includes(c)){await A(o,C,B);return}if(a){const K=a.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}$({channel:c});try{const K=await oe(c,o.receiver);await ge(1),$({channel:c,result:K}),(typeof K=="boolean"&&K||Ct(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[o.receiver],B),L.anchorEl||(await ge(.5),f()))}catch(K){q.error(K.message)}},re=a=>{g(o=>({...o,dateRange:a,page:1}))},ne=(a,o,c,C)=>{a.stopPropagation();const B=c.filter(G=>G!==o);g(G=>({...G,[C]:B,page:1}))},le=Y(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:o,receiver:c}=w[a];return o?e.jsxs(N,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Je,{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(zt,{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:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:o,index:c,column:C,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"wallet",onResend:B=>R(B,w[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"pushkit",onResend:B=>R(B,w[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:o,index:c,column:C,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"email",onResend:B=>R(B,w[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Email",filterList:a,onChange:o,index:c,column:C,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:o}=w[a];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[C,B]=c,G=B[0];return e.jsx(N,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(N,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:C},C),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,w[a],"webhook",[C],!1)})]},C)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:o}=w[a];return e.jsx(tt,{value:o,locale:i,shouldUpdate:!0})}}}],[w,i,p,r]),ft=[e.jsx(ze,{value:p.dateRange,onChange:re},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:P,startIcon:e.jsx(ht,{}),onClick:()=>z(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(N,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(ts,{children:e.jsxs(Ye,{theme:b,children:[e.jsx(Ze,{className:"receivers-table",locale:i,loading:P,columns:le,data:w,onChange:Z,options:se,customButtons:ft,components:{TableFilterList:a=>e.jsx(We,{...a,itemComponent:o=>e.jsx(Me,{...o,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ee,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ss,{children:[e.jsxs(X,{variant:"body1",component:"div",className:"check-title",children:[k?.channel," Checking"]}),e.jsx(N,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:Ne(k?.channel).map(a=>{const{type:o,pass:c,fail:C}=a;return!k?.result||k?.result?.[o]?e.jsxs(X,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:k?.result?.[o]?be.success.main:"inherit"},children:[k?.result?e.jsx(gt,{}):e.jsx(Ge,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs(X,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:be.error.main},children:[e.jsx(xt,{}),e.jsx("span",{children:C})]},o)})})]})}),L.anchorEl&&e.jsx(Ee,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(ct,{loading:n,onCancel:u,onConfirm:I})})]})})})}const es=x.memo(dt),ts=ae.div`
|
|
2
|
-
td.MuiTableCell-footer {
|
|
3
|
-
border: none !important;
|
|
4
|
-
}
|
|
5
|
-
.sent-status-cell {
|
|
6
|
-
.resend-btn {
|
|
7
|
-
display: none;
|
|
8
|
-
}
|
|
9
|
-
&:hover {
|
|
10
|
-
.resend-btn {
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`,ss=ae.div`
|
|
16
|
-
padding: 8px 16px;
|
|
17
|
-
.check-title {
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
margin-bottom: 8px;
|
|
20
|
-
&::first-letter {
|
|
21
|
-
text-transform: uppercase;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.check-item {
|
|
25
|
-
svg {
|
|
26
|
-
font-size: 16px;
|
|
27
|
-
}
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
}
|
|
30
|
-
`,fe=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ns(t){const{wallet:s,push:n,email:r,webhook:i}=t;return[{name:"Wallet",value:e.jsx(de,{item:s})},{name:"Push",value:e.jsx(de,{item:n})},{name:"Email",value:e.jsx(de,{item:r})},...i.total>0?[{name:"Webhook",value:e.jsx(de,{item:i,isWebhook:!0})}]:[]]}function as(t,s,n){const{wallet:r,push:i,email:l,webhook:b}=t;return[{name:"Wallet",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...b.total>0?[{name:"Webhook",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:b,isWebhook:!0,onResend:s})}]:[]]}Ke.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};de.propTypes={item:d.object.isRequired,isWebhook:d.bool};function de({item:t,isWebhook:s=!1}){const{t:n}=Q(),r=s?t.success.length:t.success,i=t.total,l=r===i?"success":"failed";return e.jsx(N,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2},children:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsxs(te,{config:{status:l},enableTooltip:!1,children:[fe(r)," / ",fe(i)," ",n("notification.sendStatus.success")]})})})}ue.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};function ue({channel:t=E.NOTIFICATION_SEND_CHANNEL.WALLET,item:s,isWebhook:n=!1,onResend:r=()=>{},loading:i=!1}){const{t:l}=Q(),{success:b,failed:m,pending:S}=s,h=Jt(t),y=n?b.length:b,v=n?m.length:m,P=n?S.length:S,F=async L=>{L.stopPropagation();const k=n?[...new Set([...b,...m].map($=>$))]:[];await r([t],[],!0,k)},w=y+v,U=w>0?y/w*100:0,M=w>0?v/w*100:0;return e.jsxs(is,{successRatio:U,failedRatio:M,children:[e.jsxs(X,{variant:"h6",children:[h," (",s.total,")"]}),e.jsxs(X,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Oe.success,fontWeight:600,fontSize:24},children:fe(y)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(N,{className:"unsent-area",children:[e.jsxs(N,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[fe(v)," ",l("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[fe(P)," ",l("notification.sendStatus.pending")]})]}),v>0&&e.jsx(N,{className:"resend-btn",children:e.jsx(Ae,{size:"small",color:"primary",loading:i,variant:"contained",startIcon:e.jsx(Pe,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:F,children:l("notification.resend")})})]})]})}function Ke({statistics:t,mode:s="simple",onResend:n=()=>{},resending:r=!1}){const i=Y(()=>s==="simple"?ns(t):as(t,n,r),[t,s]);return s==="simple"?e.jsx("div",{children:i.map(l=>e.jsx(et,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(He,{container:!0,spacing:2,children:i.map(l=>e.jsx(He,{size:{md:4,sm:6,xs:12},children:l.value},l.name))})}const is=ae(N)`
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
align-items: flex-start;
|
|
34
|
-
padding: 16px;
|
|
35
|
-
border-radius: 8px;
|
|
36
|
-
background: ${({successRatio:t,failedRatio:s,theme:n})=>t===0&&s===0?n.palette.grey[300]:`linear-gradient(to right, ${bt(n.palette.success.light,.4)} ${t}%, ${n.palette.grey[100]} ${t}%)`};
|
|
37
|
-
transition: 'background 0.5s ease';
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
.unsent-area {
|
|
40
|
-
width: 100%;
|
|
41
|
-
position: relative;
|
|
42
|
-
.resend-btn {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;ut.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function ut({notification:t,onCancel:s=()=>{},blocklet:n,tab:r="info"}){const{t:i,locale:l}=Q(),{getComponent:b,resendNotification:m}=_e(),[S,h]=x.useState(!1),y=Y(()=>b(t.componentDid)||n,[n,t.componentDid]),v=De({tab:r||"info"}),P=x.useCallback(async(p,g,T=!0,D=[])=>{if(!p.length||!t.id)return;const O=g.length>0?g:t?.receivers?.map(_=>_.receiver);if(!O.length)return;let z=[...p];if(z.includes(E.NOTIFICATION_SEND_CHANNEL.PUSH)&&!rt(n)&&(q.warning(i("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),z=z.filter(_=>_!==E.NOTIFICATION_SEND_CHANNEL.PUSH)),z.includes(E.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ot(n)&&(q.warning(i("notification.sendStatus.reason.unavailable",{channel:"Email"})),z=z.filter(_=>_!==E.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!z.length)try{h(!0),await m({notificationId:t.id,receivers:O,channels:z,resendFailedOnly:T,...z.includes("webhook")&&D.length?{webhookUrls:D}:{}}),q.success("Message has been sent!")}catch(_){console.error("handleResend error",{error:_}),q.error(_.response?_.response.statusText:_.message)}finally{h(!1)}},[n,t.id,t?.receivers,m,i]),F=Y(()=>Pt(t),[t]),w=Y(()=>_t(t),[t]),U=Y(()=>F?t?.actorInfo:[],[t]),M=Y(()=>n?.did||n?.meta?.did||"",[n]);function L(){return[{name:i("notification.from"),value:F&&w?e.jsx(Ot,{actors:U,teamDid:M,size:32,showName:!0}):e.jsx(Lt,{size:32,blocklet:y,showName:!0,hideDot:!0})},{name:i("notification.notificationTitle"),value:e.jsx(me,{maxLength:50,children:t.title})},{name:i("notification.body"),value:F?e.jsx(kt,{notification:t,blocklet:n}):e.jsx(Bt,{notification:t,rows:0})},{name:i("notification.severity"),value:e.jsx(he,{severity:t.severity})},{name:i("notification.createdAt"),value:e.jsx(It,{value:t.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(g=>e.jsx(et,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:g.name,children:g.value},g.name))}const k={info:{label:i("common.basicInfo"),value:"info",component:L},receivers:{label:i("notification.receiver"),value:"receivers"},statistics:{label:i("notification.statistics"),value:"statistics"}},$=Object.values(k).map(({label:p,value:g})=>({label:p,value:g})),V=k[v.tab]||k.info,J=p=>{v.tab=p};return e.jsx(Rt,{title:i("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{v.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(rs,{children:[e.jsx(N,{className:"tabs",sx:{mx:3},children:e.jsx(Tt,{tabs:$,current:v.tab,onChange:J,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[v.tab==="receivers"&&e.jsx(es,{notificationId:t.id,resending:S,handleResend:P}),v.tab==="statistics"&&e.jsx(Ke,{statistics:t.statistics,mode:"detail",resending:S,onResend:P}),v.tab==="info"&&e.jsx(V.component,{})]})]})})}const os=x.memo(ut),rs=ae.div`
|
|
49
|
-
& > .notification-row {
|
|
50
|
-
padding: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.tabs {
|
|
54
|
-
margin: 0;
|
|
55
|
-
}
|
|
56
|
-
.body {
|
|
57
|
-
margin-top: 16px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.channel-item {
|
|
61
|
-
display: flex;
|
|
62
|
-
padding: 4px;
|
|
63
|
-
justify-content: flex-start;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 8px;
|
|
66
|
-
> p {
|
|
67
|
-
font-size: 15px;
|
|
68
|
-
}
|
|
69
|
-
.resend-btn {
|
|
70
|
-
svg {
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
}
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
font-size: 12px;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
&.disabled {
|
|
78
|
-
cursor: not-allowed;
|
|
79
|
-
color: ${be.text.disabled};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
`;ve.propTypes={blocklet:d.object,label:d.string};const ls=ae.div`
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-items: flex-start;
|
|
86
|
-
align-items: center;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
.name {
|
|
89
|
-
display: block;
|
|
90
|
-
max-width: 260px;
|
|
91
|
-
white-space: nowrap;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
text-overflow: ellipsis;
|
|
94
|
-
}
|
|
95
|
-
`;function ve({blocklet:t=null,label:s=""}){return e.jsx(ls,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(nt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||t.meta?.title})]}):e.jsx("span",{className:"name",children:s})})}pt.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function pt({list:t,label:s,onDelete:n=()=>{}}){return e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(X,{children:[s,": "]}),t.map(r=>e.jsx(ke,{size:"small",label:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(he,{severity:r})}),onDelete:i=>n(i,r)},r))]})}function cs(t){return e.jsx(Be,{...t,renderLabel:s=>e.jsx(he,{severity:s})})}function ds({customTableButtons:t}){const{t:s,locale:n}=Q(),r=Xe(),i=yt(r.breakpoints.down("sm")),l=x.useMemo(()=>Qe(r,lt()),[r]),[b,m]=x.useState(!1),{data:S,paging:h,blocklet:y,fetch:v,getComponent:P,componentDids:F,inService:w,teamDid:U}=_e(),M=x.useRef(null),[L,k]=x.useState(null),[$,V]=x.useState("info"),J=`notification-records-${y.meta?.did}`,p=Et(J),[g,T]=x.useState({pageSize:p.rowsPerPage||10,page:p.page?p.page+1:1,dids:p.dids||[],dateRange:p.dateRange||[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),D=Y(()=>{if(!y.children||!y.children.length)return[];const f=[];return y.children.forEach(u=>{const j=u.did||u.meta?.did;F.includes(j)&&(u.ancestors=[y],f.push(u))}),f},[F,y]),O=async f=>{try{m(!0),await v(f),m(!1)}finally{m(!1)}};x.useEffect(()=>{O(g)},[g]),x.useEffect(()=>{const f=S.find(u=>u.id===L?.id);L&&f&&k({...f})},[S]);const z=(f,u,j,I)=>{f.stopPropagation();const A=j.filter(R=>R!==u);T(R=>({...R,[I]:A,page:1}))},_=({page:f,rowsPerPage:u,filterList:j})=>{const[I=[],,,,A=[]]=j;g.pageSize!==u?T(R=>({...R,pageSize:u,page:1})):g.page!==f+1?T(R=>({...R,page:f+1})):pe(g.dids,I)?pe(g.severities,A)||T(R=>({...R,severities:A,page:1})):T(R=>({...R,dids:I,page:1}))},ie=x.useCallback(()=>{k(null),V("info")},[]),se=x.useCallback(()=>{v(g)},[v,g]),Z=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((u,j)=>{if(u==="system")return e.jsx("span",{children:s("notification.system")},`system-${j}`);const I=D.find(A=>(A.did||A.meta?.did)===u);return e.jsx(ve,{blocklet:I,label:I?.title||I?.meta?.title},u)}),update:(f,u,j)=>(f[j].splice(u,1),f)},filterOptions:{names:D,logic:(f,u)=>u.length?!u.includes(f):!1,display:(f,u,j,I)=>e.jsxs(Fe,{style:{width:"380px"},children:[e.jsx(jt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(St,{multiple:!0,value:f[j],renderValue:A=>e.jsx(N,{style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{display:"flex",gap:1,alignItems:"center"},children:A.map(R=>{if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const re=D.find(ne=>(ne.did||ne.meta?.did)===R);return e.jsx(ve,{blocklet:re,label:re?.title||re?.meta?.title},R)})}),onChange:A=>{f[j]=A.target.value,u(f[j],j,I)},children:[e.jsx(qe,{value:"system",children:s("notification.system")}),D.map(A=>{const R=A.did||A.meta?.did;return e.jsx(qe,{value:R,children:e.jsx(ve,{blocklet:A,label:A.title||A.meta?.title})},R)})]})]})},customBodyRenderLite:f=>{const u=S[f],j=P(u.componentDid);return e.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[j?e.jsx(nt,{size:32,blocklet:j,ancestors:j.ancestors??[]}):e.jsx(Ft,{blocklet:y,size:32}),e.jsx(me,{maxLength:50,children:j?.meta?.title||y?.meta?.title})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const u=S[f],{receivers:j}=u;return e.jsx(vt,{total:j.length,renderSurplus:I=>I<100?e.jsxs("span",{children:["+",I]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:I=>{I.stopPropagation(),k(u),V("receivers")},children:j.map(I=>{const{receiverUser:A}=I,R=st(A.avatar,U,w);return e.jsx(Je,{alt:A.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:I.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},I.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const u=S[f];return e.jsx(N,{onClick:j=>{j.stopPropagation(),k(u),V("statistics")},children:e.jsx(Ke,{statistics:u.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const u=S[f];return e.jsx(me,{maxLength:50,children:u.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const u=S[f];return e.jsx(he,{severity:u.severity})},filter:!0,filterType:"custom",filterList:g.severities??[],customFilterListOptions:{render:f=>e.jsx(pt,{list:f,label:s("notification.severity"),onDelete:(u,j)=>{u.stopPropagation(),z(u,j,Z[4].options.filterList,"severities")}}),update:ye},filterOptions:{names:$e,fullWidth:!0,logic:je,display:(f,u,j,I)=>e.jsx(cs,{label:s("notification.severity"),filterList:f,onChange:u,index:j,column:I,filterValues:$e})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:u}=S[f];return e.jsx(tt,{value:u,locale:n,shouldUpdate:!0})}}}],oe=f=>{T(u=>({...u,dateRange:f,page:1}))},Ne=[...t||[]];return e.jsxs(N,{ref:M,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(us,{isBreakpointsDownSm:i,children:e.jsx(Ye,{theme:l,children:e.jsx(Ze,{className:"main-table",verticalKeyWidth:100,loading:b,locale:n,columns:Z,data:S,durable:J,onChange:_,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:h.page-1,rowsPerPage:h.pageSize,count:h.total,...p,onRowClick:(f,{dataIndex:u})=>{k(S[u])}},title:e.jsx(ze,{value:g.dateRange,onChange:oe}),customButtons:Ne,components:{TableFilterList:f=>e.jsx(We,{...f,itemComponent:u=>e.jsx(Me,{...u,canDelete:j=>j?.columnNames?.[j?.index||0]?.name==="sender"})})}})})}),L&&e.jsx(os,{refresh:se,onCancel:ie,notification:L,blocklet:y,tab:$})]})}const us=ae.div`
|
|
96
|
-
td.MuiTableCell-footer {
|
|
97
|
-
border: none !important;
|
|
98
|
-
}
|
|
99
|
-
.sent-status-cell {
|
|
100
|
-
.resend-btn {
|
|
101
|
-
display: none;
|
|
102
|
-
}
|
|
103
|
-
&:hover {
|
|
104
|
-
.resend-btn {
|
|
105
|
-
display: flex;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.custom-toobar-btns {
|
|
111
|
-
gap: 4px;
|
|
112
|
-
}
|
|
113
|
-
.custom-toobar-title-inner {
|
|
114
|
-
display: flex;
|
|
115
|
-
justify-content: ${({isBreakpointsDownSm:t})=>t?"space-between":"flex-end"};
|
|
116
|
-
padding-right: ${({isBreakpointsDownSm:t})=>t?"0":"8px"};
|
|
117
|
-
flex-wrap: wrap;
|
|
118
|
-
gap: 8px;
|
|
119
|
-
}
|
|
120
|
-
`;ps.propTypes={blocklet:d.object.isRequired,customTableButtons:d.array};function ps({blocklet:t={},customTableButtons:s=[]}){return e.jsx(Ht,{blocklet:t,children:e.jsx(ds,{customTableButtons:s})})}export{ps as default};
|