@dcl/builder-site 7.21.2-19872797940.commit-aecff8d → 7.21.3-19896835659.commit-bb1d19a
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-DF3b8Vad.js → Back-Bt1TpmNC.js} +1 -1
- package/assets/{CollectionProvider.container-DpmjXEm_.js → CollectionProvider.container-CdZDU931.js} +1 -1
- package/assets/{CollectionStatus.container-CidmUG47.js → CollectionStatus.container-D7SF6GBG.js} +1 -1
- package/assets/{ConfirmDelete-ByyhO6oc.js → ConfirmDelete-BvCbqgkr.js} +1 -1
- package/assets/{FileSaver.min-DQSptuuk.js → FileSaver.min-DkBGT7wg.js} +1 -1
- package/assets/{ItemProvider.container-cnm5in2H.js → ItemProvider.container-BE8u0Rvw.js} +2 -2
- package/assets/{JumpIn.container-CV_AsN5Z.js → JumpIn.container-BA-hVJA8.js} +1 -1
- package/assets/{LandAction-BctvH2Pa.js → LandAction-ClUpTbS0.js} +1 -1
- package/assets/{LandProviderPage-DrBlvQUp.js → LandProviderPage-Cle8Kso_.js} +1 -1
- package/assets/{LoggedInDetailPage.container-D3flN0sg.js → LoggedInDetailPage.container-DWMoMSsT.js} +1 -1
- package/assets/{Navigation-Ba0Kbzvi.css → Navigation-BvYpwaZ8.css} +1 -1
- package/assets/{Navigation.container-C6riyJpf.js → Navigation.container-9A40G-C8.js} +1 -1
- package/assets/{NotFound-Dbnnn04F.js → NotFound-BGRBV5Uq.js} +1 -1
- package/assets/{OptionsDropdown-RXZhPLTa.js → OptionsDropdown-CG8mCbxa.js} +1 -1
- package/assets/{RentalPeriod-B5vBeGOG.js → RentalPeriod-Em0xOmR0.js} +1 -1
- package/assets/{SDKTag-BLK-Xuk4.js → SDKTag--yigH3bT.js} +1 -1
- package/assets/{SceneStats.container-CI13yvwk.js → SceneStats.container-CFQr-vWl.js} +1 -1
- package/assets/{SignInRequired-B9AD3g_2.js → SignInRequired-B_3SXeXM.js} +1 -1
- package/assets/{ThirdPartyKindBadge-QN4f9D_z.js → ThirdPartyKindBadge-BClaXwJI.js} +1 -1
- package/assets/{dataReader-DbgdPizy.js → dataReader-BLycT3A3.js} +1 -1
- package/assets/{date-CKtzySAJ.js → date-BuuPIXis.js} +1 -1
- package/assets/{fortmatic-BYKZ9RP8.js → fortmatic-DJEz0rp3.js} +1 -1
- package/assets/{hooks-sFzfMYjS.js → hooks-aEto244t.js} +1 -1
- package/assets/{index-BYI_z2NB.css → index-3fCnTMv0.css} +1 -1
- package/assets/{index-UcKx2WKJ.js → index-8iYCGnTs.js} +1 -1
- package/assets/{index-Bvk6rHT1.js → index-BD8iJDzG.js} +1 -1
- package/assets/{index-4YYgi5nn.js → index-BHRIVcTs.js} +24 -24
- package/assets/{index-BWAbdhN9.js → index-BICUfUCl.js} +1 -1
- package/assets/{index-BMbodJ2i.js → index-BQ0GFn_M.js} +1 -1
- package/assets/{index-CuFr2HIB.js → index-Bhseic3g.js} +1 -1
- package/assets/{index-CB4QmsI_.js → index-BknYlUwd.js} +1 -1
- package/assets/{index-DQg98s1f.css → index-BosWvral.css} +7 -7
- package/assets/{index-ChpncsGD.js → index-Br6hHsA1.js} +1 -1
- package/assets/{index-BVqSEpJF.js → index-CG8pSyWD.js} +1 -1
- package/assets/{index-8HUkmr4Z.js → index-CGrCbrif.js} +1 -1
- package/assets/{index-CaW87E3q.js → index-CJppakqi.js} +2 -2
- package/assets/{index-CujKAe14.css → index-CLw4Lv2v.css} +1 -1
- package/assets/{index-TBQcHv5_.css → index-CTAssOyf.css} +1 -1
- package/assets/{index-oNwcy3Qd.js → index-CWPKklZI.js} +2 -2
- package/assets/{index-BSANwm0a.js → index-CZ8dfrU0.js} +1 -1
- package/assets/{index-BmDbN7U2.js → index-CbjNJ2Kx.js} +1 -1
- package/assets/{index-FxUS8buh.js → index-CdewbTl9.js} +1 -1
- package/assets/{index-DLAuXrz5.js → index-CdmO0FNu.js} +1 -1
- package/assets/{index-B9-mOGVz.css → index-Cl_Vz47v.css} +1 -1
- package/assets/index-Co_sF4mN.js +1 -0
- package/assets/{index-D3HfYL__.js → index-D2M0UdRW.js} +1 -1
- package/assets/{index-DcIMry35.js → index-D39rSukq.js} +1 -1
- package/assets/{index-cDl2RuQQ.js → index-DAAeQbXS.js} +1 -1
- package/assets/{index-CpHAc1Pr.js → index-DAx-r4m3.js} +1 -1
- package/assets/{index-rZnp_MgI.js → index-DGucDtQe.js} +1 -1
- package/assets/{index-cFaKSAsY.js → index-DMJQXYRd.js} +1 -1
- package/assets/{index-BZCZ7vU4.js → index-DOh8-nXu.js} +1 -1
- package/assets/{index-DxEx1xsg.js → index-DYzSJInl.js} +1 -1
- package/assets/{index-R3obG38P.js → index-Db5vWMok.js} +1 -1
- package/assets/{index-DdeT8oUt.js → index-DhWMukFk.js} +1 -1
- package/assets/{index-B-IA_SkQ.js → index-DlLGErhb.js} +1 -1
- package/assets/{index-J9acyXAZ.css → index-Dpo0OSlf.css} +1 -1
- package/assets/{index-BmWiBSix.js → index-DvQq0rNn.js} +1 -1
- package/assets/{index-9-J3xQhU.js → index-Gh2V6S8q.js} +1 -1
- package/assets/{index-dw4pQbGk.js → index-JkZS13Xr.js} +1 -1
- package/assets/{index-CFXvHGOP.js → index-LLu-0F-B.js} +1 -1
- package/assets/{index-Cb9gq47R.js → index-N5H4XX_z.js} +1 -1
- package/assets/{index-B6jx0HWs.js → index-OtuvcX8Z.js} +1 -1
- package/assets/{index-97fGaEg3.js → index-Pi8zH23Q.js} +1 -1
- package/assets/{index-COr3oQDB.css → index-SoLXlPaG.css} +1 -1
- package/assets/index-UXTmA8HS.js +1 -0
- package/assets/index-ZjF3iZ0v.js +1 -0
- package/assets/{index-mFqk1zCo.js → index-ik5xvgjC.js} +1 -1
- package/assets/{index-BY0mjzwy.js → index-koBO0cpK.js} +1 -1
- package/assets/{index-0uLTCJGa.js → index-mFsPtgxU.js} +1 -1
- package/assets/{index-B8JKPZl3.js → index-rfdKGuam.js} +1 -1
- package/assets/{index-DcNMC_Qm.js → index-w9zwRdjL.js} +1 -1
- package/assets/{index.es--fsWc2TS.js → index.es-B5hd-vsJ.js} +4 -4
- package/assets/{selectors-Bdn7uSD3.js → selectors-RKMIkjNm.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-BgNbEary.js +0 -1
- package/assets/index-DcE7yAs8.js +0 -1
- package/assets/index-PntaTlcT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as be,a4 as F,J as n,ak as je,N as e,M as s,Q as de,R as E,dN as me,S as t,T as U,ey as Ie,a2 as he,ez as Se,eA as Z,a7 as Ne,dM as Ce,eB as fe,eC as ue,eD as Re,eE as ce,P as ve,eF as f,bD as oe,eG as w,aM as we,eH as Le,eI as De,eJ as Ee,eK as Ae,eL as Oe,bq as G,eM as Pe,eN as ie,eO as ye,eP as ke,eQ as Me,eR as He,eS as $e,eT as Be,eU as Fe,eV as Ue,eW as Ve,eX as ze}from"./index-4YYgi5nn.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-C6riyJpf.js";import{L as Ze}from"./LoggedInDetailPage.container-D3flN0sg.js";import{O as ge}from"./OptionsDropdown-RXZhPLTa.js";import{a as B}from"./date-CKtzySAJ.js";import{C as _e}from"./CollectionStatus.container-CidmUG47.js";import"./selectors-Bdn7uSD3.js";import"./SignInRequired-B9AD3g_2.js";import"./index-CFXvHGOP.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
|
1
|
+
import{b1 as be,a4 as F,J as n,ak as je,N as e,M as s,Q as de,R as E,dN as me,S as t,T as U,ey as Ie,a2 as he,ez as Se,eA as Z,a7 as Ne,dM as Ce,eB as fe,eC as ue,eD as Re,eE as ce,P as ve,eF as f,bD as oe,eG as w,aM as we,eH as Le,eI as De,eJ as Ee,eK as Ae,eL as Oe,bq as G,eM as Pe,eN as ie,eO as ye,eP as ke,eQ as Me,eR as He,eS as $e,eT as Be,eU as Fe,eV as Ue,eW as Ve,eX as ze}from"./index-BHRIVcTs.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-9A40G-C8.js";import{L as Ze}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{O as ge}from"./OptionsDropdown-CG8mCbxa.js";import{a as B}from"./date-BuuPIXis.js";import{C as _e}from"./CollectionStatus.container-D7SF6GBG.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";import"./index-LLu-0F-B.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ak as N,N as s,a7 as P,M as x,dJ as k,S as l,dK as v,dL as H,J as j,bP as y,cf as w,bO as B,bQ as _,dM as z,dN as $,dO as F,b6 as i,Q as S,R as h,dP as K,dQ as V,dR as Q,dS as G,dT as J,dU as Y,dV as W,dW as A,dX as q,dY as f,dZ as X,d_ as Z,d$ as b,e0 as L,e1 as R,e2 as O,e3 as ss,e4 as es,e5 as as,e6 as ts,e7 as ns,e8 as is,e9 as cs,ea as os,eb as rs,ec as ls,ed as D,ee as M,ef as U,am as ds,ao as ms,T as xs,aj as us,aM as _s,eg as js,eh as Ss}from"./index-
|
|
1
|
+
import{ak as N,N as s,a7 as P,M as x,dJ as k,S as l,dK as v,dL as H,J as j,bP as y,cf as w,bO as B,bQ as _,dM as z,dN as $,dO as F,b6 as i,Q as S,R as h,dP as K,dQ as V,dR as Q,dS as G,dT as J,dU as Y,dV as W,dW as A,dX as q,dY as f,dZ as X,d_ as Z,d$ as b,e0 as L,e1 as R,e2 as O,e3 as ss,e4 as es,e5 as as,e6 as ts,e7 as ns,e8 as is,e9 as cs,ea as os,eb as rs,ec as ls,ed as D,ee as M,ef as U,am as ds,ao as ms,T as xs,aj as us,aM as _s,eg as js,eh as Ss}from"./index-BHRIVcTs.js";import{b as hs}from"./Navigation.container-9A40G-C8.js";import{S as Cs}from"./SignInRequired-B_3SXeXM.js";import{a as Es}from"./date-BuuPIXis.js";import"./selectors-RKMIkjNm.js";import"./index-LLu-0F-B.js";const ps="_ensImage_er26d_1",gs="_name_er26d_15",Ns="_small_er26d_23",I={ensImage:ps,name:gs,small:Ns};class Ts extends N.PureComponent{render(){const{subdomain:a,isSmall:e}=this.props;return s.jsx("div",{className:P(I.ensImage,{[I.small]:e}),children:s.jsx("div",{className:I.name,children:a.slice(0,2)})})}}const vs=c=>{const a=c.replacedBy||c.hash;return a?H({txHash:a},c.chainId):""},ys=c=>{const{selection:a,address:e,collectionId:t,item:n,subdomain:r,slotsToyBuy:d}=c,u=j.useMemo(()=>new Set((a||[]).map(C=>y(C.x,C.y))),[a]),E=j.useCallback((C,T)=>u.has(y(C,T))?{color:"#ff0044",scale:1.4}:null,[u]),p=j.useCallback((C,T)=>u.has(y(C,T))?{color:"#ff9990",scale:1.2}:null,[u]),[m,g]=j.useMemo(()=>a?w(a):[0,0],[a]);return a?s.jsx(B,{x:m,y:g,layers:[E,p],width:48,height:48,size:9,isDraggable:!1}):e?s.jsx(_,{address:e,size:"huge",imageOnly:!0}):t?s.jsx(z,{collectionId:t}):n?s.jsx($,{item:n}):r?s.jsx(Ts,{subdomain:r,isSmall:!0}):d?s.jsx("div",{className:"slot-image"}):null},Is=c=>{const{text:a,tx:e}=c;return s.jsxs("div",{className:"TransactionDetail",children:[s.jsxs("div",{className:"left",children:[s.jsx("div",{className:"image",children:s.jsx(ys,{...c})}),s.jsxs("div",{className:"text",children:[s.jsx("div",{className:"description",children:a}),s.jsxs("div",{className:"timestamp",children:[Es(e.timestamp),"."]})]})]}),s.jsx("div",{className:"right",children:s.jsxs("a",{href:vs(e),className:e.status?"status "+e.status:"status",target:"_blank",rel:"noopener noreferrer",children:[s.jsx("div",{className:"description",children:e.status||x("global.loading")}),k(e.status)?s.jsx("div",{className:"spinner",children:s.jsx(l.Loader,{active:!0,size:"mini"})}):null,e.status===v.REVERTED?s.jsx(l.Icon,{name:"warning sign"}):null,e.status===v.CONFIRMED||e.status===v.REPLACED?s.jsx(l.Icon,{name:"check"}):null]})})]})},o=N.memo(Is),As=c=>{const{tx:a}=c;switch(a.actionType){case M:case ls:{const{authorization:e}=a.payload,t=D(e.authorizedAddress),n=D(e.contractAddress),r=a.actionType===M?x("transaction.approved"):x("transaction.unapproved");return s.jsx(o,{address:e.address,text:s.jsx(i,{id:"transaction.approve_token",values:{action:r,contract:s.jsx(U,{chainId:e.chainId,address:e.authorizedAddress,txHash:"",children:t}),token:s.jsx(U,{chainId:e.chainId,address:e.contractAddress,txHash:"",children:n})}}),tx:a})}case rs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:"transaction.transfer",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case os:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.edit",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case cs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:t?"transaction.set_operator_assigned":"transaction.set_operator_revoked",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case is:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.create_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case ns:{const{name:e,count:t,type:n,selection:r}=a.payload;return s.jsx(o,{selection:r,text:s.jsx(i,{id:`transaction.edit_estate_${n}`,values:{name:s.jsx("strong",{children:e}),count:t}}),tx:a})}case ts:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.dissolve_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case as:{const{address:e,type:t,isApproved:n}=a.payload;return s.jsx(o,{address:e,text:s.jsx(i,{id:n?"transaction.set_manager_assigned":"transaction.set_manager_revoked",values:{address:s.jsx(_,{address:e,textOnly:!0}),type:x(`global.${t}_plural`)}}),tx:a})}case es:{const{item:e}=a.payload;return s.jsx(o,{item:e,text:s.jsx(i,{id:"transaction.set_price_and_beneficiary",values:{name:s.jsx(S,{to:h.itemDetail(e.id),children:e.name})}}),tx:a})}case ss:{const{thirdPartyId:e,thirdPartyName:t}=a.payload;return s.jsx(o,{thirdPartyId:e,text:s.jsx(i,{id:"transaction.disable_third_party",values:{name:t}}),tx:a})}case L:case R:case O:case b:{const{collection:e}=a.payload,t={[L]:"collection_published",[R]:"collection_approved",[O]:"collection_rejected",[b]:"updated_collection_managers"}[a.actionType];return s.jsx(o,{collectionId:e.id,text:s.jsx(i,{id:`transaction.${t}`,values:{name:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name})}}),tx:a})}case X:{const{collection:e,mints:t}=a.payload,n=t.length===1,r=t[0].item,d=n?{item:r}:{collection:e};return s.jsx(o,{...d,text:s.jsx(i,{id:n?"transaction.collection_item_minted":"transaction.collection_items_minted",values:{collectionName:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name}),itemName:s.jsx(S,{to:h.itemDetail(r.id),children:r.name}),count:Z(t)}}),tx:a})}case W:{const{chainId:e}=a,{collection:t,minters:n}=a.payload,r=A(n,t.minters),d=A(t.minters,n),u=q(e),E=f(d,u),p=f(r,u);let m="";return E?m="transaction.unset_collection_on_sale":p?m="transaction.set_collection_on_sale":m="transaction.updated_collection_minters",s.jsx(o,{collectionId:t.id,text:s.jsx(i,{id:m,values:{name:s.jsx(S,{to:h.collectionDetail(t.id),children:t.name})}}),tx:a})}case Y:{const{address:e,ens:t}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:s.jsx(i,{id:"transaction.set_ens_resolver",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case J:{const{address:e,ens:t,land:n}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:n?s.jsx(i,{id:"transaction.set_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain,land_link:s.jsx(S,{to:h.landDetail(n.id),children:n.name})}}):s.jsx(i,{id:"transaction.unset_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case Q:{const{address:e,allowance:t}=a.payload;return s.jsx(o,{address:e,text:G(t)?s.jsx(i,{id:"transaction.allowed_claim_mana",values:{address:s.jsx(_,{address:e})}}):s.jsx(i,{id:"transaction.disallowed_claim_mana",values:{address:s.jsx(_,{address:e})}}),tx:a})}case V:{const{subdomain:e}=a.payload;return s.jsx(o,{subdomain:e,text:s.jsx(i,{id:"transaction.claim_name",values:{name:e}}),tx:a})}case K:{const{ens:e}=a.payload;return s.jsx(o,{subdomain:e.subdomain,text:s.jsx(i,{id:"transaction.reclaim_name",values:{subdomain:e.subdomain}}),tx:a})}case F:{const{count:e,collectionId:t,collectionName:n}=a.payload;return s.jsx(o,{tx:a,collectionId:t,text:s.jsx(i,{id:"transaction.rescue_items",values:{count:e,collectionName:s.jsx(S,{to:h.collectionDetail(t),children:n})}})})}default:return null}},fs=N.memo(As),bs=c=>{const{address:a,transactions:e,onClearHistory:t,isLoggedIn:n}=c,[r,d]=j.useState(!1),u=j.useCallback(()=>{a&&t(a),d(!1)},[a,t]),E=j.useCallback(()=>d(!0),[d]),p=j.useCallback(()=>d(!1),[d]);let m=null;return n?e.length===0?m=s.jsx("div",{className:"center",children:s.jsx("p",{children:x("activity_page.empty")})}):m=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"history-header",children:[s.jsx("div",{className:"left",children:s.jsx(l.Header,{sub:!0,children:x("activity_page.latest_activity")})}),s.jsx("div",{className:"right",children:s.jsx(l.Button,{basic:!0,onClick:E,children:x("activity_page.clear_history")})})]}),s.jsx("div",{className:"transactions",children:e.map(g=>s.jsx(fs,{tx:g},g.hash)).reverse()})]}):m=s.jsx(Cs,{}),s.jsxs(s.Fragment,{children:[s.jsx(ds,{}),s.jsx(hs,{}),s.jsx(l.Page,{className:"ActivityPage",children:m}),s.jsxs(l.Modal,{size:"tiny",open:r,children:[s.jsx(l.Modal.Header,{children:x("activity_page.clear_history_modal.title")}),s.jsx(l.Modal.Content,{children:x("activity_page.clear_history_modal.text")}),s.jsxs(l.Modal.Actions,{children:[s.jsx(l.Button,{onClick:p,children:x("global.cancel")}),s.jsx(l.Button,{primary:!0,onClick:u,children:x("global.proceed")})]})]}),s.jsx(ms,{})]})},Ls=N.memo(bs),Rs=c=>({isLoggedIn:us(c),address:_s(c),transactions:js(c)}),Os=c=>({onClearHistory:a=>c(Ss(a))}),ws=xs(Rs,Os)(Ls);export{ws as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-4YYgi5nn.js";import{d as Re}from"./hooks-sFzfMYjS.js";import{I as Le}from"./ItemProvider.container-cnm5in2H.js";import{C as Be}from"./ConfirmDelete-ByyhO6oc.js";import{L as Ue}from"./LoggedInDetailPage.container-D3flN0sg.js";import{N as Oe}from"./NotFound-Dbnnn04F.js";import{B as Ae}from"./Back-DF3b8Vad.js";import"./Navigation.container-C6riyJpf.js";import"./selectors-Bdn7uSD3.js";import"./SignInRequired-B9AD3g_2.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
1
|
+
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-BHRIVcTs.js";import{d as Re}from"./hooks-aEto244t.js";import{I as Le}from"./ItemProvider.container-BE8u0Rvw.js";import{C as Be}from"./ConfirmDelete-BvCbqgkr.js";import{L as Ue}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{N as Oe}from"./NotFound-BGRBV5Uq.js";import{B as Ae}from"./Back-Bt1TpmNC.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.2-19872797940.commit-aecff8d/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
|
|
1
|
+
.ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as g,aj as n,ac as a,ad as i}from"./index-BHRIVcTs.js";import{H as s}from"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";const e=o=>({isLoggedIn:n(o),isLoggingIn:a(o)||i(o)}),r=g(e)(s);export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-
|
|
1
|
+
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-BHRIVcTs.js";import{L as z}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{B as D}from"./Back-Bt1TpmNC.js";import{N as M}from"./NotFound-BGRBV5Uq.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";function G(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const d of a)if(d.land.id!==o.landId){n=d.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const d=h(a,n);return c&&d in c?c[d].land:void 0},[c]),f=l.useCallback((a,n)=>{const d=j(a,n);d&&u(d)},[]),v=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),S=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const d=h(a,n);return(!s||s.id!==d)&&g===d},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(z,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(t.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(D,{absolute:!0,onClick:p}),e.jsxs(t.Narrow,{children:[e.jsx(t.Row,{children:e.jsx(t.Column,{children:e.jsxs(t.Section,{children:[e.jsx(t.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(T,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(t.Row,{className:"atlas-footer",children:[e.jsx(t.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(t.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(t.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(t.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(M,{})})}const J=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:H(g,u),isLoading:R(i)||O(P(i),q)||F(i),landTiles:A(i)}},X=y(J)(G);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var y=Object.defineProperty;var b=(o,r,e)=>r in o?y(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var d=(o,r,e)=>b(o,typeof r!="symbol"?r+"":r,e);import{J as g,aF as E,N as s,Q as F,R as v,P as C,M as h,T as I,U as L,X as M,a2 as P,bu as i,am as A,S as l,ao as w,aa as D,a4 as T,b1 as B,ab as m,ah as R,bv as k,bw as O,bx as U,aj as W,by as _,bz as z,bn as G,bA as V,ai as $}from"./index-
|
|
1
|
+
var y=Object.defineProperty;var b=(o,r,e)=>r in o?y(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var d=(o,r,e)=>b(o,typeof r!="symbol"?r+"":r,e);import{J as g,aF as E,N as s,Q as F,R as v,P as C,M as h,T as I,U as L,X as M,a2 as P,bu as i,am as A,S as l,ao as w,aa as D,a4 as T,b1 as B,ab as m,ah as R,bv as k,bw as O,bx as U,aj as W,by as _,bz as z,bn as G,bA as V,ai as $}from"./index-BHRIVcTs.js";import{B as H}from"./Back-Bt1TpmNC.js";const K=["page","sortBy","sortOrder","group","ethAddress"];var j;let Z=(j=class extends g.PureComponent{constructor(){super(...arguments);d(this,"state",{isDeleting:!1});d(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});d(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});d(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});d(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:E.CLEAR_DEPLOYMENT,projectId:e.id})})}render(){const{pool:e}=this.props,t=e.statistics?e.statistics.parcels:e.layout.cols*e.layout.rows;return s.jsxs(F,{to:v.poolView(e.id,"pool"),className:"PoolCard",children:[s.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${e.thumbnail})`}}),s.jsxs("div",{className:"project-data",children:[s.jsx("div",{className:"title-wrapper",children:s.jsx("div",{className:"title",children:e.title})}),s.jsx("div",{className:"description",title:e.description,children:s.jsxs("div",{className:"component-list",children:[s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-parcel"})," ",h("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",h("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},d(j,"defaultProps",{items:0}),j);const q=(o,r)=>{const{pool:e}=r,t=L(o)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:M(o)[r.pool.id]}},J=o=>({onOpenModal:(r,e)=>o(P(r,e))}),Q=I(q,J)(Z);let X=class extends g.PureComponent{constructor(){super(...arguments);d(this,"handleChangeGroup",(e,t)=>{const{group:n,...a}=this.getFilters(),c=1;t.value==="all"?this.handleChangeFilters({...a,page:c}):this.handleChangeFilters({...a,page:c,group:t.value})});d(this,"handleChangeUser",(e,t)=>{const{ethAddress:n,...a}=this.getFilters(),c=1;t.value==="all"?this.handleChangeFilters({...a,page:c}):this.handleChangeFilters({...a,page:c,ethAddress:t.value})});d(this,"handleChangeSort",(e,t)=>{const n=this.getFilters(),a=1;if(t.value&&n.sortBy!==t.value)switch(t.value){case i.NAME:this.handleChangeFilters({...n,page:a,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...n,page:a,sortBy:t.value,sortOrder:"desc"})}});d(this,"handlePageChange",(e,t)=>{const n=this.getFilters(),a=Number(t.activePage);!Number.isNaN(a)&&a>0&&this.handleChangeFilters({...n,page:a})});d(this,"handleNavigateToScenes",()=>{const{history:e}=this.props;e.push(v.scenes())})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=i.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return K.reduce((t,n)=>{const a=e[n];return a!==void 0&&(t[n]=a),t},{})}handleChangeFilters(e){const{history:t,onLoadPools:n}=this.props;t.push(v.poolSearch(e)),n(e)}render(){const{pools:e,total:t,totalPages:n,isLoggedIn:a}=this.props,c=this.getFilters(),u={firstItem:null,lastItem:null};return c.page===1&&(u.prevItem=null),c.page===n&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(A,{}),s.jsx(l.Page,{isFullscreen:!0,children:s.jsxs("div",{className:"SceneListPage",children:[s.jsxs(l.Container,{children:[s.jsx(l.Section,{className:"navigation",children:s.jsxs(l.Row,{children:[s.jsx(H,{absolute:!0,onClick:this.handleNavigateToScenes}),s.jsx(l.Narrow,{children:s.jsxs(l.Row,{children:[s.jsx(l.Column,{children:s.jsx(l.Row,{children:s.jsx(l.Header,{size:"large",children:h("scene_list_page.projects_title")})})}),s.jsx(l.Column,{align:"right",children:s.jsxs(l.Row,{children:[s.jsx(l.Responsive,{minWidth:1025,as:g.Fragment,children:a&&s.jsx(l.Dropdown,{direction:"left",value:c.ethAddress||"all",options:[{value:"all",text:h("scene_list_page.filters.all_users")},{value:"me",text:h("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(l.Dropdown,{direction:"left",value:c.sortBy,options:[{value:i.NEWEST,text:h("scene_list_page.filters.newest")},{value:i.NAME,text:h("scene_list_page.filters.name")},{value:i.LIKES,text:h("scene_list_page.filters.likes")},{value:i.ITEMS,text:h("scene_list_page.filters.items")},{value:i.SMART_ITEMS,text:h("scene_list_page.filters.smart_items")},{value:i.SIZE,text:h("scene_list_page.filters.size")}],onChange:this.handleChangeSort})]})})]})})]})}),s.jsx(l.Narrow,{children:s.jsxs("div",{className:"PoolCardList",children:[e===null&&s.jsx(l.Loader,{active:!0,size:"huge"}),Array.isArray(e)&&t===0&&s.jsx("div",{className:"empty-projects",children:h("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(x=>s.jsx(Q,{pool:x},x.id))})]})})]}),s.jsx(l.Container,{children:t!==null&&n!==null&&s.jsx(l.Pagination,{totalPages:n,activePage:c.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(w,{})]})}};const Y=()=>{const o=D(),r=T(),e=B(),t=m(R),n=m(k),a=m(O),c=m(U),u=m(W),x=g.useMemo(()=>{const p=new URLSearchParams(e.search);return{group:_(p.get("group")),ethAddress:_(p.get("eth_address")),page:z(p.get("page"),1),sortBy:G(p.get("sort_by")??"",[i.NEWEST,i.LIKES,i.NAME,i.SIZE,i.ITEMS,i.SMART_ITEMS],i.NEWEST),sortOrder:V(p.get("sort_order"),"desc")}},[e.search]),S=g.useCallback((p,N)=>o(P(p,N)),[o]),f=g.useCallback(p=>o($(p)),[o]);return s.jsx(X,{pools:t,poolGroups:n,total:a,totalPages:c,isLoggedIn:u,onOpenModal:S,onLoadPools:f,history:r,location:e,...x})},le=Y;export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var C=Object.defineProperty;var b=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>b(s,typeof r!="symbol"?r+"":r,e);import{aG as v,J as u,W as P,N as t,aq as L,am as p,S as a,ao as g,M as d,bB as f,R as y,bC as k,bD as m,P as h,T as w,bE as N,as as S,av as F,au as j,bF as I,aj as R,ay as A,bG as E,U as T,bH as _,bI as M,bJ as O,bK as B,bL as D,aA as U,bM as V,a2 as $,a3 as q}from"./index-
|
|
1
|
+
var C=Object.defineProperty;var b=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>b(s,typeof r!="symbol"?r+"":r,e);import{aG as v,J as u,W as P,N as t,aq as L,am as p,S as a,ao as g,M as d,bB as f,R as y,bC as k,bD as m,P as h,T as w,bE as N,as as S,av as F,au as j,bF as I,aj as R,ay as A,bG as E,U as T,bH as _,bI as M,bJ as O,bK as B,bL as D,aA as U,bM as V,a2 as $,a3 as q}from"./index-BHRIVcTs.js";import{B as W}from"./Back-Bt1TpmNC.js";import{S as G}from"./SDKTag--yigH3bT.js";function J(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const K=v.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:J(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${K}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(m,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(m,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(G,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const H=s=>({isPreviewing:S(s),isReady:!F(s)&&j(s),isFetching:I(s)&&!j(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:T(s),currentAuthor:_(s),isLoading:M(s)||!!O(s).length}),Q=s=>({onLikePool:(r,e=!0)=>s(B(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s(V(r,e)),onOpenModal:(r,e)=>s($(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(H,Q)(N(z));export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-4YYgi5nn.js";import{a as we,N as ss}from"./Navigation.container-C6riyJpf.js";import{L as ts}from"./LoggedInDetailPage.container-D3flN0sg.js";import"./selectors-Bdn7uSD3.js";import"./SignInRequired-B9AD3g_2.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(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),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",S={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:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.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 Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?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})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("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:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("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:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("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=>a(`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(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(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:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("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:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,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,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();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(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,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:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,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(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;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:a("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:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("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?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("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(()=>n.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:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),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:a("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(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(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]),D=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:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
1
|
+
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-BHRIVcTs.js";import{a as we,N as ss}from"./Navigation.container-9A40G-C8.js";import{L as ts}from"./LoggedInDetailPage.container-DWMoMSsT.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.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(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),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",S={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:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.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 Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?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})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("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:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("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:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("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=>a(`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(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(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:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("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:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,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,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();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(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,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:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,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(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;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:a("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:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("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?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("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(()=>n.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:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),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:a("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(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(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]),D=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:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-
|
|
1
|
+
var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-BHRIVcTs.js";import{N as W}from"./Navigation.container-9A40G-C8.js";import{L as M}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{R as X}from"./RentalPeriod-Em0xOmR0.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";import"./index-LLu-0F-B.js";const Y=n=>n.ui.land,Z=n=>Y(n).view;class A extends R.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(v,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(v,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,S)?1:f(t,S)?-1:n>t?1:-1;let z=class extends R.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(X,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const J=(n,t)=>{const{land:a}=t,o=$(n)[a.id]||[],d=H(n,a);return{deployments:o,rental:d}},Q=O(J)(F(z)),b=20;let U=class extends R.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(C,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(C,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?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:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Q,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(M,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const K=n=>({lands:V(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(G(t))}),he=O(K,ee)(U);export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{J as C,c6 as h,N as e,S as s,M as r,ei as b,cM as v,cN as y,b6 as u,bQ as S,co as A,T,ej as _,ek as N,el as z}from"./index-
|
|
1
|
+
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{J as C,c6 as h,N as e,S as s,M as r,ei as b,cM as v,cN as y,b6 as u,bQ as S,co as A,T,ej as _,ek as N,el as z}from"./index-BHRIVcTs.js";import{L as P}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{S as f}from"./SignInRequired-B_3SXeXM.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";let L=class extends C.PureComponent{constructor(){super(...arguments);d(this,"timeoutId",null);d(this,"state",{hasCopiedText:!1,type:h.PARCEL,managerAddress:""});d(this,"handleOnCopy",()=>{this.timeoutId&&clearTimeout(this.timeoutId),this.setState({hasCopiedText:!0}),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.setState({hasCopiedText:!1})},1200)});d(this,"handleAddressChange",(t,a)=>{this.setState({managerAddress:a.value})});d(this,"handleTypeChange",(t,a)=>{this.setState({type:a.value})});d(this,"handleAddAuthorization",()=>{const{onSetUpdateManager:t}=this.props,{managerAddress:a,type:c}=this.state;t(a,c,!0)})}renderPage(){const{authorizations:t,wallet:a,onSetUpdateManager:c}=this.props,{hasCopiedText:g,managerAddress:o,type:m}=this.state,p=A(o);return e.jsx(s.Grid,{children:a===null?e.jsx(s.Loader,{size:"big",active:!0}):e.jsxs(e.Fragment,{children:[e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("global.address")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx("div",{className:"blockie-container",children:e.jsx(s.Blockie,{seed:a.address,scale:12})}),e.jsxs("div",{className:"address-container",children:[e.jsx("div",{className:"address",children:b()?v(a.address):a.address}),e.jsx(y,{role:"button",text:a.address,onCopy:this.handleOnCopy,children:g?e.jsx("span",{children:r("settings_page.copied")}):e.jsx("span",{className:"link",children:r("settings_page.copy_address")})})]})]})]}),e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("settings_page.authorizations")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx(s.Section,{className:"authoziations-disclaimer",children:r("settings_page.disclaimer",{emphasis:e.jsx("strong",{children:r("settings_page.emphasis")})})}),e.jsxs(s.Row,{className:"authorization-action",children:[e.jsx(u,{id:"settings_page.authorization_action",values:{address:e.jsx(s.Field,{value:o,onChange:this.handleAddressChange,placeholder:"0x...",error:o.length>0&&!p}),type:e.jsx(s.Dropdown,{options:[{text:"Parcels",value:h.PARCEL},{text:"Estates",value:h.ESTATE}],value:m,onChange:this.handleTypeChange})}}),e.jsx(s.Button,{size:"small",primary:!0,disabled:o.length===0||!p,onClick:this.handleAddAuthorization,children:r("global.submit")})]}),t.length>0?e.jsxs(s.Section,{children:[e.jsx(s.Header,{sub:!0,children:r("settings_page.authorizations_title")}),t.map(l=>e.jsxs(s.Row,{className:"authorization",children:[e.jsx(u,{id:"settings_page.authorization",values:{address:e.jsx(S,{address:l.address}),type:e.jsxs("span",{children:[" ",e.jsx("strong",{children:r(`global.${l.type}_plural`)})," "]})}}),e.jsx(s.Button,{basic:!0,onClick:()=>c(l.address,l.type,!1),children:r("global.revoke")})]}))]}):null]})]})]})})}renderLogin(){return e.jsx(f,{})}renderLoading(){return e.jsx("div",{className:"center",children:e.jsx(s.Loader,{active:!0,size:"huge"})})}render(){return e.jsx(P,{className:"SettingsPage",children:this.renderPage()})}};const R=i=>({wallet:_(i),authorizations:N(i)}),E=i=>({onSetUpdateManager:(n,t,a)=>i(z(n,t,a))}),B=T(R,E)(L);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./index-
|
|
1
|
+
import{a as g}from"./index-CJppakqi.js";import"./index-BHRIVcTs.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty;var
|
|
1
|
+
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{a4 as f,J as d,aF as $,aG as m,aH as v,M as _,N as s,S as o,P as g,O as U,T,ay as j,aI as O,aJ as V,aK as w,aL as y,a2 as k,aM as M,aj as A,aN as G,aO as J,aP as X,aQ as z}from"./index-BHRIVcTs.js";import{S as H}from"./SignInRequired-B_3SXeXM.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",Q="_downloadBtn_1abv2_36",W="_button_1abv2_13",b={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:Q,button:W},Z=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const I=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Z);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),N=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),C=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):N?_("topbar.limits_exceeded"):null,[r,N]),S=d.useCallback(()=>{I.goBack()},[I]);return s.jsxs("div",{className:b.container,children:[s.jsxs("div",{className:b.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:b.editNameBtn,children:[e.title,s.jsx(g,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(g,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:b.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:b.downloadBtn,disabled:c,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:C,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:j(e),metrics:O(e),limits:V(e),areEntitiesOutOfBoundaries:w(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(k(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:I=""}=this.props;if(!c)return s.jsx(H,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${I}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:j(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),Ee=T(ie,de)(ce);export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a4 as A,J as t,aG as S,R as B,N as e,M as l,S as n,P as v,a7 as f,cL as L,cM as T,cK as M,Q as P,cN as R,aa as w,ab as p,cX as O,bq as V,cT as D,cO as U,cS as $,cY as q,cZ as G,a2 as H,c_ as K}from"./index-
|
|
1
|
+
import{a4 as A,J as t,aG as S,R as B,N as e,M as l,S as n,P as v,a7 as f,cL as L,cM as T,cK as M,Q as P,cN as R,aa as w,ab as p,cX as O,bq as V,cT as D,cO as U,cS as $,cY as q,cZ as G,a2 as H,c_ as K}from"./index-BHRIVcTs.js";import{b as Q}from"./hooks-aEto244t.js";import{L as J}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{N as W}from"./Navigation.container-9A40G-C8.js";import"./SignInRequired-B_3SXeXM.js";import"./selectors-RKMIkjNm.js";const X="_main_7p9v2_1",Y="_fields_7p9v2_9",Z="_ensImage_7p9v2_16",z="_field_7p9v2_9",ee="_fieldContainer_7p9v2_29",ae="_fieldTitle_7p9v2_41",se="_subdomain_7p9v2_50",le="_actionBtn_7p9v2_64",ne="_editableFieldValue_7p9v2_84",ie="_avatar_7p9v2_90",te="_avatarImg_7p9v2_97",de="_avatarName_7p9v2_104",ce="_ensBtn_7p9v2_109",oe="_address_7p9v2_116",re="_returnLink_7p9v2_122",me="_editableField_7p9v2_84",_e="_emptyFieldPlaceholder_7p9v2_138",pe="_pin_7p9v2_144",ue="_externalLink_7p9v2_154",he="_unclaimedBadge_7p9v2_159",xe="_disabled_7p9v2_170",s={main:X,fields:Y,ensImage:Z,field:z,fieldContainer:ee,fieldTitle:ae,subdomain:se,actionBtn:le,editableFieldValue:ne,avatar:ie,avatarImg:te,avatarName:de,ensBtn:ce,address:oe,returnLink:re,editableField:me,emptyFieldPlaceholder:_e,pin:pe,externalLink:ue,unclaimedBadge:he,disabled:xe};function Ne(r){const{ens:a,isLoading:j,alias:u,avatar:m,name:_,wallet:h,onOpenModal:c,onFetchENS:x}=r,d=A(),g=t.useMemo(()=>a?`${S.get("MARKETPLACE_API")}/ens/generate?ens=${a.name}&width=330&height=330`:"",[a]),o=(a==null?void 0:a.ensOwnerAddress)!==(a==null?void 0:a.nftOwnerAddress);t.useEffect(()=>{_&&h&&x(_)},[_,h,x]);const b=t.useCallback(()=>{c("EnsMapAddressModal",{ens:a})},[c,a]),F=t.useCallback(()=>{c("UseAsAliasModal",{newName:a==null?void 0:a.name})},[c,a==null?void 0:a.name]),N=t.useCallback(()=>{d.push(B.ensSelectLand(a==null?void 0:a.subdomain))},[d,a==null?void 0:a.subdomain]),C=t.useCallback(()=>{c("ReclaimNameModal",{ens:a})},[c]),k=t.useMemo(()=>{var I;let i;return u!==(a==null?void 0:a.name)?i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.unassign")}),e.jsx(n.Button,{compact:!0,primary:!0,onClick:F,className:s.actionBtn,"aria-label":l("ens_detail_page.set_as_primary"),children:e.jsx(n.Icon,{name:"user plus"})})]}):i=e.jsx("div",{className:s.editableField,children:e.jsxs("span",{className:s.avatar,"data-testid":"alias-avatar",children:[m?e.jsx("img",{className:s.avatarImg,src:((I=m.avatar.snapshots)==null?void 0:I.face256)||"",alt:m.realName}):e.jsx(v,{name:"profile"}),e.jsx("span",{className:s.avatarName,children:a.name}),l("ens_list_page.table.you")]})}),e.jsxs("div",{className:s.field,children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.alias"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.alias")})]}),i]})},[a==null?void 0:a.name,o,m,u,F]),E=t.useMemo(()=>{let i=null;return o?i=e.jsxs("div",{className:f(s.editableField,s.disabled),children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_address")}),e.jsx(n.Button,{compact:!0,secondary:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):a!=null&&a.ensAddressRecord?i=e.jsxs("span",{className:s.editableField,children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("img",{src:L,alt:"Ethereum"}),T(a.ensAddressRecord)]}),e.jsx(n.Button,{compact:!0,secondary:!0,inverted:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.edit_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.assign_address")}),e.jsx(n.Button,{compact:!0,secondary:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.assign_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}),e.jsxs("div",{className:f(s.field,{[s.disabled]:o}),children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.address"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.address")})]}),i]})},[a==null?void 0:a.ensAddressRecord,o,b]),y=t.useMemo(()=>{let i=null;return o?i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_location")}),e.jsx(n.Button,{compact:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_location"),children:e.jsx(n.Icon,{name:"crosshairs"})})]}):a!=null&&a.landId?M(a.landId)?i=e.jsxs("div",{className:s.editableField,"data-testid":"land-field",children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("div",{className:s.pin,children:e.jsx(v,{name:"pin"})}),a==null?void 0:a.landId]}),e.jsx(n.Button,{compact:!0,onClick:N,className:s.actionBtn,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,"data-testid":"estate-field",children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("div",{className:s.pin,children:e.jsx(v,{name:"pin"})}),`Estate (${a.landId})`]}),e.jsx(n.Button,{compact:!0,className:s.actionBtn,onClick:N,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.point_location")}),e.jsx(n.Button,{compact:!0,className:s.actionBtn,onClick:N,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"crosshairs"})})]}),e.jsxs("div",{className:f(s.field,{[s.disabled]:o}),children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.land"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.land")})]}),i]})},[a==null?void 0:a.landId,o,N]);return e.jsxs(J,{activeTab:W.NAMES,isPageFullscreen:!0,isLoading:j||!a,children:[e.jsx(P,{to:B.ens(),children:e.jsxs(n.Button,{basic:!0,className:s.returnLink,children:[e.jsx(n.Icon,{name:"chevron left"}),"Return"]})}),e.jsxs("div",{className:s.main,children:[e.jsx("img",{alt:a==null?void 0:a.subdomain,src:g,className:s.ensImage}),e.jsxs("div",{className:s.fields,children:[e.jsxs("div",{className:s.fieldContainer,children:[e.jsxs("div",{children:[e.jsx("span",{className:s.fieldTitle,children:l("ens_detail_page.name")}),e.jsxs("span",{className:s.subdomain,children:[e.jsxs("span",{children:[e.jsx("span",{children:a==null?void 0:a.name}),".dcl.eth"]}),e.jsx(R,{role:"button",text:(a==null?void 0:a.subdomain)||"",showPopup:!0,className:"copy-to-clipboard",children:e.jsx(n.Icon,{"aria-label":"copy name","aria-hidden":"false",name:"clone outline"})}),(a==null?void 0:a.ensOwnerAddress)!==(a==null?void 0:a.nftOwnerAddress)?e.jsx("span",{className:s.unclaimedBadge,children:l("ens_detail_page.unclaimed")}):null]})]}),e.jsx(n.Button,{primary:!0,onClick:C,children:l("ens_detail_page.reclaim_name")})]}),e.jsxs("div",{className:s.fieldContainer,children:[k,E,y]})]})]})]})}function Ie(){const r=w(),a=Q(),j=p(d=>a?O(d,`${a}.dcl.eth`):null),u=p(d=>V(D(d),K)),m=p(U),_=p($),h=p(q),c=t.useCallback(d=>r(G(d)),[r]),x=t.useCallback((d,g)=>r(H(d,g)),[r]);return e.jsx(Ne,{name:a,ens:j,isLoading:u,alias:m,avatar:_,wallet:h,onFetchENS:c,onOpenModal:x})}export{Ie as default};
|