@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
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
import{bS as Wo,j as e,aL as Vt,aM as _t,q as z,Q as j,az as me,P as r,A,bm as W,r as g,f as ye,br as qe,b as K,hJ as po,hK as uo,aP as Hn,V as Nt,cl as Ne,n as O,hL as Ho,K as Q,gR as Yo,bO as Le,aX as xe,aW as ut,hM as Te,M as fe,a3 as $,D as qt,F as k,bp as Ko,Z as We,a0 as Yn,b0 as Jo,fM as Qo,fN as Zo,C as ie,fh as Xo,y as mo,aw as at,a2 as Ee,x as Lt,hN as $o,hO as es,B as Z,bc as fo,H as Wt,hP as ts,m as X,a4 as ns,eI as os,W as ho,$ as go,al as ss,w as rs,J as xo,R as Ve,X as is,hQ as yo,U as ue,aB as as,aC as ls,aD as cs,i as mt,ay as Co,hR as ds,cI as ps,bh as us,hk as ms,hS as fs,aA as Kn,cF as hs,hT as gs,ae as Oe,aK as jo,bQ as Ht,cn as xs,hU as ys,b7 as Cs,z as js,aY as Ot,T as vs,bK as we,aO as _e,au as Ut,dN as Ss,gn as Ft,hV as Mt,gp as Gt,bs as vo,fY as zt,aG as Rs,dV as bs,hW as Ts,aZ as Es,G as st,gr as ws,hX as Ps,bP as Is}from"./index-Boqyvc8Q.js";import{d as Jn}from"./Add-DOwN6I9N.js";import{a as ks,R as it,F as Us,L as Bs,d as Yt,b as Kt}from"./line-DdSLBn8H.js";import{C as Ds,A as As,d as Ns}from"./agreement-DBRJClMM.js";import{E as Ls}from"./index-BXmzbebA.js";import{b as Os,a as Fs,c as Ms,u as Jt,R as Gs}from"./actions-ByUCXaaH.js";import{S as zs}from"./switch-control-D1Iqbf5D.js";import{u as Vs}from"./detail-CaMUtLL5.js";import{d as So}from"./Edit-B1ySEana.js";import{T as _s}from"./index-zUZPbg2I.js";import{T as qs,M as Ws,t as Hs}from"./table-icons-CB9vK-gH.js";import{C as Qn}from"./click-to-copy-CBs5PKxt.js";import{T as Y}from"./TextField-sj2mcEXD.js";import{d as Qt}from"./Link-DN_Lz3rV.js";import{c as Ys,C as Ks,a as Js,b as Qs,D as Zs,A as Xs,B as $s,d as er,S as tr}from"./item-BdJl6I8q.js";import{u as nr,a as or,P as Ro,L as Zn,A as sr,S as rr}from"./index-Bvs8qR9r.js";import{u as bo,t as ir}from"./toUpper-D0HPBfn5.js";import{u as oe,a as ar}from"./team-rrZYIohT.js";import{c as lr,d as cr,a as dr,e as pr,f as ur,g as Xn,h as mr,i as $n}from"./spaces-CGO2dSgv.js";import{d as fr}from"./EditIcon-BQGlXOR3.js";import{d as hr}from"./Done-DaMxTX7e.js";import{C as gr}from"./Google-D2cPndsH.js";import{I as xr,B as yr}from"./install-from-url-Cnfp9xqR.js";import{a as eo}from"./api-BdOqJGVs.js";import{v as To,a as lt}from"./util-CRUZQ4-B.js";import{P as Cr,u as jr}from"./use-blocklet-info-for-connect-did-spaces-YWN8QaVT.js";import{D as vr}from"./DeleteOutline-C-1A8rVu.js";import{S as to}from"./index-RlfSCcPa.js";import{d as Sr}from"./ArrowDropDown-CEsdzzcK.js";import{_ as Rr}from"./useLocalStorage-BNvbpN9F.js";import{d as br}from"./LockIcon-mC00ojRt.js";import{d as ft}from"./Delete-h8Ye2r4b.js";import{d as Eo}from"./Launch-BIqLZtET.js";import{C as Tr}from"./delete-confirm-Da1BomBl.js";import{W as He}from"./tag-CANB-Fll.js";import{d as Er}from"./InfoOutlined-BUn5fKCT.js";import{R as wr,b as no,B as wo}from"./url-evaluation-DymLev_N.js";import{B as Pr}from"./bundle-avatar-DzcvR6DI.js";import{A as Ir}from"./actions-xngcxvp5.js";import{I as Bt}from"./index-B6ReOJJN.js";import{a as kr}from"./index-D81FDm0a.js";import"./ButtonGroup-CKY0O7tT.js";import"./getValidReactChildren-B_HEoXEd.js";import"./index-DC46OSan.js";import"./index-DycwPjM3.js";import"./MoreVert-BCR8irtL.js";import"./app-avatar-DEqDSBYG.js";import"./Breadcrumbs-f87TWJgq.js";import"./FilterList-DKFhXHd2.js";import"./Select-CPvSg7uW.js";import"./InputLabel-BjbeXM2B.js";import"./LastPage-DXu9ZGZF.js";import"./slicedToArray-BwJA6b7k.js";import"./Search-5iZBDNjz.js";import"./ChevronLeft-DRzRLgnp.js";import"./ChevronRight-B2YICLYm.js";import"./DeleteOutline-ClZ-ABF-.js";import"./redux-07bmubSg.js";import"./Skeleton-B4-1c0OT.js";import"./InputAdornment-DHLm1mFN.js";import"./memoize-one.esm-BdPwpGay.js";import"./index-eGpwmK92.js";import"./preact.module-B1z5cdvs.js";import"./Close-D9SKZkJ7.js";import"./lottie-BYxFXW-g.js";import"./Stepper-DpooXZzV.js";import"./index--Q6KdM7v.js";const Ur=Wo(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 Zt={},Br=_t;Object.defineProperty(Zt,"__esModule",{value:!0});var Po=Zt.default=void 0,Dr=Br(Vt()),Ar=e;Po=Zt.default=(0,Dr.default)((0,Ar.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 Xt({children:t,...o}){const{t:s}=z(),{updateAutoCheckUpdate:l,autoCheckUpdate:n}=Vs(),i=async()=>{try{const a=!(n!=null&&n.enabled);await l({enabled:a}),A.success(s(a?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(a){A.error(a.message)}},p=!!(n!=null&&n.enabled);return e.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(me,{title:s("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(zs,{checked:p,onChange:i,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}Xt.propTypes={children:r.any};Xt.defaultProps={children:null};const Nr=(t,o)=>{let{description:s}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||Ho(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 ct({blocklet:t,ancestors:o}){const s=W(),{inService:l}=s,{t:n}=g.useContext(ye),i=[...o.map(f=>f.meta.did),t.meta.did],p=()=>A.success(n("blocklet.config.changedTip")),a=f=>Dt(f,t,o);if(qe(t.status)||t.status==="unknown"&&qe(t.status))return null;const u=async f=>{if(!f.key.trim()||!f.value.trim()){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")||f.key.startsWith("COMPONENT_")){A.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){A.error(Q(S))}},x=async(f,S)=>{if(f.required&&(!f.key.trim()||!f.value.trim())){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")&&!K.BLOCKLET_CONFIGURABLE_KEY[f.key]){A.error(n("blocklet.config.environment.invalidKey"));return}if(f.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const P=Yo(f);if(P){A.error(P);return}}const R=[{...f,value:f.secure&&f.value==="__encrypted__"?"":f.value}];if(f.key!==S.key){if(!Dt(f,t,o)){A.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){A.error(Q(P))}},y=async f=>{if(f.required){A.error(n("blocklet.config.environment.deleteForbidden"));return}if(!Dt(f,t,o)){A.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){A.error(Q(S))}},d=(t.configs||[]).filter(f=>!K.BLOCKLET_CONFIGURABLE_KEY[f.key]),v=po(o[0],t),c=uo(t,o[0]),h=d.map(f=>({...f,value:Object.values(K.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(Qn,{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(oo,{children:e.jsx(Y,{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(Qn,{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(oo,{children:[e.jsx(Y,{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}),Nr(R,n)]})}}];return e.jsxs(Lr,{children:[!!c.length&&e.jsx(Hn,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),C&&e.jsx(Hn,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Nt,{permission:l?"":"mutate_blocklets",role:l?Ne:[],children:f=>e.jsx(qs,{className:"config-table",children:e.jsx(Ws,{title:e.jsx("h4",{children:n("common.environment")}),columns:b(),icons:{...Os,...Hs},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:{}})})})]})}ct.propTypes={blocklet:r.object.isRequired,ancestors:r.array};ct.defaultProps={ancestors:[]};const Lr=O.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
|
-
`,oo=O.div`
|
|
54
|
-
height: 60px;
|
|
55
|
-
`;function ht({blocklet:t,ancestors:o,hasPermission:s,...l}){const{t:n}=z(),{api:i}=W(),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"&&qe(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=Q(m),A.error(m.message),m}},h=C=>{d(n("common.slugifyHint",{value:ut(C)}))};return e.jsx(Gr,{component:"div",...l,children:e.jsx(j,{mt:3,children:e.jsx(ks,{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 Or=Le(ht,"mutate_blocklets"),Fr=Le(ht,"",Ne);function Mr(t){const{inService:o}=W();return o?e.jsx(Fr,{...t}):e.jsx(Or,{...t})}ht.propTypes={blocklet:r.object.isRequired,ancestors:r.array,hasPermission:r.bool};ht.defaultProps={ancestors:[],hasPermission:!1};const Gr=O.div``;function gt({blocklet:t,ancestors:o,children:s}){const[l,n]=g.useState(""),{t:i}=z(),p=!!o.length,[a,u]=g.useState(Te(t==null?void 0:t.meta)?"settings":"environments"),x=p?fe(t,!0):i("blocklet.component.container");if(qe(t.status)||t.status==="unknown"&&qe(t.status))return null;const y=()=>{n(!1)},d=b=>{b.stopPropagation(),n(!0)},v={settings:Te(t.meta)&&{label:i("blocklet.component.setting"),value:"settings",component:e.jsx(Mr,{blocklet:t,ancestors:o})},environments:{label:i("common.environment"),value:"environments",component:e.jsx(ct,{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($,{onClick:d,"data-cy":"action-config-component",children:e.jsx(So,{})}),l&&e.jsx(zr,{open:!0,fullWidth:!0,maxWidth:"md",title:x,onClose:y,PaperProps:{style:{minHeight:"auto"}},children:p?e.jsxs(j,{mt:1,children:[e.jsx(_s,{tabs:h,current:a,onChange:C,scrollButtons:"auto"}),m.component]}):e.jsx(ct,{blocklet:t,ancestors:o})})]}gt.propTypes={blocklet:r.object.isRequired,ancestors:r.array,children:r.any};gt.defaultProps={ancestors:[],children:null};const zr=O(qt)`
|
|
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:so}=k,Vr=({mode:t,previousMode:o}={})=>t===so.SERVERLESS||o===so.SERVERLESS;var Io={isInServerlessMode:Vr};function _r(){const[t,o]=g.useState(null),{blocklet:s}=oe();return g.useEffect(()=>{o(lr(s))},[s]),{storageEndpoint:t}}const ko=g.createContext({}),{Provider:qr,Consumer:el}=ko;function $t({children:t}){const[o,s]=g.useState(!1),[l,n]=g.useState(null),{blocklet:i,actions:{refreshBlocklet:p}}=oe(),{storageEndpoint:a}=_r(),{api:u}=W();Ko(async()=>{try{if(s(!0),Yn.isEmpty(a)){n(null);return}const c=await cr(a);n(c)}catch(c){console.error(c),A.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:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:c}]}}),p()};g.useEffect(()=>{async function c(){if(!l)return;const h=await dr(l.endpoint,l.name),C=Yn.merge(l,{name:h});n(C)}c()},[]);const v=!!(a&&l);return e.jsx(qr,{value:{loading:o,spaceGateway:l,deleteSpaceGateway:x,updateSpaceGateway:y,storageEndpoint:a,settingStorageEndpoint:d,hasStorageEndpoint:v},children:t})}$t.propTypes={children:We.node.isRequired};$t.defaultProps={};function en(){return g.useContext(ko)}const tn={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 nn({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(Jo,{open:l,anchorEl:i.current,onClose:()=>n(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(gr,{color:o,onChange:d=>a(d.hex)})})]});return t?y:x}nn.propTypes=tn;function on({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(Y,{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})}on.propTypes=tn;on.defaultProps={componentProps:{}};function sn({editing:t,value:o,onChange:s,componentProps:l,...n}){const{blocklet:i}=l,p=o==="auto"?Qo.getPassportColorFromDid(i.appDid):o;return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Zo({title:"Owner",issuer:fe(i),issuerDid:i.appDid,ownerName:"Your Name",ownerDid:i.appDid,preferredColor:o||"auto"})}}),e.jsx(nn,{...n,editing:t,value:t?p:o,onChange:s,componentProps:l})]})}sn.propTypes={...tn,componentProps:r.shape({blocklet:r.object.isRequired}).isRequired};sn.defaultProps={};const Wr={input:on,color:nn,passport:sn,uploader:t=>e.jsx(Bs,{...t.componentProps})};function Hr(t,{editing:o=!1}){const{componentType:s="input",render:l,renderFormItem:n}=t;return o&&n?n:!o&&l?l:Wr[s==null?void 0:s.toLowerCase()]}function rn({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,N={...y,[S]:b};L&&d(N),n({[S]:b},{allValues:N,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(Yr,{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 N=!!(u&&b===u.key),D=C(m,{editing:N}),B=Hr(m,{editing:N}),F={inputProps:{"data-cy":"schema-form-item-component"},key:b,description:f,editing:N,value:D,onChange:(I,H="change")=>c(m,I,H),componentProps:L};return e.jsxs(j,{className:"form-item",children:[!R&&e.jsxs(j,{className:"form-item-label",style:{color:S&&!D?"#ff0000":"#333"},children:[f,S&&e.jsx(it,{})]}),e.jsxs(j,{className:"form-item-body",children:[e.jsx(j,{className:"form-item-input",sx:{textAlign:R?"center":"left"},children:e.jsx(B,{...F})}),!R&&e.jsx(j,{className:"form-item-action",children:N?e.jsxs(e.Fragment,{children:[e.jsx($,{"data-cy":"schema-form-item-confirm",onClick:()=>{c(m,D,"confirm")},disabled:p||o,size:"large",children:o?e.jsx(ie,{size:24}):e.jsx(hr,{})}),e.jsx($,{"data-cy":"schema-form-item-cancel",onClick:()=>{c(m,v.current,"cancel")},disabled:p||o,size:"large",children:e.jsx(Xo,{})})]}):e.jsx($,{"data-cy":"schema-form-item-edit",onClick:()=>{c(m,y[b],"edit")},disabled:p||u,size:"large",children:e.jsx(fr,{})})})]})]},b)})})}rn.propTypes={schema:r.array.isRequired,loading:r.bool,onChange:r.func.isRequired,value:r.object,defaultValue:r.object,style:r.object,disabled:r.bool};rn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const Yr=O(Us)``;function an({meta:t,onCancel:o,mode:s,handlePaySuccess:l}){const{t:n,locale:i}=z(),{info:p}=W(),a=mo(p),[u,x]=g.useState(null),y=new URL(t==null?void 0:t.registryUrl).origin,d=fe({meta:t}),v=async(h,C)=>{const m=({downloadTokenList:S})=>{l({downloadTokenList:S})},b=S=>{A.error(S),o(S)};function f(S){return es(()=>eo.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}=$o(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{eo.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:at.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:at.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]})}an.propTypes={...Ys,handlePaySuccess:r.func,mode:r.oneOf(["verify","purchase"]).isRequired};an.defaultProps={handlePaySuccess:()=>{}};const ln=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(Ks,{action:l,onNext:null,onSelect:a})}):e.jsx(an,{...o,mode:l})});ln.propTypes={mode:r.oneOf(["both","verify","purchase"]).isRequired,ref:r.any};ln.defaultProps={ref:{}};const Kr=ln;function Jr({...t}){return e.jsx(Z,{className:"bottom-button",variant:"contained",color:"primary",...t})}function cn({key:t}={key:"sm"}){const o=fo();return Wt(o.breakpoints.down(t))}function dn({blocklet:t,onStartNow:o,children:s,disabled:l}){const{t:n}=z(),i=cn();return!t||ts(t.meta)?e.jsx(Qr,{children:s}):e.jsxs(Zr,{isMobile:i,children:[e.jsx(Jr,{className:"start-now",variant:"contained",color:"primary",disabled:l,onClick:()=>o(),children:n("setup.startNow")}),e.jsx(j,{display:"flex",alignItems:"center",children:s})]})}dn.propTypes={blocklet:r.object,onStartNow:r.func,children:r.any,disabled:r.bool};dn.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Qr=O(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
|
-
`,Zr=O(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 Uo=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/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5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cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Uo.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Bo(){const{t}=z();return e.jsx(j,{children:e.jsxs(j,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Uo,{style:{width:200,height:250}}),e.jsx(X,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.providerForStorage")})]})})}Bo.propTypes={};function pn({spaceGateway:t,onDeleteSpace:o}){const{t:s}=z(),[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),A.error(`${s("storage.spaces.gateway.delete.failed")}: ${Q(y)}`)}finally{p(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx($,{size:"small",onClick:x=>a(x,!0),children:e.jsx(vr,{})}),e.jsx(ns,{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)})]})}pn.propTypes={onDeleteSpace:r.func,spaceGateway:r.shape({name:r.string.isRequired,url:r.string.isRequired,protected:r.bool}).isRequired};pn.defaultProps={onDeleteSpace:()=>{}};var Do=function(o){return e.jsx("svg",{...o,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Do.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function un({spaceGateway:t,connected:o,onDisconnect:s,...l}){const n=cn(),{t:i}=z(),p=async()=>{try{await s(),A.success(i("storage.spaces.gateway.delete.succeeded",{name:t.name}))}catch(a){console.error(a),A.error(Q(a))}};return e.jsxs(Xr,{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(Cr,{alt:t.did,src:pr(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(X,{color:o?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:t.name}),e.jsx(os,{label:e.jsxs(e.Fragment,{children:[e.jsx(Do,{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(X,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(ho,{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(pn,{spaceGateway:t,onDeleteSpace:p})})})]}),e.jsx(j,{className:"selected-container selected",children:e.jsx(go,{className:"selected-icon"})})]})}un.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:We.bool,onDisconnect:We.func};un.defaultProps={connected:!1,onDisconnect:()=>{}};const Xr=O(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 $r(){const{t}=z(),{spaceGateway:o,settingStorageEndpoint:s}=en();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(X,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.spaces.connected.title")})}),e.jsx(j,{children:e.jsx(un,{style:{marginTop:"12px"},spaceGateway:o,connected:!0,onDisconnect:()=>s(null)},o.endpoint)})]})}function mn({onConnect:t,...o}){const{blocklet:s}=oe(),{info:l}=W(),{t:n,locale:i}=z(),[p,a]=g.useState(""),[u,x]=g.useState(!1),[y,d]=g.useState(!1),[v,c]=g.useState(""),h=jr({blocklet:s}),C=mo(l),{storageEndpoint:m}=en(),[b,f]=g.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,prefix:"/api/did",checkFn:at.create({baseURL:Ee(window.location.origin,ss())}).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(X,{gutterBottom:!0,children:n("storage.spaces.provideNFT.success")})},onClose:()=>{f(B=>({...B,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(X,{gutterBottom:!0,children:n("storage.spaces.authorize.success")})},onClose:()=>{R(B=>({...B,open:!1}))}}),P=async({did:B,name:F,endpoint:I})=>{const H=await Xn(I);if(!await $n(H)){A.error(n("storage.spaces.gateway.add.invalidUrl"));return}const V={name:F,did:B,url:H,endpoint:I};await t(V),A.success(n("storage.spaces.connectedWithName",{name:V.name}))},L=(B,F)=>{setTimeout(async()=>{if(R(V=>({...V,open:!1})),a(null),f(V=>({...V,open:!1})),!Ve(B.spaceGateway)){await P(F(B.spaceGateway));return}const I=F(B.endpoint),H=B.space?F(B.space):{};await P({endpoint:I,did:ur(I),name:"DID Space",...H})},0)},N=()=>{f(B=>({...B,open:!0,extraParams:{appPid:s.appPid,referrer:window.location.href}}))},D=async()=>{try{x(!0);const B=await Xn(p),F=mr(B),I=new URL(B).searchParams.get("spaceDid");if(!await $n(F))throw new Error(n("storage.spaces.gateway.add.invalidUrl"));R(H=>({...H,open:!0,prefix:Ee(F,"space/api/did"),baseUrl:new URL(F).origin,checkFn:at.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(B){const F=`${n("storage.spaces.gateway.add.failed",i)}: ${Q(B)}`;c(F)}finally{x(!1)}};return e.jsxs(j,{children:[e.jsx(to,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:N,variant:"outlined",menu:[e.jsx(to.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(X,{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(qt,{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(Z,{onClick:B=>{B.stopPropagation(),d(!1)},color:"inherit",children:n("common.cancel")}),e.jsxs(Z,{onClick:D,color:"primary",disabled:u||!p,variant:"contained",autoFocus:!0,children:[u&&e.jsx(ie,{size:16}),n("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(rs,{component:"div",children:e.jsx(X,{component:"div",children:e.jsx(Y,{label:n("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:p,onChange:B=>{c(null),a(B.target.value)},disabled:u,onKeyPress:async B=>{B.key==="Enter"&&await D()},autoFocus:!0})})})}),!!v&&e.jsx(xo,{type:"error",style:{width:"100%"},children:v})]})]})}mn.propTypes={onConnect:We.func};mn.defaultProps={onConnect:()=>{}};function fn({blockletMeta:t,onEndpointUpdate:o}){var a;const s=cn(),{blocklet:l}=oe(),{updateSpaceGateway:n,loading:i,hasStorageEndpoint:p}=en();return g.useEffect(()=>{o==null||o()},[l]),i?e.jsx(is,{relative:"parent",children:e.jsx(ie,{})}):e.jsxs(ei,{children:[e.jsx(j,{width:s?"360px":"720px",children:p?e.jsx($r,{}):e.jsx(Bo,{})}),((a=t==null?void 0:t.capabilities)==null?void 0:a.didSpace)==="required"&&e.jsx(dn,{mt:8,children:e.jsx(mn,{onConnect:n})})]})}fn.propTypes={blockletMeta:r.any.isRequired,onEndpointUpdate:We.func};fn.defaultProps={onEndpointUpdate:()=>{}};const ei=O(Ds)`
|
|
165
|
-
height: 100%;
|
|
166
|
-
overflow-y: auto;
|
|
167
|
-
padding-bottom: 32px;
|
|
168
|
-
overflow-x: hidden;
|
|
169
|
-
`;function hn({onChange:t,loading:o,children:s,extra:l,stores:n,storageKey:i}){const{t:p}=z(),{info:a,inService:u}=W(),{blocklet:x}=oe(),[y,d]=g.useState(!1),v=g.useRef(null),[c,h]=g.useState(),[C,m]=Rr(i||"tmp"),[b,f]=i?[C,m]:[c,h],{storeList:S,teamDid:R}=yo({fromBlocklet:u,blocklet:x,nodeInfo:a}),P=bo([...n.map(N=>({...N,protected:!0})),...S],"url"),L=b&&P.find(N=>b===N.url)||P[0];return e.jsxs(e.Fragment,{children:[e.jsxs(ti,{children:[e.jsx(Z,{ref:v,color:"primary","data-cy":"add-component-select-store",endIcon:e.jsx(Sr,{color:"primary"}),onClick:()=>{d(!0)},style:{padding:"0 2px"},children:e.jsx(X,{color:"primary",children:L.name})}),e.jsx(X,{color:"primary",children:l})]}),e.jsxs(Y,{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:N=>{const D=N.target.value;f(D.url),t(D)},SelectProps:{open:y,MenuProps:{anchorEl:v.current},renderValue:N=>N==null?void 0:N.name,onClose:()=>{d(!1)}},style:{display:"none"},margin:"normal",children:[P==null?void 0:P.map(N=>e.jsx(ue,{sx:{width:"400px",maxWidth:"90vw"},value:N,"data-cy":N.url,children:e.jsx(Js,{teamDid:R,store:N,onDelete:()=>{var D;b===N.url&&f((D=P[0])==null?void 0:D.url)}})},N.url)),!Io.isInServerlessMode(a)&&e.jsx(Qs,{disabled:o,storeList:P,teamDid:R,onAdd:N=>{f(N)}})]}),s({currentRegistry:L})]})}hn.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}))};hn.defaultProps={onChange:()=>{},loading:!1,extra:"",stores:[],storageKey:""};const ti=O.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 gn={},ni=_t;Object.defineProperty(gn,"__esModule",{value:!0});var Ao=gn.default=void 0,oi=ni(Vt()),si=e;Ao=gn.default=(0,oi.default)((0,si.jsx)("path",{d:"M16 18v2H8v-2zM11 7.99V16h2V7.99h3L12 4 8 7.99z"}),"Upgrade");const ri=(t,o)=>Ee(o,`/blocklets/${t.did}`),ro=({blocklet:t,attribute:o,value:s})=>t._formatted?t._formatted[o]:s,ii=t=>t.inStore&&Co(t)===!1;function xn({blocklet:t,blocklets:o,handleButtonClick:s,endpoint:l}){const{t:n}=z();let i=Ee(l,cs(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){A.error(m.message)}finally{a(!1)}},{blocklet:y}=oe(),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(ds.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"):ii(t)&&(h=n("common.purchase")),e.jsx(mt,{href:ri(t,l),style:{color:"initial",textDecoration:"none"},onClick:u,target:"_blank",children:e.jsx(ai,{title:ro({blocklet:t,attribute:"title",value:t.title||t.name}),did:t.did,description:ro({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(Xs,{children:e.jsxs(Z,{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(ie,{size:16,style:{marginRight:3}}),h]}):h,c==="upgrade"?e.jsx(Ao,{style:{fontSize:"1.2rem"}}):null]},t.did)})})})})}xn.propTypes={blocklet:r.object.isRequired,blocklets:r.array,handleButtonClick:r.func,endpoint:r.string};xn.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[]};function yn({handleButtonClick:t,handleSearchSelect:o,storeUrl:s,handleBlockletRender:l,extraFilter:n,serverVersion:i,resourceType:p,resourceDid:a,showResourcesSwitch:u,showCategory:x,...y}){const{locale:d}=z(),[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(as,{FallbackComponent:ls,resetKeys:[b],children:e.jsx("div",{...y,children:v&&e.jsx(Zs,{showCategory:x,showResourcesSwitch:u,blockletRender:f=>{const S={...f,handleButtonClick:t,endpoint:b};return l({...f,defaultRender:e.jsx(xn,{...S})})},baseSearch:!0,endpoint:b,locale:d,onFilterChange:m,onSearchSelect:o,filters:h,extraFilter:n,serverVersion:i,fetchCategoryDelay:500})})})}yn.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};yn.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:"",resourceDid:"",showResourcesSwitch:!0,showCategory:!0};const ai=O($s)`
|
|
181
|
-
.ms-highlight {
|
|
182
|
-
color: ${t=>t.theme.palette.primary.main};
|
|
183
|
-
}
|
|
184
|
-
`,Cn=g.forwardRef(({meta:t,isMobile:o,onStepChange:s},l)=>{const{steps:n,activeStep:i,setActiveStepByKey:p,setActiveStepByIndex:a}=nr(),{t:u,locale:x}=z(),y=n[i];return g.useEffect(()=>{s(i)},[s,i]),g.useImperativeHandle(l,()=>({setActiveStepByKey:p,setActiveStepByIndex:a})),e.jsx(ci,{component:"div",className:o?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-child":{flex:{md:1}}},children:e.jsx(or,{locale:x,blockletMeta:{title:" ",...t},pcWidth:"100%",pcHeight:"100%",logoUrl:t&&t.logo&&t.registryUrl?ps({did:t.did,version:t.version,baseUrl:t.registryUrl,logoPath:t.logo}):null,stepTip:u("blocklet.component.add"),children:e.jsx(li,{children:y!=null&&y.body&&typeof y.body=="function"?y.body():y.body})})})});Cn.propTypes={meta:r.any,onStepChange:r.func.isRequired,isMobile:r.bool.isRequired};Cn.defaultProps={meta:null};const io=t=>t.isMobile?`
|
|
185
|
-
height: calc(100vh - 56px - 64px - 48px);
|
|
186
|
-
`:"",li=O.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
|
-
`,ci=O(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=>io(t)}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
& .agreement-wrapper {
|
|
309
|
-
${t=>io(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
|
-
`,di=Cn,pi=t=>t.inStore&&Co(t)===!1,ui=t=>{var o;return[K.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,K.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes((o=t==null?void 0:t.capabilities)==null?void 0:o.didSpace)},At=t=>{var o,s;return((s=(o=t==null?void 0:t.configs)==null?void 0:o.find(l=>l.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:s.value)||null},mi=t=>(t.environments||[]).some(o=>o.required),ao=(t,o)=>t==null?void 0:t.some(s=>s.required&&!o[s.key]),fi=({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")},lo=({componentDid:t,timeout:o=1e3,manual:s=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:t,manual:s},"*")},o)};function jn({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 Ln,On,Fn,Je,Mn,Qe,Gn;const{t:c,locale:h}=z(),[C,m]=g.useState(!1),[b,f]=g.useState(null),[S,R]=g.useState(""),[P,L]=g.useState(""),{api:N,ws:{useSubscription:D},inService:B,info:F}=W(),{blocklet:I,actions:{refreshBlocklet:H}}=oe(),[V,Ce]=g.useState(null),[Pe,Ie]=g.useState(!1),Fe={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[w,E]=g.useState(Fe),[_,ae]=g.useState(0),M=g.useRef({}),ee=g.useRef({}),he=g.useRef({}),ge=Wt(T=>T.breakpoints.down("md")),je=us(),[ve,vt]=g.useState(!0),{meta:J}=M.current,te=T=>E(U=>({...U,...T}));g.useEffect(()=>{if(w.pathPrefix){const{errMsg:T}=Nn({...w,pathPrefix:w.pathPrefix,locale:h});R(T)}},[w.pathPrefix]),g.useEffect(()=>{_===0&&E(Fe)},[_]);const Mo=()=>{const T=At(I)??"";te({didSpaceEndpoint:T})},Ye=()=>{var T;return(T=M==null?void 0:M.current)!=null&&T.meta?fe(M.current):""},St=T=>{const U=G=>{te({installResultProps:{variant:"error",title:Ye(),subTitle:T,footer:e.jsx(Z,{className:"bottom-button",disabled:G,"data-cy":"retry-install-component",onClick:async()=>{U(!0),await An(M.current.installInput)},children:e.jsxs(j,{display:"flex",alignItems:"center",children:[G&&e.jsx(ie,{size:16,style:{marginRight:8}}),c("common.retry")]})})}})};U()},Rt=T=>U=>{var G,q;(((G=U==null?void 0:U.meta)==null?void 0:G.did)||(U==null?void 0:U.meta))===((q=I==null?void 0:I.meta)==null?void 0:q.did)&&T(U)};D(K.BlockletEvents.statusChange,Rt(T=>{switch(T.status){case K.BlockletStatus.upgrading:te({installResultProps:{variant:"success",title:Ye(),subTitle:c("blocklet.component.installSuccessTip")}}),lo({componentDid:je.componentDid});break}const U=At(I);te(G=>({...G,didSpaceEndpoint:U}))}),[(Ln=I==null?void 0:I.meta)==null?void 0:Ln.did]),D(K.BlockletEvents.downloadFailed,Rt(()=>{St(c("blocklet.component.installComponentError"))}),[(On=I==null?void 0:I.meta)==null?void 0:On.did]),D(K.BlockletEvents.installFailed,Rt(()=>{St(c("blocklet.component.installComponentError"))}),[(Fn=I==null?void 0:I.meta)==null?void 0:Fn.did]);const le=[],bt=()=>{m(!1),E({}),M.current={},t()},Ke=T=>((I==null?void 0:I.children)||[]).some(U=>U.meta.did===T),An=async T=>{var $e,De;const{pathPrefix:U,bundleDid:G,title:q,componentName:Se="",componentDid:ke=""}=w,{configs:Ue=[],registryUrl:pe,inStore:Be,inputUrl:Ge,dist:ze}=(($e=M.current)==null?void 0:$e.meta)||{},Ze=(De=M.current)==null?void 0:De.downloadTokenList,Xe=Be?Kn(pe,G,ze):Ge;m(!0);const ne={rootDid:I.meta.did,url:Xe,mountPoint:xe(U),title:q,name:Se,did:ke,onlyRequired:!ve,...w.hasEnvironmentsStep&&Ue.length>0?{configs:Ue.map(ce=>({...ce,value:w.configsValue[ce.key]||""}))}:{},...Ze?{downloadTokenList:Ze}:{},...T};try{if(await N.installComponent({input:ne}),pe){const{teamDid:ce,storeList:Re}=yo({fromBlocklet:B,nodeInfo:F,blocklet:I}),{isNew:Et,decoded:wt}=hs(pe,Re);Et&&await N.addBlockletStore({input:{teamDid:ce,url:wt}})}te({installResultProps:{}}),H({showError:!1,attachRuntimeInfo:!1})}catch(ce){const Re=Q(ce);A.error(Re),console.error("installComponent error: ",ce),St(Re)}finally{m(!1),M.current.installInput=ne}},Nn=T=>({errMsg:To({params:{...T,did:T.bundleDid},blocklets:[I],blocklet:I,locale:h})}),de=async T=>{var G,q;const{errMsg:U}=Nn({...w,locale:h});R(U),_===le.length-2&&await An(T),(q=(G=ee.current)==null?void 0:G.setActiveStepByIndex)==null||q.call(G,Se=>Se+1)},Me=()=>{var T,U;(U=(T=ee.current)==null?void 0:T.setActiveStepByIndex)==null||U.call(T,G=>G-1)},Go=()=>{const{pathPrefix:T,bundleDid:U,title:G,componentName:q="",componentDid:Se=""}=w,{meta:ke={}}=M.current||{},{registryUrl:Ue,inStore:pe,inputUrl:Be,dist:Ge}=ke,ze=pe?Kn(Ue,U,Ge):Be;Ce({meta:ke,installOpts:{type:"component",rootDid:I.meta.did,mountPoint:T,url:ze,title:G,name:q,did:Se}})},zo=T=>{Ie(!1),te({purchaseResultProps:{variant:"error",title:Ye(),subTitle:T,style:{paddingTop:120},footer:e.jsx(Z,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{te({purchaseResultProps:{}})},children:c("common.retry")})}})},Vo=({downloadTokenList:T})=>{M.current.downloadTokenList=T,Ie(!1),de()},Tt=({chooseParams:T=M.current,componentDid:U,isInit:G=!1})=>{var zn,Vn,_n,qn;const{meta:q,registryUrl:Se,inStore:ke,inputUrl:Ue}=T,{did:pe,title:Be,name:Ge}=q,ze=(((zn=I.settings)==null?void 0:zn.children)||[]).filter(re=>re.status==="deleted"&&re.meta.bundleDid===pe),Ze=U||"",Xe=(Vn=q.environments)==null?void 0:Vn.map(re=>{const{name:Pt,validation:et,...tt}=re,It={validation:ms(et)?"":et};return{...tt,key:Pt,...It}});M.current={...T,meta:{...q,configs:Xe,registryUrl:Se,inStore:ke,inputUrl:Ue}};let ne={};if(G){const re=[I],Pt=Xe||[],et=[],tt=bo(fs([...Pt,...et]),"key").filter(Ae=>!!Ae.key).sort((Ae,nt)=>Ae.required&&!nt.required?-1:nt.required&&!Ae.required?1:0),It=po(re[0],{configs:tt}),kt={},Wn=tt.map(Ae=>{const{default:nt,key:ot,...qo}=Ae;return kt[ot]=It[ot]||nt,{...qo,key:ot,hidden:!!K.BLOCKLET_CONFIGURABLE_KEY[ot]}});ne={...ne,configsList:Wn,configsValue:kt,hasMissRequiredConfigs:ao(Wn,kt)}}const $e=I.children.some(re=>re.mountPoint==="/"),De=ze.find(re=>re.meta.bundleDid===pe),ce=I.children.find(re=>re.meta.bundleDid===pe);ne.title=Be||"",De?ne={...ne,pathPrefix:De.mountPoint||"",componentName:De.meta.name,hasEnvironmentsStep:!1}:ce?ne={...ne,pathPrefix:ce.mountPoint||"",componentName:ce.meta.name,hasEnvironmentsStep:!1}:ne={...ne,pathPrefix:$e?`/${xe(Be)||xe(Ge)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:((qn=(_n=M.current.meta)==null?void 0:_n.environments)==null?void 0:qn.length)>0};const Re=pi(M.current.meta),Et=ui(M.current.meta),wt=At(I);te({bundleDid:pe,componentDid:Ze,...ne,hasRequiredEnvironments:mi(M.current.meta),requirePurchase:Re,didSpaceIsRequiredSetup:Et,didSpaceEndpoint:wt}),G&&Re&&Go()};g.useEffect(()=>{!a||_!==0||!I||(Tt({chooseParams:{blocklets:[a],meta:a,registryUrl:u||a.homepage,inStore:!0},isInit:!0}),te({showFromUrlDialog:!1}),de())},[a,_,I]),le.push({key:"selectComponent",name:c("blocklet.component.selectComponent"),body:e.jsxs(be,{sx:{width:400},component:"div",children:[y&&w.showFromUrlDialog&&e.jsx(xr,{mode:"component",onCancel:()=>{te({showFromUrlDialog:!1})},onSuccess:({meta:T,inputUrl:U,inStore:G,registryUrl:q})=>{Tt({chooseParams:{meta:T,inputUrl:U,inStore:G,registryUrl:q},isInit:!0}),te({showFromUrlDialog:!1}),de()},handleText:{title:c("blocklet.component.addComponentTip.fromUrl"),confirm:c("blocklet.component.choose")}}),e.jsx(hn,{stores:s,extra:Io.isInServerlessMode(F)?null:y?e.jsxs(Z,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{te({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[e.jsx(Qt,{style:{fontSize:20,marginRight:4}})," ",c("blocklet.component.addComponentTip.fromUrl")," "]}):null,loading:C,onChange:()=>{E({}),M.current={}},storageKey:i,children:({currentRegistry:T})=>e.jsx(yn,{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:T.url,resourceType:l,resourceDid:n,handleButtonClick:U=>{Tt({chooseParams:{...U,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:U,defaultRender:G})=>{const q=(w==null?void 0:w.bundleDid)&&(w==null?void 0:w.bundleDid)===(U==null?void 0:U.did);return e.jsxs(gi,{children:[q&&e.jsx("div",{className:"check-container",children:e.jsx(go,{className:"check-icon"})}),e.jsx("div",{className:q?"choose-blocklet":"",style:{marginLeft:16},children:G})]})}})})]}),cancel:o==="embed"?void 0:c("common.cancel"),confirm:fi({params:w,blocklet:I,t:c}),onCancel:bt,onConfirm:()=>{de()}}),le.push({key:"agreement",name:c("launchBlocklet.introduction"),body:e.jsxs(be,{component:"div",className:"agreement-wrapper",children:[e.jsx(Ro,{title:c("launchBlocklet.introduction"),subTitle:c("blocklet.component.addComponentTip.introduction")}),e.jsx(As,{meta:J,onClickNext:de,installRelated:ve,onChangeInstallRelated:vt,handleDescEle:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:e.jsx("div",{dangerouslySetInnerHTML:{__html:c(`blocklet.component.addComponentTip.${w.requirePurchase?"isPurchase":"isFree"}`,{name:Ye()})}})}),e.jsx("p",{children:c("blocklet.component.addComponentTip.belowInformation")})]})})]}),cancel:a?void 0:c("common.pre"),confirm:c("launchBlocklet.next"),onCancel:a?bt:Me,onConfirm:()=>{Ie(!1),de()}}),J&&w.requirePurchase&&le.push({key:"purchase",name:e.jsxs(e.Fragment,{children:[c("common.verifyNFT"),e.jsx(it,{})]}),body:e.jsxs(be,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(((Mn=(Je=he.current)==null?void 0:Je.getCurrentStep)==null?void 0:Mn.call(Je))===2||Pe)&&e.jsx(rt,{title:c("common.verifyNFT"),subTitle:c("blocklet.component.addComponentTip.verifyNFT")}),Ve(w.purchaseResultProps)?V&&e.jsx(Kr,{ref:he,meta:V.meta,mode:w.componentDid?"verify":"both",onCancel:zo,installOpts:V.installOpts,handlePaySuccess:Vo}):e.jsx("div",{className:"flex-align-center flex-justify-center",children:e.jsx(Zn,{...w.purchaseResultProps})})]}),disabled:((Gn=(Qe=he.current)==null?void 0:Qe.getCurrentStep)==null?void 0:Gn.call(Qe))===2||Pe,cancel:c("common.pre"),confirm:c("common.next"),onConfirm:()=>{typeof he.current.onNext=="function"&&(he.current.onNext(),Ie(!0))},onCancel:()=>{Me()}}),Te(J)&&!Ke(J.did)&&le.push({key:"config",name:c("common.config"),error:S,body:e.jsxs(be,{component:"div",children:[e.jsx(rt,{title:c("common.config"),subTitle:c("blocklet.component.addComponentTip.config")}),e.jsx(Y,{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:T=>{const U=T.target.value;te({pathPrefix:U}),L(c("common.slugifyHint",{value:ut(U)}))}}),!!S&&e.jsx(xo,{type:"error",style:{width:"100%",marginTop:8},children:S})]}),cancel:c("common.pre"),confirm:c("common.next"),onCancel:Me,onConfirm:()=>{de()}}),J&&!Ke(J.did)&&(w!=null&&w.hasEnvironmentsStep)&&le.push({key:"environment",name:e.jsxs(e.Fragment,{children:[c("common.environment")," ",w.hasRequiredEnvironments&&e.jsx(it,{})]}),disabled:!!b||(w==null?void 0:w.hasMissRequiredConfigs),body:()=>e.jsxs(be,{component:"div",children:[e.jsx(rt,{title:c("common.environment"),subTitle:c("blocklet.component.addComponentTip.environment")}),e.jsx(rn,{style:{marginTop:-12,width:"100%"},schema:w.configsList,defaultValue:w.configsValue,onChange:(T,{action:U,currentItem:G,allValues:q})=>{U==="confirm"&&te({hasMissRequiredConfigs:ao(w.configsList,q),configsValue:q}),U==="edit"?f(G):["cancel","confirm"].includes(U)&&f(null)}})]}),cancel:c("common.pre"),confirm:c("common.next"),onCancel:Me,onConfirm:de}),J&&!Ke(J.did)&&(w!=null&&w.didSpaceIsRequiredSetup)&&le.push({key:"didSpace",name:e.jsxs(e.Fragment,{children:[c("blocklet.component.didSpaceConfig")," ",w.didSpaceIsRequiredSetup==="required"&&e.jsx(it,{})]}),disabled:(w==null?void 0:w.didSpaceIsRequiredSetup)&&!w.didSpaceEndpoint,body:()=>e.jsx($t,{children:e.jsxs(be,{component:"div",children:[e.jsx(rt,{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(fn,{blockletMeta:M.current.meta,onNext:()=>{de()},onEndpointUpdate:Mo})})]})}),cancel:c("common.pre"),confirm:c("common.next"),onCancel:Me,onConfirm:de}),le.push({key:"install",name:Ke(J==null?void 0:J.did)?c("common.upgrade"):c("common.install"),disabled:d?!1:Ve(w.installResultProps),loading:d?!1:Ve(w.installResultProps),body:e.jsx(be,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:Ve(w.installResultProps)?e.jsx(sr,{message:e.jsx(xi,{children:c(d?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):e.jsx("div",{style:{marginTop:120},children:e.jsx(Zn,{...w.installResultProps})})}),confirm:c("common.complete"),onConfirm:()=>{lo({timeout:0,componentDid:je.componentDid,manual:!0}),bt(),setTimeout(()=>{const T=document.getElementsByClassName("dashboard-main")[0];T&&(T.scrollTop=T.scrollHeight)},200)}});const se=le[_]||{},_o=()=>C||se.error||!w.bundleDid?!0:_>1?!w.pathPrefix:!1;return I?e.jsxs(hi,{sx:{width:"100%",height:ge?window.innerHeight:p?"72vh":"100vh"},children:[e.jsx(rr,{steps:le,mode:"memory",children:e.jsx(di,{ref:ee,meta:J,isMobile:ge,onStepChange:T=>{ae(T)}})}),e.jsxs(j,{className:"action-bar",children:[se.cancel&&e.jsx(Z,{onClick:T=>{T.stopPropagation(),se.onCancel()},disabled:_===le.length-2&&C,color:"inherit",children:se.cancel||c("common.cancel")}),se.confirm&&e.jsx(Z,{onClick:T=>{T.stopPropagation(),se.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:C||(typeof se.disabled=="boolean"?se.disabled:_o()),variant:"contained",autoFocus:!0,title:se.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 se.loading=="boolean"?se.loading:C)&&e.jsx(ie,{style:{marginRight:8},size:16}),se.confirm]})})]})]}):null}jn.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};jn.defaultProps={onClose:()=>{},mode:"normal",stores:[],storeUrl:"",resourceType:"",resourceDid:"",storageKey:"",inDialog:!0,selectedMeta:null,showResourcesSwitch:!0,showFromUrl:!0,enableRunBackground:!0,showCategory:!0};const hi=O(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=O(X)`
|
|
335
|
-
width: 100%;
|
|
336
|
-
height: 100%;
|
|
337
|
-
`,rt=O(Ro)`
|
|
338
|
-
margin-bottom: 24px;
|
|
339
|
-
`,gi=O.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
|
-
`,xi=O.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 xt({blocklet:t,showDialog:o,setShowDialog:s,selectedMeta:l}){const{t:n}=z(),i=Wt(u=>u.breakpoints.down("md")),{inService:p}=W(),a=()=>{s(!1)};return o?e.jsx(yi,{title:n("blocklet.component.addWithName",{name:fe(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(jn,{selectedMeta:l,onClose:a,storageKey:p?er:tr})}):null}xt.propTypes={selectedMeta:r.object,showDialog:r.bool.isRequired,setShowDialog:r.func.isRequired,blocklet:r.object.isRequired};xt.defaultProps={selectedMeta:null};const yi=O(qt)`
|
|
392
|
-
.MuiDialogContent-root {
|
|
393
|
-
}
|
|
394
|
-
`;function vn({blocklet:t,children:o}){const{t:s}=z(),[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(ue,{onClick:i,className:"component-action","data-cy":"action-add-component",children:[e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),s("blocklet.component.add")]}),e.jsx(xt,{showDialog:l,setShowDialog:n,blocklet:t})]})}vn.propTypes={children:r.any,blocklet:r.object.isRequired};vn.defaultProps={children:null};const Ci=t=>t.children.filter(o=>o.meta.interfaces.find(s=>s.type===K.BLOCKLET_INTERFACE_TYPE_WEB));function yt({params:t,setParams:o,setError:s,serviceTypes:l}){const{t:n}=z(),{blocklet:i}=oe(),p=i.meta.did,a=Ci(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=gs(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(Y,{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(ue,{value:v,children:d},v))}),t.type===k.ROUTING_RULE_TYPES.REDIRECT&&[e.jsx(Y,{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(ue,{value:d,children:`${y[d]} - ${d}`},d))},"redirectCode"),e.jsx(Y,{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(Y,{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(ue,{value:d.meta.did,selected:d.meta.did===t.componentId,children:fe(d,!0)},d.meta.did))},"componentId"),u.length?e.jsx(Y,{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(ue,{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(Y,{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(Y,{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(ue,{value:d.value,children:d.text},d.value))},"responseType"),e.jsx(Y,{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")]]})}yt.propTypes={params:r.object,serviceTypes:r.array,setParams:r.func,setError:r.func};yt.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 Sn({children:t}){const{t:o}=z(),{api:s}=W(),{blocklet:l}=oe(),[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 lt(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){A.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),lt(f,o)){C({...f,__disableConfirm:!0});return}C({...f})};return e.jsxs(X,{component:"div",children:[e.jsx(Y,{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=To({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:ut(f.target.value)});C({...h,pathPrefix:f.target.value,pathPrefixHint:P,__disableConfirm:S})}}),e.jsx(yt,{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(ue,{onClick:c,className:"rule-action","data-cy":"action-add-rule",children:[n?e.jsx(ie,{size:16}):e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),o("router.rule.add.title")]}),p&&e.jsx(Oe,{title:p.title,description:p.description,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel,color:"primary"})]})}Sn.propTypes={children:r.any};Sn.defaultProps={children:null};function Rn({id:t,from:o,children:s}){const{t:l}=z(),{api:n}=W(),{blocklet:i}=oe(),[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){A.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(ue,{onClick:m,className:"rule-action","data-cy":"action-delete-rule",children:[p?e.jsx(ie,{size:16}):e.jsx(ft,{style:{fontSize:18,marginRight:5}}),l("router.rule.delete.title")]}),u&&e.jsx(Tr,{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})]})}Rn.propTypes={id:r.string.isRequired,from:r.object.isRequired,children:r.any};Rn.defaultProps={children:null};function bn({id:t,from:o,to:s,children:l}){var f,S;const{t:n}=z(),{api:i}=W(),{blocklet:p}=oe(),[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 lt(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){A.error(P.message)}finally{u(!1),y(null)}},m={title:n("router.rule.update.title"),description:(R,P,L)=>{const N=D=>{if(lt(D,n)){P({...D,__disableConfirm:!0});return}P({...D})};return e.jsxs(X,{component:"div",children:[e.jsx(Y,{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:D=>{let B=!1;R.type===k.ROUTING_RULE_TYPES.REDIRECT&&!R.url&&(B=!0),R.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!R.url&&(B=!0),R.type===k.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!R.responseType||!R.responseBody)&&(B=!0),D.target.value.trim()||(B=!0,L(n("router.validation.pathPrefixRequired"))),B||L("");const F=n("common.slugifyHint",{value:ut(D.target.value)});P({...R,pathPrefix:D.target.value,helperText:F,__disableConfirm:B})}}),e.jsx(yt,{params:R,setParams:N,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(ue,{onClick:b,className:"rule-action","data-cy":"action-update-rule",children:[a?e.jsx(ie,{size:16}):e.jsx(So,{style:{fontSize:18,marginRight:5}}),n("router.rule.update.title")]}),x&&e.jsx(Oe,{title:x.title,description:x.description,confirm:x.confirm,color:x.color,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}bn.propTypes={id:r.string.isRequired,from:r.object.isRequired,to:r.object.isRequired,children:r.any};bn.defaultProps={children:null};function Tn(t){const{locale:o}=z(),{blocklet:s,recommendedDomain:l}=oe(),n=jo(l,t.from.pathPrefix,Ht(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($,{size:"small",children:e.jsx(Eo,{})})}),e.jsx(bn,{...t,children:({open:i})=>e.jsx($,{size:"small",onClick:i,disabled:t.isProtected,"data-cy":"action-update-rule",children:e.jsx(Yt,{})})}),e.jsx(Rn,{...t,children:({open:i})=>e.jsx($,{size:"small",onClick:i,disabled:t.isProtected,"data-cy":"action-delete-rule",children:e.jsx(ft,{})})})]})}Tn.propTypes={isProtected:r.bool};Tn.defaultProps={isProtected:!1};function No({group:t,...o}){return t?e.jsx(He,{type:"reverse",...o,children:t}):null}No.propTypes={group:r.string.isRequired};function dt({domain:t,isHttps:o,toUrl:s}){const l=o?"https":"http";let n=s;return Cs(n)||(n=`${l}://${t}${s}`),e.jsx(mt,{href:n,target:"_blank",style:{fontSize:14},underline:"hover",children:s},n)}dt.propTypes={domain:r.string.isRequired,toUrl:r.string.isRequired,isHttps:r.bool};dt.defaultProps={isHttps:!1};function Ct({hasPermission:t}){const{t:o,locale:s}=z(),l=fo(),{blocklet:n,recommendedDomain:i}=oe();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(Ur,{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(me,{title:o("blocklet.router.urlLockTooltip"),placement:"top",children:e.jsx("span",{children:e.jsx($,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:e.jsx(br,{style:{fill:l.palette.text.disabled}})})})}):e.jsx(Tn,{...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(xs,{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&&fe(x,!0)]}),e.jsxs(j,{display:"flex",alignItems:"center",children:[a.to.type===k.ROUTING_RULE_TYPES.REDIRECT&&e.jsx(dt,{domain:i,toUrl:a.to.url}),a.to.type===k.ROUTING_RULE_TYPES.GENERAL_REWRITE&&e.jsx(dt,{domain:i,toUrl:a.to.url}),a.to.type===k.ROUTING_RULE_TYPES.COMPONENT&&e.jsx(No,{group:a.to.pageGroup})]})]})]}),e.jsx(j,{px:2,sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:e.jsx(mt,{href:jo(i,a.from.pathPrefix,Ht(n,s)),target:"_blank",style:{fontSize:16},underline:"hover",children:ys(a.from.pathPrefix,"/")||"/"})},a.from.pathPrefix),e.jsx(j,{children:t&&e.jsx("div",{style:{textAlign:"right"},children:y})},"actions")]},"rule"),e.jsx(Kt,{},"divider")]})}Ct.propTypes={hasPermission:r.bool};Ct.defaultProps={hasPermission:!1};const ji=Le(Ct,"mutate_blocklets"),vi=Le(Ct,"",Ne);function Si(t){const{inService:o}=W();return o?e.jsx(vi,{...t}):e.jsx(ji,{...t})}function Ri({blocklet:t,scrollToComponent:o}={blocklet:null,scrollToComponent:!1}){const s=js(),{t:l}=z(),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 A.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 En({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(X,{component:"div",children:[e.jsx(X,{gutterBottom:!0,children:a("blocklet.action.removeComponentDescription")}),e.jsxs(wr,{name:"removeType",value:b.removeType,onChange:S=>f({...b,removeType:S.target.value}),children:[e.jsx(Ot,{value:"keepData",control:e.jsx(no,{}),label:a("blocklet.action.removeComponentKeepData")}),e.jsx(Ot,{value:"complete",control:e.jsx(no,{}),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(bi,{size:"small",disabled:c,onClick:()=>h,"data-cy":"delete-component-btn",children:e.jsx(ft,{disabled:c})}),m=e.jsx(me,{title:l||a("common.delete"),children:e.jsx("span",{children:C})});return e.jsxs(e.Fragment,{children:[!i&&m,y&&e.jsx(Oe,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]})}En.propTypes={component:r.object.isRequired,remove:r.func,onCancel:r.func,disabled:r.bool,showConfirm:r.bool,hideBtn:r.bool,tip:r.string};En.defaultProps={remove:async()=>{},disabled:!1,showConfirm:!1,hideBtn:!1,onCancel:()=>{},tip:""};const bi=O($)`
|
|
395
|
-
&.Mui-disabled {
|
|
396
|
-
opacity: 0.5;
|
|
397
|
-
}
|
|
398
|
-
`;function wn({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){A.error(m.message)}a(!1)},d=async()=>{a(!0);try{await s(t)}catch(m){A.error(m.message)}a(!1)},v=l||p,c=["starting","running","stopping"].includes(t.status),h=c?Fs:Ms,C=e.jsx(Ti,{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(me,{title:n||i(`common.${c?"stop":"start"}`),children:e.jsx("span",{children:C})},"btn"),u&&e.jsx(Oe,{title:u.title,description:u.description,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel},"connect")]}wn.propTypes={component:r.object.isRequired,onStart:r.func,onStop:r.func,disabled:r.bool,tip:r.string};wn.defaultProps={onStart:async()=>{},onStop:async()=>{},disabled:!1,tip:""};const Ti=O($)`
|
|
399
|
-
&.Mui-disabled {
|
|
400
|
-
opacity: 0.5;
|
|
401
|
-
}
|
|
402
|
-
`;function Pn({sourceInfo:t,blocklet:o}){var l;const{t:s}=g.useContext(ye);return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(vs,{type:"success",children:ir(t.source)},"source"),t.source==="registry"&&e.jsx(mt,{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")})]})}Pn.propTypes={sourceInfo:r.shape({source:r.string,deployedFrom:r.string}),blocklet:r.object};Pn.defaultProps={sourceInfo:{},blocklet:{}};var In={},Ei=_t;Object.defineProperty(In,"__esModule",{value:!0});var Lo=In.default=void 0,wi=Ei(Vt()),Pi=e;Lo=In.default=(0,wi.default)((0,Pi.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward");function jt({blocklet:t,checkUpgrade:o,hasPermission:s,...l}){const{api:n}=W(),{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,K.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 _e(2e3),await n.upgradeBlocklet({input:b})}catch(b){A.error(`Blocklet upgrade failed: ${Q(b)}`)}finally{a(!1),c(null)}},m={title:`${i("common.upgrade")} ${i("common.blocklet")} ${fe(t)}`,description:i("blocklet.action.upgradeDescription"),confirm:i("blocklet.action.confirmUpgrade"),cancel:i("common.cancel"),onConfirm:C,onCancel:h};return s&&y&&!we(t.status)?e.jsxs(e.Fragment,{children:[e.jsx(He,{...l,children:t.meta.version}),e.jsx(me,{title:i("common.updateAvailable",{version:y.version}),children:e.jsx($,{size:"small",style:{marginLeft:8},disabled:p,onClick:()=>c(m),children:p?e.jsx(ie,{size:16}):e.jsx(Lo,{style:{fontSize:16,color:"red"}})})}),!!u&&e.jsx(A,{variant:"error",message:u,onClose:()=>x("")}),v&&e.jsx(Oe,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]}):e.jsx(He,{...l,children:t.meta.version})}jt.propTypes={blocklet:r.object.isRequired,checkUpgrade:r.bool,hasPermission:r.bool};jt.defaultProps={checkUpgrade:!1,hasPermission:!1};const Ii=Le(jt,"mutate_blocklets"),ki=Le(jt,"",Ne);function Ui(t){const{inService:o}=W();return o?e.jsx(ki,{...t}):e.jsx(Ii,{...t})}const Bi=t=>{var o;return!((o=t==null?void 0:t.meta)!=null&&o.group)},Di=(t,o)=>t?[{name:o("common.name"),value:t.displayName},{name:o("common.description"),value:t.description},{name:o("common.version"),value:e.jsx(He,{children:t.version})}]:[],Ai=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}},Ni=(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 kn({blocklet:t,depth:o,componentInfo:s,app:l,onClose:n}){var c,h;const{t:i,locale:p}=g.useContext(ye),{deletingBlocklets:a}=Jt();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(Bt,{valueComponent:"div",nameWidth:120,name:m.name,nameFormatter:()=>m.name,children:m.value},m.name):e.jsx(Bt,{valueComponent:"div",nameWidth:120,name:m.name,children:m.value},m.name)),d=s?Ai(s):{},v=s?[{name:i("common.name"),value:fe(s,!0)},{name:i("common.version"),value:e.jsx(Ui,{blocklet:s,checkUpgrade:!1})},{name:i("common.status"),value:e.jsx(wo,{isResource:Bi(t),status:u,source:s.source,progress:t.progress})},t.status==="running"?{name:i("blocklet.startedAt"),value:Ut(t.startedAt,p)}:null,t.status!=="running"?{name:i("blocklet.stoppedAt"),value:Ut(t.stoppedAt,p)}:null,t.installedAt?{name:i("blocklet.installedAt"),value:Ut(t.installedAt,p)}:null,Te(t.meta)?{name:i("common.mountPoint"),value:x}:null,s.meta.group?{name:i("common.group"),value:e.jsx(He,{type:"success",children:s.meta.group})}:null,{name:i("blocklet.overview.source"),value:e.jsx(Pn,{sourceInfo:d,blocklet:t})},{name:i("blocklet.overview.deployedFrom"),value:d.deployedFrom||"-"},{name:i("common.did"),value:e.jsx(ho,{did:s.meta.did,showQrcode:!0})},{name:i("common.author"),value:Ss(s.meta.author)},{name:i("common.engine"),value:Di(s.engine,i).map(({name:C,value:m})=>e.jsx(Bt,{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:`${Ni(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(Ft,{open:!0,fullWidth:!0,maxWidth:"md",onClose:()=>{n(null)},children:e.jsxs(j,{paddingY:1.5,children:[e.jsx(Mt,{children:i("common.componentBasicInfo")}),e.jsx(Gt,{children:y(v)})]},"dialog-wrapper")},"base-info-dialog"):null}kn.propTypes={blocklet:r.object.isRequired,depth:r.number,app:r.object,componentInfo:r.object,onClose:r.func.isRequired};kn.defaultProps={depth:0,app:null,componentInfo:null};O(vo)`
|
|
403
|
-
.BaseBadge-badge {
|
|
404
|
-
top: ${t=>t.top*8||6}px;
|
|
405
|
-
right: ${t=>t.right*8||6}px;
|
|
406
|
-
}
|
|
407
|
-
`;O(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 Li=t=>{var o;return!((o=t==null?void 0:t.meta)!=null&&o.group)},co=(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 pt({blocklet:t,ancestors:o,depth:s,onRemove:l,onStart:n,onStop:i,onRestart:p,getComponentUrl:a,app:u}){var F,I,H;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}=Jt();let{status:S}=t;s===1&&f.includes(t.meta.did)&&(S="deleting");const R=`/${t.mountPoint||"/"}`.replace(/\/+/g,"/"),P=a(R),L=we(u.status),N=we(t.status);let D="";if(L||N||s===1&&f.includes(t.meta.did))D=x("blocklet.component.tip.stopBlocklet");else if((F=t.dependents)!=null&&F.length){const V=t.dependents.filter(Ce=>Ce.required);if(V.length){const Ce=V.map(Pe=>co(Pe.id,u));D=x("blocklet.component.tip.requiredBy",{name:Ce.join(", ")})}}const B=async(...V)=>{C(!0);try{await l(...V)}catch{}C(!1),c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(Un,{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(Pr,{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:fe(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(wo,{style:{marginLeft:4},status:S,source:t.source,progress:t.progress}),e.jsx(yr,{style:{marginLeft:4},mode:t.mode||""}),!!((H=t.dependents)!=null&&H.length)&&e.jsx(me,{title:[`${x("common.dependents")}: `,t.dependents.map(V=>e.jsx(j,{pl:1,children:`${co(V.id,u)} ${V.required?`(${x("common.required")})`:""}`},V.id))],children:e.jsx(j,{display:"flex",color:"primary.main",ml:1,children:e.jsx(zt,{icon:"octicon:package-dependents-16"})})})]})]})]},t),Te(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:Rs(R)})})},R),e.jsx("div",{style:{flex:1}}),e.jsxs(j,{display:"flex",alignItems:"center",children:[Te(t.meta)&&e.jsx(me,{title:x("common.visit"),children:e.jsx("a",{target:"_blank",href:P,rel:"noopener noreferrer",children:e.jsx($,{size:"small",children:e.jsx(Eo,{})})})}),e.jsx(gt,{blocklet:t,ancestors:o,children:({open:V})=>e.jsx(me,{title:x("common.config"),children:e.jsx(Oo,{color:"error",badgeContent:"",variant:"dot",invisible:!uo(t,o[0]).length,children:e.jsx($,{onClick:V,size:"small",children:e.jsx(Yt,{})})})},"config")}),e.jsx(wn,{blocklet:u,component:t,onStart:n,onStop:i,disabled:!["starting","stopping"].includes(u.status)&&we(u.status)}),e.jsx(Ir,{"data-cy":"component-actions",actions:[Te(t.meta)?{icon:e.jsx(Er,{}),text:x("common.detail"),onClick:()=>{d(t)}}:null,!Li(t)&&{icon:e.jsx(Gs,{}),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||N||t.status!=="running"},{icon:e.jsx(ft,{}),text:x("common.delete"),onClick:()=>{c(!0)},disabled:L||N||!!D,tip:D}].filter(Boolean)})]},"actions")]},"group-not-gateway-box"),e.jsx(Kt,{},"line"),e.jsx(kn,{componentInfo:y,onClose:d,blocklet:t,app:u,depth:s}),e.jsx(En,{blocklet:u,component:t,remove:B,onCancel:()=>c(!1),hideBtn:!0,showConfirm:v},"delete-component"),m&&e.jsx(Oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel},"confirm-setting")]})}pt.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};pt.defaultProps={ancestors:[],depth:0,onRemove:()=>{},onStart:()=>{},onStop:()=>{},onRestart:()=>{},getComponentUrl:()=>window.location.origin,app:null};const Oo=O(vo)`
|
|
425
|
-
.BaseBadge-badge {
|
|
426
|
-
top: ${t=>t.top*8||6}px;
|
|
427
|
-
right: ${t=>t.right*8||6}px;
|
|
428
|
-
}
|
|
429
|
-
`,Un=O(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 Bn({meta:t,dependencies:o,logoUrl:s,setInstallComponentMeta:l}){const n=W(),{t:i}=z(),p=()=>{l(t)},a=40;return e.jsxs(Oi,{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(me,{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(zt,{icon:"octicon:package-dependents-16"})})})]}),e.jsx("div",{style:{flex:1}}),e.jsx(bs,{onClick:p,startIcon:e.jsx(zt,{icon:"ph:download-simple-bold"}),children:i("common.install")})]}),e.jsx(Kt,{class:"line"},"line")]})}Bn.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}))};Bn.defaultProps={logoUrl:"",dependencies:[]};const Oi=O(Un)`
|
|
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 Dn({blocklet:t,onUpdate:o,getComponentUrl:s,...l}){var w;const{t:n}=g.useContext(ye),{api:i,inService:p,info:a}=W(),{addDeletingDid:u,removeDeletingDid:x,matchDeletingDid:y}=Jt(),[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,N]=g.useState(!1),D=[...t.children];t.meta.group!=="gateway"&&D.unshift(t),y(D.map(E=>E.meta.did));const B=async()=>{if(!d){v(!0);try{const{updateId:E,updateList:_}=(await i.checkComponentsForUpdates({input:{did:t.meta.did}})).preUpdateInfo||{};if(v(!1),!E){A.info(n("blocklet.component.noUpdate"));return}const ae=[];Ps(t,(ee,{id:he,ancestors:ge})=>{const je=_.find(ve=>ve.id===he);if(je){const ve=ge.slice(1).concat(ee).map(J=>J.meta.title||J.meta.name).join(" / "),vt=(ge[1]||ee).meta.did;ae.push({groupId:vt,name:ve,version:ee.meta.version,newVersion:je.meta.version})}});const M={};ae.forEach(ee=>{M[ee.groupId]?ee.disabled=!0:M[ee.groupId]=!0}),h({params:{updateId:E},list:ae,checks:M,hasChecks:!0})}catch(E){v(!1),A.error(Q(E))}}},F=async()=>{if(!d)try{v(!0);const E=Object.keys(c.checks).filter(ae=>c.checks[ae]),_={updateId:c.params.updateId,rootDid:t.meta.did,selectedComponents:E};await i.upgradeComponents({input:_}),v(!1),h(null),N(null)}catch(E){v(!1),A.error(Q(E))}},I=async(E,_)=>{u(E.meta.did);try{await i.deleteComponent({input:{did:E.meta.did,keepData:_==="keepData",rootDid:t.meta.did}}),await _e(800)}catch(ae){A.error(Q(ae)),x(E.meta.did)}},H=async E=>{try{await i.startBlocklet({input:{did:t.meta.did,componentDids:[E.meta.did]}}),await _e(800)}catch(_){A.error(Q(_))}},V=async E=>{try{await i.stopBlocklet({input:{did:t.meta.did,componentDids:[E.meta.did]}}),await _e(800)}catch(_){A.error(Q(_))}},Ce=async E=>{try{await i.restartBlocklet({input:{did:t.meta.did,componentDids:[E.meta.did]}}),await _e(800)}catch(_){A.error(Q(_))}},Pe=(E,_)=>{const{checked:ae}=E.target;h(M=>{const ee=Object.entries(M.checks).reduce((ge,[je,ve])=>(ge[je]=_===je?ae:ve,ge),{}),he=Object.values(ee).includes(!0);return{...M,checks:ee,hasChecks:he}})};Ts(B);const Ie=Ri({blocklet:t,scrollToComponent:!0}),Fe=S||Ie;return e.jsxs(Fi,{component:"div",...l,children:[e.jsxs(Mi,{display:"flex",children:[e.jsxs(Gi,{flexDirection:"row",className:"title",display:"flex",alignItems:"center",children:[D!=null&&D.length?`${n("common.components")} (${D.length})`:`${n("common.components")}`,!P&&e.jsx(Nt,{permission:p?"":"mutate_blocklets",role:p?Ne:[],children:e.jsx(Xt,{children:e.jsx(Oo,{top:1.2,right:.4,color:"error",badgeContent:"",variant:"dot",invisible:!L,children:e.jsxs(Z,{disabled:d||we(t.status),color:"secondary",onClick:()=>{B()},"data-cy":"check-for-updates",children:[e.jsx(j,{ml:.5,mr:.5,display:"flex",children:d?e.jsx(ie,{size:16}):e.jsx(Po,{style:{fontSize:"1em"}})}),n("blocklet.component.checkUpdateTitle")]})})})})]}),e.jsx(Nt,{permission:p?"":"mutate_blocklets",role:p?Ne:[],children:e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(Sn,{children:({open:E})=>e.jsxs(Z,{disabled:d||we(t.status),variant:"text",color:"primary","data-cy":"add-rule",className:"sm-hide-icon",onClick:E,children:[e.jsx(Jn,{style:{fontSize:"1.3em",marginRight:4}}),n("router.rule.add.title")]})}),!P&&e.jsx(vn,{blocklet:t,serverVersion:a.version,children:({open:E})=>e.jsxs(Z,{disabled:d||we(t.status),variant:"text",color:"primary","data-cy":"add-component",className:"sm-hide-icon",onClick:E,children:[e.jsx(Jn,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.component.add")]})}),!P&&e.jsx(gt,{blocklet:t,ancestors:[],children:({open:E})=>e.jsx(me,{title:`${n("blocklet.component.container")}${n("common.config")}`,children:e.jsx($,{onClick:E,size:"small",color:"primary",children:e.jsx(Yt,{style:{fontSize:18}})})},"config")})]})})]}),D!=null&&D.length?e.jsxs(e.Fragment,{children:[e.jsxs(j,{mt:2,children:[t.meta.group!=="gateway"&&e.jsx(pt,{blocklet:t,app:t,onRemove:I,onStart:H,onStop:V,onRestart:Ce,getComponentUrl:s},`0-${t.meta.did}`),t.children.map(E=>e.jsx(pt,{depth:1,blocklet:E,ancestors:[t],app:t,onRemove:I,onStart:H,onStop:V,onRestart:Ce,getComponentUrl:s},`1-${E.meta.did}`))]},`top-blocklet-${t.meta.did}`),(w=t.optionalComponents)==null?void 0:w.map(E=>e.jsx(Un,{children:e.jsx(Bn,{setInstallComponentMeta:R,...E})},E.meta.did))]}):e.jsx(j,{mt:8,children:e.jsx(Ls,{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(Si,{})}),!!c&&e.jsx(Ft,{open:!0,fullWidth:!0,children:e.jsxs(j,{paddingY:1.5,children:[e.jsx(Mt,{children:n("blocklet.component.updateTitle")}),e.jsx(j,{component:Gt,py:4,children:c.list.map(E=>e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(Es,{checked:c.checks[E.groupId],onChange:_=>Pe(_,E.groupId),style:{marginLeft:E.disabled?16:0},defaultChecked:!0,disabled:E.disabled}),e.jsxs(j,{flexGrow:1,mt:3,children:[e.jsx(j,{item:!0,xs:8,children:E.name}),E.version&&e.jsxs(st,{fontSize:"h6.fontSize",container:!0,spacing:2,alignItems:"center",children:[e.jsx(st,{item:!0,xs:3,children:E.version}),e.jsx(st,{item:!0,xs:1,children:e.jsx(Ns,{style:{fontSize:"0.9em"}})}),e.jsx(st,{item:!0,xs:3,children:e.jsx(j,{color:"secondary.main",children:E.newVersion})})]})]},`${E.name}-${E.newVersion}`)]},E.name))}),e.jsxs(ws,{style:{padding:"8px 24px 24px"},children:[e.jsx(Z,{onClick:()=>{h(null)},children:n("common.cancel")}),e.jsxs(Z,{onClick:E=>{E.stopPropagation(),F()},color:"primary",disabled:d||!c.hasChecks,variant:"contained",autoFocus:!0,children:[d&&e.jsx(ie,{size:16}),n("common.update")]})]})]})}),!!C&&e.jsx(Ft,{open:!0,fullWidth:!0,onClose:()=>m(!1),children:e.jsxs(j,{paddingY:1.5,children:[e.jsx(Mt,{children:n("common.configuration")}),e.jsx(Gt,{children:e.jsx(j,{py:2,children:e.jsx(Ot,{control:e.jsx(kr,{checked:b,onChange:E=>f(!!E.target.checked)}),label:n("blocklet.component.showContainer")})})})]})}),e.jsx(xt,{selectedMeta:Fe,blocklet:t,showDialog:!!Fe,setShowDialog:()=>R(null)})]})}Dn.propTypes={blocklet:r.object.isRequired,onUpdate:r.func,getComponentUrl:r.func};Dn.defaultProps={onUpdate:()=>{},getComponentUrl:()=>window.location.origin};const Fi=O.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
|
-
`,Mi=O(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
|
-
`,Gi=O(j)`
|
|
526
|
-
${t=>t.theme.breakpoints.down("sm")} {
|
|
527
|
-
width: 100%;
|
|
528
|
-
justify-content: space-between;
|
|
529
|
-
}
|
|
530
|
-
`;function Fo(t){const{locale:o}=g.useContext(ye),{blocklet:s,recommendedDomain:l}=ar(),n=i=>Is({blocklet:s,domain:{value:l},mountPoint:i,params:Ht(s,o)});return e.jsx(Dn,{blocklet:s,getComponentUrl:n,...t})}Fo.propTypes={};Fo.defaultProps={};export{Fo as default};
|