@abtnode/webapp 1.16.27 → 1.16.28-beta-bfbab430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-DOwN6I9N.js → Add-DEou6OQu.js} +1 -1
- package/dist/assets/{ArrowDropDown-CEsdzzcK.js → ArrowDropDown-B8q6yJii.js} +1 -1
- package/dist/assets/{Autocomplete-DcC19-q2.js → Autocomplete-CxHBaO5x.js} +1 -1
- package/dist/assets/Breadcrumbs--9MrOMZw.js +1 -0
- package/dist/assets/{ButtonGroup-CKY0O7tT.js → ButtonGroup-BbRXyWVe.js} +1 -1
- package/dist/assets/{CheckCircle-BA-bGNdF.js → CheckCircle-D6vwJd9K.js} +1 -1
- package/dist/assets/{ChevronLeft-DRzRLgnp.js → ChevronLeft-Bc2acyen.js} +1 -1
- package/dist/assets/{ChevronRight-B2YICLYm.js → ChevronRight-Bcko4z80.js} +1 -1
- package/dist/assets/{Close-D9SKZkJ7.js → Close-DGnER_ve.js} +1 -1
- package/dist/assets/Delete-BGOcGa_D.js +1 -0
- package/dist/assets/DeleteOutline-C7JmRduW.js +1 -0
- package/dist/assets/{Done-DaMxTX7e.js → Done-CydSjSOx.js} +1 -1
- package/dist/assets/{Edit-B1ySEana.js → Edit-B0yxTPMe.js} +1 -1
- package/dist/assets/{EditIcon-BQGlXOR3.js → EditIcon-CF5y6ttj.js} +1 -1
- package/dist/assets/{FilterList-DKFhXHd2.js → FilterList-RGEuYf_e.js} +5 -5
- package/dist/assets/{Google-D2cPndsH.js → Google-CuSS9iHp.js} +4 -4
- package/dist/assets/{Https-CsiKqkaT.js → Https-B3P9JJiw.js} +1 -1
- package/dist/assets/{InfoOutlined-BUn5fKCT.js → InfoOutlined-B4lqtuRU.js} +1 -1
- package/dist/assets/{InputAdornment-DHLm1mFN.js → InputAdornment-BzCm_2kz.js} +1 -1
- package/dist/assets/{InputLabel-BjbeXM2B.js → InputLabel-CdW9MyDY.js} +1 -1
- package/dist/assets/{LastPage-DXu9ZGZF.js → LastPage-dDlMsztV.js} +1 -1
- package/dist/assets/{Launch-BIqLZtET.js → Launch-Dhs9Q_70.js} +1 -1
- package/dist/assets/{Link-DN_Lz3rV.js → Link-DSNZ4PNo.js} +1 -1
- package/dist/assets/{LoadingButton-3UN68oPJ.js → LoadingButton-DrVP9tt_.js} +1 -1
- package/dist/assets/{LockIcon-mC00ojRt.js → LockIcon-BMilDbx1.js} +1 -1
- package/dist/assets/{Loop-2BGd9rzF.js → Loop-CAxjNyCL.js} +1 -1
- package/dist/assets/{MoreVert-BCR8irtL.js → MoreVert-BL42DjcZ.js} +1 -1
- package/dist/assets/{Pagination-0NPBd4bk.js → Pagination-DWKt9t_F.js} +1 -1
- package/dist/assets/{Public-333jCEeA.js → Public-BobH8eAT.js} +1 -1
- package/dist/assets/{SchemaReference.es-oKwgj6eC.js → SchemaReference.es-MUfmufV5.js} +1 -1
- package/dist/assets/{Search-5iZBDNjz.js → Search-J7ilvWof.js} +1 -1
- package/dist/assets/{Select-CPvSg7uW.js → Select-DJl6HmRs.js} +2 -2
- package/dist/assets/{Skeleton-B4-1c0OT.js → Skeleton-CSyuj2cV.js} +4 -4
- package/dist/assets/{Slider-DdynydW3.js → Slider-DRCfqhU1.js} +1 -1
- package/dist/assets/{Stepper-DpooXZzV.js → Stepper-C2a4PQ3_.js} +1 -1
- package/dist/assets/{TextField-sj2mcEXD.js → TextField-BD0it3d0.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BKQ2fKoV.js → ToggleButtonGroup-CR3zvwUX.js} +1 -1
- package/dist/assets/{ViewList-Cul4OAvz.js → ViewList-D3pEO1Ca.js} +1 -1
- package/dist/assets/{actions-xngcxvp5.js → actions-CL-Y8Eer.js} +1 -1
- package/dist/assets/actions-Dx15LaaC.js +11 -0
- package/dist/assets/{agreement-DBRJClMM.js → agreement-Dd1yuqFa.js} +9 -9
- package/dist/assets/api-Ce74sKYG.js +1 -0
- package/dist/assets/app-avatar-rgMNqIXw.js +1 -0
- package/dist/assets/{ar-DqmJV4p8.js → ar-DXpJw3XU.js} +1 -1
- package/dist/assets/{audit-logs-BkgPztEs.js → audit-logs-CmuAN_qn.js} +1 -1
- package/dist/assets/{brace-fold.es-CsornGfx.js → brace-fold.es-psNZdrWu.js} +1 -1
- package/dist/assets/{bundle-avatar-DzcvR6DI.js → bundle-avatar-C_2wXttj.js} +1 -1
- package/dist/assets/chart-sF6tbndw.js +35 -0
- package/dist/assets/{click-to-copy-CBs5PKxt.js → click-to-copy-KBQWqGOq.js} +1 -1
- package/dist/assets/{closebrackets.es-5NAqcDxa.js → closebrackets.es-ZHCmqLUg.js} +1 -1
- package/dist/assets/{codemirror.es-CEoouqN7.js → codemirror.es-DmoQbR9T.js} +1 -1
- package/dist/assets/{comment.es-DX01jrAI.js → comment.es-B7zL23d5.js} +1 -1
- package/dist/assets/{config-navigation-Ngw7D7GZ.js → config-navigation-BN7PO-cf.js} +2 -2
- package/dist/assets/{de-CHOUObJ5.js → de-CWxlIdre.js} +1 -1
- package/dist/assets/{delete-confirm-Da1BomBl.js → delete-confirm-ztUwg2kj.js} +1 -1
- package/dist/assets/detail-CXbwmlpg.js +58 -0
- package/dist/assets/{dialog.es-Oh6qpXQO.js → dialog.es-CFWHh6H2.js} +1 -1
- package/dist/assets/{download-DHPNYF1S.js → download-bWTPRaod.js} +1 -1
- package/dist/assets/{es-aZ4oYeVs.js → es-BmrvDK07.js} +1 -1
- package/dist/assets/{foldgutter.es-DqR5-lAT.js → foldgutter.es-CqRhTHya.js} +1 -1
- package/dist/assets/{fr-Bi9vptGI.js → fr-B7SxgRy3.js} +1 -1
- package/dist/assets/getValidReactChildren-DKO9kPop.js +1 -0
- package/dist/assets/{hi-BXYjfUTP.js → hi-BRRtNIB_.js} +1 -1
- package/dist/assets/{hint.es-D5LvE1_r.js → hint.es-DK_6KY-o.js} +1 -1
- package/dist/assets/{hint.es2-CgI0iRUf.js → hint.es2-CgWo28Uj.js} +1 -1
- package/dist/assets/{id-VVXvzjmO.js → id-D6-Qi7Q1.js} +1 -1
- package/dist/assets/{iframe-BcDoraJg.js → iframe-C32DbqVc.js} +1 -1
- package/dist/assets/{index-CWilKNfl.js → index-84DtgjQO.js} +6 -6
- package/dist/assets/{index-DuwHJNV9.js → index-B0WN-XH2.js} +1 -1
- package/dist/assets/{index-Cl7gQviA.js → index-B4ZjZNN8.js} +1 -1
- package/dist/assets/{index-CsVg93BX.js → index-BA_TAXpL.js} +2 -2
- package/dist/assets/{index-CAH8ukaj.js → index-BD7uC7gm.js} +4 -4
- package/dist/assets/{index-DPGsh5ca.js → index-BET56ssY.js} +1 -1
- package/dist/assets/{index-zUZPbg2I.js → index-BNulkcXj.js} +1 -1
- package/dist/assets/{index--Q6KdM7v.js → index-BoZhSN8h.js} +1 -1
- package/dist/assets/{index-BgqVsUwi.js → index-Bzs05ai8.js} +1 -1
- package/dist/assets/index-C4aM6rsI.js +54 -0
- package/dist/assets/index-C6fuJWed.js +262 -0
- package/dist/assets/{index-DC46OSan.js → index-CE4mBIM_.js} +1 -1
- package/dist/assets/{index-4SJGeyEI.js → index-CEBXL16c.js} +1 -1
- package/dist/assets/{index-DV-pE5RI.js → index-CYGLUEkg.js} +3 -3
- package/dist/assets/index-CYZ-ZpV5.js +80 -0
- package/dist/assets/{index-B6ReOJJN.js → index-Ca7UJIsi.js} +1 -1
- package/dist/assets/{index-BXmzbebA.js → index-CfOOBUnf.js} +2 -2
- package/dist/assets/{index-C7GDLIo-.js → index-CiaQ1OoK.js} +1 -1
- package/dist/assets/{index-CtWm5SK6.js → index-Cj3s4CtX.js} +4 -4
- package/dist/assets/{index-Boqyvc8Q.js → index-CkI554oc.js} +212 -211
- package/dist/assets/{index-eGpwmK92.js → index-Clbjq5Ay.js} +3 -3
- package/dist/assets/{index-Bvs8qR9r.js → index-CsNkkebn.js} +1 -1
- package/dist/assets/{index-BwcFSka9.js → index-CwOFD6vt.js} +1 -1
- package/dist/assets/{index-DoMsU5M2.js → index-CzZF4DJ9.js} +1 -1
- package/dist/assets/{index-B-OHtxJg.js → index-D2cgpNGA.js} +57 -57
- package/dist/assets/{index-DycwPjM3.js → index-D5A34D-v.js} +1 -1
- package/dist/assets/index-D9RqTndg.js +21 -0
- package/dist/assets/index-DA4GWzzk.js +85 -0
- package/dist/assets/{index-CBdVDTUr.js → index-DG50udXf.js} +4 -4
- package/dist/assets/index-DHDAQRQS.js +11 -0
- package/dist/assets/index-DbaRhcjK.js +1 -0
- package/dist/assets/{index-BPEtPX12.js → index-Dc48oA1e.js} +7 -7
- package/dist/assets/index-DeSsBKwN.js +16 -0
- package/dist/assets/{index-Ct_q9GS4.js → index-Dlmo3B4P.js} +1 -1
- package/dist/assets/index-DoYPOJLK.js +530 -0
- package/dist/assets/{index-BCPsngBN.js → index-DuHl-QWf.js} +1 -1
- package/dist/assets/{index-opBznRc5.js → index-HMFhZkjG.js} +11 -11
- package/dist/assets/{index-_NTV4-zc.js → index-aVpXIXlo.js} +5 -5
- package/dist/assets/index-dQw_Q0Sx.js +58 -0
- package/dist/assets/{index-BCQQEHyP.js → index-lXzOGnDm.js} +11 -11
- package/dist/assets/index-lfuZxoX8.js +11 -0
- package/dist/assets/{index-DZnZf-o0.js → index-owRl0jyR.js} +16 -16
- package/dist/assets/{index-D81FDm0a.js → index-sNR67yJ2.js} +1 -1
- package/dist/assets/{index.es-C_vrKJwx.js → index.es-r9xAwx7Q.js} +1 -1
- package/dist/assets/{index.esm-Cnicyd3_.js → index.esm-BCQ0BZMT.js} +1 -1
- package/dist/assets/{info-addon.es-B0sGOwNz.js → info-addon.es-BDFdJmkW.js} +1 -1
- package/dist/assets/{info.es-x51I_2sm.js → info.es-CBadJSwW.js} +1 -1
- package/dist/assets/install-from-url-DuxahkOW.js +1 -0
- package/dist/assets/{invitation-B30vIvMt.js → invitation-CSvGVnhZ.js} +6 -6
- package/dist/assets/{isEqual-DbZp5EUk.js → isEqual-DLk5wI5o.js} +1 -1
- package/dist/assets/{item-BdJl6I8q.js → item-Bv034Zcl.js} +13 -13
- package/dist/assets/{ja-DqJiajLu.js → ja--dtwu5Xy.js} +1 -1
- package/dist/assets/{javascript.es-AOt9muQq.js → javascript.es-Bq6krn1L.js} +1 -1
- package/dist/assets/{jump-to-line.es-p4ynQoBS.js → jump-to-line.es-Cm-kakdo.js} +1 -1
- package/dist/assets/{jump.es-BrSOPKg0.js → jump.es-VEZCju5l.js} +1 -1
- package/dist/assets/{ko-DQKmtlbI.js → ko-DpRJDWhF.js} +1 -1
- package/dist/assets/{line-DdSLBn8H.js → line-VNmgswg2.js} +4 -4
- package/dist/assets/{lint.es-BMdrvXUs.js → lint.es-DhrBN362.js} +1 -1
- package/dist/assets/{lint.es2-DX4OlyGK.js → lint.es2-CWQYXYDN.js} +1 -1
- package/dist/assets/{lint.es3-BYQCiNDn.js → lint.es3-HsrZT9m1.js} +1 -1
- package/dist/assets/{list-header-BnipX_Rp.js → list-header-DsWkp7IV.js} +1 -1
- package/dist/assets/{log-i4SQ4Z0y.js → log-DgVRxyob.js} +2 -2
- package/dist/assets/{lottie-BYxFXW-g.js → lottie-CYf1PmCL.js} +1 -1
- package/dist/assets/{matchbrackets.es-aeJus3PD.js → matchbrackets.es-BthTk6Jn.js} +1 -1
- package/dist/assets/{memory-Cu-5WL0k.js → memory-dGmMptAO.js} +1 -1
- package/dist/assets/{mode.es-CXfOP3-9.js → mode.es-_GdTPtpx.js} +1 -1
- package/dist/assets/{mode.es2-DOeKit6c.js → mode.es2-brmgogqJ.js} +1 -1
- package/dist/assets/{mode.es3-8pUUSOKg.js → mode.es3-DPGB-Rg-.js} +1 -1
- package/dist/assets/{onlineParser.es-Bsw_5f31.js → onlineParser.es-BUsBjG_x.js} +1 -1
- package/dist/assets/overview-BjqHXIvR.js +23 -0
- package/dist/assets/{pt-si0ACe2m.js → pt-BxA88dKG.js} +1 -1
- package/dist/assets/{react-BU7lI6gg.js → react-B-xa5K3p.js} +22 -22
- package/dist/assets/{redux-07bmubSg.js → redux-BBckwmBz.js} +1 -1
- package/dist/assets/{resource-dialog-Co295aU2.js → resource-dialog-CIpxrG7w.js} +2 -2
- package/dist/assets/{ru-B36cpSA6.js → ru-C9WJaQoQ.js} +1 -1
- package/dist/assets/runtime-mnz4kggA.js +1 -0
- package/dist/assets/{search.es-ByHwIa0U.js → search.es-CV0d4AUV.js} +1 -1
- package/dist/assets/{searchcursor.es-CsQOLBoo.js → searchcursor.es-CxYOh1mB.js} +1 -1
- package/dist/assets/service-DbM6n6e-.js +1 -0
- package/dist/assets/{show-hint.es-BY2B9aLR.js → show-hint.es-GDHMVUwy.js} +1 -1
- package/dist/assets/{slicedToArray-BwJA6b7k.js → slicedToArray-Pwxti1pp.js} +3 -3
- package/dist/assets/spaces-3s9pbV-M.js +1 -0
- package/dist/assets/{sublime.es-DZOyVbIC.js → sublime.es-BiX2tLa_.js} +1 -1
- package/dist/assets/{switch-control-D1Iqbf5D.js → switch-control-1CHbJzd5.js} +1 -1
- package/dist/assets/{table-icons-CB9vK-gH.js → table-icons-DjAM1A7C.js} +10 -10
- package/dist/assets/{tag-CANB-Fll.js → tag-CdoBHuxB.js} +1 -1
- package/dist/assets/team-CrNp0IgF.js +1 -0
- package/dist/assets/{th-Dtc8_3Sk.js → th-z7LSYRZi.js} +1 -1
- package/dist/assets/toUpper-C7enqaxL.js +1 -0
- package/dist/assets/{traffic-CmQ-j2sa.js → traffic-Bw_e_wEP.js} +5 -5
- package/dist/assets/url-evaluation-asC5XTLH.js +7 -0
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-R82fq7SC.js +1 -0
- package/dist/assets/{useLocalStorage-BNvbpN9F.js → useLocalStorage-DRS65jti.js} +1 -1
- package/dist/assets/util-BC42zb0j.js +1 -0
- package/dist/assets/{vi-DpH7bkpR.js → vi-CAtyUyNW.js} +1 -1
- package/dist/assets/{wait-container-mYVBI-ZE.js → wait-container-DzvlQJkQ.js} +4 -4
- package/dist/assets/withStyles-CPWhmxGn.js +1 -0
- package/dist/assets/wrap-locale-p7nrsckq.js +1 -0
- package/dist/assets/{zh-Dizc5DZz.js → zh-BVBeddUa.js} +1 -1
- package/dist/assets/{zh-tw-Cb93tcSH.js → zh-tw-CoStw7dd.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Breadcrumbs-f87TWJgq.js +0 -1
- package/dist/assets/Delete-h8Ye2r4b.js +0 -1
- package/dist/assets/DeleteOutline-C-1A8rVu.js +0 -1
- package/dist/assets/DeleteOutline-ClZ-ABF-.js +0 -1
- package/dist/assets/actions-ByUCXaaH.js +0 -11
- package/dist/assets/api-BdOqJGVs.js +0 -1
- package/dist/assets/app-avatar-DEqDSBYG.js +0 -1
- package/dist/assets/chart-CQeRS3mZ.js +0 -35
- package/dist/assets/detail-CaMUtLL5.js +0 -58
- package/dist/assets/getValidReactChildren-B_HEoXEd.js +0 -1
- package/dist/assets/index-3vcNDYsD.js +0 -530
- package/dist/assets/index-B7-XNbV9.js +0 -85
- package/dist/assets/index-BMkbX5aS.js +0 -11
- package/dist/assets/index-B_M-nPU6.js +0 -58
- package/dist/assets/index-DMKpICI6.js +0 -1
- package/dist/assets/index-DY9g7uAE.js +0 -54
- package/dist/assets/index-DdxWI-QG.js +0 -262
- package/dist/assets/index-DwOVPSU7.js +0 -21
- package/dist/assets/index-Mr6j5sdU.js +0 -11
- package/dist/assets/index-PDofIfka.js +0 -80
- package/dist/assets/index-RlfSCcPa.js +0 -16
- package/dist/assets/install-from-url-Cnfp9xqR.js +0 -1
- package/dist/assets/overview-CnuzNSfm.js +0 -23
- package/dist/assets/runtime-CW-W-Oej.js +0 -1
- package/dist/assets/service-DNZLEaeT.js +0 -1
- package/dist/assets/spaces-CGO2dSgv.js +0 -1
- package/dist/assets/team-rrZYIohT.js +0 -1
- package/dist/assets/toUpper-D0HPBfn5.js +0 -1
- package/dist/assets/url-evaluation-DymLev_N.js +0 -7
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-YWN8QaVT.js +0 -1
- package/dist/assets/util-CRUZQ4-B.js +0 -1
- package/dist/assets/withStyles-CSLQqeaB.js +0 -1
- package/dist/assets/wrap-locale-B076jNc7.js +0 -1
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import{bK as zo,j as e,aJ as Ft,aK as Gt,q as V,O as j,ax as fe,P as r,A as N,bk as Y,r as g,f as ye,bo as Ve,b as H,M as O,aN as Vn,U as Nt,cc as Be,n as M,K as Z,gG as Vo,bG as Ne,aV as xe,aU as dt,cy as At,a2 as ee,D as pt,F as k,bm as qo,Y as qe,$ as qn,a_ as _o,fD as Wo,fE as Ho,C as ae,f8 as Yo,y as co,av as rt,a1 as Ee,x as Lt,hv as Jo,hw as Ko,B as X,ba as po,H as zt,hx as Qo,m as $,a3 as Zo,ez as Xo,W as uo,Z as mo,ak as $o,w as es,J as fo,Q as Ge,V as ts,hy as ho,S as me,az as ns,aA as os,aB as ss,i as ut,hz as rs,cz as is,bf as as,h6 as ls,hA as cs,ay as _n,cw as ds,ad as Ae,aI as go,bI as Vt,ce as ps,hB as us,b5 as ms,z as fs,aW as Ot,T as hs,aM as ze,at as kt,dE as gs,bp as xo,fP as Mt,aE as xs,dM as ys,hC as Cs,ge as Wn,hD as Hn,gg as Yn,aX as js,G as nt,gi as vs,bH as Ss}from"./index-CkI554oc.js";import{d as Jn}from"./Add-DEou6OQu.js";import{a as Rs,R as st,F as bs,L as Es,d as qt,b as _t}from"./line-VNmgswg2.js";import{C as Ts,A as ws,d as Ps}from"./agreement-Dd1yuqFa.js";import{E as Is}from"./index-CfOOBUnf.js";import{b as ks,a as Us,c as Ds,u as Wt,e as Bs}from"./actions-Dx15LaaC.js";import{S as Ns}from"./switch-control-1CHbJzd5.js";import{u as As}from"./detail-CXbwmlpg.js";import{d as yo}from"./Edit-B0yxTPMe.js";import{T as Ls}from"./index-BNulkcXj.js";import{T as Os,M as Ms,t as Fs}from"./table-icons-DjAM1A7C.js";import{C as Kn}from"./click-to-copy-KBQWqGOq.js";import{T as Q}from"./TextField-BD0it3d0.js";import{d as Ht}from"./Link-DSNZ4PNo.js";import{c as Gs,C as zs,a as Vs,b as qs,D as _s,A as Ws,B as Hs,d as Ys,S as Js}from"./item-Bv034Zcl.js";import{u as Ks,a as Qs,P as Co,L as Qn,A as Zs,S as Xs}from"./index-CsNkkebn.js";import{u as jo,t as $s}from"./toUpper-C7enqaxL.js";import{u as se,a as er}from"./team-CrNp0IgF.js";import{c as tr,d as nr,a as or,e as sr,f as rr,g as Zn,h as ir,i as Xn}from"./spaces-3s9pbV-M.js";import{d as ar}from"./EditIcon-CF5y6ttj.js";import{d as lr}from"./Done-CydSjSOx.js";import{C as cr}from"./Google-CuSS9iHp.js";import{I as dr,B as pr}from"./install-from-url-DuxahkOW.js";import{a as $n}from"./api-Ce74sKYG.js";import{v as vo,a as it}from"./util-BC42zb0j.js";import{P as ur,u as mr}from"./use-blocklet-info-for-connect-did-spaces-R82fq7SC.js";import{d as fr}from"./DeleteOutline-C7JmRduW.js";import{S as eo}from"./index-DeSsBKwN.js";import{d as hr}from"./ArrowDropDown-B8q6yJii.js";import{_ as gr}from"./useLocalStorage-DRS65jti.js";import{d as xr}from"./LockIcon-BMilDbx1.js";import{d as mt}from"./Delete-BGOcGa_D.js";import{d as So}from"./Launch-Dhs9Q_70.js";import{C as yr}from"./delete-confirm-ztUwg2kj.js";import{W as _e}from"./tag-CdoBHuxB.js";import{d as Cr}from"./InfoOutlined-B4lqtuRU.js";import{R as jr,b as to,B as Ro}from"./url-evaluation-asC5XTLH.js";import{B as vr}from"./bundle-avatar-C_2wXttj.js";import{A as Sr}from"./actions-CL-Y8Eer.js";import{I as Ut}from"./index-Ca7UJIsi.js";import{a as Rr}from"./index-sNR67yJ2.js";import"./ButtonGroup-BbRXyWVe.js";import"./getValidReactChildren-DKO9kPop.js";import"./index-CE4mBIM_.js";import"./index-D5A34D-v.js";import"./MoreVert-BL42DjcZ.js";import"./app-avatar-rgMNqIXw.js";import"./Breadcrumbs--9MrOMZw.js";import"./FilterList-RGEuYf_e.js";import"./Select-DJl6HmRs.js";import"./InputLabel-CdW9MyDY.js";import"./LastPage-dDlMsztV.js";import"./slicedToArray-Pwxti1pp.js";import"./Search-J7ilvWof.js";import"./ChevronLeft-Bc2acyen.js";import"./ChevronRight-Bcko4z80.js";import"./redux-BBckwmBz.js";import"./Skeleton-CSyuj2cV.js";import"./InputAdornment-BzCm_2kz.js";import"./memoize-one.esm-BdPwpGay.js";import"./index-Clbjq5Ay.js";import"./preact.module-B1z5cdvs.js";import"./Close-DGnER_ve.js";import"./lottie-CYf1PmCL.js";import"./Stepper-C2a4PQ3_.js";import"./index-BoZhSN8h.js";const br=zo(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Yt={},Er=Gt;Object.defineProperty(Yt,"__esModule",{value:!0});var bo=Yt.default=void 0,Tr=Er(Ft()),wr=e;bo=Yt.default=(0,Tr.default)((0,wr.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Jt({children:t,...o}){const{t:s}=V(),{updateAutoCheckUpdate:l,autoCheckUpdate:n}=As(),i=async()=>{try{const a=!(n!=null&&n.enabled);await l({enabled:a}),N.success(s(a?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(a){N.error(a.message)}},p=!!(n!=null&&n.enabled);return e.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(fe,{title:s("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(Ns,{checked:p,onChange:i,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}Jt.propTypes={children:r.any};Jt.defaultProps={children:null};const Pr=(t,o)=>{let{description:s}=t;return(Object.values(H.CHAIN_PROP_MAP).includes(t.key)||O.isEnvShareable(t))&&(s?s=`${s} (${o("blocklet.config.sharedToAllComponents")})`:s=o("blocklet.config.sharedToAllComponents")),s&&e.jsx("div",{style:{marginLeft:12},children:s})},Dt=(t,o,s=[])=>!(s!=null&&s.length)&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(l=>l.name===t.key)&&o.children.every(l=>!l.meta.environments.find(n=>n.name===t.key))?!0:t.custom;function at({blocklet:t,ancestors:o}){const s=Y(),{inService:l}=s,{t:n}=g.useContext(ye),i=[...o.map(f=>f.meta.did),t.meta.did],p=()=>N.success(n("blocklet.config.changedTip")),a=f=>Dt(f,t,o);if(Ve(t.status)||t.status==="unknown"&&Ve(t.status))return null;const u=async f=>{if(!f.key.trim()||!f.value.trim()){N.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")||f.key.startsWith("COMPONENT_")){N.error(n("blocklet.config.environment.invalidKey"));return}f.custom=!0;try{const S=await s.api.configBlocklet({input:{did:i,configs:[f]}});p(S.blocklet)}catch(S){N.error(Z(S))}},x=async(f,S)=>{if(f.required&&(!f.key.trim()||!f.value.trim())){N.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")&&!H.BLOCKLET_CONFIGURABLE_KEY[f.key]){N.error(n("blocklet.config.environment.invalidKey"));return}if(f.key===H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const P=Vo(f);if(P){N.error(P);return}}const R=[{...f,value:f.secure&&f.value==="__encrypted__"?"":f.value}];if(f.key!==S.key){if(!Dt(f,t,o)){N.error("Only key of custom env can be changed");return}R.push({key:S.key,custom:!0})}try{const P=await s.api.configBlocklet({input:{did:i,configs:R}});p(P.blocklet)}catch(P){N.error(Z(P))}},y=async f=>{if(f.required){N.error(n("blocklet.config.environment.deleteForbidden"));return}if(!Dt(f,t,o)){N.error("Only key of custom env can be changed");return}try{const S=await s.api.configBlocklet({input:{did:i,configs:[{key:f.key,custom:!0}]}});p(S.blocklet)}catch(S){N.error(Z(S))}},d=(t.configs||[]).filter(f=>!H.BLOCKLET_CONFIGURABLE_KEY[f.key]),v=O.getSharedConfigObj(o[0],t),c=O.getComponentMissingConfigs(t,o[0]),h=d.map(f=>({...f,value:Object.values(H.CHAIN_PROP_MAP).includes(f.key)&&Object.keys(v).includes(f.key)?v[f.key]:v[f.key]||f.value})),C=h.some(f=>f.key&&f.key.startsWith("BWA_")),m={onRowAdd:u,onRowUpdate:x,onRowDelete:y,isDeletable:a},b=()=>[{title:n("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:f=>e.jsx(Kn,{value:f.value,style:{color:f.required&&!f.value?"#ff4436":"#222222",fontWeight:f.required?"bold":"normal"},children:f.key}),editComponent:f=>{const{value:S,rowData:R,onChange:P}=f;return e.jsx(no,{children:e.jsx(Q,{fullWidth:!0,size:"small",disabled:a(R)===!1,value:S,onChange:L=>P(L.target.value),variant:"outlined",label:"Key",placeholder:n("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:n("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:f=>f.value?f.secure?"******":e.jsx(Kn,{unstyled:!0,value:f.value,style:{wordBreak:"break-all"},children:f.value}):null,editComponent:f=>{const{value:S,rowData:R,onChange:P}=f;return e.jsxs(no,{children:[e.jsx(Q,{fullWidth:!0,size:"small",value:S==="__encrypted__"?"":S,onChange:L=>P(L.target.value),variant:"outlined",label:n("common.value"),placeholder:n("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),Pr(R,n)]})}}];return e.jsxs(Ir,{children:[!!c.length&&e.jsx(Vn,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),C&&e.jsx(Vn,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Nt,{permission:l?"":"mutate_blocklets",role:l?Be:[],children:f=>e.jsx(Os,{className:"config-table",children:e.jsx(Ms,{title:e.jsx("h4",{children:n("common.environment")}),columns:b(),icons:{...ks,...Fs},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:n("common.actions")},body:{emptyDataSourceMessage:n("common.noData")}},data:h,editable:f?m:{}})})})]})}at.propTypes={blocklet:r.object.isRequired,ancestors:r.array};at.defaultProps={ancestors:[]};const Ir=M.div`
|
|
2
|
+
.config-table {
|
|
3
|
+
margin-bottom: 24px;
|
|
4
|
+
position: relative;
|
|
5
|
+
.hide-control {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 10px;
|
|
8
|
+
left: 200px;
|
|
9
|
+
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|
|
10
|
+
left: 160px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.MuiToolbar-root {
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.MuiTableRow-head {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.hide-header {
|
|
23
|
+
.MuiToolbar-root {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.accordion {
|
|
30
|
+
margin-bottom: 16px;
|
|
31
|
+
&:last-of-type {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
padding: 8px 0 8px 0px;
|
|
35
|
+
&.MuiAccordion-root {
|
|
36
|
+
background: transparent;
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
border: 1px solid #ddd;
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
&::before,
|
|
41
|
+
&::after {
|
|
42
|
+
height: 0;
|
|
43
|
+
}
|
|
44
|
+
.MuiAccordionSummary-root {
|
|
45
|
+
padding-left: 0;
|
|
46
|
+
}
|
|
47
|
+
.accordion-title {
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
padding-left: 16px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`,no=M.div`
|
|
54
|
+
height: 60px;
|
|
55
|
+
`;function ft({blocklet:t,ancestors:o,hasPermission:s,...l}){const{t:n}=V(),{api:i}=Y(),p=!o.length,a=p?t.meta.did:o.map(C=>C.meta.did)[0],[u,x]=g.useState(""),[y,d]=g.useState(""),v=u||!s;if(!a||t.status==="unknown"&&Ve(t.status))return null;const c=async C=>{x(!0);try{const m={rootDid:a,mountPoint:xe(C)};return p||(m.did=t.meta.did),await i.updateComponentMountPoint({input:m}),x(!1),!0}catch(m){throw x(!1),m.message=Z(m),N.error(m.message),m}},h=C=>{d(n("common.slugifyHint",{value:dt(C)}))};return e.jsx(Br,{component:"div",...l,children:e.jsx(j,{mt:3,children:e.jsx(Rs,{label:n("blocklet.component.mountPoint"),style:{marginTop:-24},disabled:u||v,loading:u,required:!0,initialValue:t.mountPoint,onSubmit:c,onChange:h,helperText:y,formatterBeforeSubmit:C=>xe(C)})})})}const kr=Ne(ft,"mutate_blocklets"),Ur=Ne(ft,"",Be);function Dr(t){const{inService:o}=Y();return o?e.jsx(Ur,{...t}):e.jsx(kr,{...t})}ft.propTypes={blocklet:r.object.isRequired,ancestors:r.array,hasPermission:r.bool};ft.defaultProps={ancestors:[],hasPermission:!1};const Br=M.div``;function ht({blocklet:t,ancestors:o,children:s}){const[l,n]=g.useState(""),{t:i}=V(),p=!!o.length,[a,u]=g.useState(At.hasMountPoint(t==null?void 0:t.meta)?"settings":"environments"),x=p?O.getDisplayName(t,!0):i("blocklet.component.container");if(Ve(t.status)||t.status==="unknown"&&Ve(t.status))return null;const y=()=>{n(!1)},d=b=>{b.stopPropagation(),n(!0)},v={settings:At.hasMountPoint(t.meta)&&{label:i("blocklet.component.setting"),value:"settings",component:e.jsx(Dr,{blocklet:t,ancestors:o})},environments:{label:i("common.environment"),value:"environments",component:e.jsx(at,{blocklet:t,ancestors:o})}},c=Object.values(v).filter(Boolean),h=c.map(({label:b,value:f})=>({label:b,value:f})),C=b=>{u(b)},m=v[a]||c[0];return[typeof s=="function"?s({open:d}):e.jsx(ee,{onClick:d,"data-cy":"action-config-component",children:e.jsx(yo,{})}),l&&e.jsx(Nr,{open:!0,fullWidth:!0,maxWidth:"md",title:x,onClose:y,PaperProps:{style:{minHeight:"auto"}},children:p?e.jsxs(j,{mt:1,children:[e.jsx(Ls,{tabs:h,current:a,onChange:C,scrollButtons:"auto"}),m.component]}):e.jsx(at,{blocklet:t,ancestors:o})})]}ht.propTypes={blocklet:r.object.isRequired,ancestors:r.array,children:r.any};ht.defaultProps={ancestors:[],children:null};const Nr=M(pt)`
|
|
56
|
+
.MuiDialogContent-root {
|
|
57
|
+
padding-top: 0;
|
|
58
|
+
margin-top: -32px;
|
|
59
|
+
}
|
|
60
|
+
.MuiToolbar-root {
|
|
61
|
+
padding-right: 12px;
|
|
62
|
+
}
|
|
63
|
+
.ux-dialog_right {
|
|
64
|
+
padding-right: 20px;
|
|
65
|
+
}
|
|
66
|
+
`,{NODE_MODES:oo}=k,Ar=({mode:t,previousMode:o}={})=>t===oo.SERVERLESS||o===oo.SERVERLESS;var Eo={isInServerlessMode:Ar};function Lr(){const[t,o]=g.useState(null),{blocklet:s}=se();return g.useEffect(()=>{o(tr(s))},[s]),{storageEndpoint:t}}const To=g.createContext({}),{Provider:Or,Consumer:Ha}=To;function Kt({children:t}){const[o,s]=g.useState(!1),[l,n]=g.useState(null),{blocklet:i,actions:{refreshBlocklet:p}}=se(),{storageEndpoint:a}=Lr(),{api:u}=Y();qo(async()=>{try{if(s(!0),qn.isEmpty(a)){n(null);return}const c=await nr(a);n(c)}catch(c){console.error(c),N.error(c.message)}finally{s(!1)}},[a]);const x=()=>{n(null),p()},y=async c=>{n(c),await d(c.endpoint),p()},d=async c=>{await u.configBlocklet({input:{did:[i.meta.did],configs:[{key:H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:c}]}}),p()};g.useEffect(()=>{async function c(){if(!l)return;const h=await or(l.endpoint,l.name),C=qn.merge(l,{name:h});n(C)}c()},[]);const v=!!(a&&l);return e.jsx(Or,{value:{loading:o,spaceGateway:l,deleteSpaceGateway:x,updateSpaceGateway:y,storageEndpoint:a,settingStorageEndpoint:d,hasStorageEndpoint:v},children:t})}Kt.propTypes={children:qe.node.isRequired};Kt.defaultProps={};function Qt(){return g.useContext(To)}const Zt={description:r.string,editing:r.bool,onChange:r.func,required:r.bool,value:r.any,componentProps:r.object,render:r.func,renderFormItem:r.func};function Xt({editing:t,value:o,onChange:s}){const[l,n]=g.useState(!1),i=g.useRef(),p=g.useRef(o);g.useEffect(()=>{let d=null;return t&&(d=setTimeout(()=>{n(!0)},50)),()=>{clearTimeout(d)}},[t]);const a=d=>{p.current=d,s(d)},u=()=>{n(!1),s(p.current)},x=e.jsx(j,{className:"form-item-input slot",px:1,children:e.jsxs(j,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),y=e.jsxs(j,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:u,children:[e.jsx(j,{display:"flex",alignItems:"center",onClick:()=>n(!0),children:e.jsx("div",{ref:i,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),e.jsx(_o,{open:l,anchorEl:i.current,onClose:()=>n(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(cr,{color:o,onChange:d=>a(d.hex)})})]});return t?y:x}Xt.propTypes=Zt;function $t({editing:t,description:o,value:s,onChange:l,componentProps:n,...i}){const{placeholder:p}=n,a=g.useRef(s),u=y=>{y.key==="Enter"&&l(a.current,"confirm")},x=y=>{a.current=y,l(y)};return t?e.jsx(Q,{style:{flex:1},fullWidth:!0,value:s,onChange:y=>{y.persist(),x(y.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:u,...i}):e.jsx(j,{px:1,className:"form-item-input slot",children:s})}$t.propTypes=Zt;$t.defaultProps={componentProps:{}};function en({editing:t,value:o,onChange:s,componentProps:l,...n}){const{blocklet:i}=l,p=o==="auto"?Wo.getPassportColorFromDid(i.appDid):o;return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Ho({title:"Owner",issuer:O.getDisplayName(i),issuerDid:i.appDid,ownerName:"Your Name",ownerDid:i.appDid,preferredColor:o||"auto"})}}),e.jsx(Xt,{...n,editing:t,value:t?p:o,onChange:s,componentProps:l})]})}en.propTypes={...Zt,componentProps:r.shape({blocklet:r.object.isRequired}).isRequired};en.defaultProps={};const Mr={input:$t,color:Xt,passport:en,uploader:t=>e.jsx(Es,{...t.componentProps})};function Fr(t,{editing:o=!1}){const{componentType:s="input",render:l,renderFormItem:n}=t;return o&&n?n:!o&&l?l:Mr[s==null?void 0:s.toLowerCase()]}function tn({schema:t,loading:o,value:s,defaultValue:l,onChange:n,style:i,disabled:p}){const a=Object.prototype.toString.call(s)==="[object Object]",[u,x]=g.useState(null),[y,d]=g.useState(a?s:l),v=g.useRef();function c(m,b,f){const{key:S,secure:R}=m,L=y[S]!==b,A={...y,[S]:b};L&&d(A),n({[S]:b},{allValues:A,action:f,currentItem:m}),f==="confirm"&&R&&d({...y,[S]:"__encrypted__"}),["confirm","cancel"].includes(f)?h(null):h(m)}function h(m){if(m){v.current=y[m.key],x(m);return}v.current=null,x(null)}function C(m,{editing:b=!1}){const{key:f}=m,S=a?s[f]:y[f];return S==="__encrypted__"?b?"":"******":S}return e.jsx(Gr,{className:"form",style:i,children:t==null?void 0:t.map(m=>{const{key:b,description:f,required:S,solo:R=!1,hidden:P=!1,componentProps:L={}}=m;if(P)return null;const A=!!(u&&b===u.key),B=C(m,{editing:A}),D=Fr(m,{editing:A}),F={inputProps:{"data-cy":"schema-form-item-component"},key:b,description:f,editing:A,value:B,onChange:(I,J="change")=>c(m,I,J),componentProps:L};return e.jsxs(j,{className:"form-item",children:[!R&&e.jsxs(j,{className:"form-item-label",style:{color:S&&!B?"#ff0000":"#333"},children:[f,S&&e.jsx(st,{})]}),e.jsxs(j,{className:"form-item-body",children:[e.jsx(j,{className:"form-item-input",sx:{textAlign:R?"center":"left"},children:e.jsx(D,{...F})}),!R&&e.jsx(j,{className:"form-item-action",children:A?e.jsxs(e.Fragment,{children:[e.jsx(ee,{"data-cy":"schema-form-item-confirm",onClick:()=>{c(m,B,"confirm")},disabled:p||o,size:"large",children:o?e.jsx(ae,{size:24}):e.jsx(lr,{})}),e.jsx(ee,{"data-cy":"schema-form-item-cancel",onClick:()=>{c(m,v.current,"cancel")},disabled:p||o,size:"large",children:e.jsx(Yo,{})})]}):e.jsx(ee,{"data-cy":"schema-form-item-edit",onClick:()=>{c(m,y[b],"edit")},disabled:p||u,size:"large",children:e.jsx(ar,{})})})]})]},b)})})}tn.propTypes={schema:r.array.isRequired,loading:r.bool,onChange:r.func.isRequired,value:r.object,defaultValue:r.object,style:r.object,disabled:r.bool};tn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const Gr=M(bs)``;function nn({meta:t,onCancel:o,mode:s,handlePaySuccess:l}){const{t:n,locale:i}=V(),{info:p}=Y(),a=co(p),[u,x]=g.useState(null),y=new URL(t==null?void 0:t.registryUrl).origin,d=O.getDisplayName({meta:t}),v=async(h,C)=>{const m=({downloadTokenList:S})=>{l({downloadTokenList:S})},b=S=>{N.error(S),o(S)};function f(S){return Ko(()=>$n.get(S).then(async({data:R})=>{const P=R==null?void 0:R.downloadTokenList;if(R.status==="succeed"){if(P&&P.length)await m({downloadTokenList:P});else return await b(n("blocklet.component.missDownloadTokenTip")),!0;return!0}return R.status==="error"?(console.error("vc error: ",R),await b(R==null?void 0:R.error),!0):!1}),{interval:1e3})}if(s==="purchase"&&u){const{statusUrl:S}=Jo(u);await f(S)}else await m({downloadTokenList:h.downloadTokenList&&C(h.downloadTokenList)})};if(g.useEffect(()=>{if(s==="purchase"){const h=new URL(y);h.pathname="/api/did/verify-purchase-blocklet/token",h.searchParams.set("serverDid",p.did),h.searchParams.set("blockletDid",t==null?void 0:t.did);try{$n.get(h.href).then(({data:C})=>{const m=`${C.url}`;x(m)})}catch(C){console.error("get next workflow url error: ",C)}}return()=>{x(null)}},[s]),s==="purchase"&&!u)return"";const c={verify:{action:"verify-purchase-blocklet",checkFn:rt.create({baseURL:y}).get,extraParams:{serverDid:p.did,blockletDid:t==null?void 0:t.did},messages:{title:n("store.purchase.verify.auth.title",{name:d}),scan:n("store.purchase.verify.auth.scan"),confirm:n("store.purchase.verify.auth.confirm"),success:n("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:rt.create({baseURL:Ee(y,"/store")}).get,extraParams:{factory:t.nftFactory,nw:u},messages:{title:n("store.purchase.auth.title",{name:d}),scan:n("store.purchase.auth.scan"),confirm:n("store.purchase.auth.confirm"),success:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:n("store.purchase.auth.success")}),e.jsx("p",{children:n("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return e.jsx(Lt,{open:!0,locale:i,popup:!1,saveConnect:!1,className:"connect",baseUrl:y,onSuccess:v,cancelWhenScanned:o,onClose:o,checkTimeout:60*5e3,webWalletUrl:a,disableClose:!0,showDownload:!1,...c[s]})}nn.propTypes={...Gs,handlePaySuccess:r.func,mode:r.oneOf(["verify","purchase"]).isRequired};nn.defaultProps={handlePaySuccess:()=>{}};const on=g.forwardRef(({mode:t,...o},s)=>{const[l,n]=g.useState(t!=="both"?t:"verify"),[i,p]=g.useState(t!=="both"?2:1),a=x=>{x!==l&&n(x)},u=()=>{l&&i!==2&&p(2)};return g.useImperativeHandle(s,()=>({onNext:u,getCurrentStep:()=>i})),i===1?e.jsx("div",{style:{maxWidth:520},children:e.jsx(zs,{action:l,onNext:null,onSelect:a})}):e.jsx(nn,{...o,mode:l})});on.propTypes={mode:r.oneOf(["both","verify","purchase"]).isRequired,ref:r.any};on.defaultProps={ref:{}};const zr=on;function Vr({...t}){return e.jsx(X,{className:"bottom-button",variant:"contained",color:"primary",...t})}function sn({key:t}={key:"sm"}){const o=po();return zt(o.breakpoints.down(t))}function rn({blocklet:t,onStartNow:o,children:s,disabled:l}){const{t:n}=V(),i=sn();return!t||Qo(t.meta)?e.jsx(qr,{children:s}):e.jsxs(_r,{isMobile:i,children:[e.jsx(Vr,{className:"start-now",variant:"contained",color:"primary",disabled:l,onClick:()=>o(),children:n("setup.startNow")}),e.jsx(j,{display:"flex",alignItems:"center",children:s})]})}rn.propTypes={blocklet:r.object,onStartNow:r.func,children:r.any,disabled:r.bool};rn.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const qr=M(j)`
|
|
67
|
+
width: 100%;
|
|
68
|
+
margin-top: auto;
|
|
69
|
+
padding-top: 24px;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
.bottom-button {
|
|
74
|
+
min-width: 200px;
|
|
75
|
+
}
|
|
76
|
+
${t=>t.theme.breakpoints.down("md")} {
|
|
77
|
+
.bottom-button {
|
|
78
|
+
width: 100%;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
`,_r=M(j)`
|
|
82
|
+
padding-top: 24px;
|
|
83
|
+
margin-top: auto;
|
|
84
|
+
width: 100%;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: space-between;
|
|
88
|
+
.start-now {
|
|
89
|
+
min-width: 140px;
|
|
90
|
+
}
|
|
91
|
+
.bottom-button {
|
|
92
|
+
min-width: 120px;
|
|
93
|
+
}
|
|
94
|
+
${t=>t.theme.breakpoints.down("lg")} {
|
|
95
|
+
width: 100%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${t=>t.theme.breakpoints.down("md")} {
|
|
99
|
+
.start-now {
|
|
100
|
+
min-width: inherit;
|
|
101
|
+
}
|
|
102
|
+
.bottom-button {
|
|
103
|
+
min-width: 100px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
${t=>t.isMobile} {
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
gap: '32px',
|
|
110
|
+
}}
|
|
111
|
+
`;var wo=function(o){return e.jsxs("svg",{...o,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7Io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1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};wo.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Po(){const{t}=V();return e.jsx(j,{children:e.jsxs(j,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(wo,{style:{width:200,height:250}}),e.jsx($,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.providerForStorage")})]})})}Po.propTypes={};function an({spaceGateway:t,onDeleteSpace:o}){const{t:s}=V(),[l,n]=g.useState(!1),[i,p]=g.useState(!1),a=(x,y)=>{x==null||x.stopPropagation(),n(y)},u=async x=>{try{x==null||x.stopPropagation(),p(!0),await o(t),n(!1)}catch(y){console.error(y),N.error(`${s("storage.spaces.gateway.delete.failed")}: ${Z(y)}`)}finally{p(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(ee,{size:"small",onClick:x=>a(x,!0),children:e.jsx(fr,{})}),e.jsx(Zo,{title:s("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:l,confirmButton:{text:s("common.confirm"),props:{variant:"contained",color:"error",loading:i}},cancelButton:{text:s("common.cancel"),props:{variant:"contained",color:"primary"}},onConfirm:u,onCancel:x=>a(x,!1)})]})}an.propTypes={onDeleteSpace:r.func,spaceGateway:r.shape({name:r.string.isRequired,url:r.string.isRequired,protected:r.bool}).isRequired};an.defaultProps={onDeleteSpace:()=>{}};var Io=function(o){return e.jsx("svg",{...o,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Io.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ln({spaceGateway:t,connected:o,onDisconnect:s,...l}){const n=sn(),{t:i}=V(),p=async()=>{try{await s(),N.success(i("storage.spaces.gateway.delete.succeeded",{name:t.name}))}catch(a){console.error(a),N.error(Z(a))}};return e.jsxs(Wr,{style:{position:"relative"},children:[e.jsxs(j,{sx:{backgroundColor:o?"#F0FDFF":"inherit","&:hover":{backgroundColor:o?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...l,children:[e.jsx(j,{display:"flex",children:e.jsx(ur,{alt:t.did,src:sr(t.endpoint)})}),e.jsxs(j,{className:"spaces-info",display:"flex",flexGrow:1,flexDirection:"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[e.jsxs(j,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[e.jsx($,{color:o?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:t.name}),e.jsx(Xo,{label:e.jsxs(e.Fragment,{children:[e.jsx(Io,{style:{marginRight:"4px"}}),i("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:n?null:"20px",fontWeight:"bold"}})]}),e.jsx(j,{className:"spaces-address",display:"flex",color:"#9397A1",marginTop:"8px",children:e.jsx($,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(uo,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsx(j,{className:"spaces-backup",display:"flex",alignItems:"center",children:e.jsx(j,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(an,{spaceGateway:t,onDeleteSpace:p})})})]}),e.jsx(j,{className:"selected-container selected",children:e.jsx(mo,{className:"selected-icon"})})]})}ln.propTypes={spaceGateway:r.shape({did:r.string.isRequired,name:r.string.isRequired,url:r.string.isRequired,endpoint:r.string.isRequired,protected:r.bool}).isRequired,connected:qe.bool,onDisconnect:qe.func};ln.defaultProps={connected:!1,onDisconnect:()=>{}};const Wr=M(j)`
|
|
112
|
+
.selected-container {
|
|
113
|
+
position: absolute;
|
|
114
|
+
right: 0px;
|
|
115
|
+
bottom: 0px;
|
|
116
|
+
display: flex;
|
|
117
|
+
-webkit-box-pack: end;
|
|
118
|
+
justify-content: flex-end;
|
|
119
|
+
align-items: flex-end;
|
|
120
|
+
width: 32px;
|
|
121
|
+
height: 32px;
|
|
122
|
+
border-radius: 0px 0px 8px;
|
|
123
|
+
color: rgb(255, 255, 255);
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
transition: all 0.4s ease 0s;
|
|
126
|
+
|
|
127
|
+
&::after {
|
|
128
|
+
position: absolute;
|
|
129
|
+
z-index: 0;
|
|
130
|
+
left: 60px;
|
|
131
|
+
top: 60px;
|
|
132
|
+
display: block;
|
|
133
|
+
width: 0px;
|
|
134
|
+
height: 0px;
|
|
135
|
+
border-width: 16px;
|
|
136
|
+
border-style: solid;
|
|
137
|
+
border-color: transparent #1dc1c7 #1dc1c7 transparent;
|
|
138
|
+
transition: all 0.1s ease 0s;
|
|
139
|
+
content: '';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.selected-icon {
|
|
143
|
+
visibility: hidden;
|
|
144
|
+
width: 60%;
|
|
145
|
+
height: 60%;
|
|
146
|
+
position: relative;
|
|
147
|
+
z-index: 2;
|
|
148
|
+
margin: 0px 1px 1px 0px;
|
|
149
|
+
font-size: 16px;
|
|
150
|
+
transition: all 0.2s ease 0s;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.selected-container.selected {
|
|
155
|
+
&::after {
|
|
156
|
+
left: 0px;
|
|
157
|
+
top: 0px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.selected-icon {
|
|
161
|
+
visibility: visible;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`;function Hr(){const{t}=V(),{spaceGateway:o,settingStorageEndpoint:s}=Qt();return e.jsxs(j,{display:"flex",flexDirection:"column",children:[e.jsx(j,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:e.jsx($,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.spaces.connected.title")})}),e.jsx(j,{children:e.jsx(ln,{style:{marginTop:"12px"},spaceGateway:o,connected:!0,onDisconnect:()=>s(null)},o.endpoint)})]})}function cn({onConnect:t,...o}){const{blocklet:s}=se(),{info:l}=Y(),{t:n,locale:i}=V(),[p,a]=g.useState(""),[u,x]=g.useState(!1),[y,d]=g.useState(!1),[v,c]=g.useState(""),h=mr({blocklet:s}),C=co(l),{storageEndpoint:m}=Qt(),[b,f]=g.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,prefix:"/api/did",checkFn:rt.create({baseURL:Ee(window.location.origin,$o())}).get,messages:{title:n("storage.spaces.provideNFT.title",{appName:h.appName},i),scan:n("storage.spaces.provideNFT.scan",{appName:h.appName},i),confirm:"",success:e.jsx($,{gutterBottom:!0,children:n("storage.spaces.provideNFT.success")})},onClose:()=>{f(D=>({...D,open:!1}))}}),[S,R]=g.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:n("storage.spaces.authorize.title",{appName:h.appName},i),scan:n("storage.spaces.authorize.scan",{appName:h.appName},i),confirm:"",success:e.jsx($,{gutterBottom:!0,children:n("storage.spaces.authorize.success")})},onClose:()=>{R(D=>({...D,open:!1}))}}),P=async({did:D,name:F,endpoint:I})=>{const J=await Zn(I);if(!await Xn(J)){N.error(n("storage.spaces.gateway.add.invalidUrl"));return}const q={name:F,did:D,url:J,endpoint:I};await t(q),N.success(n("storage.spaces.connectedWithName",{name:q.name}))},L=(D,F)=>{setTimeout(async()=>{if(R(q=>({...q,open:!1})),a(null),f(q=>({...q,open:!1})),!Ge(D.spaceGateway)){await P(F(D.spaceGateway));return}const I=F(D.endpoint),J=D.space?F(D.space):{};await P({endpoint:I,did:rr(I),name:"DID Space",...J})},0)},A=()=>{f(D=>({...D,open:!0,extraParams:{appPid:s.appPid,referrer:window.location.href}}))},B=async()=>{try{x(!0);const D=await Zn(p),F=ir(D),I=new URL(D).searchParams.get("spaceDid");if(!await Xn(F))throw new Error(n("storage.spaces.gateway.add.invalidUrl"));R(J=>({...J,open:!0,prefix:Ee(F,"space/api/did"),baseUrl:new URL(F).origin,checkFn:rt.create({baseURL:Ee(F,"space")}).get,extraParams:{appDid:h.appDid,appName:h.appName,appDescription:h.appDescription,scopes:h.scopes,appUrl:h.appUrl,referrer:h.referrer,nodeDid:l.did,spaceDid:I}})),d(!1)}catch(D){const F=`${n("storage.spaces.gateway.add.failed",i)}: ${Z(D)}`;c(F)}finally{x(!1)}};return e.jsxs(j,{children:[e.jsx(eo,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:A,variant:"outlined",menu:[e.jsx(eo.Item,{sx:{textTransform:"none"},onClick:()=>d(!0),size:"small",...o,children:n(m?"storage.spaces.connect.useSpaceGatewayReconnect":"storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx($,{sx:{fontWeight:"bold",textTransform:"none"},children:n(m?"storage.spaces.connect.useWalletReconnect":"storage.spaces.connect.useWallet")})}),e.jsx(Lt,{forceConnected:!1,saveConnect:!1,prefix:b.prefix,open:b.open,popup:!0,action:b.action,webWalletUrl:C,baseUrl:b.baseUrl,checkFn:b.checkFn,onSuccess:L,onClose:b.onClose,checkTimeout:b.checkTimeout,extraParams:b.extraParams,messages:b.messages,locale:i}),e.jsx(Lt,{forceConnected:!1,saveConnect:!1,prefix:S.prefix,open:S.open,popup:!0,action:S.action,baseUrl:S.baseUrl,checkFn:S.checkFn,onSuccess:L,onClose:S.onClose,checkTimeout:S.checkTimeout,extraParams:S.extraParams,messages:S.messages,locale:i}),e.jsxs(pt,{title:n("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:y,onClose:()=>d(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(X,{onClick:D=>{D.stopPropagation(),d(!1)},color:"inherit",children:n("common.cancel")}),e.jsxs(X,{onClick:B,color:"primary",disabled:u||!p,variant:"contained",autoFocus:!0,children:[u&&e.jsx(ae,{size:16}),n("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(es,{component:"div",children:e.jsx($,{component:"div",children:e.jsx(Q,{label:n("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:p,onChange:D=>{c(null),a(D.target.value)},disabled:u,onKeyPress:async D=>{D.key==="Enter"&&await B()},autoFocus:!0})})})}),!!v&&e.jsx(fo,{type:"error",style:{width:"100%"},children:v})]})]})}cn.propTypes={onConnect:qe.func};cn.defaultProps={onConnect:()=>{}};function dn({blockletMeta:t,onEndpointUpdate:o}){var a;const s=sn(),{blocklet:l}=se(),{updateSpaceGateway:n,loading:i,hasStorageEndpoint:p}=Qt();return g.useEffect(()=>{o==null||o()},[l]),i?e.jsx(ts,{relative:"parent",children:e.jsx(ae,{})}):e.jsxs(Yr,{children:[e.jsx(j,{width:s?"360px":"720px",children:p?e.jsx(Hr,{}):e.jsx(Po,{})}),((a=t==null?void 0:t.capabilities)==null?void 0:a.didSpace)==="required"&&e.jsx(rn,{mt:8,children:e.jsx(cn,{onConnect:n})})]})}dn.propTypes={blockletMeta:r.any.isRequired,onEndpointUpdate:qe.func};dn.defaultProps={onEndpointUpdate:()=>{}};const Yr=M(Ts)`
|
|
165
|
+
height: 100%;
|
|
166
|
+
overflow-y: auto;
|
|
167
|
+
padding-bottom: 32px;
|
|
168
|
+
overflow-x: hidden;
|
|
169
|
+
`;function pn({onChange:t,loading:o,children:s,extra:l,stores:n,storageKey:i}){const{t:p}=V(),{info:a,inService:u}=Y(),{blocklet:x}=se(),[y,d]=g.useState(!1),v=g.useRef(null),[c,h]=g.useState(),[C,m]=gr(i||"tmp"),[b,f]=i?[C,m]:[c,h],{storeList:S,teamDid:R}=ho({fromBlocklet:u,blocklet:x,nodeInfo:a}),P=jo([...n.map(A=>({...A,protected:!0})),...S],"url"),L=b&&P.find(A=>b===A.url)||P[0];return e.jsxs(e.Fragment,{children:[e.jsxs(Jr,{children:[e.jsx(X,{ref:v,color:"primary","data-cy":"add-component-select-store",endIcon:e.jsx(hr,{color:"primary"}),onClick:()=>{d(!0)},style:{padding:"0 2px"},children:e.jsx($,{color:"primary",children:L.name})}),e.jsx($,{color:"primary",children:l})]}),e.jsxs(Q,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:p("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:L,autoFocus:!0,onChange:A=>{const B=A.target.value;f(B.url),t(B)},SelectProps:{open:y,MenuProps:{anchorEl:v.current},renderValue:A=>A==null?void 0:A.name,onClose:()=>{d(!1)}},style:{display:"none"},margin:"normal",children:[P==null?void 0:P.map(A=>e.jsx(me,{sx:{width:"400px",maxWidth:"90vw"},value:A,"data-cy":A.url,children:e.jsx(Vs,{teamDid:R,store:A,onDelete:()=>{var B;b===A.url&&f((B=P[0])==null?void 0:B.url)}})},A.url)),!Eo.isInServerlessMode(a)&&e.jsx(qs,{disabled:o,storeList:P,teamDid:R,onAdd:A=>{f(A)}})]}),s({currentRegistry:L})]})}pn.propTypes={onChange:r.func,loading:r.bool,children:r.any.isRequired,extra:r.node,storageKey:r.string,stores:r.arrayOf(r.shape({name:r.string.isRequired,url:r.string.isRequired}))};pn.defaultProps={onChange:()=>{},loading:!1,extra:"",stores:[],storageKey:""};const Jr=M.div`
|
|
170
|
+
display: flex;
|
|
171
|
+
justify-content: space-between;
|
|
172
|
+
align-items: center;
|
|
173
|
+
margin-bottom: 16px;
|
|
174
|
+
|
|
175
|
+
span {
|
|
176
|
+
font-size: 16px;
|
|
177
|
+
color: ${t=>t.theme.palette.common.black};
|
|
178
|
+
// font-weight: bold;
|
|
179
|
+
}
|
|
180
|
+
`;var un={},Kr=Gt;Object.defineProperty(un,"__esModule",{value:!0});var ko=un.default=void 0,Qr=Kr(Ft()),Zr=e;ko=un.default=(0,Qr.default)((0,Zr.jsx)("path",{d:"M16 18v2H8v-2zM11 7.99V16h2V7.99h3L12 4 8 7.99z"}),"Upgrade");const Xr=(t,o)=>Ee(o,`/blocklets/${t.did}`),so=({blocklet:t,attribute:o,value:s})=>t._formatted?t._formatted[o]:s,$r=t=>t.inStore&&O.isFreeBlocklet(t)===!1;function mn({blocklet:t,blocklets:o,handleButtonClick:s,endpoint:l}){const{t:n}=V();let i=Ee(l,ss(t.did,t.logo||""));try{const C=new URL(i);C.searchParams.set("v",t.version||+new Date),i=C.href}catch{}const[p,a]=g.useState(!1),u=C=>C.currentTarget.contains(C.target)?!0:(C.preventDefault(),!1),x=async C=>{C.preventDefault(),C.stopPropagation();try{a(!0),await s({meta:t,registryUrl:l,blocklets:o})}catch(m){N.error(m.message)}finally{a(!1)}},{blocklet:y}=se(),d=()=>((y==null?void 0:y.children)||[]).find(b=>b.meta.bundleDid===t.did).meta.version,c=(()=>{const C=((y==null?void 0:y.children)||[]).find(m=>m.meta.bundleDid===t.did);if(C){try{const m=C.meta.version,b=t.version;if(rs.gt(b,m))return"upgrade"}catch{return"install"}return"disable"}return"install"})();let h=n("blocklet.component.choose");return c==="upgrade"?h=n("blocklet.component.upgrade"):c==="disable"?h=n("blocklet.component.installed"):$r(t)&&(h=n("common.purchase")),e.jsx(ut,{href:Xr(t,l),style:{color:"initial",textDecoration:"none"},onClick:u,target:"_blank",children:e.jsx(ei,{title:so({blocklet:t,attribute:"title",value:t.title||t.name}),did:t.did,description:so({blocklet:t,attribute:"description",value:t.description}),cover:t.logo?i:"",version:t.version,button:e.jsx("div",{style:{display:"flex",alignItems:"center"},children:e.jsx(Ws,{children:e.jsxs(X,{onClick:x,size:"small",disabled:p||c==="disable",variant:"outlined",color:"primary","data-cy":"install-blocklet",title:c==="upgrade"?`${d()} -> ${t.version}`:"",children:[p?e.jsxs(e.Fragment,{children:[e.jsx(ae,{size:16,style:{marginRight:3}}),h]}):h,c==="upgrade"?e.jsx(ko,{style:{fontSize:"1.2rem"}}):null]},t.did)})})})})}mn.propTypes={blocklet:r.object.isRequired,blocklets:r.array,handleButtonClick:r.func,endpoint:r.string};mn.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[]};function fn({handleButtonClick:t,handleSearchSelect:o,storeUrl:s,handleBlockletRender:l,extraFilter:n,serverVersion:i,resourceType:p,resourceDid:a,showResourcesSwitch:u,showCategory:x,...y}){const{locale:d}=V(),[v,c]=g.useState(!1),[h,C]=g.useState({}),m=f=>{C(f)},b=s;return g.useEffect(()=>{C({showResources:!0,resourceType:p,resourceDid:a})},[b,p,a]),g.useEffect(()=>{c(!0),C({showResources:!0,resourceType:p,resourceDid:a})},[]),e.jsx(ns,{FallbackComponent:os,resetKeys:[b],children:e.jsx("div",{...y,children:v&&e.jsx(_s,{showCategory:x,showResourcesSwitch:u,blockletRender:f=>{const S={...f,handleButtonClick:t,endpoint:b};return l({...f,defaultRender:e.jsx(mn,{...S})})},baseSearch:!0,endpoint:b,locale:d,onFilterChange:m,onSearchSelect:o,filters:h,extraFilter:n,serverVersion:i,fetchCategoryDelay:500})})})}fn.propTypes={storeUrl:r.string.isRequired,handleButtonClick:r.func,handleSearchSelect:r.func,handleBlockletRender:r.func,extraFilter:r.func,serverVersion:r.string,resourceType:r.string,resourceDid:r.string,showResourcesSwitch:r.bool,showCategory:r.bool};fn.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:"",resourceDid:"",showResourcesSwitch:!0,showCategory:!0};const ei=M(Hs)`
|
|
181
|
+
.ms-highlight {
|
|
182
|
+
color: ${t=>t.theme.palette.primary.main};
|
|
183
|
+
}
|
|
184
|
+
`,hn=g.forwardRef(({meta:t,isMobile:o,onStepChange:s},l)=>{const{steps:n,activeStep:i,setActiveStepByKey:p,setActiveStepByIndex:a}=Ks(),{t:u,locale:x}=V(),y=n[i];return g.useEffect(()=>{s(i)},[s,i]),g.useImperativeHandle(l,()=>({setActiveStepByKey:p,setActiveStepByIndex:a})),e.jsx(ni,{component:"div",className:o?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-child":{flex:{md:1}}},children:e.jsx(Qs,{locale:x,blockletMeta:{title:" ",...t},pcWidth:"100%",pcHeight:"100%",logoUrl:t&&t.logo&&t.registryUrl?is({did:t.did,version:t.version,baseUrl:t.registryUrl,logoPath:t.logo}):null,stepTip:u("blocklet.component.add"),children:e.jsx(ti,{children:y!=null&&y.body&&typeof y.body=="function"?y.body():y.body})})})});hn.propTypes={meta:r.any,onStepChange:r.func.isRequired,isMobile:r.bool.isRequired};hn.defaultProps={meta:null};const ro=t=>t.isMobile?`
|
|
185
|
+
height: calc(100vh - 56px - 64px - 48px);
|
|
186
|
+
`:"",ti=M.div`
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 100%;
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
justify-content: flex-start;
|
|
192
|
+
align-items: flex-start;
|
|
193
|
+
|
|
194
|
+
.bottom-button {
|
|
195
|
+
min-width: 200px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// blocklet-select-side
|
|
199
|
+
aside {
|
|
200
|
+
width: 140px;
|
|
201
|
+
}
|
|
202
|
+
`,ni=M(j)`
|
|
203
|
+
${({className:t})=>t==="mobileStyle"?`
|
|
204
|
+
& > div{
|
|
205
|
+
height: 100%;
|
|
206
|
+
}
|
|
207
|
+
.root-header {
|
|
208
|
+
.app-name-content {
|
|
209
|
+
display: none;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
// content-panel
|
|
216
|
+
.root-header + div{
|
|
217
|
+
padding-top: 0;
|
|
218
|
+
position: relative;
|
|
219
|
+
& > div {
|
|
220
|
+
padding-top: 0;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
header + div {
|
|
225
|
+
padding-top: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
header {
|
|
229
|
+
.header-title {
|
|
230
|
+
margin-left: 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.header-title-name {
|
|
234
|
+
max-width: 100% !important;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
.app-content {
|
|
238
|
+
padding: 0!important;
|
|
239
|
+
}
|
|
240
|
+
`:`
|
|
241
|
+
position: relative;
|
|
242
|
+
.ll-container { // 通过 Launcher Layout 组件约定的 .ll-container class 自定义 Layout 样式
|
|
243
|
+
width: 100%;
|
|
244
|
+
height: 100%;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.root-header {
|
|
248
|
+
z-index: auto !important;
|
|
249
|
+
position: fixed !important;
|
|
250
|
+
}
|
|
251
|
+
& > div {
|
|
252
|
+
height: 100%;
|
|
253
|
+
width: 100%;
|
|
254
|
+
max-width: 100%;
|
|
255
|
+
& > div {
|
|
256
|
+
max-height: unset !important;
|
|
257
|
+
max-width: 100%;
|
|
258
|
+
& > div {
|
|
259
|
+
// left-panel
|
|
260
|
+
&:first-child {
|
|
261
|
+
padding: 0;
|
|
262
|
+
width: 20%;
|
|
263
|
+
min-width: 180px;
|
|
264
|
+
|
|
265
|
+
& > div:first-child {
|
|
266
|
+
display: none;
|
|
267
|
+
}
|
|
268
|
+
// step
|
|
269
|
+
& > div:last-child {
|
|
270
|
+
// margin-top: 32px;
|
|
271
|
+
margin-top: 0;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
// right-panel
|
|
275
|
+
&:last-child {
|
|
276
|
+
padding-top: 0;
|
|
277
|
+
padding-right: 0px;
|
|
278
|
+
overflow-y: hidden;
|
|
279
|
+
.app-content {
|
|
280
|
+
padding: 0 0 24px 0;
|
|
281
|
+
}
|
|
282
|
+
.button-container {
|
|
283
|
+
padding-right: 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
`}
|
|
291
|
+
|
|
292
|
+
& .app-overview {
|
|
293
|
+
margin-left: 0 !important;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
& .flex-justify-center {
|
|
297
|
+
display: flex;
|
|
298
|
+
justify-content: center;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
& .flex-align-center {
|
|
302
|
+
display: flex;
|
|
303
|
+
height: 100%;
|
|
304
|
+
align-items: center;
|
|
305
|
+
${t=>ro(t)}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
& .agreement-wrapper {
|
|
309
|
+
${t=>ro(t)}
|
|
310
|
+
max-height: 60vh;
|
|
311
|
+
.eula-trigger {
|
|
312
|
+
padding-right: 0;
|
|
313
|
+
}
|
|
314
|
+
.next-button {
|
|
315
|
+
display: none;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
& .connect {
|
|
320
|
+
background: white;
|
|
321
|
+
}
|
|
322
|
+
`,oi=hn,si=t=>t.inStore&&O.isFreeBlocklet(t)===!1,ri=t=>{var o;return[H.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,H.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes((o=t==null?void 0:t.capabilities)==null?void 0:o.didSpace)},Bt=t=>{var o,s;return((s=(o=t==null?void 0:t.configs)==null?void 0:o.find(l=>l.key===H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:s.value)||null},ii=t=>(t.environments||[]).some(o=>o.required),io=(t,o)=>t==null?void 0:t.some(s=>s.required&&!o[s.key]),ai=({params:t,blocklet:o,t:s})=>{const l=t.title||t.name;return l?((o==null?void 0:o.children)||[]).find(i=>i.meta.bundleDid===t.bundleDid)?s("blocklet.component.upgradeNext",{name:l}):s("blocklet.component.addNext",{name:l}):s("common.next")},ao=({componentDid:t,timeout:o=1e3,manual:s=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:t,manual:s},"*")},o)};function gn({onClose:t,mode:o,stores:s,resourceType:l,resourceDid:n,storageKey:i,inDialog:p,selectedMeta:a,storeUrl:u,showResourcesSwitch:x,showFromUrl:y,enableRunBackground:d,showCategory:v}){var Dn,Bn,Nn,Ye,An,Je,Ln;const{t:c,locale:h}=V(),[C,m]=g.useState(!1),[b,f]=g.useState(null),[S,R]=g.useState(""),[P,L]=g.useState(""),{api:A,ws:{useSubscription:B},inService:D,info:F}=Y(),{blocklet:I,actions:{refreshBlocklet:J}}=se(),[q,Ce]=g.useState(null),[Te,we]=g.useState(!1),Le={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[w,T]=g.useState(Le),[_,le]=g.useState(0),G=g.useRef({}),te=g.useRef({}),he=g.useRef({}),ge=zt(E=>E.breakpoints.down("md")),je=as(),[ve,jt]=g.useState(!0),{meta:K}=G.current,ne=E=>T(U=>({...U,...E}));g.useEffect(()=>{if(w.pathPrefix){const{errMsg:E}=Un({...w,pathPrefix:w.pathPrefix,locale:h});R(E)}},[w.pathPrefix]),g.useEffect(()=>{_===0&&T(Le)},[_]);const Ao=()=>{const E=Bt(I)??"";ne({didSpaceEndpoint:E})},We=()=>{var E;return(E=G==null?void 0:G.current)!=null&&E.meta?O.getDisplayName(G.current):""},vt=E=>{const U=z=>{ne({installResultProps:{variant:"error",title:We(),subTitle:E,footer:e.jsx(X,{className:"bottom-button",disabled:z,"data-cy":"retry-install-component",onClick:async()=>{U(!0),await kn(G.current.installInput)},children:e.jsxs(j,{display:"flex",alignItems:"center",children:[z&&e.jsx(ae,{size:16,style:{marginRight:8}}),c("common.retry")]})})}})};U()},St=E=>U=>{var z,W;(((z=U==null?void 0:U.meta)==null?void 0:z.did)||(U==null?void 0:U.meta))===((W=I==null?void 0:I.meta)==null?void 0:W.did)&&E(U)};B(H.BlockletEvents.statusChange,St(E=>{switch(E.status){case H.BlockletStatus.upgrading:ne({installResultProps:{variant:"success",title:We(),subTitle:c("blocklet.component.installSuccessTip")}}),ao({componentDid:je.componentDid});break}const U=Bt(I);ne(z=>({...z,didSpaceEndpoint:U}))}),[(Dn=I==null?void 0:I.meta)==null?void 0:Dn.did]),B(H.BlockletEvents.downloadFailed,St(()=>{vt(c("blocklet.component.installComponentError"))}),[(Bn=I==null?void 0:I.meta)==null?void 0:Bn.did]),B(H.BlockletEvents.installFailed,St(()=>{vt(c("blocklet.component.installComponentError"))}),[(Nn=I==null?void 0:I.meta)==null?void 0:Nn.did]);const ce=[],Rt=()=>{m(!1),T({}),G.current={},t()},He=E=>((I==null?void 0:I.children)||[]).some(U=>U.meta.did===E),kn=async E=>{var Ze,Ue;const{pathPrefix:U,bundleDid:z,title:W,componentName:Se="",componentDid:Pe=""}=w,{configs:Ie=[],registryUrl:ue,inStore:ke,inputUrl:Me,dist:Fe}=((Ze=G.current)==null?void 0:Ze.meta)||{},Ke=(Ue=G.current)==null?void 0:Ue.downloadTokenList,Qe=ke?_n(ue,z,Fe):Me;m(!0);const oe={rootDid:I.meta.did,url:Qe,mountPoint:xe(U),title:W,name:Se,did:Pe,onlyRequired:!ve,...w.hasEnvironmentsStep&&Ie.length>0?{configs:Ie.map(de=>({...de,value:w.configsValue[de.key]||""}))}:{},...Ke?{downloadTokenList:Ke}:{},...E};try{if(await A.installComponent({input:oe}),ue){const{teamDid:de,storeList:Re}=ho({fromBlocklet:D,nodeInfo:F,blocklet:I}),{isNew:Et,decoded:Tt}=ds(ue,Re);Et&&await A.addBlockletStore({input:{teamDid:de,url:Tt}})}ne({installResultProps:{}}),J({showError:!1,attachRuntimeInfo:!1})}catch(de){const Re=Z(de);N.error(Re),console.error("installComponent error: ",de),vt(Re)}finally{m(!1),G.current.installInput=oe}},Un=E=>({errMsg:vo({params:{...E,did:E.bundleDid},blocklets:[I],blocklet:I,locale:h})}),pe=async E=>{var z,W;const{errMsg:U}=Un({...w,locale:h});R(U),_===ce.length-2&&await kn(E),(W=(z=te.current)==null?void 0:z.setActiveStepByIndex)==null||W.call(z,Se=>Se+1)},Oe=()=>{var E,U;(U=(E=te.current)==null?void 0:E.setActiveStepByIndex)==null||U.call(E,z=>z-1)},Lo=()=>{const{pathPrefix:E,bundleDid:U,title:z,componentName:W="",componentDid:Se=""}=w,{meta:Pe={}}=G.current||{},{registryUrl:Ie,inStore:ue,inputUrl:ke,dist:Me}=Pe,Fe=ue?_n(Ie,U,Me):ke;Ce({meta:Pe,installOpts:{type:"component",rootDid:I.meta.did,mountPoint:E,url:Fe,title:z,name:W,did:Se}})},Oo=E=>{we(!1),ne({purchaseResultProps:{variant:"error",title:We(),subTitle:E,style:{paddingTop:120},footer:e.jsx(X,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{ne({purchaseResultProps:{}})},children:c("common.retry")})}})},Mo=({downloadTokenList:E})=>{G.current.downloadTokenList=E,we(!1),pe()},bt=({chooseParams:E=G.current,componentDid:U,isInit:z=!1})=>{var On,Mn,Fn,Gn;const{meta:W,registryUrl:Se,inStore:Pe,inputUrl:Ie}=E,{did:ue,title:ke,name:Me}=W,Fe=(((On=I.settings)==null?void 0:On.children)||[]).filter(ie=>ie.status==="deleted"&&ie.meta.bundleDid===ue),Ke=U||"",Qe=(Mn=W.environments)==null?void 0:Mn.map(ie=>{const{name:wt,validation:Xe,...$e}=ie,Pt={validation:ls(Xe)?"":Xe};return{...$e,key:wt,...Pt}});G.current={...E,meta:{...W,configs:Qe,registryUrl:Se,inStore:Pe,inputUrl:Ie}};let oe={};if(z){const ie=[I],wt=Qe||[],Xe=[],$e=jo(cs([...wt,...Xe]),"key").filter(De=>!!De.key).sort((De,et)=>De.required&&!et.required?-1:et.required&&!De.required?1:0),Pt=O.getSharedConfigObj(ie[0],{configs:$e}),It={},zn=$e.map(De=>{const{default:et,key:tt,...Go}=De;return It[tt]=Pt[tt]||et,{...Go,key:tt,hidden:!!H.BLOCKLET_CONFIGURABLE_KEY[tt]}});oe={...oe,configsList:zn,configsValue:It,hasMissRequiredConfigs:io(zn,It)}}const Ze=I.children.some(ie=>ie.mountPoint==="/"),Ue=Fe.find(ie=>ie.meta.bundleDid===ue),de=I.children.find(ie=>ie.meta.bundleDid===ue);oe.title=ke||"",Ue?oe={...oe,pathPrefix:Ue.mountPoint||"",componentName:Ue.meta.name,hasEnvironmentsStep:!1}:de?oe={...oe,pathPrefix:de.mountPoint||"",componentName:de.meta.name,hasEnvironmentsStep:!1}:oe={...oe,pathPrefix:Ze?`/${xe(ke)||xe(Me)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:((Gn=(Fn=G.current.meta)==null?void 0:Fn.environments)==null?void 0:Gn.length)>0};const Re=si(G.current.meta),Et=ri(G.current.meta),Tt=Bt(I);ne({bundleDid:ue,componentDid:Ke,...oe,hasRequiredEnvironments:ii(G.current.meta),requirePurchase:Re,didSpaceIsRequiredSetup:Et,didSpaceEndpoint:Tt}),z&&Re&&Lo()};g.useEffect(()=>{!a||_!==0||!I||(bt({chooseParams:{blocklets:[a],meta:a,registryUrl:u||a.homepage,inStore:!0},isInit:!0}),ne({showFromUrlDialog:!1}),pe())},[a,_,I]),ce.push({key:"selectComponent",name:c("blocklet.component.selectComponent"),body:e.jsxs(be,{sx:{width:400},component:"div",children:[y&&w.showFromUrlDialog&&e.jsx(dr,{mode:"component",onCancel:()=>{ne({showFromUrlDialog:!1})},onSuccess:({meta:E,inputUrl:U,inStore:z,registryUrl:W})=>{bt({chooseParams:{meta:E,inputUrl:U,inStore:z,registryUrl:W},isInit:!0}),ne({showFromUrlDialog:!1}),pe()},handleText:{title:c("blocklet.component.addComponentTip.fromUrl"),confirm:c("blocklet.component.choose")}}),e.jsx(pn,{stores:s,extra:Eo.isInServerlessMode(F)?null:y?e.jsxs(X,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{ne({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[e.jsx(Ht,{style:{fontSize:20,marginRight:4}})," ",c("blocklet.component.addComponentTip.fromUrl")," "]}):null,loading:C,onChange:()=>{T({}),G.current={}},storageKey:i,children:({currentRegistry:E})=>e.jsx(fn,{showResourcesSwitch:x,showCategory:v,serverVersion:F==null?void 0:F.version,style:ge?{height:"calc(100vh - 56px - 80px - 32px - 40px )"}:{height:"calc(100% - 40px)"},storeUrl:E.url,resourceType:l,resourceDid:n,handleButtonClick:U=>{bt({chooseParams:{...U,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:U,defaultRender:z})=>{const W=(w==null?void 0:w.bundleDid)&&(w==null?void 0:w.bundleDid)===(U==null?void 0:U.did);return e.jsxs(ci,{children:[W&&e.jsx("div",{className:"check-container",children:e.jsx(mo,{className:"check-icon"})}),e.jsx("div",{className:W?"choose-blocklet":"",style:{marginLeft:16},children:z})]})}})})]}),cancel:o==="embed"?void 0:c("common.cancel"),confirm:ai({params:w,blocklet:I,t:c}),onCancel:Rt,onConfirm:()=>{pe()}}),ce.push({key:"agreement",name:c("launchBlocklet.introduction"),body:e.jsxs(be,{component:"div",className:"agreement-wrapper",children:[e.jsx(Co,{title:c("launchBlocklet.introduction"),subTitle:c("blocklet.component.addComponentTip.introduction")}),e.jsx(ws,{meta:K,onClickNext:pe,installRelated:ve,onChangeInstallRelated:jt,handleDescEle:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:e.jsx("div",{dangerouslySetInnerHTML:{__html:c(`blocklet.component.addComponentTip.${w.requirePurchase?"isPurchase":"isFree"}`,{name:We()})}})}),e.jsx("p",{children:c("blocklet.component.addComponentTip.belowInformation")})]})})]}),cancel:a?void 0:c("common.pre"),confirm:c("launchBlocklet.next"),onCancel:a?Rt:Oe,onConfirm:()=>{we(!1),pe()}}),K&&w.requirePurchase&&ce.push({key:"purchase",name:e.jsxs(e.Fragment,{children:[c("common.verifyNFT"),e.jsx(st,{})]}),body:e.jsxs(be,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(((An=(Ye=he.current)==null?void 0:Ye.getCurrentStep)==null?void 0:An.call(Ye))===2||Te)&&e.jsx(ot,{title:c("common.verifyNFT"),subTitle:c("blocklet.component.addComponentTip.verifyNFT")}),Ge(w.purchaseResultProps)?q&&e.jsx(zr,{ref:he,meta:q.meta,mode:w.componentDid?"verify":"both",onCancel:Oo,installOpts:q.installOpts,handlePaySuccess:Mo}):e.jsx("div",{className:"flex-align-center flex-justify-center",children:e.jsx(Qn,{...w.purchaseResultProps})})]}),disabled:((Ln=(Je=he.current)==null?void 0:Je.getCurrentStep)==null?void 0:Ln.call(Je))===2||Te,cancel:c("common.pre"),confirm:c("common.next"),onConfirm:()=>{typeof he.current.onNext=="function"&&(he.current.onNext(),we(!0))},onCancel:()=>{Oe()}}),O.hasStartEngine(K)&&K.group!==H.BlockletGroup.engine&&!He(K.did)&&ce.push({key:"config",name:c("common.config"),error:S,body:e.jsxs(be,{component:"div",children:[e.jsx(ot,{title:c("common.config"),subTitle:c("blocklet.component.addComponentTip.config")}),e.jsx(Q,{label:c("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:P||c("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:w.pathPrefix,onChange:E=>{const U=E.target.value;ne({pathPrefix:U}),L(c("common.slugifyHint",{value:dt(U)}))}}),!!S&&e.jsx(fo,{type:"error",style:{width:"100%",marginTop:8},children:S})]}),cancel:c("common.pre"),confirm:c("common.next"),onCancel:Oe,onConfirm:()=>{pe()}}),K&&!He(K.did)&&(w!=null&&w.hasEnvironmentsStep)&&ce.push({key:"environment",name:e.jsxs(e.Fragment,{children:[c("common.environment")," ",w.hasRequiredEnvironments&&e.jsx(st,{})]}),disabled:!!b||(w==null?void 0:w.hasMissRequiredConfigs),body:()=>e.jsxs(be,{component:"div",children:[e.jsx(ot,{title:c("common.environment"),subTitle:c("blocklet.component.addComponentTip.environment")}),e.jsx(tn,{style:{marginTop:-12,width:"100%"},schema:w.configsList,defaultValue:w.configsValue,onChange:(E,{action:U,currentItem:z,allValues:W})=>{U==="confirm"&&ne({hasMissRequiredConfigs:io(w.configsList,W),configsValue:W}),U==="edit"?f(z):["cancel","confirm"].includes(U)&&f(null)}})]}),cancel:c("common.pre"),confirm:c("common.next"),onCancel:Oe,onConfirm:pe}),K&&!He(K.did)&&(w!=null&&w.didSpaceIsRequiredSetup)&&ce.push({key:"didSpace",name:e.jsxs(e.Fragment,{children:[c("blocklet.component.didSpaceConfig")," ",w.didSpaceIsRequiredSetup==="required"&&e.jsx(st,{})]}),disabled:(w==null?void 0:w.didSpaceIsRequiredSetup)&&!w.didSpaceEndpoint,body:()=>e.jsx(Kt,{children:e.jsxs(be,{component:"div",children:[e.jsx(ot,{title:c("blocklet.component.didSpaceConfig"),subTitle:c("blocklet.component.didSpaceConfigTip")}),e.jsx(j,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:e.jsx(dn,{blockletMeta:G.current.meta,onNext:()=>{pe()},onEndpointUpdate:Ao})})]})}),cancel:c("common.pre"),confirm:c("common.next"),onCancel:Oe,onConfirm:pe}),ce.push({key:"install",name:He(K==null?void 0:K.did)?c("common.upgrade"):c("common.install"),disabled:d?!1:Ge(w.installResultProps),loading:d?!1:Ge(w.installResultProps),body:e.jsx(be,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:Ge(w.installResultProps)?e.jsx(Zs,{message:e.jsx(di,{children:c(d?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):e.jsx("div",{style:{marginTop:120},children:e.jsx(Qn,{...w.installResultProps})})}),confirm:c("common.complete"),onConfirm:()=>{ao({timeout:0,componentDid:je.componentDid,manual:!0}),Rt(),setTimeout(()=>{const E=document.getElementsByClassName("dashboard-main")[0];E&&(E.scrollTop=E.scrollHeight)},200)}});const re=ce[_]||{},Fo=()=>C||re.error||!w.bundleDid?!0:_>1?!w.pathPrefix:!1;return I?e.jsxs(li,{sx:{width:"100%",height:ge?window.innerHeight:p?"72vh":"100vh"},children:[e.jsx(Xs,{steps:ce,mode:"memory",children:e.jsx(oi,{ref:te,meta:K,isMobile:ge,onStepChange:E=>{le(E)}})}),e.jsxs(j,{className:"action-bar",children:[re.cancel&&e.jsx(X,{onClick:E=>{E.stopPropagation(),re.onCancel()},disabled:_===ce.length-2&&C,color:"inherit",children:re.cancel||c("common.cancel")}),re.confirm&&e.jsx(X,{onClick:E=>{E.stopPropagation(),re.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:C||(typeof re.disabled=="boolean"?re.disabled:Fo()),variant:"contained",autoFocus:!0,title:re.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:e.jsxs(j,{display:"flex",alignItems:"center",children:[(typeof re.loading=="boolean"?re.loading:C)&&e.jsx(ae,{style:{marginRight:8},size:16}),re.confirm]})})]})]}):null}gn.propTypes={onClose:r.func,mode:r.oneOf(["normal","embed"]),inDialog:r.bool,stores:r.arrayOf(r.string),storeUrl:r.string,resourceType:r.string,resourceDid:r.string,storageKey:r.string,selectedMeta:r.object,showResourcesSwitch:r.bool,showFromUrl:r.bool,enableRunBackground:r.bool,showCategory:r.bool};gn.defaultProps={onClose:()=>{},mode:"normal",stores:[],storeUrl:"",resourceType:"",resourceDid:"",storageKey:"",inDialog:!0,selectedMeta:null,showResourcesSwitch:!0,showFromUrl:!0,enableRunBackground:!0,showCategory:!0};const li=M(j)`
|
|
323
|
+
.action-bar {
|
|
324
|
+
display: flex;
|
|
325
|
+
justify-content: flex-end;
|
|
326
|
+
position: sticky;
|
|
327
|
+
bottom: 0;
|
|
328
|
+
padding-top: 16px;
|
|
329
|
+
z-index: 100;
|
|
330
|
+
width: 100%;
|
|
331
|
+
background: #fff;
|
|
332
|
+
border-top: 1px solid #eee;
|
|
333
|
+
}
|
|
334
|
+
`,be=M($)`
|
|
335
|
+
width: 100%;
|
|
336
|
+
height: 100%;
|
|
337
|
+
`,ot=M(Co)`
|
|
338
|
+
margin-bottom: 24px;
|
|
339
|
+
`,ci=M.div`
|
|
340
|
+
position: relative;
|
|
341
|
+
|
|
342
|
+
.choose-blocklet {
|
|
343
|
+
background-color: rgb(236, 251, 253);
|
|
344
|
+
border-color: rgb(236, 251, 253);
|
|
345
|
+
border-radius: 8px;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.check-container {
|
|
349
|
+
position: absolute;
|
|
350
|
+
right: 0;
|
|
351
|
+
bottom: 0;
|
|
352
|
+
display: flex;
|
|
353
|
+
justify-content: flex-end;
|
|
354
|
+
align-items: flex-end;
|
|
355
|
+
width: 30px;
|
|
356
|
+
height: 30px;
|
|
357
|
+
border-radius: 0 0 8px 0;
|
|
358
|
+
color: ${t=>t.theme.palette.common.white};
|
|
359
|
+
overflow: hidden;
|
|
360
|
+
transition: all ease 0.3s;
|
|
361
|
+
&:after {
|
|
362
|
+
position: absolute;
|
|
363
|
+
z-index: 0;
|
|
364
|
+
display: block;
|
|
365
|
+
width: 0;
|
|
366
|
+
height: 0;
|
|
367
|
+
border-top: transparent solid 15px;
|
|
368
|
+
border-left: transparent solid 15px;
|
|
369
|
+
border-bottom: ${t=>t.theme.palette.primary.main} solid 15px;
|
|
370
|
+
border-right: ${t=>t.theme.palette.primary.main} solid 15px;
|
|
371
|
+
transition: all ease 0.1s;
|
|
372
|
+
content: '';
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.check-icon {
|
|
376
|
+
position: relative;
|
|
377
|
+
z-index: 2;
|
|
378
|
+
margin: 0 1px 1px 0;
|
|
379
|
+
font-size: 16px;
|
|
380
|
+
transition: all ease 0.2s;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
`,di=M.div`
|
|
384
|
+
color: ${t=>t.theme.palette.primary.main};
|
|
385
|
+
.msg-before {
|
|
386
|
+
display: inline-block;
|
|
387
|
+
color: #aaa;
|
|
388
|
+
font-size: 14px;
|
|
389
|
+
margin-right: 6px;
|
|
390
|
+
}
|
|
391
|
+
`;function gt({blocklet:t,showDialog:o,setShowDialog:s,selectedMeta:l}){const{t:n}=V(),i=zt(u=>u.breakpoints.down("md")),{inService:p}=Y(),a=()=>{s(!1)};return o?e.jsx(pi,{title:n("blocklet.component.addWithName",{name:O.getDisplayName(t)}),maxWidth:!1,fullWidth:!1,PaperProps:{style:i?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(u,x)=>{x!=="backdropClick"&&a()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:e.jsx(gn,{selectedMeta:l,onClose:a,storageKey:p?Ys:Js})}):null}gt.propTypes={selectedMeta:r.object,showDialog:r.bool.isRequired,setShowDialog:r.func.isRequired,blocklet:r.object.isRequired};gt.defaultProps={selectedMeta:null};const pi=M(pt)`
|
|
392
|
+
.MuiDialogContent-root {
|
|
393
|
+
}
|
|
394
|
+
`;function xn({blocklet:t,children:o}){const{t:s}=V(),[l,n]=g.useState(!1),i=p=>{p.stopPropagation(),n(!0)};return e.jsxs(e.Fragment,{children:[typeof o=="function"?o({open:i}):e.jsxs(me,{onClick:i,className:"component-action","data-cy":"action-add-component",children:[e.jsx(Ht,{style:{fontSize:18,marginRight:5}}),s("blocklet.component.add")]}),e.jsx(gt,{showDialog:l,setShowDialog:n,blocklet:t})]})}xn.propTypes={children:r.any,blocklet:r.object.isRequired};xn.defaultProps={children:null};const ui=t=>t.children.filter(o=>o.meta.interfaces.find(s=>s.type===H.BLOCKLET_INTERFACE_TYPE_WEB));function xt({params:t,setParams:o,setError:s,serviceTypes:l}){const{t:n}=V(),{blocklet:i}=se(),p=i.meta.did,a=ui(i),[u,x]=g.useState([]),y={301:n("common.redirectPermanently"),302:n("common.redirectTemporary"),307:n("common.redirectTemporary"),308:n("common.redirectPermanently")};return g.useEffect(()=>{if(t.type===k.ROUTING_RULE_TYPES.COMPONENT&&t.componentId){const d=a.find(h=>h.meta.did===t.componentId),v=O.findWebInterface(d.meta),c=(Array.isArray(v==null?void 0:v.pageGroups)?v.pageGroups:[]).map(h=>({value:h,label:`${h} pages`}));c.length&&c.unshift({value:"",label:"All pages"}),x(c),t.pageGroup&&c.find(h=>h.value===t.pageGroup)===!1&&o({...t,pageGroups:""})}},[t.componentId,t.type]),e.jsxs(e.Fragment,{children:[e.jsx(Q,{select:!0,label:n("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:t.type,onChange:d=>{s(""),o({...t,type:d.target.value,did:d.target.value===k.ROUTING_RULE_TYPES.BLOCKLET?p:"",__disableConfirm:!1})},style:{marginBottom:32},SelectProps:{},children:l.map(({name:d,value:v})=>e.jsx(me,{value:v,children:d},v))}),t.type===k.ROUTING_RULE_TYPES.REDIRECT&&[e.jsx(Q,{select:!0,label:n("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:t.redirectCode,onChange:d=>o({...t,redirectCode:d.target.value}),style:{marginBottom:32},SelectProps:{},children:Object.keys(y).map(d=>e.jsx(me,{value:d,children:`${y[d]} - ${d}`},d))},"redirectCode"),e.jsx(Q,{label:n("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url",inputProps:{"data-cy":"redirect-url-input"},fullWidth:!0,value:t.url,helperText:n("router.urlHelperText"),style:{marginBottom:32},onChange:d=>{o({...t,url:d.target.value,__disableConfirm:!d.target.value.trim()}),d.target.value.trim()?s(""):s(n("router.validation.redirectUrlRequired"))}},"redirectUrl")],t.type===k.ROUTING_RULE_TYPES.COMPONENT&&[e.jsx(Q,{select:!0,label:n("router.domain.add.component"),autoComplete:"off",variant:"outlined","data-cy":"select-component-input",name:"componentId",fullWidth:!0,value:t.componentId,onChange:d=>{o({...t,componentId:d.target.value})},style:{marginBottom:32},SelectProps:{},children:a.map(d=>e.jsx(me,{value:d.meta.did,selected:d.meta.did===t.componentId,children:O.getDisplayName(d,!0)},d.meta.did))},"componentId"),u.length?e.jsx(Q,{select:!0,label:n("router.domain.add.pageGroup"),autoComplete:"off",variant:"outlined",name:"pageGroup","data-cy":"route-group-input",fullWidth:!0,value:t.pageGroup,helperText:n("router.domain.add.pageGroupTip"),style:{marginBottom:32},onChange:d=>{o({...t,pageGroup:d.target.value})},SelectProps:{},children:u.map(d=>e.jsx(me,{value:d.value,selected:d.value===t.pageGroup,children:d.label},d.label))},"pageGroup"):null].filter(Boolean),t.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(Q,{label:n("common.rewriteUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"rewrite-url-input",fullWidth:!0,value:t.url,helperText:n("router.urlHelperText"),style:{marginBottom:32},onChange:d=>{const v=d.target.value.trim();o({...t,url:d.target.value,__disableConfirm:!v}),s(v?"":n("router.validation.rewriteUrlRequired"))}},"url"),t.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&[e.jsx(Q,{select:!0,label:n("router.rule.add.responseType"),autoComplete:"off",variant:"outlined",name:"responseType",fullWidth:!0,value:t.responseType,onChange:d=>o({...t,responseType:d.target.value}),style:{marginBottom:32},SelectProps:{},children:k.ROUTING_RESPONSE_TYPES.map(d=>e.jsx(me,{value:d.value,children:d.text},d.value))},"responseType"),e.jsx(Q,{label:n("router.rule.add.responseBody"),autoComplete:"off",variant:"outlined",name:"responseBody","data-cy":"response-body-input",fullWidth:!0,multiline:!0,minRows:3,value:t.responseBody,helperText:n("router.rule.add.responseBodyTip"),style:{marginBottom:32},onChange:d=>{const v=d.target.value.trim();o({...t,responseBody:d.target.value,__disableConfirm:!v}),s(v?"":n("router.rule.add.responseBodyRequired"))}},"response-body")]]})}xt.propTypes={params:r.object,serviceTypes:r.array,setParams:r.func,setError:r.func};xt.defaultProps={params:{},serviceTypes:[{name:"Redirect",value:k.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:k.ROUTING_RULE_TYPES.NONE},{name:"Rewrite - Route traffic without redirect",value:k.ROUTING_RULE_TYPES.GENERAL_REWRITE},{name:"Response - Response with provided content",value:k.ROUTING_RULE_TYPES.DIRECT_RESPONSE},{name:"Component - Pass traffic to blocklet component",value:k.ROUTING_RULE_TYPES.COMPONENT}],setParams:()=>{},setError:()=>{}};function yn({children:t}){const{t:o}=V(),{api:s}=Y(),{blocklet:l}=se(),[n,i]=g.useState(!1),[p,a]=g.useState(null),u=l.meta.did,x=l.site.id,y=()=>{i(!1),a(null)},d=async h=>{try{const C=await it(h,o);if(C)throw C;i(!0);const m={from:{pathPrefix:xe(h.pathPrefix)},to:{type:h.type}};h.type===k.ROUTING_RULE_TYPES.REDIRECT&&(m.to.url=h.url.trim(),m.to.redirectCode=h.redirectCode),h.type===k.ROUTING_RULE_TYPES.COMPONENT&&(m.to.did=u,m.to.componentId=h.componentId,m.to.pageGroup=h.pageGroup),h.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(m.to.url=xe(h.url)),h.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(m.to.response={status:200,contentType:h.responseType,body:h.responseBody}),await s.addRoutingRule({input:{id:x,rule:m,teamDid:u}})}catch(C){N.error(C.message)}finally{i(!1),a(null)}},v={title:o("router.rule.add.title"),description:(h,C,m)=>{const b=f=>{if(m(null),it(f,o)){C({...f,__disableConfirm:!0});return}C({...f})};return e.jsxs($,{component:"div",children:[e.jsx(Q,{label:o("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"path-prefix-input"},fullWidth:!0,autoFocus:!0,helperText:h.pathPrefixHint||o("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:h.pathPrefix,onChange:f=>{let S=!1;const R=vo({params:{...h,pathPrefix:f.target.value},blocklets:[l]});m(R),h.type===k.ROUTING_RULE_TYPES.BLOCKLET&&R&&(S=!0),h.type===k.ROUTING_RULE_TYPES.REDIRECT&&!h.url&&(S=!0),h.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!h.url&&(S=!0),h.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!h.responseType||!h.responseBody)&&(S=!0),f.target.value.trim()||(S=!0,m(o("router.validation.pathPrefixRequired"))),S||m("");const P=o("common.slugifyHint",{value:dt(f.target.value)});C({...h,pathPrefix:f.target.value,pathPrefixHint:P,__disableConfirm:S})}}),e.jsx(xt,{params:h,setParams:b,setError:m})]})},confirm:o("router.rule.add.confirm"),cancel:o("common.cancel"),params:{did:"",pathPrefix:"",type:k.ROUTING_RULE_TYPES.REDIRECT,componentId:"",pageGroup:"",redirectCode:302,responseType:"text/plain",responseBody:"",__disableConfirm:!0},onConfirm:d,onCancel:y},c=h=>{h.stopPropagation(),a(v)};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:n,open:c}):e.jsxs(me,{onClick:c,className:"rule-action","data-cy":"action-add-rule",children:[n?e.jsx(ae,{size:16}):e.jsx(Ht,{style:{fontSize:18,marginRight:5}}),o("router.rule.add.title")]}),p&&e.jsx(Ae,{title:p.title,description:p.description,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel,color:"primary"})]})}yn.propTypes={children:r.any};yn.defaultProps={children:null};function Cn({id:t,from:o,children:s}){const{t:l}=V(),{api:n}=Y(),{blocklet:i}=se(),[p,a]=g.useState(!1),[u,x]=g.useState(null),y=i.meta.did,d=i.site.id,v=o.pathPrefix,c=()=>{a(!1),x(null)},h=async()=>{a(!0);try{await n.deleteRoutingRule({input:{id:d,ruleId:t,teamDid:y}})}catch(b){N.error(b.message)}finally{x(null),a(!1)}},C={keyName:v,title:l("router.rule.delete.title"),description:l("router.rule.delete.description",{name:`<b>${v}</b>`}),confirmPlaceholder:l("router.rule.delete.confirm_desc",{name:v}),confirm:l("common.delConfirm"),cancel:l("router.rule.delete.cancel"),onConfirm:h,onCancel:c},m=b=>{b.stopPropagation(),x(C)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:p,open:m}):e.jsxs(me,{onClick:m,className:"rule-action","data-cy":"action-delete-rule",children:[p?e.jsx(ae,{size:16}):e.jsx(mt,{style:{fontSize:18,marginRight:5}}),l("router.rule.delete.title")]}),u&&e.jsx(yr,{keyName:u.keyName,title:u.title,description:u.description,confirmPlaceholder:u.confirmPlaceholder,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}Cn.propTypes={id:r.string.isRequired,from:r.object.isRequired,children:r.any};Cn.defaultProps={children:null};function jn({id:t,from:o,to:s,children:l}){var f,S;const{t:n}=V(),{api:i}=Y(),{blocklet:p}=se(),[a,u]=g.useState(!1),[x,y]=g.useState(null),d=p.meta.did,v=p.site.id,c=o.pathPrefix,h=()=>{u(!1),y(null)},C=async R=>{try{const P=await it(R,n);if(P)throw P;u(!0);const L={id:t,from:{pathPrefix:xe(R.pathPrefix)},to:{type:R.type}};R.type===k.ROUTING_RULE_TYPES.REDIRECT&&(L.to.url=R.url,L.to.redirectCode=R.redirectCode),R.type===k.ROUTING_RULE_TYPES.COMPONENT&&(L.to.did=d,L.to.componentId=R.componentId,L.to.pageGroup=R.pageGroup),R.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(L.to.url=xe(R.url)),R.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(L.to.response={status:200,contentType:R.responseType,body:R.responseBody}),await i.updateRoutingRule({input:{id:v,rule:L,teamDid:d}})}catch(P){N.error(P.message)}finally{u(!1),y(null)}},m={title:n("router.rule.update.title"),description:(R,P,L)=>{const A=B=>{if(it(B,n)){P({...B,__disableConfirm:!0});return}P({...B})};return e.jsxs($,{component:"div",children:[e.jsx(Q,{label:n("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"path-prefix-input"},fullWidth:!0,autoFocus:!0,helperText:R.helperText||n("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:R.pathPrefix,onChange:B=>{let D=!1;R.type===k.ROUTING_RULE_TYPES.REDIRECT&&!R.url&&(D=!0),R.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!R.url&&(D=!0),R.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!R.responseType||!R.responseBody)&&(D=!0),B.target.value.trim()||(D=!0,L(n("router.validation.pathPrefixRequired"))),D||L("");const F=n("common.slugifyHint",{value:dt(B.target.value)});P({...R,pathPrefix:B.target.value,helperText:F,__disableConfirm:D})}}),e.jsx(xt,{params:R,setParams:A,setError:L})]})},confirm:n("router.rule.update.confirm"),cancel:n("router.rule.update.cancel"),color:"primary",params:{did:s.did||"",pathPrefix:c==="/"?c:c.replace(/^\/+/,"").replace(/\/+$/,""),type:s.type||k.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:s.redirectCode||302,componentId:s.componentId||"",pageGroup:s.pageGroup||"",url:s.url||"",responseType:((f=s.response)==null?void 0:f.contentType)||"",responseBody:(((S=s.response)==null?void 0:S.body)||"").replace(/\\"/g,'"'),__disableConfirm:!1},onConfirm:C,onCancel:h},b=R=>{R.stopPropagation(),y(m)};return e.jsxs(e.Fragment,{children:[typeof l=="function"?l({loading:a,open:b}):e.jsxs(me,{onClick:b,className:"rule-action","data-cy":"action-update-rule",children:[a?e.jsx(ae,{size:16}):e.jsx(yo,{style:{fontSize:18,marginRight:5}}),n("router.rule.update.title")]}),x&&e.jsx(Ae,{title:x.title,description:x.description,confirm:x.confirm,color:x.color,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}jn.propTypes={id:r.string.isRequired,from:r.object.isRequired,to:r.object.isRequired,children:r.any};jn.defaultProps={children:null};function vn(t){const{locale:o}=V(),{blocklet:s,recommendedDomain:l}=se(),n=go(l,t.from.pathPrefix,Vt(s,o));return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx("a",{target:"_blank",href:n,rel:"noopener noreferrer",title:n,children:e.jsx(ee,{size:"small",children:e.jsx(So,{})})}),e.jsx(jn,{...t,children:({open:i})=>e.jsx(ee,{size:"small",onClick:i,disabled:t.isProtected,"data-cy":"action-update-rule",children:e.jsx(qt,{})})}),e.jsx(Cn,{...t,children:({open:i})=>e.jsx(ee,{size:"small",onClick:i,disabled:t.isProtected,"data-cy":"action-delete-rule",children:e.jsx(mt,{})})})]})}vn.propTypes={isProtected:r.bool};vn.defaultProps={isProtected:!1};function Uo({group:t,...o}){return t?e.jsx(_e,{type:"reverse",...o,children:t}):null}Uo.propTypes={group:r.string.isRequired};function lt({domain:t,isHttps:o,toUrl:s}){const l=o?"https":"http";let n=s;return ms(n)||(n=`${l}://${t}${s}`),e.jsx(ut,{href:n,target:"_blank",style:{fontSize:14},underline:"hover",children:s},n)}lt.propTypes={domain:r.string.isRequired,toUrl:r.string.isRequired,isHttps:r.bool};lt.defaultProps={isHttps:!1};function yt({hasPermission:t}){const{t:o,locale:s}=V(),l=po(),{blocklet:n,recommendedDomain:i}=se();return n.site.rules.filter(a=>a.to.type!==k.ROUTING_RULE_TYPES.BLOCKLET).map(a=>{var d;let u=null,x=null;a.to.type===k.ROUTING_RULE_TYPES.NONE?u="404":a.to.type===k.ROUTING_RULE_TYPES.REDIRECT?u=a.to.redirectCode:a.to.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE?u="R":a.to.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE?u=e.jsx(br,{sx:{color:"text.secondary",fontSize:"45px"}}):a.to.type===k.ROUTING_RULE_TYPES.COMPONENT&&(x=n.children.find(v=>v.meta.did===a.to.componentId),u="C");const y=a.isProtected?e.jsx(fe,{title:o("blocklet.router.urlLockTooltip"),placement:"top",children:e.jsx("span",{children:e.jsx(ee,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:e.jsx(xr,{style:{fill:l.palette.text.disabled}})})})}):e.jsx(vn,{...a});return[e.jsxs(j,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[e.jsxs(j,{width:{xs:300,md:400},display:"flex",alignItems:"center",children:[e.jsx(j,{className:"component-item__indent",width:28}),typeof u=="object"?u:e.jsx(ps,{children:u}),e.jsxs(j,{sx:{ml:2,flex:1,wordBreak:"break-word"},children:[e.jsxs(j,{style:{color:"#222",fontSize:16},children:[a.to.type===k.ROUTING_RULE_TYPES.NONE&&o("common.page404"),a.to.type===k.ROUTING_RULE_TYPES.REDIRECT&&o("common.redirect"),a.to.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&o("common.rewrite"),a.to.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&((d=k.ROUTING_RESPONSE_TYPES.find(v=>v.value===a.to.response.contentType))==null?void 0:d.text),a.to.type===k.ROUTING_RULE_TYPES.COMPONENT&&O.getDisplayName(x,!0)]}),e.jsxs(j,{display:"flex",alignItems:"center",children:[a.to.type===k.ROUTING_RULE_TYPES.REDIRECT&&e.jsx(lt,{domain:i,toUrl:a.to.url}),a.to.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(lt,{domain:i,toUrl:a.to.url}),a.to.type===k.ROUTING_RULE_TYPES.COMPONENT&&e.jsx(Uo,{group:a.to.pageGroup})]})]})]}),e.jsx(j,{px:2,sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:e.jsx(ut,{href:go(i,a.from.pathPrefix,Vt(n,s)),target:"_blank",style:{fontSize:16},underline:"hover",children:us(a.from.pathPrefix,"/")||"/"})},a.from.pathPrefix),e.jsx(j,{children:t&&e.jsx("div",{style:{textAlign:"right"},children:y})},"actions")]},"rule"),e.jsx(_t,{},"divider")]})}yt.propTypes={hasPermission:r.bool};yt.defaultProps={hasPermission:!1};const mi=Ne(yt,"mutate_blocklets"),fi=Ne(yt,"",Be);function hi(t){const{inService:o}=Y();return o?e.jsx(fi,{...t}):e.jsx(mi,{...t})}function gi({blocklet:t,scrollToComponent:o}={blocklet:null,scrollToComponent:!1}){const s=fs(),{t:l}=V(),n=g.useRef(null),i=g.useMemo(()=>{if(!t||!t.optionalComponents)return null;const p=new URLSearchParams(window.location.search),a=p.get("install-component");if(a){n.current=a,p.delete("install-component"),s(p.toString());const u=t.optionalComponents.find(y=>y.meta.did===a);if(!u)return N.success(l("notification.installComponentError",{did:a})),null;const{meta:x}=u;if(o){const y=document.getElementById(`optional-component-${a}`),d=document.querySelector(".dashboard-main");if(y){const v=y.getBoundingClientRect(),c=d.getBoundingClientRect();d.scrollTo({top:v.top-c.top+d.scrollTop,behavior:"smooth"})}}return x}return null},[t,s,l,o]);return g.useEffect(()=>{var p;n.current&&window.opener&&window.opener.postMessage({blocklet:t,kind:"component-installer"},(p=window.blocklet)==null?void 0:p.appUrl)},[t]),i}function Sn({component:t,remove:o,disabled:s,tip:l,showConfirm:n,hideBtn:i,onCancel:p}){const{t:a}=g.useContext(ye),[u,x]=g.useState(!1),[y,d]=g.useState(null),v=async b=>{x(!0),await o(b.component,b.removeType),x(!1),d(null)},c=s||u,h=()=>{d({title:`${a("common.delete")} ${t.meta.title||t.meta.name}`,description:(b,f)=>e.jsxs($,{component:"div",children:[e.jsx($,{gutterBottom:!0,children:a("blocklet.action.removeComponentDescription")}),e.jsxs(jr,{name:"removeType",value:b.removeType,onChange:S=>f({...b,removeType:S.target.value}),children:[e.jsx(Ot,{value:"keepData",control:e.jsx(to,{}),label:a("blocklet.action.removeComponentKeepData")}),e.jsx(Ot,{value:"complete",control:e.jsx(to,{}),label:a("blocklet.action.removeComponentComplete")})]})]}),confirm:a("common.confirm"),cancel:a("common.cancel"),params:{component:t,removeType:"keepData"},onConfirm:v,onCancel:()=>{d(null),p()}})};g.useEffect(()=>{n?h():(x(!1),d(null))},[n]);const C=e.jsx(xi,{size:"small",disabled:c,onClick:()=>h,"data-cy":"delete-component-btn",children:e.jsx(mt,{disabled:c})}),m=e.jsx(fe,{title:l||a("common.delete"),children:e.jsx("span",{children:C})});return e.jsxs(e.Fragment,{children:[!i&&m,y&&e.jsx(Ae,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]})}Sn.propTypes={component:r.object.isRequired,remove:r.func,onCancel:r.func,disabled:r.bool,showConfirm:r.bool,hideBtn:r.bool,tip:r.string};Sn.defaultProps={remove:async()=>{},disabled:!1,showConfirm:!1,hideBtn:!1,onCancel:()=>{},tip:""};const xi=M(ee)`
|
|
395
|
+
&.Mui-disabled {
|
|
396
|
+
opacity: 0.5;
|
|
397
|
+
}
|
|
398
|
+
`;function Rn({component:t,onStart:o,onStop:s,disabled:l,tip:n}){const{t:i}=g.useContext(ye),[p,a]=g.useState(!1),[u,x]=g.useState(),y=async()=>{a(!0);try{await o(t)}catch(m){N.error(m.message)}a(!1)},d=async()=>{a(!0);try{await s(t)}catch(m){N.error(m.message)}a(!1)},v=l||p,c=["starting","running","stopping"].includes(t.status),h=c?Us:Ds,C=e.jsx(yi,{disabled:v,onClick:()=>{var m;c?x({title:`${i("common.stop")} ${(m=t==null?void 0:t.meta)==null?void 0:m.title}`,description:i("blocklet.action.stopComponentDescription"),confirm:i("blocklet.action.confirmStop"),cancel:i("common.cancel"),onConfirm:()=>(x(null),d()),onCancel:()=>x(null)}):y()},"data-cy":`${c?"stop":"start"}-component-btn`,children:e.jsx(h,{disabled:v})});return[e.jsx(fe,{title:n||i(`common.${c?"stop":"start"}`),children:e.jsx("span",{children:C})},"btn"),u&&e.jsx(Ae,{title:u.title,description:u.description,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel},"connect")]}Rn.propTypes={component:r.object.isRequired,onStart:r.func,onStop:r.func,disabled:r.bool,tip:r.string};Rn.defaultProps={onStart:async()=>{},onStop:async()=>{},disabled:!1,tip:""};const yi=M(ee)`
|
|
399
|
+
&.Mui-disabled {
|
|
400
|
+
opacity: 0.5;
|
|
401
|
+
}
|
|
402
|
+
`;function bn({sourceInfo:t,blocklet:o}){var l;const{t:s}=g.useContext(ye);return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(hs,{type:"success",children:$s(t.source)},"source"),t.source==="registry"&&e.jsx(ut,{href:Ee(t.deployedFrom,"blocklets",((l=o==null?void 0:o.meta)==null?void 0:l.bundleDid)||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:s("blocklet.overview.viewInStore")})]})}bn.propTypes={sourceInfo:r.shape({source:r.string,deployedFrom:r.string}),blocklet:r.object};bn.defaultProps={sourceInfo:{},blocklet:{}};var En={},Ci=Gt;Object.defineProperty(En,"__esModule",{value:!0});var Do=En.default=void 0,ji=Ci(Ft()),vi=e;Do=En.default=(0,ji.default)((0,vi.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward");function Ct({blocklet:t,checkUpgrade:o,hasPermission:s,...l}){const{api:n}=Y(),{t:i}=g.useContext(ye),[p,a]=g.useState(!1),[u,x]=g.useState(""),[y,d]=g.useState(null),[v,c]=g.useState(null);g.useEffect(()=>{d(null),o&&(t.mode,H.BLOCKLET_MODES.DEVELOPMENT)},[t,o]);const h=()=>{a(!1),c(null)},C=async()=>{a(!0);try{const b={did:t.meta.did,version:y.version,storeUrl:y.registryUrl||""};await ze(2e3),await n.upgradeBlocklet({input:b})}catch(b){N.error(`Blocklet upgrade failed: ${Z(b)}`)}finally{a(!1),c(null)}},m={title:`${i("common.upgrade")} ${i("common.blocklet")} ${O.getDisplayName(t)}`,description:i("blocklet.action.upgradeDescription"),confirm:i("blocklet.action.confirmUpgrade"),cancel:i("common.cancel"),onConfirm:C,onCancel:h};return s&&y&&!O.isInProgress(t.status)?e.jsxs(e.Fragment,{children:[e.jsx(_e,{...l,children:t.meta.version}),e.jsx(fe,{title:i("common.updateAvailable",{version:y.version}),children:e.jsx(ee,{size:"small",style:{marginLeft:8},disabled:p,onClick:()=>c(m),children:p?e.jsx(ae,{size:16}):e.jsx(Do,{style:{fontSize:16,color:"red"}})})}),!!u&&e.jsx(N,{variant:"error",message:u,onClose:()=>x("")}),v&&e.jsx(Ae,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]}):e.jsx(_e,{...l,children:t.meta.version})}Ct.propTypes={blocklet:r.object.isRequired,checkUpgrade:r.bool,hasPermission:r.bool};Ct.defaultProps={checkUpgrade:!1,hasPermission:!1};const Si=Ne(Ct,"mutate_blocklets"),Ri=Ne(Ct,"",Be);function bi(t){const{inService:o}=Y();return o?e.jsx(Ri,{...t}):e.jsx(Si,{...t})}const Ei=t=>{var o;return!((o=t==null?void 0:t.meta)!=null&&o.group)},Ti=(t,o)=>t?[{name:o("common.name"),value:t.displayName},{name:o("common.description"),value:t.description},{name:o("common.version"),value:e.jsx(_e,{children:t.version})}]:[],wi=t=>{const{source:o,deployedFrom:s,bundleSource:l}=t;return o?{source:o,deployedFrom:s}:l?l.url?{source:"url",deployedFrom:s||Array.isArray(l.url)?l.url[0]:l.url}:l.store?{source:"registry",deployedFrom:s||Array.isArray(l.store)?l.store[0]:l.store}:{}:{source:"upload",deployedFrom:s}},Pi=(t,o)=>{const s=t.split("/").slice(1);let l=o,n=0;const i=[];for(;l&&n<s.length;){const p=l.children.find(a=>a.meta.did===s[n]);l=p,n++,p&&i.push(p.meta.title)}return i.join(" / ")};function Tn({blocklet:t,depth:o,componentInfo:s,app:l,onClose:n}){var c,h;const{t:i,locale:p}=g.useContext(ye),{deletingBlocklets:a}=Wt();let{status:u}=t;o===1&&a.includes(t.meta.did)&&(u="deleting");const x=`/${t.mountPoint||"/"}`.replace(/\/+/g,"/"),y=C=>C.map(m=>m.name===i("common.did")||m.name===i("blocklet.appId")?e.jsx(Ut,{valueComponent:"div",nameWidth:120,name:m.name,nameFormatter:()=>m.name,children:m.value},m.name):e.jsx(Ut,{valueComponent:"div",nameWidth:120,name:m.name,children:m.value},m.name)),d=s?wi(s):{},v=s?[{name:i("common.name"),value:O.getDisplayName(s,!0)},{name:i("common.version"),value:e.jsx(bi,{blocklet:s,checkUpgrade:!1})},{name:i("common.status"),value:e.jsx(Ro,{isResource:Ei(t),status:u,source:s.source,progress:t.progress})},t.status==="running"?{name:i("blocklet.startedAt"),value:kt(t.startedAt,p)}:null,t.status!=="running"?{name:i("blocklet.stoppedAt"),value:kt(t.stoppedAt,p)}:null,t.installedAt?{name:i("blocklet.installedAt"),value:kt(t.installedAt,p)}:null,O.hasStartEngine(t.meta)?{name:i("common.mountPoint"),value:x}:null,s.meta.group?{name:i("common.group"),value:e.jsx(_e,{type:"success",children:s.meta.group})}:null,{name:i("blocklet.overview.source"),value:e.jsx(bn,{sourceInfo:d,blocklet:t})},{name:i("blocklet.overview.deployedFrom"),value:d.deployedFrom||"-"},{name:i("common.did"),value:e.jsx(uo,{did:s.meta.did,showQrcode:!0})},{name:i("common.author"),value:gs(s.meta.author)},{name:i("common.engine"),value:Ti(s.engine,i).map(({name:C,value:m})=>e.jsx(Ut,{style:{marginBottom:4},nameWidth:120,name:C,children:m},C))},(c=t.dependents)!=null&&c.length?{name:i("common.dependents"),value:e.jsx(j,{children:t.dependents.map(C=>e.jsx(j,{children:`${Pi(C.id,l)} ${C.required?`(${i("common.required")})`:""}`},C.id))})}:null,(h=t.meta.resources)!=null&&h.length?{name:i("common.resource"),value:t.meta.resources.join(", ")}:null].filter(Boolean):[];return s?e.jsx(pt,{open:!0,title:i("common.componentBasicInfo"),showCloseButton:!0,fullWidth:!0,maxWidth:"md",onClose:()=>{n(null)},children:e.jsx(j,{paddingBottom:1.5,children:y(v)},"dialog-wrapper")},"base-info-dialog"):null}Tn.propTypes={blocklet:r.object.isRequired,depth:r.number,app:r.object,componentInfo:r.object,onClose:r.func.isRequired};Tn.defaultProps={depth:0,app:null,componentInfo:null};M(xo)`
|
|
403
|
+
.BaseBadge-badge {
|
|
404
|
+
top: ${t=>t.top*8||6}px;
|
|
405
|
+
right: ${t=>t.right*8||6}px;
|
|
406
|
+
}
|
|
407
|
+
`;M(j)`
|
|
408
|
+
.component-header {
|
|
409
|
+
display: flex;
|
|
410
|
+
align-items: center;
|
|
411
|
+
align-items: flex-end;
|
|
412
|
+
cursor: pointer;
|
|
413
|
+
}
|
|
414
|
+
.component-name {
|
|
415
|
+
color: #222;
|
|
416
|
+
font-size: 16px;
|
|
417
|
+
}
|
|
418
|
+
.component-version {
|
|
419
|
+
color: #999;
|
|
420
|
+
font-size: 12px;
|
|
421
|
+
margin-left: 4px;
|
|
422
|
+
transform: translateY(-1px);
|
|
423
|
+
}
|
|
424
|
+
`;const Ii=t=>{var o;return!((o=t==null?void 0:t.meta)!=null&&o.group)},lo=(t,o)=>{const s=t.split("/").slice(1);let l=o,n=0;const i=[];for(;l&&n<s.length;){const p=l.children.find(a=>a.meta.did===s[n]);l=p,n++,p&&i.push(p.meta.title)}return i.join(" / ")};function ct({blocklet:t,ancestors:o,depth:s,onRemove:l,onStart:n,onStop:i,onRestart:p,getComponentUrl:a,app:u}){var F,I,J;const{t:x}=g.useContext(ye),[y,d]=g.useState(),[v,c]=g.useState(!1),[h,C]=g.useState(!1),[m,b]=g.useState(null),{deletingBlocklets:f}=Wt();let{status:S}=t;s===1&&f.includes(t.meta.did)&&(S="deleting");const R=`/${t.mountPoint||"/"}`.replace(/\/+/g,"/"),P=a(R),L=O.isInProgress(u.status),A=O.isInProgress(t.status);let B="";if(L||A||s===1&&f.includes(t.meta.did))B=x("blocklet.component.tip.stopBlocklet");else if((F=t.dependents)!=null&&F.length){const q=t.dependents.filter(Ce=>Ce.required);if(q.length){const Ce=q.map(Te=>lo(Te.id,u));B=x("blocklet.component.tip.requiredBy",{name:Ce.join(", ")})}}const D=async(...q)=>{C(!0);try{await l(...q)}catch{}C(!1),c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(wn,{display:"flex",py:2,className:"component-item",justifyContent:"flex-start",alignItems:"center",children:[e.jsxs(j,{pl:2,width:{xs:300,md:400},display:"flex",alignItems:"center",children:[e.jsx(vr,{blocklet:t,ancestors:o}),e.jsxs(j,{ml:"16px",children:[e.jsxs(j,{className:"component-header",onClick:()=>d(t),children:[e.jsx(j,{className:"component-name",children:O.getDisplayName(t,!0)}),e.jsx(j,{className:"component-version",children:(I=t==null?void 0:t.meta)==null?void 0:I.version})]}),e.jsxs(j,{display:"flex",alignItems:"center",sx:{mt:"2px",ml:-.5},children:[S!=="unknown"&&e.jsx(Ro,{style:{marginLeft:4},status:S,source:t.source,progress:t.progress}),e.jsx(pr,{style:{marginLeft:4},mode:t.mode||""}),!!((J=t.dependents)!=null&&J.length)&&e.jsx(fe,{title:[`${x("common.dependents")}: `,t.dependents.map(q=>e.jsx(j,{pl:1,children:`${lo(q.id,u)} ${q.required?`(${x("common.required")})`:""}`},q.id))],children:e.jsx(j,{display:"flex",color:"primary.main",ml:1,children:e.jsx(Mt,{icon:"octicon:package-dependents-16"})})})]})]})]},t),At.hasMountPoint(t.meta)&&e.jsx(j,{sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:e.jsx("a",{target:"_blank",href:P,rel:"noopener noreferrer",title:P,children:e.jsx(j,{maxWidth:400,sx:{color:"secondary.main",fontSize:16,px:2},overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",children:xs(R)})})},R),e.jsx("div",{style:{flex:1}}),e.jsxs(j,{display:"flex",alignItems:"center",children:[O.hasStartEngine(t.meta)&&e.jsx(fe,{title:x("common.visit"),children:e.jsx("a",{target:"_blank",href:P,rel:"noopener noreferrer",children:e.jsx(ee,{size:"small",children:e.jsx(So,{})})})}),e.jsx(ht,{blocklet:t,ancestors:o,children:({open:q})=>e.jsx(fe,{title:x("common.config"),children:e.jsx(Bo,{color:"error",badgeContent:"",variant:"dot",invisible:!O.getComponentMissingConfigs(t,o[0]).length,children:e.jsx(ee,{onClick:q,size:"small",children:e.jsx(qt,{})})})},"config")}),e.jsx(Rn,{blocklet:u,component:t,onStart:n,onStop:i,disabled:!["starting","stopping"].includes(u.status)&&O.isInProgress(u.status)}),e.jsx(Sr,{"data-cy":"component-actions",actions:[O.hasStartEngine(t.meta)||Ii(t)?{icon:e.jsx(Cr,{}),text:x("common.detail"),onClick:()=>{d(t)}}:null,{icon:e.jsx(Bs,{}),text:x("common.restart"),onClick:()=>{b({title:`${x("common.restart")} ${t.meta.title}`,description:x("blocklet.action.restartDescription"),confirm:x("blocklet.action.confirmRestart"),cancel:x("common.cancel"),onConfirm:async()=>{C(!0),await p(t),C(!1)},onCancel:()=>b(null)})},disabled:h||L||A||t.status!=="running"},{icon:e.jsx(mt,{}),text:x("common.delete"),onClick:()=>{c(!0)},disabled:L||A||!!B,tip:B}].filter(Boolean)})]},"actions")]},"group-not-gateway-box"),e.jsx(_t,{},"line"),e.jsx(Tn,{componentInfo:y,onClose:d,blocklet:t,app:u,depth:s}),e.jsx(Sn,{blocklet:u,component:t,remove:D,onCancel:()=>c(!1),hideBtn:!0,showConfirm:v},"delete-component"),m&&e.jsx(Ae,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel},"confirm-setting")]})}ct.propTypes={blocklet:r.object.isRequired,ancestors:r.array,depth:r.number,onRemove:r.func,onStart:r.func,onStop:r.func,onRestart:r.func,getComponentUrl:r.func,app:r.object};ct.defaultProps={ancestors:[],depth:0,onRemove:()=>{},onStart:()=>{},onStop:()=>{},onRestart:()=>{},getComponentUrl:()=>window.location.origin,app:null};const Bo=M(xo)`
|
|
425
|
+
.BaseBadge-badge {
|
|
426
|
+
top: ${t=>t.top*8||6}px;
|
|
427
|
+
right: ${t=>t.right*8||6}px;
|
|
428
|
+
}
|
|
429
|
+
`,wn=M(j)`
|
|
430
|
+
.component-header {
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
align-items: flex-end;
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
}
|
|
436
|
+
.component-name {
|
|
437
|
+
color: #222;
|
|
438
|
+
font-size: 16px;
|
|
439
|
+
}
|
|
440
|
+
.component-version {
|
|
441
|
+
color: #999;
|
|
442
|
+
font-size: 12px;
|
|
443
|
+
margin-left: 4px;
|
|
444
|
+
transform: translateY(-1px);
|
|
445
|
+
}
|
|
446
|
+
`;function Pn({meta:t,dependencies:o,logoUrl:s,setInstallComponentMeta:l}){const n=Y(),{t:i}=V(),p=()=>{l(t)},a=40;return e.jsxs(ki,{id:`optional-component-${t.did}`,children:[e.jsxs("div",{className:"cell",children:[e.jsxs("div",{className:"component-left",children:[e.jsx("img",{className:"component-logo",src:s,onError:()=>`${n.imgPrefix}/blocklet.png`,alt:t.title,style:{width:a,height:a}}),e.jsxs("div",{className:"component-header",children:[e.jsx("div",{className:"component-name",children:t.title}),e.jsx("div",{className:"component-version",children:t.version})]}),e.jsx(fe,{title:[`${i("common.dependents")}: `,o.map(u=>e.jsx(j,{pl:1,children:`${u.parentTitle} ${u.required?`(${i("common.required")})`:""}`},u.parentName+u.mount_point))],children:e.jsx(j,{display:"flex",color:"primary.main",ml:1,children:e.jsx(Mt,{icon:"octicon:package-dependents-16"})})})]}),e.jsx("div",{style:{flex:1}}),e.jsx(ys,{onClick:p,startIcon:e.jsx(Mt,{icon:"ph:download-simple-bold"}),children:i("common.install")})]}),e.jsx(_t,{class:"line"},"line")]})}Pn.propTypes={meta:r.object.isRequired,logoUrl:r.string,setInstallComponentMeta:r.func.isRequired,dependencies:r.arrayOf(r.shape({parentDid:r.string,parentName:r.string,parentPoint:r.string,required:r.bool}))};Pn.defaultProps={logoUrl:"",dependencies:[]};const ki=M(wn)`
|
|
447
|
+
.line {
|
|
448
|
+
opacity: 0.5;
|
|
449
|
+
}
|
|
450
|
+
.cell {
|
|
451
|
+
display: flex;
|
|
452
|
+
width: 100%;
|
|
453
|
+
flex-direction: row;
|
|
454
|
+
align-items: center;
|
|
455
|
+
justify-content: flex-start;
|
|
456
|
+
padding-top: 16px;
|
|
457
|
+
padding-bottom: 16px;
|
|
458
|
+
}
|
|
459
|
+
.component-left {
|
|
460
|
+
display: flex;
|
|
461
|
+
flex-direction: row;
|
|
462
|
+
justify-content: flex-start;
|
|
463
|
+
align-items: center;
|
|
464
|
+
}
|
|
465
|
+
.component-logo {
|
|
466
|
+
width: 40px;
|
|
467
|
+
margin-left: 16px;
|
|
468
|
+
opacity: 0.5;
|
|
469
|
+
border-radius: 10px;
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
}
|
|
472
|
+
.component-header {
|
|
473
|
+
opacity: 0.5;
|
|
474
|
+
margin-left: 12px;
|
|
475
|
+
display: flex;
|
|
476
|
+
align-items: center;
|
|
477
|
+
align-items: flex-end;
|
|
478
|
+
cursor: pointer;
|
|
479
|
+
}
|
|
480
|
+
.component-name {
|
|
481
|
+
opacity: 0.5;
|
|
482
|
+
color: #222;
|
|
483
|
+
font-size: 16px;
|
|
484
|
+
}
|
|
485
|
+
.component-version {
|
|
486
|
+
opacity: 0.8;
|
|
487
|
+
color: #999;
|
|
488
|
+
font-size: 12px;
|
|
489
|
+
margin-left: 4px;
|
|
490
|
+
transform: translateY(-1px);
|
|
491
|
+
}
|
|
492
|
+
`;function In({blocklet:t,onUpdate:o,getComponentUrl:s,...l}){var w;const{t:n}=g.useContext(ye),{api:i,inService:p,info:a}=Y(),{addDeletingDid:u,removeDeletingDid:x,matchDeletingDid:y}=Wt(),[d,v]=g.useState(!1),[c,h]=g.useState(null),[C,m]=g.useState(null),[b,f]=g.useState(!1),[S,R]=g.useState(null),P=t&&t.structVersion!==k.APP_STRUCT_VERSION,[L,A]=g.useState(!1),B=[...t.children];t.meta.group!=="gateway"&&B.unshift(t),y(B.map(T=>T.meta.did));const D=async()=>{if(!d){v(!0);try{const{updateId:T,updateList:_}=(await i.checkComponentsForUpdates({input:{did:t.meta.did}})).preUpdateInfo||{};if(v(!1),!T){N.info(n("blocklet.component.noUpdate"));return}const le=[];O.forEachChildSync(t,(te,{id:he,ancestors:ge})=>{const je=_.find(ve=>ve.id===he);if(je){const ve=ge.slice(1).concat(te).map(K=>K.meta.title||K.meta.name).join(" / "),jt=(ge[1]||te).meta.did;le.push({groupId:jt,name:ve,version:te.meta.version,newVersion:je.meta.version})}});const G={};le.forEach(te=>{G[te.groupId]?te.disabled=!0:G[te.groupId]=!0}),h({params:{updateId:T},list:le,checks:G,hasChecks:!0})}catch(T){v(!1),N.error(Z(T))}}},F=async()=>{if(!d)try{v(!0);const T=Object.keys(c.checks).filter(le=>c.checks[le]),_={updateId:c.params.updateId,rootDid:t.meta.did,selectedComponents:T};await i.upgradeComponents({input:_}),v(!1),h(null),A(null)}catch(T){v(!1),N.error(Z(T))}},I=async(T,_)=>{u(T.meta.did);try{await i.deleteComponent({input:{did:T.meta.did,keepData:_==="keepData",rootDid:t.meta.did}}),await ze(800)}catch(le){N.error(Z(le)),x(T.meta.did)}},J=async T=>{try{await i.startBlocklet({input:{did:t.meta.did,componentDids:[T.meta.did]}}),await ze(800)}catch(_){N.error(Z(_))}},q=async T=>{try{await i.stopBlocklet({input:{did:t.meta.did,componentDids:[T.meta.did]}}),await ze(800)}catch(_){N.error(Z(_))}},Ce=async T=>{try{await i.restartBlocklet({input:{did:t.meta.did,componentDids:[T.meta.did]}}),await ze(800)}catch(_){N.error(Z(_))}},Te=(T,_)=>{const{checked:le}=T.target;h(G=>{const te=Object.entries(G.checks).reduce((ge,[je,ve])=>(ge[je]=_===je?le:ve,ge),{}),he=Object.values(te).includes(!0);return{...G,checks:te,hasChecks:he}})};Cs(D);const we=gi({blocklet:t,scrollToComponent:!0}),Le=S||we;return e.jsxs(Ui,{component:"div",...l,children:[e.jsxs(Di,{display:"flex",children:[e.jsxs(Bi,{flexDirection:"row",className:"title",display:"flex",alignItems:"center",children:[B!=null&&B.length?`${n("common.components")} (${B.length})`:`${n("common.components")}`,!P&&e.jsx(Nt,{permission:p?"":"mutate_blocklets",role:p?Be:[],children:e.jsx(Jt,{children:e.jsx(Bo,{top:1.2,right:.4,color:"error",badgeContent:"",variant:"dot",invisible:!L,children:e.jsxs(X,{disabled:d||O.isInProgress(t.status),color:"secondary",onClick:()=>{D()},"data-cy":"check-for-updates",children:[e.jsx(j,{ml:.5,mr:.5,display:"flex",children:d?e.jsx(ae,{size:16}):e.jsx(bo,{style:{fontSize:"1em"}})}),n("blocklet.component.checkUpdateTitle")]})})})})]}),e.jsx(Nt,{permission:p?"":"mutate_blocklets",role:p?Be:[],children:e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(yn,{children:({open:T})=>e.jsxs(X,{disabled:d||O.isInProgress(t.status),variant:"text",color:"primary","data-cy":"add-rule",className:"sm-hide-icon",onClick:T,children:[e.jsx(Jn,{style:{fontSize:"1.3em",marginRight:4}}),n("router.rule.add.title")]})}),!P&&e.jsx(xn,{blocklet:t,serverVersion:a.version,children:({open:T})=>e.jsxs(X,{disabled:d||O.isInProgress(t.status),variant:"text",color:"primary","data-cy":"add-component",className:"sm-hide-icon",onClick:T,children:[e.jsx(Jn,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.component.add")]})}),!P&&e.jsx(ht,{blocklet:t,ancestors:[],children:({open:T})=>e.jsx(fe,{title:`${n("blocklet.component.container")}${n("common.config")}`,children:e.jsx(ee,{onClick:T,size:"small",color:"primary",children:e.jsx(qt,{style:{fontSize:18}})})},"config")})]})})]}),B!=null&&B.length?e.jsxs(e.Fragment,{children:[e.jsxs(j,{mt:2,children:[t.meta.group!=="gateway"&&e.jsx(ct,{blocklet:t,app:t,onRemove:I,onStart:J,onStop:q,onRestart:Ce,getComponentUrl:s},`0-${t.meta.did}`),t.children.map(T=>e.jsx(ct,{depth:1,blocklet:T,ancestors:[t],app:t,onRemove:I,onStart:J,onStop:q,onRestart:Ce,getComponentUrl:s},`1-${T.meta.did}`))]},`top-blocklet-${t.meta.did}`),(w=t.optionalComponents)==null?void 0:w.map(T=>e.jsx(wn,{children:e.jsx(Pn,{setInstallComponentMeta:R,...T})},T.meta.did))]}):e.jsx(j,{mt:8,children:e.jsx(Is,{children:n("blocklet.component.noComponent")})}),!!t.site.rules.length&&e.jsx(j,{sx:{mt:0,".component-item__indent":{pl:2,width:0}},children:e.jsx(hi,{})}),!!c&&e.jsx(Wn,{open:!0,fullWidth:!0,children:e.jsxs(j,{paddingY:1.5,children:[e.jsx(Hn,{children:n("blocklet.component.updateTitle")}),e.jsx(j,{component:Yn,py:4,children:c.list.map(T=>e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(js,{checked:c.checks[T.groupId],onChange:_=>Te(_,T.groupId),style:{marginLeft:T.disabled?16:0},defaultChecked:!0,disabled:T.disabled}),e.jsxs(j,{flexGrow:1,mt:3,children:[e.jsx(j,{item:!0,xs:8,children:T.name}),T.version&&e.jsxs(nt,{fontSize:"h6.fontSize",container:!0,spacing:2,alignItems:"center",children:[e.jsx(nt,{item:!0,xs:3,children:T.version}),e.jsx(nt,{item:!0,xs:1,children:e.jsx(Ps,{style:{fontSize:"0.9em"}})}),e.jsx(nt,{item:!0,xs:3,children:e.jsx(j,{color:"secondary.main",children:T.newVersion})})]})]},`${T.name}-${T.newVersion}`)]},T.name))}),e.jsxs(vs,{style:{padding:"8px 24px 24px"},children:[e.jsx(X,{onClick:()=>{h(null)},children:n("common.cancel")}),e.jsxs(X,{onClick:T=>{T.stopPropagation(),F()},color:"primary",disabled:d||!c.hasChecks,variant:"contained",autoFocus:!0,children:[d&&e.jsx(ae,{size:16}),n("common.update")]})]})]})}),!!C&&e.jsx(Wn,{open:!0,fullWidth:!0,onClose:()=>m(!1),children:e.jsxs(j,{paddingY:1.5,children:[e.jsx(Hn,{children:n("common.configuration")}),e.jsx(Yn,{children:e.jsx(j,{py:2,children:e.jsx(Ot,{control:e.jsx(Rr,{checked:b,onChange:T=>f(!!T.target.checked)}),label:n("blocklet.component.showContainer")})})})]})}),e.jsx(gt,{selectedMeta:Le,blocklet:t,showDialog:!!Le,setShowDialog:()=>R(null)})]})}In.propTypes={blocklet:r.object.isRequired,onUpdate:r.func,getComponentUrl:r.func};In.defaultProps={onUpdate:()=>{},getComponentUrl:()=>window.location.origin};const Ui=M.div`
|
|
493
|
+
.title {
|
|
494
|
+
font-size: 1.2rem;
|
|
495
|
+
font-weight: bold;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@keyframes showDelay {
|
|
499
|
+
0% {
|
|
500
|
+
opacity: 0;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
100% {
|
|
504
|
+
opacity: 1;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.component-item {
|
|
509
|
+
animation: showDelay 0.75s ease 1;
|
|
510
|
+
}
|
|
511
|
+
`,Di=M(j)`
|
|
512
|
+
${t=>t.theme.breakpoints.up("sm")} {
|
|
513
|
+
flex-direction: row;
|
|
514
|
+
justify-content: space-between;
|
|
515
|
+
align-items: center;
|
|
516
|
+
}
|
|
517
|
+
${t=>t.theme.breakpoints.down("sm")} {
|
|
518
|
+
flex-direction: column;
|
|
519
|
+
justify-content: flex-end;
|
|
520
|
+
align-items: flex-end;
|
|
521
|
+
.sm-hide-icon > svg {
|
|
522
|
+
display: none;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
`,Bi=M(j)`
|
|
526
|
+
${t=>t.theme.breakpoints.down("sm")} {
|
|
527
|
+
width: 100%;
|
|
528
|
+
justify-content: space-between;
|
|
529
|
+
}
|
|
530
|
+
`;function No(t){const{locale:o}=g.useContext(ye),{blocklet:s,recommendedDomain:l}=er(),n=i=>Ss({blocklet:s,domain:{value:l},mountPoint:i,params:Vt(s,o)});return e.jsx(In,{blocklet:s,getComponentUrl:n,...t})}No.propTypes={};No.defaultProps={};export{No as default};
|