@abtnode/blocklet-services 1.16.42-beta-20250413-121549-22e9a196 → 1.16.42-beta-20250415-224346-080ee735
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +4 -3
- package/api/libs/auth/index.js +5 -5
- package/api/libs/connect/session.js +29 -3
- package/api/libs/jwt.js +36 -1
- package/api/routes/federated.js +1 -1
- package/api/routes/mcp.js +26 -13
- package/api/routes/{oauth.js → oauth/client.js} +22 -21
- package/api/routes/oauth/server.js +95 -0
- package/api/routes/user.js +5 -4
- package/api/services/auth/connect/gen-access-key.js +92 -0
- package/api/services/auth/index.js +8 -0
- package/api/services/auth/passkey.js +1 -1
- package/api/services/auth/session.js +2 -3
- package/api/services/dashboard/index.js +6 -0
- package/api/services/mcp/server.js +151 -32
- package/api/services/notification/queue.js +9 -6
- package/api/services/oauth/server.js +213 -0
- package/api/util/index.js +1 -1
- package/api/util/user-util.js +1 -21
- package/dist/assets/AdapterDayjs-BLBXeg9J.js +3 -0
- package/dist/assets/{ArrowDropDown-a-C4j7Lx.js → ArrowDropDown--dAaadP8.js} +1 -1
- package/dist/assets/{CheckCircle-CuYzdCtm.js → CheckCircle-Av1UotA-.js} +1 -1
- package/dist/assets/{ChevronLeft-CnflXey6.js → ChevronLeft-De8Da-PB.js} +1 -1
- package/dist/assets/{ChevronRight-DE7hYCb3.js → ChevronRight-CQOI2CyK.js} +1 -1
- package/dist/assets/{Community-C8NtUXNH.js → Community-B_YqAP9P.js} +1 -1
- package/dist/assets/{DeleteOutline-PGhagisl.js → DeleteOutline-Cgoi-K0i.js} +1 -1
- package/dist/assets/{Done-BVaQae1-.js → Done-BYuUlh_s.js} +1 -1
- package/dist/assets/{Download-DNNh4N1T.js → Download-DUKR_Wkm.js} +1 -1
- package/dist/assets/Edit-D2RQMivt.js +1 -0
- package/dist/assets/{EditIcon-Y1U-3M09.js → EditIcon-5ixNT5sW.js} +1 -1
- package/dist/assets/{Email-BYzCrU9G.js → Email-RGD-rKFl.js} +1 -1
- package/dist/assets/{Error-C4dVUMw4.js → Error-By0ZMWzh.js} +1 -1
- package/dist/assets/{ExpandLess-Blh1x-4z.js → ExpandLess-BNGLjxae.js} +1 -1
- package/dist/assets/{Google-CAujGJ1A.js → Google-tZCjvU7D.js} +1 -1
- package/dist/assets/{Holiday-DxDxhx5X.js → Holiday-C_1hMIGZ.js} +1 -1
- package/dist/assets/{InfoOutlined-DF9JwavD.js → InfoOutlined-DSoJjRQo.js} +1 -1
- package/dist/assets/{Launch-gOz_lwLg.js → Launch-B161pSEw.js} +1 -1
- package/dist/assets/{LaunchOutlined-MbSPR9qn.js → LaunchOutlined-wehxIahb.js} +1 -1
- package/dist/assets/{Location-CEwgGcA5.js → Location-B6FoL795.js} +1 -1
- package/dist/assets/{LockIcon-D7BH0t_p.js → LockIcon-D3vSMIOk.js} +1 -1
- package/dist/assets/{Meeting-BJz5QiFc.js → Meeting-BfKca-xn.js} +1 -1
- package/dist/assets/{MoreHoriz-CGWVyYh4.js → MoreHoriz-Bo_R2nuS.js} +1 -1
- package/dist/assets/{OffSick--msvqLGm.js → OffSick-QPPyYyU6.js} +1 -1
- package/dist/assets/{Phone-CDl3oDYG.js → Phone-_lRBpoVi.js} +1 -1
- package/dist/assets/{PlayArrow-CxWt6459.js → PlayArrow-D38lbyGo.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-CPHZnM6u.js → QuestionMarkCircle-B4EnwYju.js} +1 -1
- package/dist/assets/{ServerLogo-vX_nf8Sc.js → ServerLogo-BW4PKwV0.js} +1 -1
- package/dist/assets/{Timezone-uXi4_8BX.js → Timezone-bYzGwn3x.js} +1 -1
- package/dist/assets/{TuneOutlined-DcqnBMqE.js → TuneOutlined-DMMtKa6E.js} +1 -1
- package/dist/assets/{ViewList-B6eveRY-.js → ViewList-CMIoKrN6.js} +1 -1
- package/dist/assets/{WorkingRemotely-CK4z1-Sd.js → WorkingRemotely-BK9_vlZ-.js} +1 -1
- package/dist/assets/{access-control-Dxyg5dpc.js → access-control-DLD9n3S7.js} +1 -1
- package/dist/assets/actions-CMsM02NP.js +1 -0
- package/dist/assets/add-component-core-FnU4dwXM.js +763 -0
- package/dist/assets/{add-resource-BetUBTvt.js → add-resource-CubCXHBS.js} +1 -1
- package/dist/assets/{addon-B1aBsfOX.js → addon-5JaI2ctX.js} +1 -1
- package/dist/assets/advanced-D4wfoh0v.js +14 -0
- package/dist/assets/api-3sG9at7i.js +1 -0
- package/dist/assets/appearance-BUsj4DWC.js +1 -0
- package/dist/assets/{ar-DrRqcx2b.js → ar-BUQWR0Zu.js} +1 -1
- package/dist/assets/{ar-Cb5zQ0go.js → ar-CMzth4YC.js} +3 -3
- package/dist/assets/{audit-logs-SSAqJt40.js → audit-logs-rk_iUYcM.js} +3 -3
- package/dist/assets/authorize-CDJXjmiI.js +1 -0
- package/dist/assets/{base32-iVyUiizz.js → base32-BhlNgZPk.js} +1 -1
- package/dist/assets/{branding-BDuOcSfH.js → branding-BBbE2Klb.js} +1 -1
- package/dist/assets/branding-JQ1914RB.js +40 -0
- package/dist/assets/{bundle-avatar-DfAWUEqX.js → bundle-avatar-woUZoGoi.js} +1 -1
- package/dist/assets/button-Rx3uHycr.js +1 -0
- package/dist/assets/click-to-copy-BxZJa7n5.js +1 -0
- package/dist/assets/cloneDeep-kMVNpUap.js +1 -0
- package/dist/assets/{complete-R99mlHBI.js → complete-KnPBZq-P.js} +2 -2
- package/dist/assets/{component-By64LaLD.js → component-fD-EGTLm.js} +80 -80
- package/dist/assets/{config-BvNNOdw8.js → config-8xeoVfWN.js} +2 -2
- package/dist/assets/{config-BHBxeyYh.js → config-DbqQgRSU.js} +1 -1
- package/dist/assets/{config-navigation-CPd_4svD.js → config-navigation-DrgPbe5I.js} +6 -6
- package/dist/assets/{config-space-BgWEAM0m.js → config-space-DZ9w_4_9.js} +1 -1
- package/dist/assets/confirm-_RIb3OmR.js +7 -0
- package/dist/assets/connect-CJOq1BXE.js +5 -0
- package/dist/assets/{connect-Bq-p3hnS.js → connect-CPIImVme.js} +1 -1
- package/dist/assets/{connect-to-bQVCrkhh.js → connect-to-BdhN0BHi.js} +1 -1
- package/dist/assets/{content-layout-CFHoSupA.js → content-layout-BM34AwsG.js} +1 -1
- package/dist/assets/dashboard-vsk4QHJ1.js +275 -0
- package/dist/assets/de-BkBUnf4o.js +13 -0
- package/dist/assets/{de-BRPos3d1.js → de-_X0eQXZu.js} +1 -1
- package/dist/assets/delete-confirm-DaoAi4Gz.js +1 -0
- package/dist/assets/did-address-CGHn52xI.js +1 -0
- package/dist/assets/domain-BJUSWYGQ.js +9 -0
- package/dist/assets/domain-action-card-9r42-rWK.js +29 -0
- package/dist/assets/domains-BNDFk-7R.js +1 -0
- package/dist/assets/{email-JviRloBo.js → email-fp1LVcF6.js} +3 -3
- package/dist/assets/empty-spinner-Ict2ItjU.js +1 -0
- package/dist/assets/es-C47yMWlQ.js +14 -0
- package/dist/assets/{es-D2rCdMgt.js → es-yHIDSG5r.js} +1 -1
- package/dist/assets/{exchange-passport-3aXbJr-q.js → exchange-passport-DIyhYtFS.js} +1 -1
- package/dist/assets/{format-error-BrmqJs5a.js → format-error-LAoTjvJe.js} +1 -1
- package/dist/assets/{fr-Chv_7X3-.js → fr-CXUB715N.js} +3 -3
- package/dist/assets/{fr-DAFx50ef.js → fr-D6i3bCqR.js} +1 -1
- package/dist/assets/{fuel-DOs3bqYm.js → fuel-aGwI1uP2.js} +1 -1
- package/dist/assets/gen-access-key-DMS1kzry.js +2 -0
- package/dist/assets/{get-safe-url-CWgEUVPT.js → get-safe-url-DMordnyN.js} +1 -1
- package/dist/assets/{get-safe-url-eATw6wn7.js → get-safe-url-DW2Z07ex.js} +1 -1
- package/dist/assets/{hi-CkD7b6N9.js → hi-ChVLDWm_.js} +1 -1
- package/dist/assets/hi-DCG5QxbH.js +11 -0
- package/dist/assets/{home-a0RwGUp7.js → home-B_gUzcjU.js} +1 -1
- package/dist/assets/id-BjbrrkXh.js +14 -0
- package/dist/assets/{id-BMWKdVei.js → id-D6XXuY_a.js} +1 -1
- package/dist/assets/{iframe-DVBEjxC1.js → iframe-BEanRyio.js} +1 -1
- package/dist/assets/index-4rY7Xp2W.js +14 -0
- package/dist/assets/{index-CwdXL2a0.js → index-AhbLOD9c.js} +1 -1
- package/dist/assets/{index-DrUxhMM5.js → index-BDNlzmD0.js} +4 -4
- package/dist/assets/{index-Th4BUzmb.js → index-BPa_QtWl.js} +30 -30
- package/dist/assets/index-BjN8LAYh.js +224 -0
- package/dist/assets/index-BmexzVQt.js +1 -0
- package/dist/assets/{index-C1nvgBfF.js → index-C-7MyHbp.js} +1 -1
- package/dist/assets/index-C0hr4pkt.js +346 -0
- package/dist/assets/{index-BGeUo-5w.js → index-CFJtmMCn.js} +1 -1
- package/dist/assets/index-CFkRKsyT.js +290 -0
- package/dist/assets/{index-9aeq_G-H.js → index-CX4jvZnM.js} +1 -1
- package/dist/assets/{index-DQIxR9j5.js → index-CbW18ndN.js} +2 -2
- package/dist/assets/index-CcjD0qiY.js +93 -0
- package/dist/assets/{index-DjIOxw8x.js → index-D1fVmwHN.js} +1 -1
- package/dist/assets/{index-VvWvVQT8.js → index-D22ZWGxu.js} +1 -1
- package/dist/assets/{index-BBl5mftj.js → index-D22lazSG.js} +3 -3
- package/dist/assets/{index-BVOsgGKh.js → index-D2EAXstd.js} +2 -2
- package/dist/assets/index-DBZZ-U66.js +1 -0
- package/dist/assets/index-DUQK_NaI.js +113 -0
- package/dist/assets/{index-DBLdE2lQ.js → index-D_gSWW1P.js} +1 -1
- package/dist/assets/index-DbpVrp8z.js +138 -0
- package/dist/assets/{index-MqiIu4kd.js → index-DkPKxdcu.js} +1 -1
- package/dist/assets/{index-sv3a1ZUw.js → index-DzDfEcNp.js} +1 -1
- package/dist/assets/{index-CCwUSMuP.js → index-O2l0NSUF.js} +1 -1
- package/dist/assets/{index-CPE8Apzb.js → index-pV_0wOyY.js} +1 -1
- package/dist/assets/{index-DVQCgvFb.js → index-tUQxVYYQ.js} +1 -1
- package/dist/assets/index-xa5W6ExD.js +1 -0
- package/dist/assets/{invitation-CwtXOXZc.js → invitation-D-l4US6a.js} +3 -3
- package/dist/assets/invite-DPswrm4J.js +1 -0
- package/dist/assets/{issue-passport-DtEbcgX6.js → issue-passport-AJghkFHK.js} +1 -1
- package/dist/assets/item-zk7clNKz.js +2 -0
- package/dist/assets/{ja-D2jInSAT.js → ja-DKZCt8Yp.js} +1 -1
- package/dist/assets/ja-DmNZQIta.js +14 -0
- package/dist/assets/{ko-BGB5KJZq.js → ko-B0uE9AyQ.js} +1 -1
- package/dist/assets/ko-CfYwMwZz.js +14 -0
- package/dist/assets/{landing-page-BM1TmagN.js → landing-page-D13wALfk.js} +1 -1
- package/dist/assets/{launch-result-message-DOa3SWMR.js → launch-result-message-Bvdtucih.js} +1 -1
- package/dist/assets/{layout-DCzN0ui5.js → layout-aS-gjZH3.js} +1 -1
- package/dist/assets/list-CJt5nOcn.js +234 -0
- package/dist/assets/{list-header-BLGbkNad.js → list-header-Bm8u_Z_p.js} +1 -1
- package/dist/assets/localization-Us9buoy1.js +1 -0
- package/dist/assets/{log-C0ajhie8.js → log-DFaz-U9x.js} +7 -7
- package/dist/assets/{logger-D6n4nbwy.js → logger-DXlQ8ejK.js} +1 -1
- package/dist/assets/{login-f1AXbIm0.js → login-DKSu0ge6.js} +1 -1
- package/dist/assets/login-oauth-callback-CP7cNspN.js +1 -0
- package/dist/assets/{logo-uploader-DbAVW3BS.js → logo-uploader-B7i5QemW.js} +5 -5
- package/dist/assets/{lost-passport-Dlmv8D-L.js → lost-passport-QRUn4RXe.js} +3 -3
- package/dist/assets/{lottie-react.esm-D2t-u0YU.js → lottie-react.esm-CPHH620R.js} +1 -1
- package/dist/assets/{lottie-web-jYmAQWuC.js → lottie-web-B6s7dDoL.js} +1 -1
- package/dist/assets/omit-MMUW2k9W.js +1 -0
- package/dist/assets/{open-window-DskgWqba.js → open-window-B6LZyZAW.js} +1 -1
- package/dist/assets/{overview-DY9-9zrL.js → overview-B3A_5sHO.js} +2 -2
- package/dist/assets/{page-header-XbzfRkA7.js → page-header-DUh_2MUQ.js} +1 -1
- package/dist/assets/passport-item-BY6VS7Ot.js +1 -0
- package/dist/assets/{permission-Bi46fqEy.js → permission-DKFJEWNH.js} +1 -1
- package/dist/assets/preferences-CA76rfbp.js +1 -0
- package/dist/assets/profile-embed-DHFHXO1W.js +1 -0
- package/dist/assets/{pt-DY0Ku5W5.js → pt-DCzE4kPq.js} +1 -1
- package/dist/assets/pt-DD_rP5GH.js +12 -0
- package/dist/assets/publish-resource-rxvf6s83.js +1 -0
- package/dist/assets/{raf-schd.esm-B3j6BePR.js → raf-schd.esm-GV-XhwE0.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-B68lWn23.js → react-beautiful-dnd.esm-D0nBCaor.js} +1 -1
- package/dist/assets/{relative-time-BeR_4mfM.js → relative-time-BK3hjJNN.js} +1 -1
- package/dist/assets/roboto-latin-400-normal-BVyCgWwA.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-DXyFPIdK.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-C6iW8rdg.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-rpP1_v3s.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-BWcFiwQV.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-CbYYDfWS.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-BSFkPfbf.woff +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-DgXbz5gU.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-DvHxAkTn.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-OQJhyaXd.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-Ba-CAIIA.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-DchBbzVz.woff2 +0 -0
- package/dist/assets/{ru-Cv5vRo7s.js → ru-B9yj9TuE.js} +1 -1
- package/dist/assets/ru-CwgUUzV8.js +11 -0
- package/dist/assets/runtime-D_bXZ0w0.js +1 -0
- package/dist/assets/sdk-Hg_BMu_u.js +1 -0
- package/dist/assets/{security-DmR541pi.js → security-DEmFjZiu.js} +1 -1
- package/dist/assets/session-DB9Du-lc.js +1 -0
- package/dist/assets/setup-kkb6SvQ7.js +19 -0
- package/dist/assets/{shorten-label-BuH-7PI8.js → shorten-label-CwDvu4_S.js} +1 -1
- package/dist/assets/simple-select-DgqUhMvQ.js +1 -0
- package/dist/assets/{slicedToArray-C0MW3KIe.js → slicedToArray-B8PdYes9.js} +1 -1
- package/dist/assets/{spaces-gLUqr6Uq.js → spaces-25E9GQ6_.js} +1 -1
- package/dist/assets/{start-XbVMHGiE.js → start-DfEUlPuS.js} +1 -1
- package/dist/assets/{status-DmyvEkKL.js → status-CUyAteC9.js} +1 -1
- package/dist/assets/{step-actions-brdohYRv.js → step-actions-CAgwlOEY.js} +1 -1
- package/dist/assets/{studio-DJeZlIfF.js → studio-2U2-FOOC.js} +1 -1
- package/dist/assets/{switch-control-Br1YNOSB.js → switch-control-DwTxPESj.js} +1 -1
- package/dist/assets/th-KqE3tuDR.js +12 -0
- package/dist/assets/{th-D6oDBVGi.js → th-et0IV3ES.js} +1 -1
- package/dist/assets/traffic-B94bYvtf.js +35 -0
- package/dist/assets/{transfer-DboKwiA_.js → transfer-DWjvJtPs.js} +1 -1
- package/dist/assets/{unsubscribe-C9k_L3g5.js → unsubscribe-CTZlUfqc.js} +1 -1
- package/dist/assets/use-mobile-BHPd3bDQ.js +1 -0
- package/dist/assets/use-mobile-CHMVa8_W.js +1 -0
- package/dist/assets/useAsync-DKE0K0bz.js +1 -0
- package/dist/assets/useAsyncRetry-BBomZj1z.js +7 -0
- package/dist/assets/{useLocalStorage-0mjZfnua.js → useLocalStorage-DKl7XFfI.js} +1 -1
- package/dist/assets/{useSetState-CWq0AVWn.js → useSetState-BL3ktMon.js} +1 -1
- package/dist/assets/user-center-Du6EtGgy.js +77 -0
- package/dist/assets/{util-YnaMqM3B.js → util-BEvdQ5nP.js} +1 -1
- package/dist/assets/{util-DLK92HF8.js → util-DkIhTuT7.js} +1 -1
- package/dist/assets/{vendor-arcblock-DPMnO1AO.js → vendor-arcblock-ACo-BN0q.js} +26 -26
- package/dist/assets/{vendor-hooks-DN4nZ7TU.js → vendor-hooks-BwVH-TAd.js} +2 -2
- package/dist/assets/{vendor-mui-core-x3zpe_j_.js → vendor-mui-core-DxD1UA4o.js} +2 -2
- package/dist/assets/vendor-mui-x-Bit8yv3W.js +6 -0
- package/dist/assets/{vendor-react-DEoibe3W.js → vendor-react-DoD83n6N.js} +1 -1
- package/dist/assets/vendor-utils-CTIzdAFg.js +11 -0
- package/dist/assets/vendor-ux-did-connect-2GapMFC4.css +1 -0
- package/dist/assets/vendor-ux-did-connect-DOjsg91L.js +1832 -0
- package/dist/assets/vi-BSkiIyr-.js +12 -0
- package/dist/assets/{vi-BKKJMbW2.js → vi-LBvVt_pj.js} +1 -1
- package/dist/assets/wrap-locale-DjpRZNtr.js +1 -0
- package/dist/assets/{zh-nDA-W8Iz.js → zh-BYP8UvRZ.js} +4 -4
- package/dist/assets/{zh-tw-B9PQstHP.js → zh-tw-Dcs2VpLv.js} +3 -3
- package/dist/assets/{zh-tw-B08rjgK3.js → zh-tw-l3XXo5aT.js} +1 -1
- package/dist/assets/{zh-gJhiLbCP.js → zh-yJzqRkfw.js} +1 -1
- package/dist/index.html +9 -9
- package/dist/service-worker.js +2 -2
- package/package.json +44 -43
- package/dist/assets/actions-BAjt7G_t.js +0 -1
- package/dist/assets/add-component-core-BXowXTJz.js +0 -762
- package/dist/assets/advanced-C8t1232G.js +0 -14
- package/dist/assets/api-kwOW9mRz.js +0 -1
- package/dist/assets/appearance-BIOmTg1q.js +0 -1
- package/dist/assets/branding-NmIAi0kv.js +0 -40
- package/dist/assets/button-Kk1bqv_H.js +0 -1
- package/dist/assets/click-to-copy-DCUroWft.js +0 -1
- package/dist/assets/cloneDeep-DHAAvuEH.js +0 -1
- package/dist/assets/confirm-92J4n1RP.js +0 -7
- package/dist/assets/connect-D20f2K4u.js +0 -5
- package/dist/assets/dashboard-BgQFc2Pc.js +0 -262
- package/dist/assets/de-BOcpEFUQ.js +0 -13
- package/dist/assets/delete-confirm-AkwIQ5yF.js +0 -1
- package/dist/assets/did-address-D4v6iN2l.js +0 -1
- package/dist/assets/domain-CBdLs2D9.js +0 -9
- package/dist/assets/domain-action-card-DN3KjFwP.js +0 -29
- package/dist/assets/domains-CMJbalsn.js +0 -1
- package/dist/assets/empty-spinner-DlzuJxRt.js +0 -1
- package/dist/assets/es-DAe7HpzA.js +0 -14
- package/dist/assets/hi-BqgGDMzX.js +0 -11
- package/dist/assets/id-DbN1Ye4x.js +0 -14
- package/dist/assets/index-3q6oLa2e.js +0 -290
- package/dist/assets/index-BJYrBMyS.js +0 -1
- package/dist/assets/index-BxTrfRkG.js +0 -138
- package/dist/assets/index-C3-7zmeY.js +0 -346
- package/dist/assets/index-DWuuU3ta.js +0 -113
- package/dist/assets/index-K5iSHoYm.js +0 -224
- package/dist/assets/index-KLUHbsxg.js +0 -1
- package/dist/assets/invite-CMj5995Z.js +0 -1
- package/dist/assets/item-zVdGBfMR.js +0 -2
- package/dist/assets/ja-Bv-A_sTl.js +0 -14
- package/dist/assets/ko-Bl3kd-sp.js +0 -14
- package/dist/assets/list-BuXPrN1N.js +0 -221
- package/dist/assets/localization-qd6O0FX9.js +0 -1
- package/dist/assets/login-oauth-callback-C5CFUlUR.js +0 -1
- package/dist/assets/omit-IjXSqbDA.js +0 -1
- package/dist/assets/preferences-DPpwnIAs.js +0 -1
- package/dist/assets/profile-embed-DV5vno0C.js +0 -1
- package/dist/assets/pt-B7_jgyK-.js +0 -12
- package/dist/assets/publish-resource-z2_THSz6.js +0 -1
- package/dist/assets/roboto-cyrillic-400-normal-DAIM1_dR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-Dry59Hjn.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-CsCirF4J.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-hCeO1jFL.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-CB1Rmiii.woff +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-CzEIZVQR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-BxX1-eA_.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-DzMWdK87.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-B7rQpwPu.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-ElvJfk8V.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-CIu0AXX2.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-D_fA0fHY.woff2 +0 -0
- package/dist/assets/roboto-greek-400-normal-CAI06USH.woff +0 -0
- package/dist/assets/roboto-greek-400-normal-jFM2czAU.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-BJMS0heP.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-D8eQD5zT.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DCrt6r9F.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DpKAje7q.woff2 +0 -0
- package/dist/assets/roboto-latin-400-normal-551zQQ7R.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-CNwBRw8h.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-CkrA1NAy.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-_8jDuD7w.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-CTLkNcF_.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-DZr4b_KL.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-ZYmyxeOy.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-uRIBRJt5.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-C_ARlJGk.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-eJ10kk0m.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BNPgmEQS.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-Cnx4FGpK.woff +0 -0
- package/dist/assets/roboto-math-400-normal-B3wgz80t.woff2 +0 -0
- package/dist/assets/roboto-math-400-normal-DHrwdhE6.woff +0 -0
- package/dist/assets/roboto-math-500-normal-CFNaIMFC.woff2 +0 -0
- package/dist/assets/roboto-math-500-normal-CetgDdIa.woff +0 -0
- package/dist/assets/roboto-math-700-normal-CpTCM92H.woff +0 -0
- package/dist/assets/roboto-math-700-normal-xbpggnJp.woff2 +0 -0
- package/dist/assets/roboto-symbols-400-normal-bG5rsNFs.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-fF1SLJBj.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-BXFTxrNR.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-toKUCDph.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-B2QKVW64.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-DKkQdRpM.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-CDDxGrUb.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-DgufTq8s.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-Dw5heWgq.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-HYpufUYk.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-BFWtvCOj.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-ChAl_rRV.woff +0 -0
- package/dist/assets/ru-CToatViJ.js +0 -11
- package/dist/assets/runtime-D6tESY33.js +0 -1
- package/dist/assets/sdk-DNr-nKBq.js +0 -1
- package/dist/assets/session-CJFbMNLl.js +0 -1
- package/dist/assets/setup-BSsqBrsc.js +0 -19
- package/dist/assets/simple-select-DHvjqsw4.js +0 -1
- package/dist/assets/th-23Hwasay.js +0 -12
- package/dist/assets/traffic-LuIcK-L1.js +0 -37
- package/dist/assets/use-mobile-C98e2dYy.js +0 -1
- package/dist/assets/use-mobile-CqLLcWbr.js +0 -1
- package/dist/assets/useAsync-BxB2TpDl.js +0 -1
- package/dist/assets/useAsync-L7_fHBH5.js +0 -1
- package/dist/assets/useAsyncRetry-CEouAsle.js +0 -7
- package/dist/assets/user-center-BaKv3X4J.js +0 -77
- package/dist/assets/vendor-mui-x-CPOc4sOK.js +0 -6
- package/dist/assets/vendor-utils-C3FZIS9A.js +0 -11
- package/dist/assets/vendor-ux-did-connect-B1u6nvmg.js +0 -1832
- package/dist/assets/vendor-ux-did-connect-BDmhBveY.css +0 -1
- package/dist/assets/vi-D-QGxDS1.js +0 -12
- package/dist/assets/wrap-locale-m_NRjq-h.js +0 -1
- /package/api/services/oauth/{index.js → client.js} +0 -0
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import{r as j}from"./vendor-react-DEoibe3W.js";import{j as e,E as d,a2 as Pe,a5 as vt,T as Y,a4 as w,A as ke,bn as _e,cd as et,bM as Re,br as Te,bN as Ie,x as je,b2 as De,a3 as tt,aa as oe,W as st,bf as Xe,bq as jt,bm as yt,ak as Je,bU as St}from"./vendor-mui-core-x3zpe_j_.js";import{c as ne,av as le,A as Ct}from"./vendor-utils-C3FZIS9A.js";import{Y as G,p as k,b3 as Nt,r as Fe,f as wt,u as X,bL as Rt,X as nt,B as Ee,a5 as at,bh as xe,ak as Tt,aq as It,bI as Dt}from"./vendor-ux-did-connect-B1u6nvmg.js";import{z as Et,t as $,l as At,G as Qe}from"./index-Th4BUzmb.js";import{f as ee,a as Ae}from"./vendor-hooks-DN4nZ7TU.js";import{S as pe}from"./shorten-label-BuH-7PI8.js";import{I as it}from"./index-VvWvVQT8.js";import{A as Lt,S as Ot,a as Pt,b as kt}from"./list-BuXPrN1N.js";import{R as Be}from"./relative-time-BeR_4mfM.js";import{b as ze}from"./dashboard-BgQFc2Pc.js";import{W as _t}from"./did-address-D4v6iN2l.js";import{p as ot}from"./util-DLK92HF8.js";import{D as Ft,g as Bt}from"./traffic-LuIcK-L1.js";import{i as zt,B as Wt}from"./index-BJYrBMyS.js";import{B as rt}from"./bundle-avatar-DfAWUEqX.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-DPMnO1AO.js";import"./index-DjIOxw8x.js";import"./InfoOutlined-DF9JwavD.js";import"./sdk-DNr-nKBq.js";import"./CheckCircle-CuYzdCtm.js";import"./useLocalStorage-0mjZfnua.js";import"./confirm-92J4n1RP.js";import"./format-error-BrmqJs5a.js";import"./PlayArrow-CxWt6459.js";import"./get-safe-url-CWgEUVPT.js";import"./session-CJFbMNLl.js";import"./useAsyncRetry-CEouAsle.js";import"./useAsync-BxB2TpDl.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-C98e2dYy.js";import"./base32-iVyUiizz.js";import"./iframe-DVBEjxC1.js";import"./LaunchOutlined-MbSPR9qn.js";import"./ChevronLeft-CnflXey6.js";import"./ChevronRight-DE7hYCb3.js";import"./index-sv3a1ZUw.js";import"./vendor-mui-x-CPOc4sOK.js";const lt=j.createContext({}),{Provider:Mt,Consumer:on}=lt;function qt({children:t,blocklet:s=""}){const{api:n,inService:o}=Et(),[i,r]=j.useState([]),[x,u]=j.useState({total:0,pageSize:20,pageCount:0,page:1}),b=ee(()=>{var D;return(D=s.meta)==null?void 0:D.did},[s]),[S,C]=j.useState([]),N=async({page:D=1,pageSize:O=20,...m}={})=>{if(!b)return[];try{const g={paging:{page:D,pageSize:O},...m,teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0},{dids:L,...Q}=g;let K="";L.includes("system")&&(K="system");const J=L.filter(Z=>Z!=="system"),F=await n.getNotificationSendLog({input:{...Q,source:K,componentDids:J}});return r(F.list),u(F.paging),F.list}catch(g){return G.error(g.message),[]}},E=async()=>{const D=await n.getNotificationComponents({input:{teamDid:b}});C(D.componentDids)},z=j.useCallback(D=>{const O=s.children.find(m=>{var g;return((g=m.meta)==null?void 0:g.did)===D});if(O)return O.ancestors=[s],O},[s]),A=async({notificationId:D,receivers:O,channels:m,...g})=>{await n.resendNotification({input:{teamDid:b,notificationId:D,receivers:O,channels:m.map(L=>L==="wallet"?k.NOTIFICATION_SEND_CHANNEL.WALLET:L==="pushKit"?k.NOTIFICATION_SEND_CHANNEL.PUSH:L),...g}})},P=j.useCallback(async D=>(await n.getUser({input:{teamDid:b,user:{did:D}}})).user,[n,b]),I=j.useCallback(async({page:D=1,pageSize:O=20,...m}={})=>{try{const g={paging:{page:D,pageSize:O},...m,userName:m.searchText||"",teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:g})}catch(g){throw G.error(g.message),g}},[n,b]);j.useEffect(()=>{b&&E()},[b]);const W={fetch:N,data:i,paging:x,blocklet:s,getComponent:z,resendNotification:A,getUser:P,componentDids:S,getReceivers:I,inService:o,teamDid:b};return e.jsx(Mt,{value:{notificationRecords:W},children:t})}function We(){const{notificationRecords:t}=j.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Kt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:Kt[t],children:t})}var Me={},Ht=Pe;Object.defineProperty(Me,"__esModule",{value:!0});var ct=Me.default=void 0,$t=Ht(Fe()),Ut=e;ct=Me.default=(0,$t.default)((0,Ut.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe={},Vt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var dt=qe.default=void 0,Gt=Vt(Fe()),Yt=e;dt=qe.default=(0,Gt.default)((0,Yt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ke={},Xt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var ut=Ke.default=void 0,Jt=Xt(Fe()),Qt=e;ut=Ke.default=(0,Jt.default)((0,Qt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Zt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case k.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case k.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case k.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case k.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function pt(t,s,n={}){const{status:o,updatedAt:i,reason:r="",channel:x="wallet"}=n,u=i?t("notification.sendStatus.sentTime",{date:At(i,s)}):"",b=Zt(t,x,r);return o===k.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:b}:o===k.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:b,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Oe=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:o.enabled},mt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:o.enabled},es=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:ft(t),enabled:n}},ts=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:mt(t),enabled:n}},ss=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),ns=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),he=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),as=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],ge=(t=[])=>{const s=$().startOf("day");return t.filter(n=>$(n.sendAt).isSame(s,"day")).length},is=(t,s="")=>{if(s&&Oe.includes(s)){const r=`${s}SendRecord`,x=ne(t,r,[]);return ge(x)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const r=n[s]??[];return ge(r)}const i={};return Oe.forEach(r=>{const x=`${r}SendRecord`,u=ne(t,x,[]),b=ge(u);i[r]=b}),o.length>0&&o.forEach(r=>{const x=n[r]??[],u=ge(x);i[r]=u}),i},be=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},os=t=>{switch(t){case k.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case k.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case k.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case k.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>wt({typography:{fontSize:14,button:{textTransform:"none"}},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:i,title:r="",sentTime:x="",reason:u=""}=t,b=[r,u].filter(Boolean).join(", ");return e.jsx(vt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:b}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(w,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(w,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[i],style:{opacity:.15}}),e.jsx(w,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[i]})]}),e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:n?r:o})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};te.defaultProps={enableTooltip:!0,showTitle:!1,children:null};ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};ce.defaultProps={onDelete:()=>{}};function ce({list:t,label:s,onDelete:n}){const{t:o,locale:i}=X();return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(r=>{const x=pt(o,i,{status:r});return e.jsx(ke,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,r)},r)})]})}He.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function He({filterList:t,onChange:s,index:n,column:o,filterValues:i,label:r,renderLabel:x}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:r}),e.jsx(Re,{row:!0,children:i.map(u=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(u.value??u)>-1,onChange:b=>{const S=[...t];b.target.checked?S[n]=[...S[n],u.value??u]:S[n]=S[n].filter(C=>C!==(u.value??u)),s(S[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function we(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}re.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function re({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:i}){const{t:r,locale:x}=X(),u=pt(r,x,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(te,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(je,{className:"resend-btn",size:"small",startIcon:e.jsx(ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:r("notification.resend")})]})}$e.propTypes={value:d.array.isRequired,onChange:d.func};function $e({value:t,onChange:s}){const{locale:n}=X(),o=$().toDate(),[i,r]=j.useState(null),x=j.useCallback(S=>{r(i?null:S.currentTarget)},[i]),u=!!i,b=j.useCallback(S=>{if(!S.startDate||!S.endDate){G.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){G.error("Invalid date range");return}s([S.startDate,S.endDate]),r(null)},[s]);return e.jsxs("div",{children:[e.jsx(Y,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(je,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],n)," - ",Qe(t[1],n)]})}),e.jsx(De,{open:u,anchorEl:i,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Ft,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Bt(o),onChange:b})})]})}Ue.propTypes={itemComponent:d.elementType.isRequired};function Ue({itemComponent:t,...s}){var i;const{t:n}=X();return!((i=s==null?void 0:s.filterList)!=null&&i.filter(r=>r.length).length)?null:e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Rt.TableFilterList,{...s,ItemComponent:t})})]})}function ye({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const i=s&&typeof s=="function"?s:void 0;let r=!0;return n&&typeof n=="function"&&(r=n({label:t,...o})),e.jsx(ke,{label:t,variant:"outlined",...i&&r?{onDelete:i}:{}})}ye.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};ye.defaultProps={canDelete:()=>!0};const rs=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ve.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ve.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ve({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=X(),[i,r]=j.useState(rs),[x,u]=j.useState(!0),b=(C,N)=>{N.checked=C.target.checked;const E=i.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));r(E)},S=C=>{C.stopPropagation(),n({channels:i.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:x})};return e.jsxs(w,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Y,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(w,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(C=>e.jsx(Te,{control:e.jsx(Ie,{checked:C.checked,onChange:N=>b(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(w,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:x,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(w,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(je,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(je,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:i}=X(),{getReceivers:r,inService:x,teamDid:u,getUser:b,blocklet:S}=We(),[C,N]=j.useState(!1),[E,z]=j.useState([]),A=Ae({anchorEl:null,position:null}),P=Ae({anchorEl:null,position:null}),[I,W]=j.useState(null),[D,O]=j.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,g]=j.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[L,Q]=j.useState([]),K=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],J=async()=>{if(!C&&t)try{N(!0);const a=await r({notificationId:t,...m}),l=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,u,x)}}));z(l),O(a.paging),N(!1)}catch(a){G.error(a.message),N(!1)}};j.useEffect(()=>{J()},[m]);const F=a=>{a.stopPropagation();const l=a.currentTarget;P.anchorEl=l;const c=l.getBoundingClientRect();P.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},Z=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ee,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:F,children:o("notification.resend")})}):null,M={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:D.page-1,rowsPerPage:D.pageSize,count:D.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:L,onRowSelectionChange:(a,l)=>{Q(l.map(c=>c.dataIndex))},customToolbarSelect:Z},Ce=({page:a,rowsPerPage:l,searchText:c,filterList:y})=>{const[,_=[],H=[],q=[]]=y;m.pageSize!==l?g(B=>({...B,pageSize:l,page:1})):m.page!==a+1?g(B=>({...B,page:a+1})):m.searchText!==c?g(B=>({...B,searchText:c,page:1})):le(_,m.walletSendStatus)?le(H,m.pushKitSendStatus)?le(q,m.emailSendStatus)||g(B=>({...B,emailSendStatus:q,page:1})):g(B=>({...B,pushKitSendStatus:H,page:1})):g(B=>({...B,walletSendStatus:_,page:1}))},Ne=j.useCallback(async(a,l)=>{if(!l)return!1;const c=await b(l);return c?a==="wallet"?ss(c):a==="email"?es(S,c):a==="pushKit"?ts(S,c):a==="webhook"?ns(c):!0:!1},[b,S]),me=j.useCallback(a=>as(o,a),[o]),f=()=>{A.anchorEl=null,A.position=null,W(null)},p=()=>{P.anchorEl=null,P.position=null},h=async(a,l,c=!0,y="")=>{if(!(!l.length||!a.length))try{s(a,l,c,y),P.anchorEl||(await he(.5),f())}catch(_){console.error("handleResend error",{error:_})}},v=async({channels:a,isResendFailedOnly:l})=>{const c=L.map(y=>E[y].receiver);await h(a,c,l),await he(.5),p(),Q([])},T=async(a,l=[],c=!0)=>{try{await h(["webhook"],[a.receiver],c,l)}catch(y){G.error(y.response?y.response.statusText:y.message)}},R=async(a,l,c,y=[],_=!0)=>{if(a.stopPropagation(),is(l,c)>=4){G.warning(o("notification.resendLimit"));return}if(!Oe.includes(c)){await T(l,y,_);return}if(a){const q=a.currentTarget,B=q.getBoundingClientRect();A.anchorEl=q,A.position={top:B.top+window.scrollY,left:B.left+window.scrollX}}W({channel:c});try{const q=await Ne(c,l.receiver);await he(1),W({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(B=>!!B))&&(await s([c],[l.receiver],_),P.anchorEl||(await he(.5),f()))}catch(q){G.error(q.message)}},U=a=>{g(l=>({...l,dateRange:a,page:1}))},V=(a,l,c,y)=>{a.stopPropagation();const _=c.filter(H=>H!==l);g(H=>({...H,[y]:_,page:1}))},se=ee(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:l,receiver:c}=E[a];return l?e.jsxs(w,{"data-cy":`member-name-${l.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(nt,{src:`${l.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(pe,{children:l.fullName})]},c):e.jsx(_t,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Wallet",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[1].options.filterList,"walletSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:l,index:c,column:y,filterValues:K})},customBodyRenderLite:a=>{const{walletSendStatus:l,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"wallet",onResend:_=>R(_,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:l,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"pushkit",onResend:_=>R(_,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Push Kit",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[2].options.filterList,"pushKitSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:l,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"email",onResend:_=>R(_,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Email",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[3].options.filterList,"emailSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Email",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:l}=E[a];if(!l)return null;const c=Object.entries(l)[0];if(!c)return null;const[y,_]=c,H=_[0];return e.jsx(w,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(w,{className:"webhook-item",fontSize:12,children:[e.jsx(pe,{maxLength:30,children:y},y),e.jsx(re,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>R(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:l}=E[a];return e.jsx(Be,{value:l,locale:i,shouldUpdate:!0})}}}],[E,i,m,o]),Ye=[e.jsx($e,{value:m.dateRange,onChange:U},"date-picker"),e.jsx(Ee,{variant:"contained",size:"small",color:"primary",loading:C,startIcon:e.jsx(ut,{}),onClick:()=>J(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(w,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(cs,{children:e.jsxs(st,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:i,loading:C,columns:se,data:E,onChange:Ce,options:M,customButtons:Ye,components:{TableFilterList:a=>e.jsx(Ue,{...a,itemComponent:l=>e.jsx(ye,{...l,canDelete:()=>!1})})}}),A.anchorEl&&e.jsx(De,{open:!!A.anchorEl,anchorReference:"anchorPosition",anchorPosition:A.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ds,{children:[e.jsxs(Y,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(w,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:me(I==null?void 0:I.channel).map(a=>{var _,H;const{type:l,pass:c,fail:y}=a;return!(I!=null&&I.result)||(_=I==null?void 0:I.result)!=null&&_[l]?e.jsxs(Y,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[l]?xe.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:xe.primary.main}}),e.jsx("span",{children:c})]},l):e.jsxs(Y,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:xe.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:y})]},l)})})]})}),P.anchorEl&&e.jsx(De,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ve,{loading:n,onCancel:p,onConfirm:v})})]})})})}const ls=j.memo(gt),cs=oe.div`
|
|
2
|
-
td.MuiTableCell-footer {
|
|
3
|
-
border: none !important;
|
|
4
|
-
}
|
|
5
|
-
.sent-status-cell {
|
|
6
|
-
.resend-btn {
|
|
7
|
-
display: none;
|
|
8
|
-
}
|
|
9
|
-
&:hover {
|
|
10
|
-
.resend-btn {
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`,ds=oe.div`
|
|
16
|
-
padding: 8px 16px;
|
|
17
|
-
.check-title {
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
margin-bottom: 8px;
|
|
20
|
-
&::first-letter {
|
|
21
|
-
text-transform: uppercase;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.check-item {
|
|
25
|
-
svg {
|
|
26
|
-
font-size: 16px;
|
|
27
|
-
}
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
}
|
|
30
|
-
`,de=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function us(t){const{wallet:s,push:n,email:o,webhook:i}=t;return[{name:"Wallet",value:e.jsx(ae,{item:s})},{name:"Push",value:e.jsx(ae,{item:n})},{name:"Email",value:e.jsx(ae,{item:o})},...i.total>0?[{name:"Webhook",value:e.jsx(ae,{item:i,isWebhook:!0})}]:[]]}function ps(t,s,n){const{wallet:o,push:i,email:r,webhook:x}=t;return[{name:"Wallet",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:s})},{name:"Push",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.EMAIL,item:r,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(ie,{loading:n,channel:k.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Se.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Se.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ae.propTypes={item:d.object.isRequired,isWebhook:d.bool};ae.defaultProps={isWebhook:!1};function ae({item:t,isWebhook:s=!1}){const{t:n}=X(),o=s?t.success.length:t.success,i=t.total,r=o===i?"success":"failed";return e.jsx(w,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(w,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(te,{config:{status:r},enableTooltip:!1,children:[de(o)," / ",de(i)," ",n("notification.sendStatus.success")]})})})}ie.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};ie.defaultProps={isWebhook:!1,channel:k.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function ie({channel:t,item:s,isWebhook:n=!1,onResend:o,loading:i}){const{t:r}=X(),{success:x,failed:u,pending:b}=s,S=os(t),C=n?x.length:x,N=n?u.length:u,E=n?b.length:b,z=async W=>{W.stopPropagation();const D=n?[...new Set([...x,...u].map(O=>O))]:[];await o([t],[],!0,D)},A=C+N,P=A>0?C/A*100:0,I=A>0?N/A*100:0;return e.jsxs(fs,{successRatio:P,failedRatio:I,children:[e.jsxs(Y,{variant:"h6",children:[S," (",s.total,")"]}),e.jsxs(Y,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:de(C)}),e.jsx("small",{style:{paddingLeft:4},children:r("notification.sendStatus.success")})]}),e.jsxs(w,{className:"unsent-area",children:[e.jsxs(w,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[de(N)," ",r("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[de(E)," ",r("notification.sendStatus.pending")]})]}),N>0&&e.jsx(w,{className:"resend-btn",children:e.jsx(Ee,{size:"small",color:"primary",loading:i,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:z,children:r("notification.resend")})})]})]})}function Se({statistics:t,mode:s="simple",onResend:n,resending:o}){const i=ee(()=>s==="simple"?us(t):ps(t,n,o),[t,s]);return s==="simple"?e.jsx("div",{children:i.map(r=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:r.name,children:r.value},r.name))}):e.jsx(Xe,{container:!0,spacing:2,children:i.map(r=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:r.value},r.name))})}const fs=oe(w)`
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
align-items: flex-start;
|
|
34
|
-
padding: 16px;
|
|
35
|
-
border-radius: 8px;
|
|
36
|
-
background: ${({successRatio:t,failedRatio:s})=>t===0&&s===0?"#eff3fa":`linear-gradient(to right, #dafee7 ${t}%, #fef2f2 ${t}%)`};
|
|
37
|
-
transition: 'background 0.5s ease',
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
.unsent-area {
|
|
40
|
-
width: 100%;
|
|
41
|
-
position: relative;
|
|
42
|
-
.resend-btn {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:s=()=>{},blocklet:n,tab:o="info"}){const{t:i,locale:r}=X(),{getComponent:x,resendNotification:u}=We(),[b,S]=j.useState(!1),C=ee(()=>x(t.componentDid)||n,[n,t.componentDid]),N=Ae({tab:o||"info"}),E=j.useCallback(async(g,L,Q=!0,K=[])=>{var Z;if(!g.length||!t.id)return;const J=L.length>0?L:(Z=t==null?void 0:t.receivers)==null?void 0:Z.map(M=>M.receiver);if(!J.length)return;let F=[...g];if(F.includes(k.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),F=F.filter(M=>M!==k.NOTIFICATION_SEND_CHANNEL.PUSH)),F.includes(k.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Email"})),F=F.filter(M=>M!==k.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!F.length)try{S(!0),await u({notificationId:t.id,receivers:J,channels:F,resendFailedOnly:Q,...F.includes("webhook")&&K.length?{webhookUrls:K}:{}}),G.success("Message has been sent!")}catch(M){console.error("handleResend error",{error:M}),G.error(M.response?M.response.statusText:M.message)}finally{S(!1)}},[n,t.id,t==null?void 0:t.receivers,u,i]),z=ee(()=>zt(t),[t]),A=ee(()=>z?t==null?void 0:t.actorInfo:[],[t]),P=ee(()=>{var g;return(n==null?void 0:n.did)||((g=n==null?void 0:n.meta)==null?void 0:g.did)||""},[n]);function I(){return[{name:i("notification.from"),value:z?e.jsx(Lt,{actors:A,teamDid:P,size:32,showName:!0}):e.jsx(Ot,{size:32,blocklet:C,showName:!0,hideDot:!0})},{name:i("notification.notificationTitle"),value:e.jsx(pe,{maxLength:50,children:t.title})},{name:i("notification.body"),value:z?e.jsx(Pt,{notification:t,blocklet:n}):e.jsx(kt,{notification:t,rows:0})},{name:i("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:i("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:r,shouldUpdate:!0})}].map(L=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:L.name,children:L.value},L.name))}const W={info:{label:i("common.basicInfo"),value:"info",component:I},receivers:{label:i("notification.receiver"),value:"receivers"},statistics:{label:i("notification.statistics"),value:"statistics"}},D=Object.values(W).map(({label:g,value:L})=>({label:g,value:L})),O=W[N.tab]||W.info,m=g=>{N.tab=g};return e.jsx(Tt,{title:i("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(hs,{children:[e.jsx(w,{mx:3,className:"tabs",children:e.jsx(It,{tabs:D,current:N.tab,onChange:m,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(ls,{notificationId:t.id,resending:b,handleResend:E}),N.tab==="statistics"&&e.jsx(Se,{statistics:t.statistics,mode:"detail",resending:b,onResend:E}),N.tab==="info"&&e.jsx(O.component,{})]})]})})}const ms=j.memo(xt),hs=oe.div`
|
|
49
|
-
& > .notification-row {
|
|
50
|
-
padding: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.tabs {
|
|
54
|
-
margin: 0;
|
|
55
|
-
}
|
|
56
|
-
.body {
|
|
57
|
-
margin-top: 16px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.channel-item {
|
|
61
|
-
display: flex;
|
|
62
|
-
padding: 4px;
|
|
63
|
-
justify-content: flex-start;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 8px;
|
|
66
|
-
> p {
|
|
67
|
-
font-size: 15px;
|
|
68
|
-
}
|
|
69
|
-
.resend-btn {
|
|
70
|
-
svg {
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
}
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
font-size: 12px;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
&.disabled {
|
|
78
|
-
cursor: not-allowed;
|
|
79
|
-
color: ${xe.text.disabled};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
`;ue.propTypes={blocklet:d.object,label:d.string};ue.defaultProps={blocklet:null,label:""};const gs=oe.div`
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-items: flex-start;
|
|
86
|
-
align-items: center;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
.name {
|
|
89
|
-
display: block;
|
|
90
|
-
max-width: 260px;
|
|
91
|
-
white-space: nowrap;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
text-overflow: ellipsis;
|
|
94
|
-
}
|
|
95
|
-
`;function ue({blocklet:t,label:s}){var n;return e.jsx(gs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((n=t.meta)==null?void 0:n.title)})]}):e.jsx("span",{className:"name",children:s})})}Ge.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ge.defaultProps={onDelete:()=>{}};function Ge({list:t,label:s,onDelete:n}){return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(o=>e.jsx(ke,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:o})}),onDelete:i=>n(i,o)},o))]})}function xs(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(fe,{severity:s})})}function bs({customTableButtons:t}){var me;const{t:s,locale:n}=X(),[o,i]=j.useState(!1),{data:r,paging:x,blocklet:u,fetch:b,getComponent:S,componentDids:C,inService:N,teamDid:E}=We(),z=j.useRef(null),[A,P]=j.useState(null),[I,W]=j.useState("info"),D=`notification-records-${(me=u.meta)==null?void 0:me.did}`,O=Dt(D),[m,g]=j.useState({pageSize:O.rowsPerPage||10,page:O.page?O.page+1:1,dids:O.dids||[],dateRange:O.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),L=ee(()=>{if(!u.children||!u.children.length)return[];const f=[];return u.children.forEach(p=>{var v;const h=p.did||((v=p.meta)==null?void 0:v.did);C.includes(h)&&(p.ancestors=[u],f.push(p))}),f},[C,u]),Q=j.useCallback(async()=>{try{i(!0),await b(m),i(!1)}finally{i(!1)}},[b,m]);j.useEffect(()=>{Q()},[]),j.useEffect(()=>{const f=setInterval(()=>{document.visibilityState==="visible"&&b(m).then(p=>{const h=p.find(v=>v.id===(A==null?void 0:A.id));A&&h&&P({...h})})},3e3);return()=>clearInterval(f)},[m,A]);const K=(f,p,h,v)=>{f.stopPropagation();const T=h.filter(R=>R!==p);g(R=>({...R,[v]:T,page:1}))},J=({page:f,rowsPerPage:p,filterList:h})=>{const[v=[],,,,T=[]]=h;m.pageSize!==p?g(R=>({...R,pageSize:p,page:1})):m.page!==f+1?g(R=>({...R,page:f+1})):le(m.dids,v)?le(m.severities,T)||g(R=>({...R,severities:T,page:1})):g(R=>({...R,dids:v,page:1}))},F=j.useCallback(()=>{P(null),W("info")},[]),Z=j.useCallback(()=>{b(m)},[b,m]),M=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((p,h)=>{var T;if(p==="system")return e.jsx("span",{children:s("notification.system")},`system-${h}`);const v=L.find(R=>{var V;return(R.did||((V=R.meta)==null?void 0:V.did))===p});return e.jsx(ue,{blocklet:v,label:(v==null?void 0:v.title)||((T=v==null?void 0:v.meta)==null?void 0:T.title)},p)}),update:(f,p,h)=>(f[h].splice(p,1),f)},filterOptions:{names:L,logic:(f,p)=>p.length?!p.includes(f):!1,display:(f,p,h,v)=>e.jsxs(_e,{style:{width:"380px"},children:[e.jsx(jt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(yt,{multiple:!0,value:f[h],renderValue:T=>e.jsx(w,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(R=>{var V;if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const U=L.find(se=>{var a;return(se.did||((a=se.meta)==null?void 0:a.did))===R});return e.jsx(ue,{blocklet:U,label:(U==null?void 0:U.title)||((V=U==null?void 0:U.meta)==null?void 0:V.title)},R)})}),onChange:T=>{f[h]=T.target.value,p(f[h],h,v)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),L.map(T=>{var U,V;const R=T.did||((U=T.meta)==null?void 0:U.did);return e.jsx(Je,{value:R,children:e.jsx(ue,{blocklet:T,label:T.title||((V=T.meta)==null?void 0:V.title)})},R)})]})]})},customBodyRenderLite:f=>{var v,T;const p=r[f],h=S(p.componentDid);return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[h?e.jsx(rt,{size:32,blocklet:h,ancestors:h.ancestors??[]}):e.jsx(Wt,{blocklet:u,size:32}),e.jsx(pe,{maxLength:50,children:((v=h==null?void 0:h.meta)==null?void 0:v.title)||((T=u==null?void 0:u.meta)==null?void 0:T.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f],{receivers:h}=p;return e.jsx(St,{total:h.length,renderSurplus:v=>v<100?e.jsxs("span",{children:["+",v]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:v=>{v.stopPropagation(),P(p),W("receivers")},children:h.map(v=>{const{receiverUser:T}=v,R=ot(T.avatar,E,N);return e.jsx(nt,{alt:T.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:v.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},v.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(w,{onClick:h=>{h.stopPropagation(),P(p),W("statistics")},children:e.jsx(Se,{statistics:p.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(pe,{maxLength:50,children:p.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const p=r[f];return e.jsx(fe,{severity:p.severity})},filter:!0,filterType:"custom",filterList:m.severities??[],customFilterListOptions:{render:f=>e.jsx(Ge,{list:f,label:s("notification.severity"),onDelete:(p,h)=>{p.stopPropagation(),K(p,h,M[4].options.filterList,"severities")}}),update:be},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(f,p,h,v)=>e.jsx(xs,{label:s("notification.severity"),filterList:f,onChange:p,index:h,column:v,filterValues:Ze})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:p}=r[f];return e.jsx(Be,{value:p,locale:n,shouldUpdate:!0})}}}],Ce=f=>{g(p=>({...p,dateRange:f,page:1}))},Ne=[...t||[]];return e.jsxs(w,{ref:z,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(vs,{children:e.jsx(st,{theme:ht(),children:e.jsx(at,{className:"main-table",verticalKeyWidth:100,loading:o,locale:n,columns:M,data:r,durable:D,onChange:J,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:x.page-1,rowsPerPage:x.pageSize,count:x.total,...O,onRowClick:(f,{dataIndex:p})=>{P(r[p])}},customPreButtons:[e.jsx($e,{value:m.dateRange,onChange:Ce})],customButtons:Ne,components:{TableFilterList:f=>e.jsx(Ue,{...f,itemComponent:p=>e.jsx(ye,{...p,canDelete:h=>{var T;const v=(T=h==null?void 0:h.columnNames)==null?void 0:T[(h==null?void 0:h.index)||0];return(v==null?void 0:v.name)==="sender"}})})}})})}),A&&e.jsx(ms,{refresh:Z,onCancel:F,notification:A,blocklet:u,tab:I})]})}const vs=oe.div`
|
|
96
|
-
td.MuiTableCell-footer {
|
|
97
|
-
border: none !important;
|
|
98
|
-
}
|
|
99
|
-
.sent-status-cell {
|
|
100
|
-
.resend-btn {
|
|
101
|
-
display: none;
|
|
102
|
-
}
|
|
103
|
-
&:hover {
|
|
104
|
-
.resend-btn {
|
|
105
|
-
display: flex;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.custom-toobar-btns {
|
|
111
|
-
gap: 4px;
|
|
112
|
-
}
|
|
113
|
-
`;bt.propTypes={blocklet:d.object.isRequired,customTableButtons:d.array};bt.defaultProps={customTableButtons:[]};function bt({blocklet:t={},customTableButtons:s}){return e.jsx(qt,{blocklet:t,children:e.jsx(bs,{customTableButtons:s})})}export{bt as default};
|