@dcl/builder-site 7.14.3 → 7.14.4-19500651590.commit-4962afd
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/assets/{Back-Du-3PX5t.js → Back-qfVBk6YN.js} +1 -1
- package/assets/{CollectionProvider.container-Lqsy-tws.js → CollectionProvider.container-Dz4kU__V.js} +1 -1
- package/assets/{CollectionStatus.container-BEIqfJjn.js → CollectionStatus.container-SecVXoKZ.js} +1 -1
- package/assets/{ConfirmDelete-BnSJSqBZ.js → ConfirmDelete-8N9eX1ru.js} +1 -1
- package/assets/{FileSaver.min-Dwax41FS.js → FileSaver.min-D7RIIP64.js} +1 -1
- package/assets/{ItemProvider.container-DdEAL_Ri.js → ItemProvider.container-BtouewED.js} +1 -1
- package/assets/{JumpIn.container-DBOPalEu.js → JumpIn.container-va_LyMbu.js} +1 -1
- package/assets/{LandAction-DweppjnN.js → LandAction-CUgZ-nVw.js} +1 -1
- package/assets/{LandProviderPage-BKfn97qy.js → LandProviderPage-D194_isC.js} +1 -1
- package/assets/{LoggedInDetailPage.container-D8H5VCWI.js → LoggedInDetailPage.container-BLLfFAse.js} +1 -1
- package/assets/{Navigation-C-ZlQ9p1.css → Navigation-pnQrAplR.css} +1 -1
- package/assets/{Navigation.container-Czf_aMXt.js → Navigation.container-m_5Xay6X.js} +1 -1
- package/assets/{NotFound-B5Bl_gw1.js → NotFound-BTo5pEaG.js} +1 -1
- package/assets/{OptionsDropdown-DePMzHXt.js → OptionsDropdown-Dkcmv78a.js} +1 -1
- package/assets/{RentalPeriod-Bsw3l3b-.js → RentalPeriod-DiTpnn81.js} +1 -1
- package/assets/{SDKTag-CBAhu_lg.js → SDKTag-B1AaBZZp.js} +1 -1
- package/assets/{SceneStats.container-Ca4F8ZRq.js → SceneStats.container-gb6NrI8H.js} +1 -1
- package/assets/{SignInRequired-BWM3m5Bh.js → SignInRequired-cMu1CrC_.js} +1 -1
- package/assets/{ThirdPartyKindBadge-ET9ggHTR.js → ThirdPartyKindBadge-85NbLCqg.js} +1 -1
- package/assets/{dataReader-DbDcjw59.js → dataReader-J2q5Wk51.js} +1 -1
- package/assets/{date-B6b7CVrN.js → date-C90QIauR.js} +1 -1
- package/assets/{fortmatic-9H4P56_9.js → fortmatic-B5_sXpTq.js} +1 -1
- package/assets/{hooks-CZx9E4HM.js → hooks-B-YhDlyt.js} +1 -1
- package/assets/{index-DbMEblf5.js → index--eP8RdN-.js} +1 -1
- package/assets/index-3ivXi3H6.css +1 -0
- package/assets/index-4S3D4LaD.js +1 -0
- package/assets/{index-D75j3LJB.js → index-B2y05o7K.js} +1 -1
- package/assets/{index-WGbYHmSa.js → index-B8mjr01h.js} +1 -1
- package/assets/{index-BfpOuMxx.js → index-B9la4WTD.js} +1 -1
- package/assets/{index-B3trRFJD.js → index-BBq_p2Jh.js} +1 -1
- package/assets/{index-jxJOvrFv.js → index-BGOe_558.js} +1 -1
- package/assets/index-BGbyjzTe.js +1 -0
- package/assets/{index-BOF2b_tG.js → index-BGrJJYrs.js} +1 -1
- package/assets/{index-CFo4HO7Z.js → index-BItWASwT.js} +1 -1
- package/assets/{index-CFjpjxhQ.js → index-BaBcvmM1.js} +1 -1
- package/assets/{index-CZDGtJQc.js → index-Bc3TZncd.js} +1 -1
- package/assets/{index-C5uvfXcz.js → index-Bl5LC4b1.js} +1 -1
- package/assets/index-BpZF6T44.js +2 -0
- package/assets/{index-DODo_AA2.css → index-C1EVXuav.css} +7 -7
- package/assets/{index-BTfmHeNN.js → index-C1clPxBD.js} +1 -1
- package/assets/{index-CYF1jnKQ.js → index-CBnSo8Zh.js} +1 -1
- package/assets/{index-CBcwD23d.js → index-CFPRYeOi.js} +1 -1
- package/assets/{index-liv2k8mp.js → index-CHuI3qPX.js} +1 -1
- package/assets/{index-DBMOLm39.js → index-CIoA4Sd_.js} +1 -1
- package/assets/{index-DTQ3d5tX.css → index-CJm4yYRA.css} +1 -1
- package/assets/{index-DBg5WiYR.js → index-CKyzF9VZ.js} +1 -1
- package/assets/{index-BLEwdEin.js → index-CO7NEMGF.js} +1 -1
- package/assets/index-Cd58ce0H.css +1 -0
- package/assets/{index-xVCHzlfE.js → index-CflCMh4p.js} +1 -1
- package/assets/{index-D-DTCEtL.js → index-CgXwvFq0.js} +1 -1
- package/assets/{index-CV6TLvQx.js → index-Ci5vJnfQ.js} +1 -1
- package/assets/{index-7VHsQJBX.js → index-CztsBLiJ.js} +1 -1
- package/assets/{index-CbSrvQ3n.js → index-D1LVGfhr.js} +1 -1
- package/assets/{index-BrUJYumw.js → index-DLuf0EV2.js} +1 -1
- package/assets/{index-YFxMXAOn.js → index-DTuQuNzL.js} +1 -1
- package/assets/{index-BmS9iM1I.js → index-DV7YxGZN.js} +1 -1
- package/assets/index-DXqNJi0c.css +1 -0
- package/assets/index-D_fzj-h4.js +1 -0
- package/assets/{index-Cf7CBDBP.js → index-DdHxFx5i.js} +1 -1
- package/assets/index-Dddu1BYO.css +1 -0
- package/assets/{index-DU5kC8Wa.js → index-DmE6V3G4.js} +1 -1
- package/assets/{index-BUPxmR5g.js → index-DmfVh-eI.js} +1 -1
- package/assets/{index-jccc0hDE.css → index-DuO-zVHz.css} +1 -1
- package/assets/{index-peDfbbNt.js → index-DztvhgAB.js} +1 -1
- package/assets/{index-BAOisAir.js → index-G58uvV_v.js} +1 -1
- package/assets/{index-76S3Bul4.js → index-LbPj94fr.js} +251 -278
- package/assets/{index-DVF64vJ1.js → index-Lx6kdj9H.js} +1 -1
- package/assets/{index-D29Huvez.js → index-Nu8JUQec.js} +1 -1
- package/assets/{index-BXMsz2Lh.js → index-ocFbUjKw.js} +1 -1
- package/assets/{index-B8MpIaEn.js → index-poJQMTAu.js} +1 -1
- package/assets/{index-DPO6HDpi.js → index-s99GEmyW.js} +1 -1
- package/assets/{index-CVBrzwuh.js → index-y3QMYVxY.js} +1 -1
- package/assets/{index.es-z67bobBT.js → index.es-BM4hfwnw.js} +4 -4
- package/assets/{selectors-xoM-YAcs.js → selectors-CSnw6goy.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-BiQ1dBjY.js +0 -2
- package/assets/index-BnlS84my.css +0 -1
- package/assets/index-CqplWHDN.js +0 -1
- package/assets/index-D8EUOW_O.js +0 -1
- package/assets/index-DSqpzpNh.js +0 -1
- package/assets/index-DbEtkDpc.css +0 -1
- package/assets/index-DfMVurEC.css +0 -1
- package/assets/index-kJ09AvL0.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aM as ye,ae as te,Z as ne,H as e,cU as z,G as n,N as Re,cV as me,a1 as ae,cW as Y,M as s,cX as Q,cY as De,cZ as M,cG as Pe,D as l,K as k,aA as le,bJ as Ae,a4 as ge,a5 as _,c_ as We,c$ as pe,d0 as Oe,bD as L,d1 as Ue,cM as xe,d2 as se,d3 as Ce,d4 as je,d5 as de,d6 as ue,d7 as K,d8 as G,J as be,$ as he,cI as Be,d9 as Me,da as Ie,cJ as He,db as $e,c5 as Fe,dc as ze,a6 as Ke,ad as Ge,dd as Ye,de as Qe,cN as Ve,X,df as qe,cO as Je,cP as Xe,c6 as Ze,dg as es}from"./index-76S3Bul4.js";import{a as we,N as ss}from"./Navigation.container-Czf_aMXt.js";import{L as ts}from"./LoggedInDetailPage.container-D8H5VCWI.js";import"./selectors-xoM-YAcs.js";import"./SignInRequired-BWM3m5Bh.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),a=new URLSearchParams(t.search),c=a.get(Ne),m={urlSearchParams:a,pathname:t.pathname};switch(c){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},ns=({isWorldContributorEnabled:t})=>{const{tab:a,pathname:c,urlSearchParams:m}=Ee(),d=ne(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),d.push(`${c}?${i.toString()}`)};return!a||a===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:a===b.DCL,onClick:()=>g(b.DCL),children:n("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:a===b.ENS,onClick:()=>g(b.ENS),children:n("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:a===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:n("worlds_list_page.name_tabs.contributor_names")})]})},as=te.memo(ns),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(as),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",T={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:a,className:c,onViewDetails:m})=>{const d=Q(t),g=Q(a),o=g*100/d;return e.jsxs("div",{"data-testid":gs,className:ae(T.container,c),children:[e.jsx("span",{className:T.used,children:n("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:T.description,children:[e.jsx("span",{children:n("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:T.link,onClick:m,children:n("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:T.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:T.current,children:Y(g)})," / ",Y(d)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:T.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Se({ens:t,deploymentsByWorlds:a}){const c=De(t.subdomain);return M(a,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:c}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(Pe,{role:"button",text:c,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ae("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:n("worlds_list_page.table.empty_url")})}function Te({deploymentsByWorlds:t,ens:a,projects:c,onEditScene:m,onUnpublishScene:d,onPublishScene:g}){const o=t[a.subdomain];return M(t,a)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),c.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(a),children:n("worlds_list_page.table.edit_scene")}):d&&e.jsx(s.Popup,{content:n("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>d(a),children:n("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:n("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:a,projects:c,loading:m,error:d,onUnpublishWorld:g}){const o=ne(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=a[p.subdomain];o.push(k.sceneDetail(x))},[a,k,o]),E=l.useCallback(p=>{var C;const x=(C=a[p.subdomain])==null?void 0:C.id;x&&g(x)},[a,g]);return d?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:d.message,header:n("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>n(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:a,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:a,ens:p,projects:c,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:Y(Q(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:n("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:n("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:n("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),a=we(),c=_(We),m=_(pe),d=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:c,deploymentsByWorlds:m,projects:a,loading:g,error:d,onUnpublishWorld:o})},_e="Worlds List Page Action",Ss=le.get("ENS_DOMAINS_URL",""),Ts=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:a,externalNames:c,error:m,deploymentsByWorlds:d,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,D]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),P=ne();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{P.push(k.scenes())},[k,P]),q=l.useCallback(u=>{const{projectId:r}=d[u.subdomain];P.push(k.sceneDetail(r))},[d,k,P]),w=l.useCallback(u=>{var j;const r=(j=d[u.subdomain])==null?void 0:j.id;r&&f(r)},[d,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:n("global.order.name_asc")},{value:B.DESC,text:n("global.order.name_desc")}],onChange:(u,{value:r})=>D(r)}),[I,D]),oe=l.useCallback(u=>{let r=M(d,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case G.BLOCKED:{r="blocked";break}case G.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:n(`worlds_list_page.table.status_${r}`)})},[K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(d,u)||!j)return"-";const S=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return Y(Q(Number(S)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:c.length,r=Math.ceil(u/ee),j=h===b.DCL?a:c;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:n("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:n("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:n("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((S,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:S.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:d,ens:S})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:d,ens:S,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(S,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(S)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,S.subdomain),children:"Permissions"})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,a,c,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ae("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?n("worlds_list_page.empty_list.title"):n("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?n("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):n("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?n("worlds_list_page.empty_list.cta"):n("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===G.OK)return null;let r;return u.status===G.TO_BE_BLOCKED?r=n("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=n("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>a.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[a,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:c.length>0?H():$()}),[c,$,H]);return l.useEffect(()=>{D(B.ASC),U(1)},[h,U,D]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:n("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),a=we(),c=_(Be),m=_(Me),d=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Ge),v=_(Ye),y=_(Qe),R=_(me),I=_(Ve),D=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),P=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:c,externalNames:m,deploymentsByWorlds:d,projects:a,worldsPermissions:g,error:D,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:P,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
1
|
+
import{aM as ye,ae as te,Z as ne,H as e,cU as z,G as n,N as Re,cV as me,a1 as ae,cW as Y,M as s,cX as Q,cY as De,cZ as M,cG as Pe,D as l,K as k,aA as le,bJ as Ae,a4 as ge,a5 as _,c_ as We,c$ as pe,d0 as Oe,bD as L,d1 as Ue,cM as xe,d2 as se,d3 as Ce,d4 as je,d5 as de,d6 as ue,d7 as K,d8 as G,J as be,$ as he,cI as Be,d9 as Me,da as Ie,cJ as He,db as $e,c5 as Fe,dc as ze,a6 as Ke,ad as Ge,dd as Ye,de as Qe,cN as Ve,X,df as qe,cO as Je,cP as Xe,c6 as Ze,dg as es}from"./index-LbPj94fr.js";import{a as we,N as ss}from"./Navigation.container-m_5Xay6X.js";import{L as ts}from"./LoggedInDetailPage.container-BLLfFAse.js";import"./selectors-CSnw6goy.js";import"./SignInRequired-cMu1CrC_.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),a=new URLSearchParams(t.search),c=a.get(Ne),m={urlSearchParams:a,pathname:t.pathname};switch(c){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},ns=({isWorldContributorEnabled:t})=>{const{tab:a,pathname:c,urlSearchParams:m}=Ee(),d=ne(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),d.push(`${c}?${i.toString()}`)};return!a||a===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:a===b.DCL,onClick:()=>g(b.DCL),children:n("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:a===b.ENS,onClick:()=>g(b.ENS),children:n("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:a===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:n("worlds_list_page.name_tabs.contributor_names")})]})},as=te.memo(ns),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(as),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",T={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:a,className:c,onViewDetails:m})=>{const d=Q(t),g=Q(a),o=g*100/d;return e.jsxs("div",{"data-testid":gs,className:ae(T.container,c),children:[e.jsx("span",{className:T.used,children:n("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:T.description,children:[e.jsx("span",{children:n("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:T.link,onClick:m,children:n("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:T.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:T.current,children:Y(g)})," / ",Y(d)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:T.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Se({ens:t,deploymentsByWorlds:a}){const c=De(t.subdomain);return M(a,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:c}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(Pe,{role:"button",text:c,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ae("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:n("worlds_list_page.table.empty_url")})}function Te({deploymentsByWorlds:t,ens:a,projects:c,onEditScene:m,onUnpublishScene:d,onPublishScene:g}){const o=t[a.subdomain];return M(t,a)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),c.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(a),children:n("worlds_list_page.table.edit_scene")}):d&&e.jsx(s.Popup,{content:n("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>d(a),children:n("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:n("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:a,projects:c,loading:m,error:d,onUnpublishWorld:g}){const o=ne(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=a[p.subdomain];o.push(k.sceneDetail(x))},[a,k,o]),E=l.useCallback(p=>{var C;const x=(C=a[p.subdomain])==null?void 0:C.id;x&&g(x)},[a,g]);return d?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:d.message,header:n("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>n(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:a,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:a,ens:p,projects:c,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:Y(Q(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:n("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:n("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:n("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),a=we(),c=_(We),m=_(pe),d=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:c,deploymentsByWorlds:m,projects:a,loading:g,error:d,onUnpublishWorld:o})},_e="Worlds List Page Action",Ss=le.get("ENS_DOMAINS_URL",""),Ts=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:a,externalNames:c,error:m,deploymentsByWorlds:d,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,D]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),P=ne();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{P.push(k.scenes())},[k,P]),q=l.useCallback(u=>{const{projectId:r}=d[u.subdomain];P.push(k.sceneDetail(r))},[d,k,P]),w=l.useCallback(u=>{var j;const r=(j=d[u.subdomain])==null?void 0:j.id;r&&f(r)},[d,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:n("global.order.name_asc")},{value:B.DESC,text:n("global.order.name_desc")}],onChange:(u,{value:r})=>D(r)}),[I,D]),oe=l.useCallback(u=>{let r=M(d,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case G.BLOCKED:{r="blocked";break}case G.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:n(`worlds_list_page.table.status_${r}`)})},[K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(d,u)||!j)return"-";const S=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return Y(Q(Number(S)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:c.length,r=Math.ceil(u/ee),j=h===b.DCL?a:c;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:n("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:n("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:n("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((S,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:S.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:d,ens:S})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:d,ens:S,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(S,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(S)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,S.subdomain),children:"Permissions"})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,a,c,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ae("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?n("worlds_list_page.empty_list.title"):n("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?n("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):n("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?n("worlds_list_page.empty_list.cta"):n("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===G.OK)return null;let r;return u.status===G.TO_BE_BLOCKED?r=n("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=n("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>a.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[a,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:c.length>0?H():$()}),[c,$,H]);return l.useEffect(()=>{D(B.ASC),U(1)},[h,U,D]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:n("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),a=we(),c=_(Be),m=_(Me),d=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Ge),v=_(Ye),y=_(Qe),R=_(me),I=_(Ve),D=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),P=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:c,externalNames:m,deploymentsByWorlds:d,projects:a,worldsPermissions:g,error:D,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:P,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|