@abtnode/webapp 1.17.4-beta-20251204-080001-08643fbe → 1.17.4-beta-20251205-104405-28838df1

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.
Files changed (232) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-B8XrCnul.js → AdapterDayjs-D7bJvNHv.js} +1 -1
  4. package/dist/assets/{Add-kI5bOAG-.js → Add-CRng1bvb.js} +1 -1
  5. package/dist/assets/ArrowDropDown-DenHrhc8.js +1 -0
  6. package/dist/assets/{Autocomplete-CQE4jUXI.js → Autocomplete-Z7djk_ZA.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-AnwvYAV4.js → Breadcrumbs-Cl3pYXuX.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BMNpoL2h.js → ButtonGroup-DT2mnbzl.js} +1 -1
  9. package/dist/assets/{CSSTransition-BxHb6pgR.js → CSSTransition-DnKCf5MC.js} +1 -1
  10. package/dist/assets/{CallMerge-D4r5xzUL.js → CallMerge-ez9AWPJv.js} +1 -1
  11. package/dist/assets/{CardContent-7R2qvvpi.js → CardContent-3_u5Glkf.js} +1 -1
  12. package/dist/assets/{ChevronLeft-LXiuPIK5.js → ChevronLeft-CrMq5UEk.js} +1 -1
  13. package/dist/assets/{ChevronRight-DqFLktR4.js → ChevronRight-Cuplw8Vk.js} +1 -1
  14. package/dist/assets/{Clear-Hs60zEib.js → Clear-BqdaPKpz.js} +1 -1
  15. package/dist/assets/{DeleteOutline-DsqrqnCp.js → DeleteOutline-BASXPKuD.js} +1 -1
  16. package/dist/assets/{Done-vE3VnBR0.js → Done-CB_qB8AL.js} +1 -1
  17. package/dist/assets/{Edit-qO_MT0b2.js → Edit-Dtb20pIp.js} +1 -1
  18. package/dist/assets/{ErrorOutline-DdvUBhqw.js → ErrorOutline-D9sfPJGD.js} +1 -1
  19. package/dist/assets/{FilterList-AnfIXCKs.js → FilterList-C8mCq8zA.js} +1 -1
  20. package/dist/assets/{Google--RzStVOR.js → Google-C-fURhjk.js} +1 -1
  21. package/dist/assets/{HelpOutline-CoSkqfzt.js → HelpOutline-Cueb4ga5.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-Dujsdgxw.js → KeyboardArrowDown-BcVS9Fto.js} +1 -1
  23. package/dist/assets/{Launch-DYmoqTVe.js → Launch-7PWsMLYi.js} +1 -1
  24. package/dist/assets/{Link-C00bCC3q.js → Link-DehBPVeZ.js} +1 -1
  25. package/dist/assets/{ListItemButton-BEID3HDl.js → ListItemButton-DWl1Vgm4.js} +1 -1
  26. package/dist/assets/{ListSubheader-Dc864cM6.js → ListSubheader-CwlXohNJ.js} +1 -1
  27. package/dist/assets/{LoadingButton-BClJhQK8.js → LoadingButton-MojQ_kdf.js} +1 -1
  28. package/dist/assets/{MoreVert-CqJOZeEC.js → MoreVert-DtyK0V7L.js} +1 -1
  29. package/dist/assets/{OpenInNew-Pw51SEHY.js → OpenInNew-_TIFZ5Zi.js} +1 -1
  30. package/dist/assets/{Refresh-CcEIh6xY.js → Refresh-DwyswQXH.js} +1 -1
  31. package/dist/assets/{Search-C_5maoKz.js → Search-CsPuhVY5.js} +1 -1
  32. package/dist/assets/{Stepper-Ck_x8FLF.js → Stepper-Rcrn65Du.js} +1 -1
  33. package/dist/assets/{Switch-DYHMHuRa.js → Switch-DkUYQLr7.js} +1 -1
  34. package/dist/assets/TableSearch-Bj-RkYUe.js +51 -0
  35. package/dist/assets/{ToggleButtonGroup-CS6Q6qZB.js → ToggleButtonGroup-3zowoGqS.js} +1 -1
  36. package/dist/assets/{UnfoldMore-BPzgNPA4.js → UnfoldMore-DkTRhBQs.js} +1 -1
  37. package/dist/assets/{Verified-LTXU8MrA.js → Verified-B6fUdHX1.js} +1 -1
  38. package/dist/assets/{VerifiedUser-B3wH8cXt.js → VerifiedUser-Dk6hfaYJ.js} +1 -1
  39. package/dist/assets/{ViewList-BfiQ8qPi.js → ViewList-D8N8QDcN.js} +1 -1
  40. package/dist/assets/{_createAggregator-4BM34H5l.js → _createAggregator-B5A3r6Wz.js} +1 -1
  41. package/dist/assets/actions-CGozisCX.js +11 -0
  42. package/dist/assets/actions-DzRp1CK0.js +1 -0
  43. package/dist/assets/{agreement-BzsHgssv.js → agreement-BPuCuaYS.js} +3 -3
  44. package/dist/assets/api-DksC2jZF.js +1 -0
  45. package/dist/assets/{appearance-DHqXwjoD.js → appearance-DqS4_O1_.js} +1 -1
  46. package/dist/assets/ar-Cwm1-0yA.js +7 -0
  47. package/dist/assets/{audit-logs-fSLdeI5s.js → audit-logs-D0e8XQkm.js} +1 -1
  48. package/dist/assets/{base-chart-D5YNxfH0.js → base-chart-DWYRF-Pp.js} +1 -1
  49. package/dist/assets/{blocklet-DzsezOxR.js → blocklet-CO_UEcgH.js} +1 -1
  50. package/dist/assets/{chain-C9-WRPu7.js → chain-Ss4dh3Ib.js} +1 -1
  51. package/dist/assets/{click-to-copy-BqSPQ3-7.js → click-to-copy-CHgcysbr.js} +1 -1
  52. package/dist/assets/cloneDeep-DGATVnvO.js +1 -0
  53. package/dist/assets/{collapse-B_3Ho-QP.js → collapse-BxCDdwz2.js} +1 -1
  54. package/dist/assets/{config-navigation-Dp2RakXR.js → config-navigation-DnjjiErQ.js} +3 -3
  55. package/dist/assets/{connect-to-pNkkzCak.js → connect-to-DDy1G5fS.js} +1 -1
  56. package/dist/assets/{cssMode-tZr3iQNS.js → cssMode-BIviLN-T.js} +1 -1
  57. package/dist/assets/de-XQM4sDLo.js +7 -0
  58. package/dist/assets/{delete-confirm-Co07Njuf.js → delete-confirm-vp8hd-iS.js} +1 -1
  59. package/dist/assets/{depsEqual-DDykxzRj.js → depsEqual-CZP345Xi.js} +1 -1
  60. package/dist/assets/{detail-DcgwTwye.js → detail-DKJA4QJA.js} +3 -3
  61. package/dist/assets/domains-DnORdhZ7.js +28 -0
  62. package/dist/assets/{download-CK01OJP3.js → download-bjQaUX52.js} +1 -1
  63. package/dist/assets/{edit.svg-BQ5aLBCI.js → edit.svg-D22FchVe.js} +1 -1
  64. package/dist/assets/emotion-cache.browser.esm-CqYOpxkG.js +1 -0
  65. package/dist/assets/engine-Cc942eOX.js +1 -0
  66. package/dist/assets/es-D4zFwVhj.js +9 -0
  67. package/dist/assets/fr-BQXlmrTL.js +7 -0
  68. package/dist/assets/{freemarker2-DSJRqUi6.js → freemarker2-B6EoaK3p.js} +1 -1
  69. package/dist/assets/{get-safe-url-DQ8We4Cn.js → get-safe-url-CfVKsPMH.js} +1 -1
  70. package/dist/assets/getValidReactChildren-D7wwEzgt.js +1 -0
  71. package/dist/assets/{graphqlMode-BG47Adzu.js → graphqlMode-B1q5zCxy.js} +2 -2
  72. package/dist/assets/{handlebars-B6x-6VIa.js → handlebars-leG6s9kW.js} +1 -1
  73. package/dist/assets/hi-Cdz2GskJ.js +5 -0
  74. package/dist/assets/{html-jMDnRBWp.js → html-BUpVyqnU.js} +1 -1
  75. package/dist/assets/{html-title-B38L6o3q.js → html-title-B7gNlV0N.js} +1 -1
  76. package/dist/assets/{htmlMode-C5S9mBrG.js → htmlMode-BtvUyoUm.js} +1 -1
  77. package/dist/assets/id-Q9i8FdSt.js +7 -0
  78. package/dist/assets/{iframe-BNWt4-fa.js → iframe-Bcq1yggD.js} +1 -1
  79. package/dist/assets/{index-BtUuqhY5.js → index-8muv7_Jd.js} +1 -1
  80. package/dist/assets/index-9amiOBds.js +1 -0
  81. package/dist/assets/{index-BWfkNY7x.js → index-B9cmEwta.js} +1 -1
  82. package/dist/assets/{index-fUcEQ60M.js → index-BA9z7d5M.js} +2 -2
  83. package/dist/assets/{index-Dj4J7MRE.js → index-BCFuar1a.js} +1 -1
  84. package/dist/assets/{index-D1awT4uB.js → index-BEBlF9m9.js} +1 -1
  85. package/dist/assets/{index-CdmTtYEH.js → index-BFd6rfnD.js} +1 -1
  86. package/dist/assets/index-BHh7dbJI.js +79 -0
  87. package/dist/assets/{index-CHG9EhW0.js → index-BZK15J4S.js} +2 -2
  88. package/dist/assets/{index-gLhIa95r.js → index-BcwJKAa8.js} +3 -3
  89. package/dist/assets/index-BmhCRjuT.js +1 -0
  90. package/dist/assets/{index-i1qQpQly.js → index-Bs1YhLgL.js} +1 -1
  91. package/dist/assets/index-BtC9W7tW.js +120 -0
  92. package/dist/assets/{index-sbhy4wTO.js → index-BuBuhUeR.js} +1 -1
  93. package/dist/assets/{index-CVAkH3vd.js → index-BzdGhRHG.js} +1 -1
  94. package/dist/assets/{index-C601SkM4.js → index-C4pxl7E6.js} +1 -1
  95. package/dist/assets/{index-B_NMI3ZI.js → index-C5QUiUfn.js} +1 -1
  96. package/dist/assets/index-C8uJSnoX.js +606 -0
  97. package/dist/assets/{index-YAdFrAoP.js → index-CK2r1fQ4.js} +3 -3
  98. package/dist/assets/{index-CdAykioB.js → index-CLUNG8RH.js} +1 -1
  99. package/dist/assets/{index-CX5L5Zzo.js → index-COAHcVH6.js} +1 -1
  100. package/dist/assets/{index-CQ3wtaOi.js → index-CP2ySx69.js} +1 -1
  101. package/dist/assets/{index-CT2MPFX1.js → index-CS3jjVt-.js} +1 -1
  102. package/dist/assets/index-CToqwOpp.js +328 -0
  103. package/dist/assets/{index-Da6avpbI.js → index-CYKLn0md.js} +1 -1
  104. package/dist/assets/{index-Ca71Ul3i.js → index-CaFQZBnI.js} +3 -3
  105. package/dist/assets/{index-B7lwLoYe.js → index-CjNtQPhT.js} +1 -1
  106. package/dist/assets/index-ClhL9yaw.js +1 -0
  107. package/dist/assets/{index-BqDRNwJX.js → index-CtuC-y68.js} +1 -1
  108. package/dist/assets/{index-ituQ-YWI.js → index-Cueikc61.js} +2 -2
  109. package/dist/assets/{index-gKfbF3Uy.js → index-D6RZzwG3.js} +1 -1
  110. package/dist/assets/{index-CLvjrKnU.js → index-D7pAGc4n.js} +9 -9
  111. package/dist/assets/{index-DOjmnZso.js → index-D8QdSuWP.js} +1 -1
  112. package/dist/assets/{index-DypTd994.js → index-DP781l3f.js} +1 -1
  113. package/dist/assets/{index-BfBCWTwI.js → index-DPRN-V2-.js} +1 -1
  114. package/dist/assets/{index-DXgv4Xqm.js → index-DPsk4bZI.js} +1 -1
  115. package/dist/assets/{index-D6Tf4nQu.js → index-DRjvR70q.js} +1 -1
  116. package/dist/assets/{index-D331Asw4.js → index-DYek3fDu.js} +5 -5
  117. package/dist/assets/{index-CtGeZSa_.js → index-D_SuvjB5.js} +1 -1
  118. package/dist/assets/{index-PBuMheS3.js → index-DdtHjUVR.js} +4 -4
  119. package/dist/assets/index-DpjK8TAu.js +20 -0
  120. package/dist/assets/{index-D0tbGiP6.js → index-LTqv_onD.js} +1 -1
  121. package/dist/assets/{index-B6tHzrIn.js → index-STr1ffGc.js} +2 -2
  122. package/dist/assets/{index-DaYK2wTG.js → index-nb9hmF43.js} +1 -1
  123. package/dist/assets/index-uvbslqFd.js +1 -0
  124. package/dist/assets/{index-CUSquMEA.js → index-wL5lEY63.js} +8 -8
  125. package/dist/assets/{index.esm-yDr2HoCY.js → index.esm-uQodQ2iI.js} +1 -1
  126. package/dist/assets/{install-from-url-CUdRu_Yn.js → install-from-url-B1AvU1HE.js} +1 -1
  127. package/dist/assets/{invitation-BcqzR03j.js → invitation-BGoJ_RU_.js} +1 -1
  128. package/dist/assets/{is-path-prefix-equal-wXDXCvIL.js → is-path-prefix-equal-B0MjzJqh.js} +1 -1
  129. package/dist/assets/item-MiuwuO0Y.js +273 -0
  130. package/dist/assets/ja-CH8WZngC.js +9 -0
  131. package/dist/assets/{javascript-Cif1kEP1.js → javascript-CQivY_iF.js} +1 -1
  132. package/dist/assets/{jsonMode-Dtj4OX0P.js → jsonMode-B1DIJogh.js} +1 -1
  133. package/dist/assets/ko-Nli9PwTV.js +9 -0
  134. package/dist/assets/{liquid-wpaZ49Sr.js → liquid-B-d-gcy-.js} +1 -1
  135. package/dist/assets/{list-header--wgea2u-.js → list-header-CSw-R3Ib.js} +1 -1
  136. package/dist/assets/{lock.svg-Br-cW1Vr.js → lock.svg-BhUN8bfS.js} +1 -1
  137. package/dist/assets/log-DSCML-QG.js +15 -0
  138. package/dist/assets/{lottie-react.esm-DGCSfjEH.js → lottie-react.esm-BsJCvwoE.js} +1 -1
  139. package/dist/assets/{mdx-BNHuuftl.js → mdx-CmVqY81W.js} +1 -1
  140. package/dist/assets/{memory-CO8_mKFj.js → memory-CYZ4RyvC.js} +1 -1
  141. package/dist/assets/{metric-D4Ezyye6.js → metric--Aw7wHv-.js} +1 -1
  142. package/dist/assets/omit-D3F-V5wK.js +1 -0
  143. package/dist/assets/overview-Dtzj0xH0.js +13 -0
  144. package/dist/assets/{permission-DkUGU8Dy.js → permission-C4awFEcL.js} +1 -1
  145. package/dist/assets/{preference-C1-5FR1J.js → preference-4rp0K0MI.js} +3 -3
  146. package/dist/assets/pt-eVksFEJb.js +5 -0
  147. package/dist/assets/{python-BeSPls-_.js → python-UalezmyW.js} +1 -1
  148. package/dist/assets/{raf-schd.esm-Bmt0I179.js → raf-schd.esm-nqmR3RY3.js} +1 -1
  149. package/dist/assets/{razor-VrEhsMvy.js → razor-CCom4Y0p.js} +1 -1
  150. package/dist/assets/{rotate-session-key-BPyoa2sO.js → rotate-session-key-BVtPivm4.js} +1 -1
  151. package/dist/assets/ru-ycnIgUGb.js +5 -0
  152. package/dist/assets/runtime-ChvahMmk.js +1 -0
  153. package/dist/assets/schema-D90no3Xq.js +1 -0
  154. package/dist/assets/sdk-D033K402.js +1 -0
  155. package/dist/assets/{service-B3qJKUUb.js → service-D0Nqh0MK.js} +1 -1
  156. package/dist/assets/shorten-label-BtsExUKj.js +1 -0
  157. package/dist/assets/{simple-select-BlzEjZYK.js → simple-select-CwS4mJu8.js} +1 -1
  158. package/dist/assets/{spaces-BW0FVSze.js → spaces-DfyZsuc8.js} +1 -1
  159. package/dist/assets/status-BniY81sT.js +1 -0
  160. package/dist/assets/{status-hfEX7VoN.js → status-CUxXICmB.js} +1 -1
  161. package/dist/assets/{switch-control-CRKB4FYD.js → switch-control-BKH5l4X4.js} +1 -1
  162. package/dist/assets/{table-icons-DIiznwf7.js → table-icons-SEKPul8f.js} +18 -18
  163. package/dist/assets/{team-Cr3_9lEo.js → team-azT9Jfpw.js} +1 -1
  164. package/dist/assets/th-BvLhxkpi.js +5 -0
  165. package/dist/assets/{toLower-CBDRJ4vw.js → toLower-BOQN0AT2.js} +1 -1
  166. package/dist/assets/toUpper-CS-AduT_.js +1 -0
  167. package/dist/assets/{traffic-c9i5qWvQ.js → traffic-DasUqpt9.js} +1 -1
  168. package/dist/assets/{tsMode-DA1Je9xp.js → tsMode-DiIkFf_x.js} +1 -1
  169. package/dist/assets/{typescript-BC9b2MIP.js → typescript-85TY_MlI.js} +1 -1
  170. package/dist/assets/{url-evaluation-BNj0UZK1.js → url-evaluation-CcvHRXPN.js} +1 -1
  171. package/dist/assets/{url-join-Cwzm0LVv.js → url-join-BXDQZ2P_.js} +1 -1
  172. package/dist/assets/{use-mobile-DegDbYke.js → use-mobile-CWjERnhJ.js} +1 -1
  173. package/dist/assets/{use-mobile-ZXn0_vSN.js → use-mobile-DMNeuaxw.js} +1 -1
  174. package/dist/assets/{useAsync-DhvcDNZU.js → useAsync-CCNZX_yW.js} +1 -1
  175. package/dist/assets/{useAsyncRetry-BuFRS3YZ.js → useAsyncRetry-DOwZIXtY.js} +1 -1
  176. package/dist/assets/{useLocalStorage-Ceu1UYjX.js → useLocalStorage-CEBeH0_O.js} +1 -1
  177. package/dist/assets/{useThemeProps-CGNNiV2h.js → useThemeProps-Ck1ydGI4.js} +1 -1
  178. package/dist/assets/{util-CvX1kI1W.js → util-C4YCPi_k.js} +1 -1
  179. package/dist/assets/vi-BmM-09Iq.js +5 -0
  180. package/dist/assets/{wait-container-DQfZdJnZ.js → wait-container-B7fAP1Xa.js} +7 -7
  181. package/dist/assets/{without-wallet-BKVBw3vL.js → without-wallet-C-OpmM-K.js} +1 -1
  182. package/dist/assets/wrap-locale-DHJmdRca.js +1 -0
  183. package/dist/assets/{xml-Byc4kRnH.js → xml-CTVLNdi0.js} +1 -1
  184. package/dist/assets/{yaml-BqelJ5A8.js → yaml-Dx5B49fH.js} +1 -1
  185. package/dist/assets/{zh-DZI4Yy2m.js → zh-BkVzTN9N.js} +2 -2
  186. package/dist/assets/zh-tw-CW4J6ddt.js +9 -0
  187. package/dist/index.html +1 -1
  188. package/dist/service-worker.js +1 -1
  189. package/package.json +1 -1
  190. package/dist/assets/ArrowDropDown-DQiHUHN2.js +0 -1
  191. package/dist/assets/TableSearch-CCo38KPm.js +0 -51
  192. package/dist/assets/actions-CE27qWor.js +0 -11
  193. package/dist/assets/actions-SrVXdq5g.js +0 -1
  194. package/dist/assets/api-SBg_zsK3.js +0 -1
  195. package/dist/assets/ar-C89Z16Ql.js +0 -7
  196. package/dist/assets/cloneDeep-DpgUjdaj.js +0 -1
  197. package/dist/assets/de-BsCDrfBl.js +0 -7
  198. package/dist/assets/domains-BV1XoGlV.js +0 -28
  199. package/dist/assets/emotion-cache.browser.esm-X_vzDGxi.js +0 -1
  200. package/dist/assets/engine-WLYB4JH-.js +0 -1
  201. package/dist/assets/es-BJh_XsEm.js +0 -9
  202. package/dist/assets/fr-DRJMwn7V.js +0 -7
  203. package/dist/assets/getValidReactChildren-BsG2WRwa.js +0 -1
  204. package/dist/assets/hi-h-9Yl5g9.js +0 -5
  205. package/dist/assets/id-BDWggRsa.js +0 -7
  206. package/dist/assets/index-B8v-axBf.js +0 -328
  207. package/dist/assets/index-B_nHd_uz.js +0 -606
  208. package/dist/assets/index-C4B0vM19.js +0 -1
  209. package/dist/assets/index-C7TNAoJk.js +0 -1
  210. package/dist/assets/index-CD7DvxmZ.js +0 -20
  211. package/dist/assets/index-CExol_6_.js +0 -1
  212. package/dist/assets/index-CvbVZVN0.js +0 -79
  213. package/dist/assets/index-DuCzR9nh.js +0 -120
  214. package/dist/assets/index-xk8o36aP.js +0 -1
  215. package/dist/assets/item-CEMWCyCy.js +0 -273
  216. package/dist/assets/ja-R9EF3xbB.js +0 -9
  217. package/dist/assets/ko-C_QLPZyk.js +0 -9
  218. package/dist/assets/log-BwGGQAmT.js +0 -15
  219. package/dist/assets/omit-BkO80IDI.js +0 -1
  220. package/dist/assets/overview-XRYsL-Df.js +0 -13
  221. package/dist/assets/pt-DpYO8djd.js +0 -5
  222. package/dist/assets/ru-DkZtar3s.js +0 -5
  223. package/dist/assets/runtime-B2AOXg1s.js +0 -1
  224. package/dist/assets/schema-BZPDZOr7.js +0 -1
  225. package/dist/assets/sdk-jF2ykj-E.js +0 -1
  226. package/dist/assets/shorten-label-CdOupV3k.js +0 -1
  227. package/dist/assets/status-BwdlUN6n.js +0 -1
  228. package/dist/assets/th-04iX5CrT.js +0 -5
  229. package/dist/assets/toUpper-CiB1f6qA.js +0 -1
  230. package/dist/assets/vi-kOP0E9Ga.js +0 -5
  231. package/dist/assets/wrap-locale-DyG--MvI.js +0 -1
  232. package/dist/assets/zh-tw-BLapUUeq.js +0 -9
@@ -1 +0,0 @@
1
- import{u as f,j as s,C as d,A as w,ax as v,cw as C,aT as u,ae as j,aH as I,K as P,bC as S}from"./index-D331Asw4.js";import{I as T}from"./invitation-BcqzR03j.js";import{g as E}from"./get-safe-url-DQ8We4Cn.js";import"./index-CtGeZSa_.js";import"./index-B_NMI3ZI.js";import"./emotion-cache.browser.esm-X_vzDGxi.js";import"./sdk-jF2ykj-E.js";import"./wrap-locale-DyG--MvI.js";import"./index-xk8o36aP.js";function R(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=E(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(T,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function b(){return f().loading?s.jsx(d,{}):s.jsx(R,{})}export{b as default};
@@ -1 +0,0 @@
1
- import{c6 as c,r as _,aT as f,h1 as S,cW as r}from"./index-D331Asw4.js";var d=function(n){var a=c(_.useState(n),2),u=a[0],o=a[1],i=f(function(t){o(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,i]};export{d as u};
@@ -1,20 +0,0 @@
1
- import{aj as ee,A as T,r as f,a as te,b as se,V as j,u as S,x as re,av as A,i as F,j as t,w as q,aw as oe,T as C,y as k,$,o as m,ax as ne,ay as ae,v as _,C as N,az as ie,H as W,X as M,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,a9 as he,s as O,a6 as fe,a7 as me,aE as ge,a8 as xe}from"./index-D331Asw4.js";import{u as L}from"./useLocalStorage-Ceu1UYjX.js";import{C as be,c as ke,e as ye,_ as je,a as Se,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-CEMWCyCy.js";import{e as D}from"./engine-WLYB4JH-.js";import{g as U}from"./get-safe-url-DQ8We4Cn.js";import{P as z}from"./permission-DkUGU8Dy.js";import{A as Re}from"./ArrowDropDown-DQiHUHN2.js";import{B as Le}from"./Breadcrumbs-AnwvYAV4.js";import"./index-BWfkNY7x.js";import"./KeyboardArrowDown-Dujsdgxw.js";import"./ChevronLeft-LXiuPIK5.js";import"./ChevronRight-DqFLktR4.js";import"./Search-C_5maoKz.js";import"./index-C601SkM4.js";import"./blocklet-DzsezOxR.js";import"./Autocomplete-CQE4jUXI.js";import"./ListSubheader-Dc864cM6.js";import"./Verified-LTXU8MrA.js";import"./VerifiedUser-B3wH8cXt.js";import"./Add-kI5bOAG-.js";import"./Launch-DYmoqTVe.js";import"./Done-vE3VnBR0.js";import"./DeleteOutline-DsqrqnCp.js";import"./delete-confirm-Co07Njuf.js";import"./click-to-copy-BqSPQ3-7.js";import"./MoreVert-CqJOZeEC.js";import"./ButtonGroup-BMNpoL2h.js";import"./getValidReactChildren-BsG2WRwa.js";function Be(e){const r=ee(),c=T(),[s,o]=L(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=j(),{info:l}=S(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,B)=>{B!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=$;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=j(),l=T(),{info:u}=S(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=L("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),B=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(M(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},Y=()=>{i(!1),g(!1)},J=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(_,{onClick:B,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:Y,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:J,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=j(),o=S();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(Se,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Q({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=j(),l=S(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(je,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Q.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=O(ve)`
2
- .ms-highlight {
3
- color: ${e=>e.theme.palette.primary.main};
4
- }
5
- `;function X({ref:e=null,onChange:r=()=>{},onDelete:c=()=>{}}){const{info:s}=S(),{t:o}=j(),[l,u]=f.useState(!1),[d,a]=f.useState(!1),[p,i]=f.useState(-1),[n,b]=L(V),g=Math.max(s.blockletRegistryList.findIndex(x=>x.url===n),0),w=x=>{try{u(!0),i(x);const h=s.blockletRegistryList[x];b(h.url),r(h.url),a(!1)}catch(h){console.error(h),W.error(`${o("store.blockletRegistry.changeFailed")} ${M(h)}`)}finally{u(!1)}};return f.useImperativeHandle(e,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(_,{sx:{textTransform:"none !important"},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(Re,{}),children:t.jsx(C,{color:"secondary",children:s.blockletRegistryList[g].name})}),t.jsx($,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:d,onClose:()=>a(!1),children:t.jsxs(fe,{children:[s.blockletRegistryList.map((x,h)=>t.jsxs(me,{button:!0,disabled:l,selected:g===h,"data-cy":"store-switch",onClick:()=>{if(!l){if(h===g){a(!1);return}w(h)}},children:[p===h&&l&&t.jsx(ge,{sx:{minWidth:24},children:t.jsx(N,{size:16})}),t.jsx(xe,{children:t.jsx(Pe,{teamDid:s.did,store:x,onDelete:()=>c(x.url)})})]},x.url)),t.jsx(z,{permission:"mutate_node",children:x=>t.jsx(Ce,{disabled:l||!x,onAdd:r,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})})]})})]})}X.propTypes={ref:m.any,onChange:m.func,onDelete:m.func};function ct(){const{t:e}=j(),{info:r}=S(),[c]=L(V),{blockletRegistryList:s}=r,o=s.find(n=>c===n.url)||s[0],[l,u]=f.useState(o.url),d=r.routing.adminPath,a=k(window.location.origin,d),p=({detailUrl:n})=>{const b=new URL(n);b.searchParams.set("server-url",a);const g=document.createElement("a");g.setAttribute("target","_blank"),g.setAttribute("href",b.href),g.click()},i=f.useRef(null);return t.jsxs(Te,{children:[t.jsxs(Le,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(C,{color:"textPrimary",children:e("common.store")}),t.jsx(X,{ref:i,onChange:n=>u(n),onDelete:n=>{l===n&&u(r.blockletRegistryList[0]?.url)}})]}),t.jsx(E,{className:"store-header",sx:{display:"flex",justifyContent:"space-between",p:0,m:0},children:t.jsx(C,{component:"h2",variant:"h4",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(Q,{className:"blocklet-list",handleSearchSelect:p,storeUrl:l})]})}const Te=O.main`
6
- .blocklet-list {
7
- aside:hover {
8
- height: calc(100vh - 235px);
9
- }
10
- }
11
-
12
- .blocklet-list {
13
- margin-top: -3px;
14
- .filter-bar {
15
- margin-top: -10px;
16
- padding-top: 0;
17
- background-color: ${e=>e.theme.palette.background.default};
18
- }
19
- }
20
- `;export{ct as default};
@@ -1 +0,0 @@
1
- import{aF as le,j as e,hw as ce,be as ue,bo as Z,V as G,gk as ee,f9 as te,aP as re,aT as u,H as E,hx as M,K as R,t as x,hy as V,aV as H,O as p,ay as de,v as W,s as ie,aW as ne,z as me,y as fe,aH as he,r as B,p as xe,bE as pe}from"./index-D331Asw4.js";import{T as ve}from"./html-title-B38L6o3q.js";import{u as ae,C as m}from"./index.esm-yDr2HoCY.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-B_3Ho-QP.js";import{u as se}from"./blocklet-DzsezOxR.js";import{S as $}from"./Switch-DYHMHuRa.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function ke(){return J||(J=1,function(c,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=t;function t(d){return d==null}c.exports=a.default,c.exports.default=a.default}(z,z.exports)),z.exports}var Q;function we(){return Q||(Q=1,function(c,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=S;var t=b(ce()),d=b(ke());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function S(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,s=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&s&&C}c.exports=a.default,c.exports.default=a.default}(O,O.exports)),O.exports}var X;function Te(){return X||(X=1,function(c,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=b;var t=d(we());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=a.default,c.exports.default=a.default}(K,K.exports)),K.exports}var Ee=Te();const Se=ue(Ee),D={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Z(),{blocklet:a}=se(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=a?.meta?.did,P=Object.assign({...D},a?.settings?.notification?.email||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=ae({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),s=_("enabled"),C=u(async(r,g,T=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...D},y?.settings?.notification?.email||{});q(oe),T&&E.success(t("oauth.saveSuccess"))}catch(y){if(T)E.error(y.message||t("oauth.saveFailed"));else throw y}}),N=u(async(r,g,T)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:T,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),E.success(t("notification.email.testSuccess"))}catch(y){E.error(y.message||t("notification.email.testfailed"))}}),A=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:T=>{l.testReceiver=T.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(T){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await N(r,g,y),T()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?V(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Se(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),k=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),w=u(r=>r?.trim()&&!V(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(H,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:s?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:s?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:s?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:s?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:s?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(H,{control:e.jsx($,{checked:r.value,...r,disabled:!s})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:s?w:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:s?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!s})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(W,{variant:"outlined",color:"warning",onClick:S(A),disabled:!s,children:t("oauth.runTest")}),e.jsx(W,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,U={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Z(),{blocklet:a}=se(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=a?.meta?.did,P=Object.assign({...U},a?.settings?.notification?.pushKit||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=ae({defaultValues:te(P,Object.keys(U))}),l=re({testReceiver:"",testReceiverError:""}),s=_("enabled"),C=u(async(o,k,v=!0)=>{try{const{blocklet:w}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...U},w?.settings?.notification?.pushKit||{});q(I),v&&E.success(t("oauth.saveSuccess"))}catch(w){if(v)E.error(w.message||t("oauth.saveFailed"));else throw w}}),N=u(async(o,k)=>{try{i.isDirty&&await C(o,k,!1);const v=(a?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,w=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:a?.meta?.version,t:new Date(a?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:a?.appDid,fullName:a?.meta?.title,avatar:w}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),E.success(t("notification.pushKit.testSuccess"))}catch(v){E.error(v.message||t("notification.pushKit.testfailed"))}}),A=u((o,k)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await N(o,k),v()}})}),F=u(o=>{const k=o?.trim();return k?V(k)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(H,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:s?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!s})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!s})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!s})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(W,{variant:"outlined",color:"warning",onClick:S(A),disabled:!s,children:t("oauth.runTest")}),e.jsx(W,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,Y=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function Ae(){const[c,a]=B.useState(Y[0].value),{locale:t}=B.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=B.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:Y,current:c,onChange:a}),e.jsx(R,{style:b,children:d[c]})]})}export{Ae as B};
@@ -1,79 +0,0 @@
1
- import{r as p,p as ye,j as e,C as H,L as Ce,s as W,o as T,u as ce,V as Q,n as ve,q as we,$ as Be,D as Se,T as P,t as Z,v as q,w as Te,x as Le,y as Ae,z as Ie,A as me,H as M,B as De,d as Ee,f as Fe,E as Pe,F as Re,i as D,I as ee,J as te,K as S,M as Ne,N as _,O as se,P as _e,S as oe,Q as le,R as Ue,U as ne,X as Me,Y as We}from"./index-D331Asw4.js";import{u as $e}from"./useLocalStorage-Ceu1UYjX.js";import{g as Oe,H as ze}from"./index-Dj4J7MRE.js";import{y as qe}from"./index-C601SkM4.js";import{W as Ve,B as E}from"./status-hfEX7VoN.js";import{D as He,u as Qe,B as re}from"./actions-CE27qWor.js";import{I as Ke,B as Xe}from"./install-from-url-CUdRu_Yn.js";import{u as de}from"./url-evaluation-BNj0UZK1.js";import{L as Je}from"./Launch-DYmoqTVe.js";import{A as Ye}from"./Add-kI5bOAG-.js";import{v as F}from"./index-BqDRNwJX.js";import{s as ae}from"./schema-BZPDZOr7.js";import{P as Ge}from"./permission-DkUGU8Dy.js";import"./FilterList-AnfIXCKs.js";import"./CSSTransition-BxHb6pgR.js";import"./emotion-cache.browser.esm-X_vzDGxi.js";import"./index-DypTd994.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DDykxzRj.js";import"./TableSearch-CCo38KPm.js";import"./Search-C_5maoKz.js";import"./Clear-Hs60zEib.js";import"./MoreVert-CqJOZeEC.js";import"./get-safe-url-DQ8We4Cn.js";import"./ButtonGroup-BMNpoL2h.js";import"./getValidReactChildren-BsG2WRwa.js";import"./without-wallet-BKVBw3vL.js";import"./index-CT2MPFX1.js";import"./cloneDeep-DpgUjdaj.js";import"./index-CQ3wtaOi.js";import"./Autocomplete-CQE4jUXI.js";import"./ListSubheader-Dc864cM6.js";import"./ListItemButton-BEID3HDl.js";import"./Stepper-Ck_x8FLF.js";function V({blocklet:j,skipAccessibilityCheck:f=!1,...c}){const{t:r}=p.useContext(ye),{urls:C,loading:n,recommendedUrl:h}=de(j);if(n&&!f)return e.jsx(H,{size:12,...c});const k=f?C[0]:h;return k?e.jsx(et,{...c,children:e.jsx(Ze,{children:e.jsxs(Ce,{href:k,target:"_blank",className:"blocklet-interface",underline:"hover",children:[r("common.visit"),e.jsx(Je,{fontSize:"12",sx:{marginLeft:.5}})]})})}):r("blocklet.router.noAccessibleUrl")}const Ze=W.div`
2
- display: flex;
3
- margin: 4px 0;
4
- `,et=W.div`
5
- .blocklet-interface {
6
- display: flex;
7
- align-items: center;
8
- justify-content: flex-start;
9
- white-space: nowrap;
10
-
11
- img {
12
- margin-right: 4px;
13
- }
14
- }
15
- `;V.propTypes={blocklet:T.object.isRequired,skipAccessibilityCheck:T.bool};function ue({onCancel:j,onSuccess:f}){const{info:c}=ce(),{t:r}=Q(),{api:C}=ve(),[n,h]=we({loading:!1,title:"",titleError:"",description:"",descriptionError:"",isConnectOpen:!1}),k={title:o=>ae.installBlockletTitleSchema.messages({"*":r("blocklet.titleValidationError")}).validate(o)?.error?.message||"",description:o=>ae.installBlockletDescriptionSchema.messages({"*":r("blocklet.descriptionValidationError")}).validate(o)?.error?.message||""},y=()=>{const o=Ae(window?.env?.apiPrefix??"/","/launch-blocklet/install");window.location.href=Ie(o,{from:"empty",title:n.title,description:n.description})},v=o=>{h({loading:!1,isConnectOpen:!1}),f(o)},w=()=>{h({loading:!1,isConnectOpen:!1})},B=o=>{const{value:m,name:d}=o.target;h({[`${d}Error`]:m?k[d](m):""})},L=o=>{const{value:m,name:d}=o.target,b=`${d}Error`;n[b]?h({[d]:m,[b]:m?k[d](m):""}):h({[d]:m})};return e.jsxs(e.Fragment,{children:[e.jsx(Be,{title:r("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:()=>j(),showCloseButton:!0,open:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(q,{onClick:o=>{o.stopPropagation(),j()},color:"inherit",children:r("common.cancel")}),e.jsxs(q,{onClick:o=>{o.stopPropagation(),y()},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:n.loading||n.titleError||n.descriptionError||!n.title||!n.description,style:{marginLeft:8},children:[n.loading&&e.jsx(H,{size:16}),r("common.create")]})]}),children:e.jsx(Se,{component:"div",children:e.jsxs(P,{component:"div",children:[e.jsx(Z,{style:{marginBottom:24},label:`Blocklet ${r("common.title")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,name:"title",value:n.title,onBlur:B,onChange:L,error:!!n.titleError,helperText:n.titleError,disabled:n.loading}),e.jsx(Z,{label:`Blocklet ${r("common.description")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,name:"description",value:n.description,onBlur:B,onChange:L,error:!!n.descriptionError,helperText:n.descriptionError,disabled:n.loading})]})})}),e.jsx(Te,{popup:!0,open:n.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:C.get,checkTimeout:5*60*1e3,webWalletUrl:Le(c),onSuccess:v,extraParams:{title:n.title,description:n.description},messages:{title:r("setup.keyPair.title"),scan:r("setup.keyPair.scan"),confirm:r("setup.keyPair.confirm"),success:r("setup.keyPair.success")},onClose:w})]})}ue.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired};function pe({onCreate:j=()=>{}}){const f=me(),{t:c}=Q(),[r,C]=p.useState(""),[n,h]=p.useState(""),[k,y]=p.useState(null),[v,w]=p.useState(null),B=()=>{y(null)},L=()=>{y({onCancel:()=>{B(),y(null)},onSuccess:()=>{B()}})},o=()=>{w({onCancel:()=>{w(null)},onSuccess:(...b)=>{w(null),j(...b)}})},m=()=>{const b=new URL("http://localhost");b.searchParams.set("restoreFrom","server"),b.searchParams.set("serverUrl",window.location.href),f(`/blocklets/restore${b.search}`)},d=()=>{f("/blocklets/restore")};return e.jsxs(e.Fragment,{children:[e.jsxs(F,{onClick:()=>f("/store"),menuButtonProps:{"data-cy":"open-install-menu"},menu:[e.jsx(F.Item,{"data-cy":"open-install-form",onClick:()=>L(),children:c("blocklet.installFromUrl")},"1"),e.jsx(F.Item,{"data-cy":"open-create-form",onClick:()=>o(),children:c("blocklet.installFromCreate")},"2"),e.jsx(F.Item,{"data-cy":"open-install-from-spaces",onClick:()=>d(),children:c("blocklet.restoreFromSpaces.title")},"3"),e.jsx(F.Item,{"data-cy":"open-install-from-spaces",onClick:()=>m(),children:c("blocklet.installFromDiskBackup")},"4")].filter(Boolean),children:[e.jsx(Ye,{}),c("blocklet.installFromMarket")]}),!!r&&e.jsx(M,{variant:"error",message:r,onClose:()=>C("")}),!!n&&e.jsx(M,{variant:"success",duration:3e3,message:n,onClose:()=>h("")}),k&&e.jsx(Ke,{onCancel:k.onCancel,onSuccess:k.onSuccess}),v&&e.jsx(ue,{onCancel:v.onCancel,onSuccess:v.onSuccess})]})}pe.propTypes={onCreate:T.func};function fe({blocklet:j,children:f}){const{urls:c}=de(j),r=c[0];return f(r||"")}fe.propTypes={blocklet:T.object.isRequired,children:T.func.isRequired};const U="internal",ie="external";function Mt(){return e.jsx(He,{children:e.jsx(tt,{})})}function tt(){const j=me(),f=ce(),[c,r]=De(),{data:C,externalData:n,error:h,refresh:k,loading:y}=Ee(),{deletingBlocklets:v,addDeletingDid:w,removeDeletingDid:B,matchDeletingDid:L}=Qe(),{t:o,locale:m}=Q(),[d,b]=p.useState(c.get("searchText")),K=Fe(),xe=l=>l?Date.now()-Number(l):Date.now(),he=[{id:U,name:o("blocklet.internal")},{id:ie,name:o("blocklet.external")}],[A,be]=$e("blocklet-type-filter",U),$=p.useMemo(()=>A===U?C:n,[A,C,n]);L($.map(l=>l.meta.did));const O=p.useCallback(({action:l,blocklet:a})=>{l==="remove"&&w(a.meta.did)},[w]),z=p.useCallback(l=>{if(l.error){M.error(l.error.message),l.action==="remove"&&B(l.blocklet.meta.did);return}l.action==="remove"&&f.refresh({silent:!0})},[f,B]),X=Pe(l=>l.breakpoints.up("md"));let R=null;const N=p.useMemo(()=>{const l=["installedAt","startedAt","stoppedAt","createdAt"];return($||[]).map(a=>(l.forEach(s=>{if(a[s]){const t=new Date(a[s]);a[s]=t}}),a))},[$]),g=p.useMemo(()=>{let l=N||[];if(d){const a=Re.toAddress(d.trim()).toLocaleLowerCase();l=l.filter(s=>{const t=D.getDisplayName(s)||"",x=s.site?.domainAliases||[],I=s.children?.map(i=>i.meta?.did?.toLocaleLowerCase());return s.appDid?.toLocaleLowerCase().includes(a)||s.appPid?.toLocaleLowerCase().includes(a)||I.some(i=>i?.toLocaleLowerCase().includes(a))||t.toLocaleLowerCase().includes(a)||x.some(i=>i.value?.toLocaleLowerCase().includes(a))})}return l},[N,d]),[ke,ge]=p.useState([]),J=p.useCallback(()=>{const l=Array.from(new Set(g.map(s=>s.status))),a=[{label:o("common.name"),name:"meta.title",options:{filter:!1,customBodyRenderLite(s){const t=g[s];if(!t)return null;const x=D.getAppMissingConfigs(t).length>0?"components":"overview";return e.jsx(ee,{to:`/blocklets/${t.meta.did}/${x}`,className:"blocklet-name-wrapper",children:e.jsxs(P,{component:"strong",variant:"body1",className:"blocklet-name",children:[e.jsx(te,{blocklet:t,style:{marginRight:8}}),e.jsxs(S,{children:[e.jsx(S,{children:D.getDisplayName(t)}),e.jsxs(S,{children:[e.jsx(Xe,{mode:t.mode||""}),!Ne(t.controller)&&e.jsx(Ve,{type:"primary",children:o("blocklet.external")})]})]})]})},t.meta.did)}}},A===U?{label:o("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,filter:!1,customBodyRenderLite(s){const t=g[s];return t?e.jsx(V,{blocklet:t},t.meta.did):null}}}:null,{label:o("common.uptime"),name:"runtimeInfo.uptime",options:{filter:!1,customBodyRenderLite(s){const t=g[s];return t?D.isBlockletRunning(t)&&t.appRuntimeInfo?e.jsx(_,{value:xe(t.appRuntimeInfo.uptime),locale:m},t.meta.did):"":null}}},{label:o("common.installedAt"),name:"installedAt",options:{filter:!1,customBodyRenderLite(s){const t=g[s];return t?t.installedAt?e.jsx(_,{value:t.installedAt.getTime(),locale:m},t.meta.did):t.createdAt?e.jsx(_,{value:t.createdAt.getTime(),locale:m},t.meta.did):"":null}}},{label:o("common.updatedAt"),name:"updatedAt",options:{filter:!1,customBodyRenderLite(s){const t=g[s];return t?e.jsx(_,{value:t.updatedAt,locale:m},t.meta.did):null}}},{label:o("common.status"),name:"status",width:120,align:"center",options:{filter:!0,filterType:"custom",customFilterListOptions:{render:s=>s.map(t=>e.jsx(E,{"data-cy":"blocklet-status-filter-list",status:t},t)),update:(s,t,x)=>(s[x].splice(t,1),s)},filterOptions:{names:l,logic:(s,t)=>t.length?!t.includes(s):!1,display:(s,t,x,I)=>e.jsxs(se,{children:[e.jsx(_e,{htmlFor:"select-multiple-chip",sx:{background:K.palette.background.default},children:o("common.status")}),e.jsx(oe,{multiple:!0,value:s[x],renderValue:i=>i.map(u=>e.jsx(E,{"data-cy":"blocklet-status-filter-display",status:u},u)),onChange:i=>{s[x]=i.target.value,t(s[x],x,I)},sx:{minWidth:120},children:l.map(i=>e.jsxs(le,{value:i,children:[e.jsx(Ue,{color:"primary",checked:s[x].indexOf(i)>-1}),e.jsx(E,{"data-cy":"blocklet-status-filter",status:i})]},i))})]}),fullWidth:!0},customBodyRenderLite(s){const t=g[s];return t?e.jsx(E,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:v.includes(t.meta.did)?"deleting":t.status,source:t.source,progress:t.progress},t.meta.did):null}}},{label:o("common.actions"),name:"",width:90,options:{sort:!1,filter:!1,customBodyRenderLite(s){const t=g[s];return t?e.jsx(re,{blocklet:t,variant:"menu",onStart:O,onComplete:z},t.meta.did):null}}}].filter(Boolean);ge(a)},[v,m,z,O,g,o,A,K]);if(p.useEffect(()=>{J()},[J]),p.useEffect(()=>{b(c.get("searchText"))},[c]),h)R=e.jsx(ne,{severity:"error",children:e.jsxs("div",{children:[Me(h),e.jsx(q,{onClick:()=>k({silent:!1}),children:e.jsx("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:o("common.retry")})})]})});else if(N.length>0||y){const l=Oe("blocklets-list");l.searchText&&!d&&b(l.searchText);const a={};X||(a.TableBody=function(t){if(y)return e.jsx(We,{relative:"parent",children:e.jsx(H,{})});const{page:x,rowsPerPage:I}=t,i=g.slice(x*I,(x+1)*I);return i.length?e.jsx("div",{children:i.map(u=>e.jsx(fe,{blocklet:u,children:Y=>e.jsxs(S,{className:"blocklet-item--mobile",sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(te,{className:"blocklet__avatar",blocklet:u,size:X?40:60}),e.jsxs(ee,{className:"blocklet__content",to:Y,onClick:G=>{G.stopPropagation(),Y||(G.preventDefault(),M.warning(o("blocklet.router.noAccessibleUrl")))},target:"_blank",children:[e.jsxs(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start","& button":{width:24,height:24}},children:[e.jsx(P,{component:"strong",variant:"body1",className:"blocklet__name",children:D.getDisplayName(u,!0)}),e.jsx(re,{blocklet:u,variant:"menu",onStart:O,onComplete:z},u.meta.did)]}),e.jsxs(P,{component:"small",className:"blocklet__addons",sx:{display:"flex",alignItems:"flex-end"},children:[e.jsx(S,{sx:{display:"flex",alignItems:"center"},children:e.jsx(V,{blocklet:u,style:{fontSize:14}})}),e.jsx(E,{"status-blocklet-did":u.meta.did,status:u.status,source:u.source,progress:u.progress},u.meta.did)]})]})]})},u.meta.did))}):e.jsx(qe,{children:o("common.empty")})}),R=e.jsx(st,{children:e.jsx(ze,{loading:y,className:"blocklet-list",title:e.jsx(S,{sx:{display:"flex",alignItems:"center"},children:o("blocklet.index.tableTitle")}),locale:m,data:g,columns:ke,durable:"blocklets-list",options:{download:!1,print:!1,searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},filterType:"checkbox",searchDebounceTime:300,onSearchChange:s=>{b(s),r({searchText:s??""})},customSearch:()=>!0,...l,searchText:d},components:a})})}else N.length===0&&(R=e.jsx(ne,{severity:"warning",children:o("blocklet.index.noBlocklet")}));const je=n&&n.length>0;return e.jsxs(ot,{children:[e.jsxs(P,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[e.jsxs(S,{sx:{display:"flex",alignItems:"center"},children:[o("common.blocklets"),(je||A===ie)&&e.jsx(se,{sx:{ml:1},children:e.jsx(oe,{value:A,onChange:l=>be(l.target.value),size:"small",children:he.map(l=>e.jsx(le,{value:l.id,children:o(l.name)},l.id))})})]}),e.jsx(Ge,{permission:"mutate_blocklets",children:e.jsx(pe,{onCreate:l=>{j(`/blocklets/${l.appDid}/components`)}})})]}),R]})}const st=W.div`
16
- .blocklet-item--mobile {
17
- padding: 16px 0;
18
- }
19
- `,ot=W.main`
20
- .page-header {
21
- display: flex;
22
- justify-content: space-between;
23
- align-items: center;
24
- }
25
-
26
- .blocklet-list {
27
- .blocklet-item--mobile {
28
- .blocklet__avatar {
29
- margin-right: -60px;
30
- }
31
- .blocklet__content {
32
- padding-left: 68px;
33
- flex: 1;
34
- display: flex;
35
- flex-direction: column;
36
- z-index: 1;
37
- }
38
- .blocklet__name {
39
- font-weight: bold;
40
- text-decoration: none;
41
- white-space: normal;
42
- word-break: break-all;
43
- }
44
- .blocklet__addons {
45
- display: flex;
46
- justify-content: space-between;
47
- margin-top: 8px;
48
- }
49
- }
50
- .blocklet-name-wrapper {
51
- display: flex;
52
- flex-direction: row;
53
- align-items: center;
54
- justify-content: flex-start;
55
- }
56
- .blocklet-name {
57
- font-weight: bold;
58
- text-decoration: underline;
59
- display: flex;
60
- align-items: center;
61
- white-space: normal;
62
- word-break: break-all;
63
- }
64
-
65
- .blocklet-interface {
66
- display: flex;
67
- align-items: center;
68
- justify-content: flex-start;
69
-
70
- img {
71
- margin-right: 4px;
72
- }
73
- }
74
-
75
- .MuiToolbar-root {
76
- display: flex;
77
- }
78
- }
79
- `;export{tt as BlockletList,Mt as default};
@@ -1,120 +0,0 @@
1
- import{aF as Ge,j as e,bo as gt,r as g,bE as J,bg as H,H as q,aH as D,g as xt,o as d,h as ee,at as bt,ay as jt,K as C,T as U,V as Q,eO as Fe,O as Pe,ik as Ye,bk as Te,aV as Ie,R as Ee,bB as Ne,b4 as qe,b2 as Ae,C as Je,f as Qe,f0 as Xe,aP as De,W as yt,as as Ze,il as et,v as Oe,f2 as tt,br as je,fJ as st,dD as St,s as ie,af as pe,G as Ue,au as vt,im as Ct,io as Nt,$ as nt,ip as wt,iq as Rt,ir as Tt,is as It,N as Et,by as it,E as At,J as Dt,P as Ot,S as Lt,Q as $e,it as kt,a3 as Ft}from"./index-D331Asw4.js";import{d as Pt,H as at,g as _t}from"./index-Dj4J7MRE.js";import{R as _e,S as Bt}from"./actions-CE27qWor.js";import{B as zt}from"./index-CExol_6_.js";import{S as me}from"./shorten-label-CdOupV3k.js";import{v as ot}from"./index-CQ3wtaOi.js";import{T as Wt}from"./html-title-B38L6o3q.js";import{R as Mt}from"./Refresh-CcEIh6xY.js";import{D as Kt,g as Ht}from"./traffic-c9i5qWvQ.js";import{u as qt}from"./use-mobile-DegDbYke.js";import"./FilterList-AnfIXCKs.js";import"./CSSTransition-BxHb6pgR.js";import"./emotion-cache.browser.esm-X_vzDGxi.js";import"./index-DypTd994.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DDykxzRj.js";import"./index-C601SkM4.js";import"./TableSearch-CCo38KPm.js";import"./Search-C_5maoKz.js";import"./Clear-Hs60zEib.js";import"./MoreVert-CqJOZeEC.js";import"./useLocalStorage-Ceu1UYjX.js";import"./url-evaluation-BNj0UZK1.js";import"./get-safe-url-DQ8We4Cn.js";import"./ButtonGroup-BMNpoL2h.js";import"./getValidReactChildren-BsG2WRwa.js";import"./permission-DkUGU8Dy.js";import"./index.esm-yDr2HoCY.js";import"./collapse-B_3Ho-QP.js";import"./blocklet-DzsezOxR.js";import"./Switch-DYHMHuRa.js";import"./iframe-BNWt4-fa.js";import"./ChevronLeft-LXiuPIK5.js";import"./ChevronRight-DqFLktR4.js";import"./index-DBii9-f-.js";import"./base-chart-D5YNxfH0.js";import"./index-Da6avpbI.js";import"./AdapterDayjs-B8XrCnul.js";import"./useThemeProps-CGNNiV2h.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),$t=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:Vt,Consumer:on}=rt;function Gt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=gt(),[l,x]=g.useState([]),[f,y]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),h=J(()=>s.meta?.did,[s]),[b,S]=g.useState([]),[B,_]=g.useState({}),R=J(()=>l.length?new Set(l.map(m=>m.id)):new Set,[l]),$=async({page:m=1,pageSize:N=20,...O}={})=>{if(!h)return[];try{const A={paging:{page:m,pageSize:N},...O,teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0},{dids:w,...L}=A;let P="";w&&w.includes("system")&&(P="system");const ae=w?w.filter(oe=>oe!=="system"):[],se={...L,source:P,componentDids:ae},Z=await n.getNotificationSendLog({input:se});return _(se),x(Z.list),y(Z.paging),Z.list}catch(A){return q.error(A.message),[]}},M=async()=>{const m=await n.getNotificationComponents({input:{teamDid:h}});S(m.componentDids)},k=g.useCallback(m=>{const N=s.children.find(O=>O.meta?.did===m);if(N)return N.ancestors=[s],N},[s]),F=async({notificationId:m,receivers:N,channels:O,...A})=>{await n.resendNotification({input:{teamDid:h,notificationId:m,receivers:N,channels:O.map(w=>w==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:w==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:w),...A}})},V=g.useCallback(async m=>(await n.getUser({input:{teamDid:h,user:{did:m},options:{enableConnectedAccount:!0}}})).user,[n,h]),G=g.useCallback(async({page:m=1,pageSize:N=20,...O}={})=>{try{const A={paging:{page:m,pageSize:N},...O,userName:O.searchText||"",teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:A})}catch(A){throw q.error(A.message),A}},[n,h]);g.useEffect(()=>{h&&M()},[h]),o(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,m=>{R.has(m.notificationId)&&$(B)},[R,B]),o(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,m=>{R.has(m.id)||$(B)},[R,B]);const X={fetch:$,data:l,paging:f,blocklet:s,getComponent:k,resendNotification:F,getUser:V,componentDids:b,getReceivers:G,inService:r,teamDid:h};return e.jsx(Vt,{value:{notificationRecords:X},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Yt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Yt[t],children:t})}const Jt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:o,reason:l="",channel:x="wallet"}=n,f=o?t("notification.sendStatus.sentTime",{date:bt(o,s)}):"",y=Jt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Qt=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Xt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Zt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),es=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ts=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],be=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ss=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=ee(t,l,[]);return be(x)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return be(l)}const o={};return ke.forEach(l=>{const x=`${l}SendRecord`,f=ee(t,x,[]),y=be(f);o[l]=y}),r.length>0&&r.forEach(l=>{const x=n[l]??[],f=be(x);o[l]=f}),o},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Se=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ns=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:o,title:l="",sentTime:x="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[o]}}),e.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[o]}})]}),e.jsx(U,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ve({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:o}=Q();return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(l=>{const x=lt(r,o,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:f=>n(f,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:o,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:o.map(f=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(f.value??f)>-1,onChange:y=>{const h=[...t];y.target.checked?h[n]=[...h[n],f.value??f]:h[n]=h[n].filter(b=>b!==(f.value??f)),s(h[n],n,r)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(f)})},f.value??f))})]})}function Re(t){return e.jsx(ze,{...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:o}){const{t:l,locale:x}=Q(),f=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(Ne,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:o,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=H().toDate(),[o,l]=g.useState(null),x=g.useCallback(h=>{l(o?null:h.currentTarget)},[o]),f=!!o,y=g.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(U,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ne,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:f,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Kt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:y})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(C,{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(Pt.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...o&&l?{onDelete:o}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const is=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[o,l]=g.useState(is),[x,f]=g.useState(!0),y=(b,S)=>{S.checked=b.target.checked;const B=o.map(_=>({..._,checked:_.value===S.value?S.checked:_.checked}));l(B)},h=b=>{b.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(U,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(b=>e.jsx(Ie,{control:e.jsx(Ee,{checked:b.checked,onChange:S=>y(S,b),name:b.value}),label:b.label},b.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:b=>f(b.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ne,{onClick:b=>{b.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ne,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Je,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:o}=Q(),l=Qe(),x=g.useMemo(()=>Xe(l,ut()),[l]),{getReceivers:f,inService:y,teamDid:h,getUser:b,blocklet:S}=Be(),[B,_]=g.useState(!1),[R,$]=g.useState([]),M=De({anchorEl:null,position:null}),k=De({anchorEl:null,position:null}),[F,V]=g.useState(null),[G,X]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,N]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[O,A]=g.useState([]),w=[{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"}],L=async()=>{if(!B&&t)try{_(!0);const i=await f({notificationId:t,...m}),a=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,y)}}));$(a),X(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{L()},[m]);const P=i=>{i.stopPropagation();const a=i.currentTarget;k.anchorEl=a;const c=a.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:P,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:G.page-1,rowsPerPage:G.pageSize,count:G.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(i,a)=>{A(a.map(c=>c.dataIndex))},customToolbarSelect:ae},Z=({page:i,rowsPerPage:a,searchText:c,filterList:v})=>{const[,z=[],Y=[],K=[]]=v;m.pageSize!==a?N(W=>({...W,pageSize:a,page:1})):m.page!==i+1?N(W=>({...W,page:i+1})):m.searchText!==c?N(W=>({...W,searchText:c,page:1})):pe(z,m.walletSendStatus)?pe(Y,m.pushKitSendStatus)?pe(K,m.emailSendStatus)||N(W=>({...W,emailSendStatus:K,page:1})):N(W=>({...W,pushKitSendStatus:Y,page:1})):N(W=>({...W,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,a)=>{if(!a)return!1;const c=await b(a);return c?i==="wallet"?Zt(c):i==="email"?Qt(S,c):i==="pushKit"?Xt(S,c):i==="webhook"?es(c):!0:!1},[b,S]),we=g.useCallback(i=>ts(r,i),[r]),ne=()=>{M.anchorEl=null,M.position=null,V(null)},re=()=>{k.anchorEl=null,k.position=null},ge=async(i,a,c=!0,v="")=>{if(!(!a.length||!i.length))try{s(i,a,c,v),k.anchorEl||(await xe(.5),ne())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:a})=>{const c=O.map(v=>R[v].receiver);await ge(i,c,a),await xe(.5),re(),A([])},u=async(i,a=[],c=!0)=>{try{await ge(["webhook"],[i.receiver],c,a)}catch(v){q.error(v.response?v.response.statusText:v.message)}},j=async(i,a,c,v=[],z=!0)=>{if(i.stopPropagation(),ss(a,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await u(a,v,z);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}V({channel:c});try{const K=await oe(c,a.receiver);await xe(1),V({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[a.receiver],z),k.anchorEl||(await xe(.5),ne()))}catch(K){q.error(K.message)}},I=i=>{N(a=>({...a,dateRange:i,page:1}))},E=(i,a,c,v)=>{i.stopPropagation();const z=c.filter(Y=>Y!==a);N(Y=>({...Y,[v]:z,page:1}))},T=J(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:a,receiver:c}=R[i];return a?e.jsxs(C,{"data-cy":`member-name-${a.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${a.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:a.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Wallet",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:a,index:c,column:v,filterValues:w})},customBodyRenderLite:i=>{const{walletSendStatus:a,walletSendAt:c,walletSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"wallet",onResend:z=>j(z,R[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:a,pushKitSendAt:c,pushKitSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"pushkit",onResend:z=>j(z,R[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Push Kit",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:a,emailSendAt:c,emailSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"email",onResend:z=>j(z,R[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Email",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Email",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:a}=R[i];if(!a)return null;const c=Object.entries(a)[0];if(!c)return null;const[v,z]=c,Y=z[0];return e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(C,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:v},v),e.jsx(ce,{status:Y.status,updatedAt:Y.sendAt,reason:Y.failedReason,channel:"webhook",onResend:K=>j(K,R[i],"webhook",[v],!1)})]},v)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:a}=R[i];return e.jsx(et,{value:a,locale:o,shouldUpdate:!0})}}}],[R,o,m,r]),le=[e.jsx(We,{value:m.dateRange,onChange:I},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Mt,{}),onClick:()=>L(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(os,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:o,loading:B,columns:T,data:R,onChange:Z,options:se,customButtons:le,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:a=>e.jsx(Ke,{...a,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ae,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:ne,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rs,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[F?.channel," Checking"]}),e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(F?.channel).map(i=>{const{type:a,pass:c,fail:v}=i;return!F?.result||F?.result?.[a]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:F?.result?.[a]?je.success.main:"inherit"},children:[F?.result?e.jsx($t,{}):e.jsx(Je,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},a):e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:je.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:v})]},a)})})]})}),k.anchorEl&&e.jsx(Ae,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:re,onConfirm:p})})]})})})}const as=g.memo(ft),os=ie.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
- `,rs=ie.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 ls(t){const{wallet:s,push:n,email:r,webhook:o}=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})},...o.total>0?[{name:"Webhook",value:e.jsx(de,{item:o,isWebhook:!0})}]:[]]}function cs(t,s,n){const{wallet:r,push:o,email:l,webhook:x}=t;return[{name:"Wallet",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.PUSH,item:o,onResend:s})},{name:"Email",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}He.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,o=t.total,l=r===o?"success":"failed";return e.jsx(C,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2},children:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsxs(te,{config:{status:l},enableTooltip:!1,children:[fe(r)," / ",fe(o)," ",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=D.NOTIFICATION_SEND_CHANNEL.WALLET,item:s,isWebhook:n=!1,onResend:r=()=>{},loading:o=!1}){const{t:l}=Q(),{success:x,failed:f,pending:y}=s,h=ns(t),b=n?x.length:x,S=n?f.length:f,B=n?y.length:y,_=async k=>{k.stopPropagation();const F=n?[...new Set([...x,...f].map(V=>V))]:[];await r([t],[],!0,F)},R=b+S,$=R>0?b/R*100:0,M=R>0?S/R*100:0;return e.jsxs(ds,{successRatio:$,failedRatio:M,children:[e.jsxs(U,{variant:"h6",children:[h," (",s.total,")"]}),e.jsxs(U,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:fe(b)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(C,{className:"unsent-area",children:[e.jsxs(C,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[fe(S)," ",l("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[fe(B)," ",l("notification.sendStatus.pending")]})]}),S>0&&e.jsx(C,{className:"resend-btn",children:e.jsx(Oe,{size:"small",color:"primary",loading:o,variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:l("notification.resend")})})]})]})}function He({statistics:t,mode:s="simple",onResend:n=()=>{},resending:r=!1}){const o=J(()=>s==="simple"?ls(t):cs(t,n,r),[t,s]);return s==="simple"?e.jsx("div",{children:o.map(l=>e.jsx(ot,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Ue,{container:!0,spacing:2,children:o.map(l=>e.jsx(Ue,{size:{md:4,sm:6,xs:12},children:l.value},l.name))})}const ds=ie(C)`
31
- display: flex;
32
- flex-direction: column;
33
- align-items: flex-start;
34
- padding: 16px;
35
- border-radius: 8px;
36
- background: ${({successRatio:t,failedRatio:s,theme:n})=>t===0&&s===0?n.palette.grey[300]:`linear-gradient(to right, ${vt(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
- `;mt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function mt({notification:t,onCancel:s=()=>{},blocklet:n,tab:r="info"}){const{t:o,locale:l}=Q(),{getComponent:x,resendNotification:f}=Be(),[y,h]=g.useState(!1),b=J(()=>x(t.componentDid)||n,[n,t.componentDid]),S=De({tab:r||"info"}),B=g.useCallback(async(m,N,O=!0,A=[])=>{if(!m.length||!t.id)return;const w=N.length>0?N:t?.receivers?.map(P=>P.receiver);if(!w.length)return;let L=[...m];if(L.includes(D.NOTIFICATION_SEND_CHANNEL.PUSH)&&!dt(n)&&(q.warning(o("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),L=L.filter(P=>P!==D.NOTIFICATION_SEND_CHANNEL.PUSH)),L.includes(D.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ct(n)&&(q.warning(o("notification.sendStatus.reason.unavailable",{channel:"Email"})),L=L.filter(P=>P!==D.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!L.length)try{h(!0),await f({notificationId:t.id,receivers:w,channels:L,resendFailedOnly:O,...L.includes("webhook")&&A.length?{webhookUrls:A}:{}}),q.success("Message has been sent!")}catch(P){console.error("handleResend error",{error:P}),q.error(P.response?P.response.statusText:P.message)}finally{h(!1)}},[n,t.id,t?.receivers,f,o]),_=J(()=>Ct(t),[t]),R=J(()=>Nt(t),[t]),$=J(()=>_?t?.actorInfo:[],[t]),M=J(()=>n?.did||n?.meta?.did||"",[n]);function k(){return[{name:o("notification.from"),value:_&&R?e.jsx(wt,{actors:$,teamDid:M,size:32,showName:!0}):e.jsx(Rt,{size:32,blocklet:b,showName:!0,hideDot:!0})},{name:o("notification.notificationTitle"),value:e.jsx(me,{maxLength:50,children:t.title})},{name:o("notification.body"),value:_?e.jsx(Tt,{notification:t,blocklet:n}):e.jsx(It,{notification:t,rows:0})},{name:o("notification.severity"),value:e.jsx(he,{severity:t.severity})},{name:o("notification.createdAt"),value:e.jsx(Et,{value:t.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(N=>e.jsx(ot,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:N.name,children:N.value},N.name))}const F={info:{label:o("common.basicInfo"),value:"info",component:k},receivers:{label:o("notification.receiver"),value:"receivers"},statistics:{label:o("notification.statistics"),value:"statistics"}},V=Object.values(F).map(({label:m,value:N})=>({label:m,value:N})),G=F[S.tab]||F.info,X=m=>{S.tab=m};return e.jsx(nt,{title:o("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{S.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(ps,{children:[e.jsx(C,{className:"tabs",sx:{mx:3},children:e.jsx(Wt,{tabs:V,current:S.tab,onChange:X,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[S.tab==="receivers"&&e.jsx(as,{notificationId:t.id,resending:y,handleResend:B}),S.tab==="statistics"&&e.jsx(He,{statistics:t.statistics,mode:"detail",resending:y,onResend:B}),S.tab==="info"&&e.jsx(G.component,{})]})]})})}const us=g.memo(mt),ps=ie.div`
49
- & > .notification-row {
50
- padding: 0;
51
- }
52
-
53
- .tabs {
54
- margin: 0;
55
- }
56
- .body {
57
- margin-top: 16px;
58
- }
59
-
60
- .channel-item {
61
- display: flex;
62
- padding: 4px;
63
- justify-content: flex-start;
64
- align-items: center;
65
- gap: 8px;
66
- > p {
67
- font-size: 15px;
68
- }
69
- .resend-btn {
70
- svg {
71
- font-size: 16px;
72
- }
73
- display: flex;
74
- align-items: center;
75
- font-size: 12px;
76
- cursor: pointer;
77
- &.disabled {
78
- cursor: not-allowed;
79
- color: ${je.text.disabled};
80
- }
81
- }
82
- }
83
- `;Ce.propTypes={blocklet:d.object,label:d.string};const fs=ie.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 Ce({blocklet:t=null,label:s=""}){return e.jsx(fs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(it,{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})})}ht.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ht({list:t,label:s,onDelete:n=()=>{}}){return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(r=>e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(he,{severity:r})}),onDelete:o=>n(o,r)},r))]})}function ms(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(he,{severity:s})})}function hs({customTableButtons:t}){const{t:s,locale:n}=Q(),r=Qe(),o=At(r.breakpoints.down("sm")),l=g.useMemo(()=>Xe(r,ut()),[r]),[x,f]=g.useState(!1),{data:y,paging:h,blocklet:b,fetch:S,getComponent:B,componentDids:_,inService:R,teamDid:$}=Be(),M=g.useRef(null),[k,F]=g.useState(null),[V,G]=g.useState("info"),X=qt(),[m,N]=g.useState(!1),O=`notification-records-${b.meta?.did}`,A=_t(O),[w,L]=g.useState({pageSize:A.rowsPerPage||10,page:A.page?A.page+1:1,dids:A.dids||[],dateRange:A.dateRange||[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),P=J(()=>{if(!b.children||!b.children.length)return[];const p=[];return b.children.forEach(u=>{const j=u.did||u.meta?.did;_.includes(j)&&(u.ancestors=[b],p.push(u))}),p},[_,b]),ae=async p=>{try{f(!0),await S(p),f(!1)}finally{f(!1)}};g.useEffect(()=>{ae(w)},[w]),g.useEffect(()=>{const p=y.find(u=>u.id===k?.id);k&&p&&F({...p})},[y]);const se=(p,u,j,I)=>{p.stopPropagation();const E=j.filter(T=>T!==u);L(T=>({...T,[I]:E,page:1}))},Z=({page:p,rowsPerPage:u,filterList:j})=>{const[I=[],,,,E=[]]=j;w.pageSize!==u?L(T=>({...T,pageSize:u,page:1})):w.page!==p+1?L(T=>({...T,page:p+1})):pe(w.dids,I)?pe(w.severities,E)||L(T=>({...T,severities:E,page:1})):L(T=>({...T,dids:I,page:1}))},oe=g.useCallback(()=>{F(null),G("info")},[]),we=g.useCallback(()=>{S(w)},[S,w]),ne=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:p=>p.map((u,j)=>{if(u==="system")return e.jsx("span",{children:s("notification.system")},`system-${j}`);const I=P.find(E=>(E.did||E.meta?.did)===u);return e.jsx(Ce,{blocklet:I,label:I?.title||I?.meta?.title},u)}),update:(p,u,j)=>(p[j].splice(u,1),p)},filterOptions:{names:P,logic:(p,u)=>u.length?!u.includes(p):!1,display:(p,u,j,I)=>e.jsxs(Pe,{style:{width:"380px"},children:[e.jsx(Ot,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(Lt,{multiple:!0,value:p[j],renderValue:E=>e.jsx(C,{style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{display:"flex",gap:1,alignItems:"center"},children:E.map(T=>{if(T==="system")return e.jsx("span",{children:s("notification.system")},T);const le=P.find(i=>(i.did||i.meta?.did)===T);return e.jsx(Ce,{blocklet:le,label:le?.title||le?.meta?.title},T)})}),onChange:E=>{p[j]=E.target.value,u(p[j],j,I)},children:[e.jsx($e,{value:"system",children:s("notification.system")}),P.map(E=>{const T=E.did||E.meta?.did;return e.jsx($e,{value:T,children:e.jsx(Ce,{blocklet:E,label:E.title||E.meta?.title})},T)})]})]})},customBodyRenderLite:p=>{const u=y[p],j=B(u.componentDid);return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[j?e.jsx(it,{size:32,blocklet:j,ancestors:j.ancestors??[]}):e.jsx(Dt,{blocklet:b,size:32}),e.jsx(me,{maxLength:50,children:j?.meta?.title||b?.meta?.title})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:p=>{const u=y[p],{receivers:j}=u;return e.jsx(kt,{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(),F(u),G("receivers")},children:j.map(I=>{const{receiverUser:E}=I,T=st(E.avatar,$,R);return e.jsx(Ze,{alt:E.fullName,src:`${T}?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:p=>{const u=y[p];return e.jsx(C,{onClick:j=>{j.stopPropagation(),F(u),G("statistics")},children:e.jsx(He,{statistics:u.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:p=>{const u=y[p];return e.jsx(me,{maxLength:50,children:u.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:p=>{const u=y[p];return e.jsx(he,{severity:u.severity})},filter:!0,filterType:"custom",filterList:w.severities??[],customFilterListOptions:{render:p=>e.jsx(ht,{list:p,label:s("notification.severity"),onDelete:(u,j)=>{u.stopPropagation(),se(u,j,ne[4].options.filterList,"severities")}}),update:ye},filterOptions:{names:Ve,fullWidth:!0,logic:Se,display:(p,u,j,I)=>e.jsx(ms,{label:s("notification.severity"),filterList:p,onChange:u,index:j,column:I,filterValues:Ve})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:p=>{const{createdAt:u}=y[p];return e.jsx(et,{value:u,locale:n,shouldUpdate:!0})}}}],re=p=>{L(u=>({...u,dateRange:p,page:1}))},ge=[e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[e.jsx(Ft,{onClick:()=>N(!0),sx:{p:X?0:void 0},children:e.jsx(Bt,{})},"settings"),X?e.jsx(U,{children:s("common.setting")}):null]}),...t||[]];return e.jsxs(C,{ref:M,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(gs,{isBreakpointsDownSm:o,children:e.jsx(tt,{theme:l,children:e.jsx(at,{className:"main-table",verticalKeyWidth:100,loading:x,locale:n,columns:ne,data:y,durable:O,onChange:Z,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:h.page-1,rowsPerPage:h.pageSize,count:h.total,...A,onRowClick:(p,{dataIndex:u})=>{F(y[u])}},title:e.jsx(We,{value:w.dateRange,onChange:re}),customButtons:ge,components:{TableFilterList:p=>e.jsx(Me,{...p,itemComponent:u=>e.jsx(Ke,{...u,canDelete:j=>j?.columnNames?.[j?.index||0]?.name==="sender"})})}})})}),k&&e.jsx(us,{refresh:we,onCancel:oe,notification:k,blocklet:b,tab:V}),e.jsx(nt,{title:`${s("common.notification")} ${s("common.setting")}`,fullWidth:!0,maxWidth:"md",open:m,onClose:()=>N(!1),PaperProps:{style:{minHeight:"500px"}},children:e.jsx(C,{sx:{mt:"-16px",overflowY:"hidden"},children:e.jsx(zt,{})})})]})}const gs=ie.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
- `;xs.propTypes={blocklet:d.object.isRequired,customTableButtons:d.array};function xs({blocklet:t={},customTableButtons:s=[]}){return e.jsx(Gt,{blocklet:t,children:e.jsx(hs,{customTableButtons:s})})}export{xs as default};
@@ -1 +0,0 @@
1
- import{bK as r,fb as _,gW as e}from"./index-D331Asw4.js";const i={en:_(e),ar:()=>r(()=>import("./ar-C89Z16Ql.js"),[],import.meta.url).then(t=>_(t.default)),de:()=>r(()=>import("./de-BsCDrfBl.js"),[],import.meta.url).then(t=>_(t.default)),es:()=>r(()=>import("./es-BJh_XsEm.js"),[],import.meta.url).then(t=>_(t.default)),fr:()=>r(()=>import("./fr-DRJMwn7V.js"),[],import.meta.url).then(t=>_(t.default)),hi:()=>r(()=>import("./hi-h-9Yl5g9.js"),[],import.meta.url).then(t=>_(t.default)),id:()=>r(()=>import("./id-BDWggRsa.js"),[],import.meta.url).then(t=>_(t.default)),ja:()=>r(()=>import("./ja-R9EF3xbB.js"),[],import.meta.url).then(t=>_(t.default)),ko:()=>r(()=>import("./ko-C_QLPZyk.js"),[],import.meta.url).then(t=>_(t.default)),pt:()=>r(()=>import("./pt-DpYO8djd.js"),[],import.meta.url).then(t=>_(t.default)),ru:()=>r(()=>import("./ru-DkZtar3s.js"),[],import.meta.url).then(t=>_(t.default)),th:()=>r(()=>import("./th-04iX5CrT.js"),[],import.meta.url).then(t=>_(t.default)),vi:()=>r(()=>import("./vi-kOP0E9Ga.js"),[],import.meta.url).then(t=>_(t.default)),"zh-TW":()=>r(()=>import("./zh-tw-BLapUUeq.js"),[],import.meta.url).then(t=>_(t.default)),zh:()=>r(()=>import("./zh-DZI4Yy2m.js"),[],import.meta.url).then(t=>_(t.default))};export{i as t};