@dcl/builder-site 7.5.3 → 7.5.4-14857361421.commit-815d0db
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-CoxexjGM.js → Back-DSw2t9ER.js} +1 -1
- package/assets/CollectionProvider.container-Ntdhnjv0.js +1 -0
- package/assets/{CollectionStatus.container-CglSuZa1.js → CollectionStatus.container-D94PszBl.js} +1 -1
- package/assets/{ConfirmDelete-D2OS_BiO.js → ConfirmDelete-BOOn71ti.js} +1 -1
- package/assets/{FileSaver.min-DOhqs8Zl.js → FileSaver.min-6SlxoEL-.js} +1 -1
- package/assets/{ItemProvider.container-BcJRoOaK.js → ItemProvider.container-C5ZTIMci.js} +1 -1
- package/assets/{JumpIn.container-D9-98tz1.js → JumpIn.container-C_Bd2Q2L.js} +1 -1
- package/assets/{LandAction-CZYQA4Rl.js → LandAction-BBw11feV.js} +1 -1
- package/assets/{LandProviderPage-DRhp88AB.js → LandProviderPage-BBXo4FKe.js} +1 -1
- package/assets/{LoggedInDetailPage.container-BMX1d7bi.js → LoggedInDetailPage.container-BacXg1fp.js} +1 -1
- package/assets/{Navigation-EuZSxuGt.css → Navigation-Bvsuxsgd.css} +1 -1
- package/assets/{Navigation.container-C8BTALTd.js → Navigation.container-BpqXxAPO.js} +1 -1
- package/assets/{NotFound-DWatCUk4.js → NotFound-DqST62Hb.js} +1 -1
- package/assets/{OptionsDropdown-CkgY0ZQ8.js → OptionsDropdown-BC4A5J96.js} +1 -1
- package/assets/{RentalPeriod-CKMQ425T.js → RentalPeriod-BorPFM4k.js} +1 -1
- package/assets/{SDKTag-BNwJJ_4v.js → SDKTag-DDQVOjGq.js} +1 -1
- package/assets/{SceneStats.container-Cf_bqw7C.js → SceneStats.container-Bnai63Cy.js} +1 -1
- package/assets/{SignInRequired-CjXWxB7A.js → SignInRequired-MhyXItkL.js} +1 -1
- package/assets/{ThirdPartyKindBadge-Dk-Ixr6v.js → ThirdPartyKindBadge-D8cjYdet.js} +1 -1
- package/assets/{dataReader-BNIBt8oE.js → dataReader-ydpB3PmN.js} +1 -1
- package/assets/{date-DfOx7gwH.js → date-C_kTbrPh.js} +1 -1
- package/assets/{fortmatic-BV4qq3Mp.js → fortmatic-CnH2IS0r.js} +1 -1
- package/assets/{index-BhXpibYF.js → index--NzGkiKZ.js} +1 -1
- package/assets/index-037V8NT6.js +1 -0
- package/assets/{index-BwREZdAT.js → index-3b5g93IH.js} +1 -1
- package/assets/{index-DiwBhhvE.js → index-6kLCHU6G.js} +1 -1
- package/assets/{index-BvFeKWJ7.js → index-B0UD7v4C.js} +1 -1
- package/assets/{index-CJk6cKNC.js → index-B1823bDj.js} +1 -1
- package/assets/index-B6OibKfL.js +1 -0
- package/assets/{index-MPXihhnV.js → index-BAWxwWDs.js} +1 -1
- package/assets/{index-DhIqmmJm.js → index-BFIL6dyF.js} +1 -1
- package/assets/{index-DB4CrazC.js → index-BJL__g8g.js} +1 -1
- package/assets/{index-CWhPI63R.js → index-BOrEfuaI.js} +1 -1
- package/assets/{index-Cer0CrxT.css → index-BcKjqDsm.css} +7 -7
- package/assets/{index-Ph4YYclU.js → index-BiZjOIll.js} +1 -1
- package/assets/{index-C3HlqCBZ.js → index-BiZvLxQh.js} +191 -223
- package/assets/{index-BFPhTAXv.js → index-Bo-pW74N.js} +1 -1
- package/assets/{index-xdwCI2BB.css → index-BvaErBtN.css} +1 -1
- package/assets/{index-btswU40-.js → index-Bwvpm93K.js} +1 -1
- package/assets/{index-BuCwvt07.js → index-C6d--0ph.js} +1 -1
- package/assets/index-C7tiTppx.js +1 -0
- package/assets/{index-Ulh0QpLZ.js → index-C9n4cfCU.js} +2 -2
- package/assets/{index-BHT7PjpM.js → index-CJBX5JmY.js} +1 -1
- package/assets/{index-DJjsDT3A.js → index-CNk77S46.js} +1 -1
- package/assets/{index-Bl5sylL-.js → index-CTw1RU2Z.js} +1 -1
- package/assets/{index-BcuTHQ0S.js → index-CXyL94F7.js} +1 -1
- package/assets/index-Ceej7n6q.css +1 -0
- package/assets/{index-CxGWN26V.js → index-Cox50Heu.js} +1 -1
- package/assets/index-CrJELdSE.css +1 -0
- package/assets/index-CwS7msCm.js +1 -0
- package/assets/{index-DdEvwQTt.js → index-CzdSWI9D.js} +1 -1
- package/assets/{index-CbQmSEPE.js → index-D1C1Zzpy.js} +1 -1
- package/assets/index-D2p1WqV8.css +1 -0
- package/assets/{index-BW-AASbE.js → index-D8Kk0SEe.js} +1 -1
- package/assets/{index-CpD-zpT2.js → index-DGvTmPZd.js} +1 -1
- package/assets/{index-BTFKqsZ4.js → index-DLvwA5Yc.js} +1 -1
- package/assets/{index-DLeXsdD5.js → index-DNtjMwnc.js} +1 -1
- package/assets/{index-BhBbJSkO.js → index-D_wGR3-G.js} +1 -1
- package/assets/index-DcnR-gB7.css +1 -0
- package/assets/{index-M3iode8d.js → index-Dxcf-E91.js} +1 -1
- package/assets/index-Dzdr3LrT.js +2 -0
- package/assets/{index-Bo4ThtqE.js → index-GnvJhnd6.js} +1 -1
- package/assets/{index-BG6vdRmM.css → index-I9j5Yvl0.css} +1 -1
- package/assets/{index-C4DGENse.js → index-IXKCWQLB.js} +1 -1
- package/assets/{index-CVYmZwPp.js → index-Kz-CQHXF.js} +1 -1
- package/assets/{index-IUL9DE-H.js → index-L5XdAOK8.js} +1 -1
- package/assets/{index-BMa9nNe6.js → index-Q3NXawtP.js} +1 -1
- package/assets/index-X71o-5XO.js +1 -0
- package/assets/{index-DOIBa0f_.js → index-eJNkfK4c.js} +1 -1
- package/assets/{index-m01u3iZ6.js → index-n1WFcgXn.js} +1 -1
- package/assets/{index-D-2IQEEF.js → index-r12W0HHy.js} +1 -1
- package/assets/{index.es-Rj_dVjSN.js → index.es-D-_aodlA.js} +4 -4
- package/assets/{selectors-CYllvatO.js → selectors-CcV531E9.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/CollectionProvider.container-BZTDt2xk.js +0 -1
- package/assets/index-BPASSgh3.js +0 -1
- package/assets/index-BypC2Qwi.css +0 -1
- package/assets/index-C8VgNASV.js +0 -1
- package/assets/index-CRmoAanb.js +0 -1
- package/assets/index-CXA9hNd7.css +0 -1
- package/assets/index-CesL4BWH.css +0 -1
- package/assets/index-CxAYoCwR.js +0 -1
- package/assets/index-DTHBUpyD.css +0 -1
- package/assets/index-DwaWq7c6.js +0 -1
- package/assets/index-tsVrJsOT.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{af as ne,H as e,M as a,G as n,D as r,fq as X,fr as fe,eQ as v,cf as Fe,cg as Q,N as F,eS as Ne,fs as le,ft as Ue,X as M,fu as He,fv as ve,e$ as J,cD as ue,fw as me,ea as ye,cE as We,bw as $,eE as Y,fx as Oe,ev as ze,fy as Ge,fe as Ee,bk as Ye,Z as ke,fz as q,fA as te,K as R,eT as Te,et as _e,fB as qe,fC as Ve,bu as ee,fD as Qe,f5 as Je,f6 as Ze,f1 as Pe,eV as Se,L as pe,fE as Ke,dE as Xe,er as es,f9 as ss,fF as as,fG as V,fH as ts,f4 as ns,eF as he,fI as xe,aH as ls,cP as os,fJ as we,eq as is,fK as rs,fL as cs,bv as ds,eZ as N,fM as us,ew as ms,J as L,fN as be,a1 as se,fO as _s,f7 as ae,fP as ge,fQ as ps,fd as hs,fR as xs,fS as bs,fT as gs,fU as Cs,fV as js}from"./index-C3HlqCBZ.js";import{g as Is}from"./selector-CtnQnmhq.js";import{C as fs}from"./CollectionProvider.container-BZTDt2xk.js";import{L as Ns}from"./LoggedInDetailPage.container-BMX1d7bi.js";import{N as vs}from"./NotFound-DWatCUk4.js";import{B as ys}from"./Back-CoxexjGM.js";import{C as Es}from"./CollectionStatus.container-CglSuZa1.js";import{J as ks}from"./JumpIn.container-D9-98tz1.js";import{C as Ts}from"./ConfirmDelete-D2OS_BiO.js";import"./Navigation.container-C8BTALTd.js";import"./selectors-CYllvatO.js";import"./SignInRequired-CjXWxB7A.js";const Ps=({type:s})=>e.jsx(a.Popup,{content:n(s==="publish"?"collection_detail_page.cant_mint":"collection_detail_page.cant_push"),position:"top center",trigger:e.jsx("div",{className:"popup-button",children:e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("collection_detail_page.under_review")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:s==="publish"}),Ce=ne.memo(Ps),Ss=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:d,onPush:_,onInit:j}=s;r.useEffect(()=>{l.isPublished&&j()},[l,j]);const x=o.length>X,E=r.useMemo(()=>o.length===0||!o.every(fe)||x,[o,x]);let g;if(l.isPublished)l.isApproved?u?g=e.jsx(Ce,{type:"push"}):t===v.UNSYNCED?g=e.jsx(a.Button,{primary:!0,compact:!0,onClick:_,children:n("collection_detail_page.push_changes")}):g=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):g=e.jsx(Ce,{type:"publish"});else{const y=e.jsx(Fe,{disabled:E,primary:!0,compact:!0,onClick:d,network:Q.Network.MATIC,children:n("collection_detail_page.publish")});if(E){let b;o.length>X?b=n("collection_detail_page.publish_reason_max_items",{maxItems:X}):o.length===0?b=n("collection_detail_page.publish_reason_no_items"):b=n("collection_detail_page.publish_reason_items_not_complete"),g=e.jsx(a.Popup,{content:b,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:y}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else g=y}return g},ws=ne.memo(Ss),Rs=(s,l)=>{const{id:o}=l.collection,t=Ne(s);return{items:le(s,o),status:t[o],hasPendingCuration:Ue(s,o)}},Ms=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(M("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(M("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(He(o))}},je=F(Rs,Ms)(ws),Ds="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",Bs="_menu_1a07a_13",Ls="_disabled_1a07a_13",$s="_item_1a07a_13",Ie={dropdown:Ds,ellipsis:As,menu:Bs,disabled:Ls,item:$s},Fs=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},d=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},_=()=>{o("AddExistingItemModal",{collectionId:s.id})},j=()=>{t(s)},x=ve(s,l.address);return e.jsx(a.Dropdown,{className:Ie.dropdown,trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{className:Ie.ellipsis,name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(a.Dropdown.Menu,{children:[s.isPublished?x?e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.managers"),onClick:u}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.minters"),onClick:d})]}):null:J(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:_}),e.jsx(Ts,{name:s.name,onDelete:j,trigger:e.jsx(a.Dropdown.Item,{text:n("global.delete")})})]}),e.jsx(ue,{role:"option",className:"item",text:s.urn,children:e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.copy_urn")})}),e.jsx(a.Popup,{content:n("collection_context_menu.unpublished"),position:"right center",disabled:s.isPublished,trigger:e.jsx(ue,{role:"option",className:"item",text:s.contractAddress,children:e.jsx(a.Dropdown.Item,{disabled:!s.isPublished,text:n("collection_context_menu.copy_address")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})]})})},Us=Fs,Hs=(s,l)=>({wallet:ye(s),items:le(s,l.collection.id),name:We(s)||"",isForumPostLoading:$(Y(s),Ge)}),Ws=s=>({onOpenModal:(l,o)=>s(M(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),Os=F(Hs,Ws)(Us),zs=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ne.memo(zs),Ys=(s,l)=>{const{itemId:o}=l;return{isEnabled:Ee(s)[o]===v.UNSYNCED}},qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(M("ResetItemModal",{itemId:o}))}},Vs=F(Ys,qs)(Gs),Qs="_itemImage_10lcv_1",Js="_itemStatus_10lcv_9",Zs="_mana_10lcv_13",Ks="_grid_10lcv_19",Xs="_row_10lcv_30",ea="_avatarColumn_10lcv_35",sa="_avatarContainer_10lcv_40",aa="_info_10lcv_44",ta="_nameWrapper_10lcv_49",na="_badgeContainer_10lcv_54",la="_badge_10lcv_54",oa="_name_10lcv_49",ia="_linkAction_10lcv_76",ra="_subtitle_10lcv_80",ca="_itemActions_10lcv_86",da="_removeSaleButton_10lcv_93",ua="_status_10lcv_98",ma="_ready_10lcv_112",_a="_notReady_10lcv_117",pa="_incomplete_10lcv_122",ha="_published_10lcv_126",xa="_underReview_10lcv_131",ba="_unsynced_10lcv_132",ga="_alertIcon_10lcv_137",Ca="_check_10lcv_148",ja="_contextMenuButton_10lcv_152",Ia="_contextMenu_10lcv_152",i={itemImage:Qs,itemStatus:Js,mana:Zs,grid:Ks,row:Xs,avatarColumn:ea,avatarContainer:sa,info:aa,nameWrapper:ta,badgeContainer:na,badge:la,name:oa,linkAction:ia,subtitle:ra,itemActions:ca,removeSaleButton:da,status:ua,ready:ma,notReady:_a,incomplete:pa,published:ha,underReview:xa,unsynced:ba,alertIcon:ga,check:Ca,contextMenuButton:ja,contextMenu:Ia},fa=25;function Na({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,collection:d,status:_,ethAddress:j,wallet:x,loadingTradeIds:E,isCancellingItemOrder:g}){const y=Ye(),b=ke(),k=x&&q(d,x),C=x&&u&&te(d,x),U=!u||C&&t.tradeId||k,T=r.useCallback(()=>{if(u&&C){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),D=r.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),f=r.useCallback(()=>{l([t]),b.push(R.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Te.COLLECTIONS}),y==null||y.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?qe(t.urn):Ve(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,b]),A=r.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),P=r.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:d})},[t,s,d]),H=r.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),W=r.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),Z=r.useCallback(()=>t.price?t.price===Qe.toString()||u&&!k&&!t.tradeId?e.jsx("span",{children:"-"}):Je(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:i.mana,network:Q.Network.MATIC,showTooltip:!0,children:Ze(t.price)}):e.jsx("div",{className:`link ${i.linkAction}`,onClick:ee(T),children:n("collection_item.set_price")}),[t,k,u,T]),S=r.useCallback(()=>_===v.UNSYNCED?e.jsxs("div",{className:`${i.unsynced} ${i.status}`,children:[e.jsx("div",{className:i.alertIcon}),n("collection_item.unsynced")]}):_===v.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${i.underReview} ${i.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${i.published} ${i.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):fe(t)?e.jsxs("div",{className:`${i.ready} ${i.status}`,children:[e.jsx(a.Icon,{className:i.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Pe(t)&&!(Se in t.contents)?e.jsxs("div",{className:`${i.notReady} ${i.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:ee(f),className:`link ${i.linkAction}`,children:n("collection_item.edit_item")}),[f,t,_]),w=r.useCallback(()=>e.jsx("div",{className:i.itemActions,children:e.jsx(a.Dropdown,{trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:i.action,onClick:ee(),children:e.jsxs(a.Dropdown.Menu,{className:i.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:R.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:D}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:f}),!d.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:P}),Ke(d,t,j)&&!J(d)?e.jsxs(e.Fragment,{children:[t.price&&U?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:T}):null,e.jsx(Vs,{itemId:t.id}),t.isPublished?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Divider,{}),e.jsx(a.Dropdown.Item,{text:n("collection_item.delete_item"),onClick:A})]})]}):null]})})}),[d,t,j,D,f,P,T,A]),I=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${i.row}`,children:[e.jsx(a.Table.Cell,{className:`${i.avatarColumn}`,width:t.name.length>fa?6:5,children:e.jsx(pe,{to:R.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:i.avatarContainer,children:[e.jsx(Xe,{className:i.itemImage,item:t}),e.jsx("div",{className:i.info,children:e.jsx("div",{className:i.nameWrapper,children:e.jsxs("div",{className:i.name,title:t.name,children:[e.jsx(es,{className:i.itemStatus,item:t}),t.name,e.jsx("div",{className:i.badgeContainer,children:e.jsx(ss,{className:i.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:i.column,children:t.rarity&&I.category?e.jsx(as,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`${t.type}.category.${I.category}`)}):null}),V(t)&&ts(I)?e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`emote.play_mode.${I.loop?"loop":"simple"}.text`)}):null}):null,u&&!d.isPublished?null:e.jsx(a.Table.Cell,{className:i.column,children:Z()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:i.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ns(t)]})}):null,e.jsx(a.Table.Cell,{children:S()}),u&&!k&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!C,onClick:H,children:n("collection_item.put_for_sale")})}),u&&t.tradeId&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{secondary:!0,size:"tiny",className:i.removeSaleButton,onClick:W,loading:g&&E.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:i.contextMenuButton,children:w()})]})}const va=(s,l)=>{const o=Ee(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ls(s),status:o[l.item.id],wallet:os(s),isOffchainPublicItemOrdersEnabled:we(s),isCancellingItemOrder:$(he(s),xe),loadingTradeIds:t}},ya=s=>({onOpenModal:(l,o)=>s(M(l,o)),onDeleteItem:l=>s(is(l)),onSetItems:l=>s(rs(l)),onRemoveFromSale:l=>s(cs(l,!0))}),Ea=F(va,ya)(Na);function ka({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:d,onOpenModal:_,isLoading:j,isOffchainPublicItemOrdersEnabled:x,onFetchCollectionForumPostReply:E}){const g=ds(),y=r.useMemo(()=>new URLSearchParams(g.search).get("tab"),[g]),[b,k]=r.useState(y||N.WEARABLE),C=ke(),U=u===R.collections(),T=r.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&E(s.id)},[s,E]);r.useEffect(()=>{s&&T()},[s]);const D=r.useCallback(()=>{_("MintItemsModal",{collectionId:s.id})},[s,_]),f=r.useCallback(()=>{_("CreateSingleItemModal",{collectionId:s.id})},[s,_]),A=r.useCallback(()=>{s&&!s.isPublished&&_("EditCollectionNameModal",{collection:s})},[s,_]),P=r.useCallback(()=>{s&&_("SellCollectionModal",{collectionId:s.id,isOnSale:te(s,l)||q(s,l)})},[s,l,_]),H=r.useCallback(()=>{U?C.goBack():C.push(R.collections())},[C,U]),W=r.useCallback(()=>{s&&C.push(us(s,o),{fromParam:Te.COLLECTIONS})},[C,s,o]),Z=r.useCallback((c,p="")=>{const m=window.open(c,p);m&&m.focus()},[]),S=r.useCallback(()=>{s&&s.isPublished&&s.forumLink&&Z(s.forumLink,"_blank")},[s]),w=r.useCallback(c=>{k(c),C.push(R.collectionDetail(s.id,ms.STANDARD,{tab:b}))},[s,C]),I=r.useCallback(c=>{const p=c===N.WEARABLE?n("collection_detail_page.wearables"):n("collection_detail_page.emotes");return e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_item_price",{item_type:p.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),oe=r.useCallback(()=>e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_smart_wearable_video"),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})}),[]),K=r.useCallback(c=>{if(!s)return null;const p=J(s),m=c.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(ks,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:p||!m}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:p||!m,onClick:W,children:[e.jsx(L,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),m&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:p,onClick:f,children:[e.jsx(L,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,W,f]),ie=r.useCallback(()=>{if(!s)return null;const c=q(s,l),p=te(s,l);return x&&!c?p?null:e.jsx(be,{network:Q.Network.MATIC,children:m=>e.jsxs(a.Button,{className:se("action-button",p?"secondary":"primary"),disabled:t||!m,onClick:P,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})}):e.jsx(be,{network:Q.Network.MATIC,children:m=>e.jsx(a.Button,{className:se("action-button",c?"basic":"primary"),disabled:t||!m,onClick:P,children:e.jsx("span",{className:"text",children:c?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})})},[s,x,P]),O=r.useCallback((c="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:p,last_read_post_number:m}=s.forumPostReply,z=p-(m??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:c,children:z})}return null},[s]),re=r.useCallback(()=>!(s!=null&&s.isApproved)||![v.UNSYNCED,v.UNDER_REVIEW].includes(d)?null:e.jsxs("div",{className:"unsynced-collection container",children:[e.jsx("i",{className:"unsynced-collection alert-icon"}),e.jsxs("div",{className:"unsynced-collection message",children:[e.jsx("h4",{className:"unsynced-collection title",children:n("collection_detail_page.unsynced_collection_title")}),e.jsx("p",{className:"unsynced-collection text",children:n(`collection_detail_page.${d}_collection_message`,{br:e.jsx("br",{})})})]}),d===v.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:S,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),O("medium")]}):null,d===v.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,d,O,S]),Re=r.useCallback(c=>{if(!s)return null;const p=_s(s,l.address),m=J(s),z=q(s,l),G=c.some(V),B=c.some(ae),Me=G?c.some(h=>V(h)&&!h.price):!1,De=B?c.some(h=>ae(h)&&!h.price):!1,Ae=B&&c.some(h=>Pe(h)&&!(Se in h.contents)),de=G&&!B,Be=B&&!G,Le=c.filter(h=>Be?ae(h):de?V(h):h.type===b),$e=G&&B;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:se({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(ys,{absolute:!0,onClick:H}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:m?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(Es,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:A,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(L,{name:"edit",className:"edit-collection-name"}),z?e.jsx(a.Label,{className:"badge-on-sale",size:"small",circular:!0,children:n("collection_detail_page.on_sale")}):null]})}),e.jsx(a.Column,{align:"right",className:"actions-container",shrink:!1,grow:!1,children:e.jsxs(a.Row,{className:"actions",children:[s.isPublished&&s.isApproved?e.jsx(a.Popup,{content:n("collection_detail_page.can_mint"),className:"CollectionDetailPage popup-mint",position:"top center",trigger:e.jsx(a.Button,{basic:!0,className:"action-button",disabled:!p,onClick:D,children:e.jsx("span",{className:"text",children:n("collection_detail_page.mint_items")})}),on:"hover",inverted:!0,flowing:!0}):null,s.isPublished&&s.forumLink&&!s.isApproved?e.jsxs(e.Fragment,{children:[e.jsx(a.Button,{basic:!0,onClick:S,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?O():null]}):null,!(s.isPublished&&s.isApproved)&&d!==v.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?ie():null,ge(s,l.address)?e.jsx(Os,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[re(),$e?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:b===N.WEARABLE,onClick:()=>w(N.WEARABLE),children:[e.jsx(L,{name:"wearable"}),n("collection_detail_page.wearables"),De?I(N.WEARABLE):Ae?oe():null]}),e.jsxs(a.Tabs.Tab,{active:b===N.EMOTE,onClick:()=>w(N.EMOTE),children:[e.jsx(L,{name:"emote"}),n("collection_detail_page.emotes"),Me?I(N.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:K(c)})]}):e.jsx("div",{className:"secondary-actions",children:K(c)}),c.length>0?e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.item")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.rarity")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.category")}),b===N.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,x&&!s.isPublished?null:e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}),s.isPublished&&s.isApproved?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.supply")}):null,e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.status")}),x&&!z&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Le.map(h=>e.jsx(Ea,{collection:s,item:h},h.id))})]}):e.jsxs("div",{className:"empty",children:[e.jsx("div",{className:"sparkles"}),e.jsxs("div",{children:[e.jsx("span",{className:"empty-collection-title",children:n("collection_detail_page.add_items_title")}),e.jsx("br",{}),n("collection_detail_page.add_items_subtitle"),e.jsx("br",{}),n("collection_detail_page.cant_remove"),e.jsx("br",{}),e.jsx(a.Button,{basic:!0,className:"empty-action-button",disabled:m,onClick:f,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[b,d,l,s,f,K,A,I,w,re,ie,w,S,oe,O,D,H]),ce=l!==null&&s!==null&&ge(s,l.address);return e.jsx(fs,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:c,isLoadingCollectionItems:p,items:m})=>e.jsx(Ns,{className:"CollectionDetailPage",hasNavigation:!ce&&!j&&!c,isLoading:j||c||p,children:ce?Re(m):e.jsx(vs,{})})})}const Ta=s=>{const l=ps(s)||"",o=hs(s,l),t=Ne(s);return{wallet:ye(s),collection:o,isOnSaleLoading:xs(s)||$(Y(s),gs),items:le(s,l),status:t[l],isLoading:$(Y(s),Cs)||$(Y(s),js),lastLocation:Is(s),isOffchainPublicItemOrdersEnabled:we(s)}},Pa=s=>({onOpenModal:(l,o)=>s(M(l,o)),onFetchCollectionForumPostReply:l=>s(bs(l))}),Oa=F(Ta,Pa)(ka);export{Oa as default};
|
|
1
|
+
import{af as ne,H as e,M as a,G as n,D as r,fo as K,fp as Ne,eO as v,ce as Fe,b8 as V,N as F,eQ as fe,fq as le,fr as Ue,X as M,fs as He,ft as ve,eZ as J,cB as ue,fu as me,e8 as ye,cC as We,bw as $,eC as Y,fv as Oe,et as ze,fw as Ge,fc as ke,bk as Ye,Z as Ee,fx as q,fy as te,K as w,eR as Te,er as _e,fz as qe,fA as Qe,bu as ee,fB as Ve,f3 as Je,f4 as Ze,e$ as Pe,eT as Se,L as pe,fC as Xe,dC as Ke,ep as es,f7 as ss,fD as as,fE as Q,fF as ts,f2 as ns,eD as he,fG as xe,aH as ls,cN as os,fH as Re,eo as is,fI as rs,fJ as cs,bv as ds,eX as f,fK as us,eu as ms,J as L,fL as be,a1 as se,fM as _s,f5 as ae,fN as ge,fO as ps,fb as hs,fP as xs,fQ as bs,fR as gs,fS as Cs,fT as js}from"./index-BiZvLxQh.js";import{g as Is}from"./selector-CtnQnmhq.js";import{C as Ns}from"./CollectionProvider.container-Ntdhnjv0.js";import{L as fs}from"./LoggedInDetailPage.container-BacXg1fp.js";import{N as vs}from"./NotFound-DqST62Hb.js";import{B as ys}from"./Back-DSw2t9ER.js";import{C as ks}from"./CollectionStatus.container-D94PszBl.js";import{J as Es}from"./JumpIn.container-C_Bd2Q2L.js";import{C as Ts}from"./ConfirmDelete-BOOn71ti.js";import"./Navigation.container-BpqXxAPO.js";import"./selectors-CcV531E9.js";import"./SignInRequired-MhyXItkL.js";const Ps=({type:s})=>e.jsx(a.Popup,{content:n(s==="publish"?"collection_detail_page.cant_mint":"collection_detail_page.cant_push"),position:"top center",trigger:e.jsx("div",{className:"popup-button",children:e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("collection_detail_page.under_review")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:s==="publish"}),Ce=ne.memo(Ps),Ss=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:d,onPush:_,onInit:j}=s;r.useEffect(()=>{l.isPublished&&j()},[l,j]);const x=o.length>K,k=r.useMemo(()=>o.length===0||!o.every(Ne)||x,[o,x]);let g;if(l.isPublished)l.isApproved?u?g=e.jsx(Ce,{type:"push"}):t===v.UNSYNCED?g=e.jsx(a.Button,{primary:!0,compact:!0,onClick:_,children:n("collection_detail_page.push_changes")}):g=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):g=e.jsx(Ce,{type:"publish"});else{const y=e.jsx(Fe,{disabled:k,primary:!0,compact:!0,onClick:d,network:V.Network.MATIC,children:n("collection_detail_page.publish")});if(k){let b;o.length>K?b=n("collection_detail_page.publish_reason_max_items",{maxItems:K}):o.length===0?b=n("collection_detail_page.publish_reason_no_items"):b=n("collection_detail_page.publish_reason_items_not_complete"),g=e.jsx(a.Popup,{content:b,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:y}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else g=y}return g},Rs=ne.memo(Ss),ws=(s,l)=>{const{id:o}=l.collection,t=fe(s);return{items:le(s,o),status:t[o],hasPendingCuration:Ue(s,o)}},Ms=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(M("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(M("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(He(o))}},je=F(ws,Ms)(Rs),Ds="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",Bs="_menu_1a07a_13",Ls="_disabled_1a07a_13",$s="_item_1a07a_13",Ie={dropdown:Ds,ellipsis:As,menu:Bs,disabled:Ls,item:$s},Fs=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},d=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},_=()=>{o("AddExistingItemModal",{collectionId:s.id})},j=()=>{t(s)},x=ve(s,l.address);return e.jsx(a.Dropdown,{className:Ie.dropdown,trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{className:Ie.ellipsis,name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(a.Dropdown.Menu,{children:[s.isPublished?x?e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.managers"),onClick:u}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.minters"),onClick:d})]}):null:J(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:_}),e.jsx(Ts,{name:s.name,onDelete:j,trigger:e.jsx(a.Dropdown.Item,{text:n("global.delete")})})]}),e.jsx(ue,{role:"option",className:"item",text:s.urn,children:e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.copy_urn")})}),e.jsx(a.Popup,{content:n("collection_context_menu.unpublished"),position:"right center",disabled:s.isPublished,trigger:e.jsx(ue,{role:"option",className:"item",text:s.contractAddress,children:e.jsx(a.Dropdown.Item,{disabled:!s.isPublished,text:n("collection_context_menu.copy_address")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})]})})},Us=Fs,Hs=(s,l)=>({wallet:ye(s),items:le(s,l.collection.id),name:We(s)||"",isForumPostLoading:$(Y(s),Ge)}),Ws=s=>({onOpenModal:(l,o)=>s(M(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),Os=F(Hs,Ws)(Us),zs=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ne.memo(zs),Ys=(s,l)=>{const{itemId:o}=l;return{isEnabled:ke(s)[o]===v.UNSYNCED}},qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(M("ResetItemModal",{itemId:o}))}},Qs=F(Ys,qs)(Gs),Vs="_itemImage_10lcv_1",Js="_itemStatus_10lcv_9",Zs="_mana_10lcv_13",Xs="_grid_10lcv_19",Ks="_row_10lcv_30",ea="_avatarColumn_10lcv_35",sa="_avatarContainer_10lcv_40",aa="_info_10lcv_44",ta="_nameWrapper_10lcv_49",na="_badgeContainer_10lcv_54",la="_badge_10lcv_54",oa="_name_10lcv_49",ia="_linkAction_10lcv_76",ra="_subtitle_10lcv_80",ca="_itemActions_10lcv_86",da="_removeSaleButton_10lcv_93",ua="_status_10lcv_98",ma="_ready_10lcv_112",_a="_notReady_10lcv_117",pa="_incomplete_10lcv_122",ha="_published_10lcv_126",xa="_underReview_10lcv_131",ba="_unsynced_10lcv_132",ga="_alertIcon_10lcv_137",Ca="_check_10lcv_148",ja="_contextMenuButton_10lcv_152",Ia="_contextMenu_10lcv_152",i={itemImage:Vs,itemStatus:Js,mana:Zs,grid:Xs,row:Ks,avatarColumn:ea,avatarContainer:sa,info:aa,nameWrapper:ta,badgeContainer:na,badge:la,name:oa,linkAction:ia,subtitle:ra,itemActions:ca,removeSaleButton:da,status:ua,ready:ma,notReady:_a,incomplete:pa,published:ha,underReview:xa,unsynced:ba,alertIcon:ga,check:Ca,contextMenuButton:ja,contextMenu:Ia},Na=25;function fa({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,collection:d,status:_,ethAddress:j,wallet:x,loadingTradeIds:k,isCancellingItemOrder:g}){const y=Ye(),b=Ee(),E=x&&q(d,x),C=x&&u&&te(d,x),U=!u||C&&t.tradeId||E,T=r.useCallback(()=>{if(u&&C){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),D=r.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),N=r.useCallback(()=>{l([t]),b.push(w.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Te.COLLECTIONS}),y==null||y.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?qe(t.urn):Qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,b]),A=r.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),P=r.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:d})},[t,s,d]),H=r.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),W=r.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),Z=r.useCallback(()=>t.price?t.price===Ve.toString()||u&&!E&&!t.tradeId?e.jsx("span",{children:"-"}):Je(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:i.mana,network:V.Network.MATIC,showTooltip:!0,children:Ze(t.price)}):e.jsx("div",{className:`link ${i.linkAction}`,onClick:ee(T),children:n("collection_item.set_price")}),[t,E,u,T]),S=r.useCallback(()=>_===v.UNSYNCED?e.jsxs("div",{className:`${i.unsynced} ${i.status}`,children:[e.jsx("div",{className:i.alertIcon}),n("collection_item.unsynced")]}):_===v.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${i.underReview} ${i.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${i.published} ${i.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ne(t)?e.jsxs("div",{className:`${i.ready} ${i.status}`,children:[e.jsx(a.Icon,{className:i.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Pe(t)&&!(Se in t.contents)?e.jsxs("div",{className:`${i.notReady} ${i.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:ee(N),className:`link ${i.linkAction}`,children:n("collection_item.edit_item")}),[N,t,_]),R=r.useCallback(()=>e.jsx("div",{className:i.itemActions,children:e.jsx(a.Dropdown,{trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:i.action,onClick:ee(),children:e.jsxs(a.Dropdown.Menu,{className:i.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:w.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:D}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:N}),!d.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:P}),Xe(d,t,j)&&!J(d)?e.jsxs(e.Fragment,{children:[t.price&&U?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:T}):null,e.jsx(Qs,{itemId:t.id}),t.isPublished?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Divider,{}),e.jsx(a.Dropdown.Item,{text:n("collection_item.delete_item"),onClick:A})]})]}):null]})})}),[d,t,j,D,N,P,T,A]),I=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${i.row}`,children:[e.jsx(a.Table.Cell,{className:`${i.avatarColumn}`,width:t.name.length>Na?6:5,children:e.jsx(pe,{to:w.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:i.avatarContainer,children:[e.jsx(Ke,{className:i.itemImage,item:t}),e.jsx("div",{className:i.info,children:e.jsx("div",{className:i.nameWrapper,children:e.jsxs("div",{className:i.name,title:t.name,children:[e.jsx(es,{className:i.itemStatus,item:t}),t.name,e.jsx("div",{className:i.badgeContainer,children:e.jsx(ss,{className:i.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:i.column,children:t.rarity&&I.category?e.jsx(as,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`${t.type}.category.${I.category}`)}):null}),Q(t)&&ts(I)?e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`emote.play_mode.${I.loop?"loop":"simple"}.text`)}):null}):null,u&&!d.isPublished?null:e.jsx(a.Table.Cell,{className:i.column,children:Z()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:i.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ns(t)]})}):null,e.jsx(a.Table.Cell,{children:S()}),u&&!E&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!C,onClick:H,children:n("collection_item.put_for_sale")})}),u&&t.tradeId&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{secondary:!0,size:"tiny",className:i.removeSaleButton,onClick:W,loading:g&&k.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:i.contextMenuButton,children:R()})]})}const va=(s,l)=>{const o=ke(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ls(s),status:o[l.item.id],wallet:os(s),isOffchainPublicItemOrdersEnabled:Re(s),isCancellingItemOrder:$(he(s),xe),loadingTradeIds:t}},ya=s=>({onOpenModal:(l,o)=>s(M(l,o)),onDeleteItem:l=>s(is(l)),onSetItems:l=>s(rs(l)),onRemoveFromSale:l=>s(cs(l,!0))}),ka=F(va,ya)(fa);function Ea({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:d,onOpenModal:_,isLoading:j,isOffchainPublicItemOrdersEnabled:x,onFetchCollectionForumPostReply:k}){const g=ds(),y=r.useMemo(()=>new URLSearchParams(g.search).get("tab"),[g]),[b,E]=r.useState(y||f.WEARABLE),C=Ee(),U=u===w.collections(),T=r.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&k(s.id)},[s,k]);r.useEffect(()=>{s&&T()},[s]);const D=r.useCallback(()=>{_("MintItemsModal",{collectionId:s.id})},[s,_]),N=r.useCallback(()=>{_("CreateSingleItemModal",{collectionId:s.id})},[s,_]),A=r.useCallback(()=>{s&&!s.isPublished&&_("EditCollectionNameModal",{collection:s})},[s,_]),P=r.useCallback(()=>{s&&_("SellCollectionModal",{collectionId:s.id,isOnSale:te(s,l)||q(s,l)})},[s,l,_]),H=r.useCallback(()=>{U?C.goBack():C.push(w.collections())},[C,U]),W=r.useCallback(()=>{s&&C.push(us(s,o),{fromParam:Te.COLLECTIONS})},[C,s,o]),Z=r.useCallback((c,p="")=>{const m=window.open(c,p);m&&m.focus()},[]),S=r.useCallback(()=>{s&&s.isPublished&&s.forumLink&&Z(s.forumLink,"_blank")},[s]),R=r.useCallback(c=>{E(c),C.push(w.collectionDetail(s.id,ms.STANDARD,{tab:b}))},[s,C]),I=r.useCallback(c=>{const p=c===f.WEARABLE?n("collection_detail_page.wearables"):n("collection_detail_page.emotes");return e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_item_price",{item_type:p.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),oe=r.useCallback(()=>e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_smart_wearable_video"),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})}),[]),X=r.useCallback(c=>{if(!s)return null;const p=J(s),m=c.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Es,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:p||!m}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:p||!m,onClick:W,children:[e.jsx(L,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),m&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:p,onClick:N,children:[e.jsx(L,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,W,N]),ie=r.useCallback(()=>{if(!s)return null;const c=q(s,l),p=te(s,l);return x&&!c?p?null:e.jsx(be,{network:V.Network.MATIC,children:m=>e.jsxs(a.Button,{className:se("action-button",p?"secondary":"primary"),disabled:t||!m,onClick:P,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})}):e.jsx(be,{network:V.Network.MATIC,children:m=>e.jsx(a.Button,{className:se("action-button",c?"basic":"primary"),disabled:t||!m,onClick:P,children:e.jsx("span",{className:"text",children:c?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})})},[s,x,P]),O=r.useCallback((c="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:p,last_read_post_number:m}=s.forumPostReply,z=p-(m??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:c,children:z})}return null},[s]),re=r.useCallback(()=>!(s!=null&&s.isApproved)||![v.UNSYNCED,v.UNDER_REVIEW].includes(d)?null:e.jsxs("div",{className:"unsynced-collection container",children:[e.jsx("i",{className:"unsynced-collection alert-icon"}),e.jsxs("div",{className:"unsynced-collection message",children:[e.jsx("h4",{className:"unsynced-collection title",children:n("collection_detail_page.unsynced_collection_title")}),e.jsx("p",{className:"unsynced-collection text",children:n(`collection_detail_page.${d}_collection_message`,{br:e.jsx("br",{})})})]}),d===v.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:S,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),O("medium")]}):null,d===v.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,d,O,S]),we=r.useCallback(c=>{if(!s)return null;const p=_s(s,l.address),m=J(s),z=q(s,l),G=c.some(Q),B=c.some(ae),Me=G?c.some(h=>Q(h)&&!h.price):!1,De=B?c.some(h=>ae(h)&&!h.price):!1,Ae=B&&c.some(h=>Pe(h)&&!(Se in h.contents)),de=G&&!B,Be=B&&!G,Le=c.filter(h=>Be?ae(h):de?Q(h):h.type===b),$e=G&&B;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:se({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(ys,{absolute:!0,onClick:H}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:m?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(ks,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:A,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(L,{name:"edit",className:"edit-collection-name"}),z?e.jsx(a.Label,{className:"badge-on-sale",size:"small",circular:!0,children:n("collection_detail_page.on_sale")}):null]})}),e.jsx(a.Column,{align:"right",className:"actions-container",shrink:!1,grow:!1,children:e.jsxs(a.Row,{className:"actions",children:[s.isPublished&&s.isApproved?e.jsx(a.Popup,{content:n("collection_detail_page.can_mint"),className:"CollectionDetailPage popup-mint",position:"top center",trigger:e.jsx(a.Button,{basic:!0,className:"action-button",disabled:!p,onClick:D,children:e.jsx("span",{className:"text",children:n("collection_detail_page.mint_items")})}),on:"hover",inverted:!0,flowing:!0}):null,s.isPublished&&s.forumLink&&!s.isApproved?e.jsxs(e.Fragment,{children:[e.jsx(a.Button,{basic:!0,onClick:S,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?O():null]}):null,!(s.isPublished&&s.isApproved)&&d!==v.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?ie():null,ge(s,l.address)?e.jsx(Os,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[re(),$e?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:b===f.WEARABLE,onClick:()=>R(f.WEARABLE),children:[e.jsx(L,{name:"wearable"}),n("collection_detail_page.wearables"),De?I(f.WEARABLE):Ae?oe():null]}),e.jsxs(a.Tabs.Tab,{active:b===f.EMOTE,onClick:()=>R(f.EMOTE),children:[e.jsx(L,{name:"emote"}),n("collection_detail_page.emotes"),Me?I(f.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:X(c)})]}):e.jsx("div",{className:"secondary-actions",children:X(c)}),c.length>0?e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.item")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.rarity")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.category")}),b===f.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,x&&!s.isPublished?null:e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}),s.isPublished&&s.isApproved?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.supply")}):null,e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.status")}),x&&!z&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Le.map(h=>e.jsx(ka,{collection:s,item:h},h.id))})]}):e.jsxs("div",{className:"empty",children:[e.jsx("div",{className:"sparkles"}),e.jsxs("div",{children:[e.jsx("span",{className:"empty-collection-title",children:n("collection_detail_page.add_items_title")}),e.jsx("br",{}),n("collection_detail_page.add_items_subtitle"),e.jsx("br",{}),n("collection_detail_page.cant_remove"),e.jsx("br",{}),e.jsx(a.Button,{basic:!0,className:"empty-action-button",disabled:m,onClick:N,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[b,d,l,s,N,X,A,I,R,re,ie,R,S,oe,O,D,H]),ce=l!==null&&s!==null&&ge(s,l.address);return e.jsx(Ns,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:c,isLoadingCollectionItems:p,items:m})=>e.jsx(fs,{className:"CollectionDetailPage",hasNavigation:!ce&&!j&&!c,isLoading:j||c||p,children:ce?we(m):e.jsx(vs,{})})})}const Ta=s=>{const l=ps(s)||"",o=hs(s,l),t=fe(s);return{wallet:ye(s),collection:o,isOnSaleLoading:xs(s)||$(Y(s),gs),items:le(s,l),status:t[l],isLoading:$(Y(s),Cs)||$(Y(s),js),lastLocation:Is(s),isOffchainPublicItemOrdersEnabled:Re(s)}},Pa=s=>({onOpenModal:(l,o)=>s(M(l,o)),onFetchCollectionForumPostReply:l=>s(bs(l))}),Oa=F(Ta,Pa)(Ea);export{Oa as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CzdSWI9D.js","assets/index-BiZvLxQh.js","assets/index-BcKjqDsm.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{B as pe,_ as me}from"./index-BiZvLxQh.js";const he=Symbol(),ee=Object.getPrototypeOf,Y=new WeakMap,ge=e=>e&&(Y.has(e)?Y.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ye=e=>ge(e)&&e[he]||null,te=(e,t=!0)=>{Y.set(e,t)},z={BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.5.4-14857361421.commit-815d0db",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.5.4-14857361421.commit-815d0db",VITE_REACT_APP_WEBSITE_VERSION:"7.5.4-14857361421.commit-815d0db"},F=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ve=(e=Object.is,t=(o,g)=>new Proxy(o,g),s=o=>F(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),n=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,g,I=n)=>{const v=l.get(o);if((v==null?void 0:v[0])===g)return v[1];const b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return te(b,!0),l.set(o,[g,b]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(b,j))return;const O=Reflect.get(o,j),A={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete A.value,A.get=()=>I(O);else if(C.has(O)){const[y,H]=C.get(O);A.value=c(y,H(),I)}Object.defineProperty(b,j,A)}),Object.preventExtensions(b)},d=new WeakMap,f=[1,1],W=o=>{if(!F(o))throw new Error("object required");const g=d.get(o);if(g)return g;let I=f[0];const v=new Set,b=(a,i=++f[0])=>{I!==i&&(I=i,v.forEach(r=>r(a,i)))};let j=f[1];const O=(a=++f[1])=>(j!==a&&!v.size&&(j=a,y.forEach(([i])=>{const r=i[1](a);r>I&&(I=r)})),I),A=a=>(i,r)=>{const h=[...i];h[1]=[a,...h[1]],b(h,r)},y=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&y.has(a))throw new Error("prop listener already exists");if(v.size){const r=i[3](A(a));y.set(a,[i,r])}else y.set(a,[i])},Z=a=>{var i;const r=y.get(a);r&&(y.delete(a),(i=r[1])==null||i.call(r))},ue=a=>(v.add(a),v.size===1&&y.forEach(([r,h],U)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const N=r[3](A(U));y.set(U,[r,N])}),()=>{v.delete(a),v.size===0&&y.forEach(([r,h],U)=>{h&&(h(),y.set(U,[r]))})}),q=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),k=t(q,{deleteProperty(a,i){const r=Reflect.get(a,i);Z(i);const h=Reflect.deleteProperty(a,i);return h&&b(["delete",[i],r]),h},set(a,i,r,h){const U=Reflect.has(a,i),N=Reflect.get(a,i,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(i),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[i],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[i],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(i,L)}return Reflect.set(a,i,V,h),b(["set",[i],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(a=>{const i=Object.getOwnPropertyDescriptor(o,a);"value"in i&&(k[a]=o[a],delete i.value,delete i.writable),Object.defineProperty(q,a,i)}),k})=>[W,C,x,e,t,s,n,l,c,d,f],[be]=ve();function P(e={}){return be(e)}function D(e,t,s){const n=C.get(e);(z?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let l;const c=[],d=n[3];let f=!1;const o=d(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function we(e,t){const s=C.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[n,l,c]=s;return c(n,l(),t)}const u=P({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:u,subscribe(e){return D(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const c=pe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",c),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ie=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=P({enabled:Ie,userSessionId:"",events:[],connectedWalletId:void 0}),_e={state:p,subscribe(e){return D(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},_=P({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:_,subscribe(e){return D(_,()=>e(_))},setChains(e){_.chains=e},setWalletConnectUri(e){_.walletConnectUri=e},setIsCustomDesktop(e){_.isCustomDesktop=e},setIsCustomMobile(e){_.isCustomMobile=e},setIsDataLoaded(e){_.isDataLoaded=e},setIsUiLoaded(e){_.isUiLoaded=e},setIsAuth(e){_.isAuth=e}},B=P({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),$={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;_e.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))We.call(t,s)&&ne(e,s,t[s]);return e};const G="https://explorer-api.walletconnect.com",Q="wcm",X="js-2.7.0";async function K(e,t){const s=Le({sdkType:Q,sdkVersion:X},t),n=new URL(e,G);return n.searchParams.append("projectId",$.state.projectId),Object.entries(s).forEach(([c,d])=>{d&&n.searchParams.append(c,String(d))}),(await fetch(n)).json()}const S={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${G}/w3m/v1/getWalletImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`},getAssetImageUrl(e){return`${G}/w3m/v1/getAssetImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Ae.call(t,s)&&re(e,s,t[s]);return e};const ie=m.isMobile(),E=P({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:E,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=$.state;if(e==="NONE"||t==="ALL"&&!e)return E.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:l}=await S.getAllListings(n),c=Object.values(l);c.sort((d,f)=>{const W=e.indexOf(d.id),o=e.indexOf(f.id);return W-o}),E.recomendedWallets=c}else{const{chains:s,isAuth:n}=w.state,l=s==null?void 0:s.join(","),c=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await S.getMobileListings(d):await S.getDesktopListings(d);E.recomendedWallets=Object.values(f)}return E.recomendedWallets},async getWallets(e){const t=Se({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=$.state,{recomendedWallets:l}=E;if(n==="ALL")return E.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:d}=e,{listings:f,total:W}=ie?await S.getMobileListings(t):await S.getDesktopListings(t),o=Object.values(f),g=d?"search":"wallets";return E[g]={listings:[...E[g].listings,...o],total:W,page:c??1},{listings:o,total:W}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){E.search={listings:[],total:0,page:1}}},T=P({open:!1}),J={state:T,subscribe(e){return D(T,()=>e(T))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=w.state;if(m.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&n)T.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),T.open=!0,t())},200)}})},close(){T.open=!1}};var Me=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))je.call(t,s)&&le(e,s,t[s]);return e};function Te(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=P({themeMode:Te()?"dark":"light"}),ce={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=Ue({},s))}},M=P({open:!1,message:"",variant:"success"}),Ve={state:M,subscribe(e){return D(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class $e{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),$.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await me(()=>import("./index-CzdSWI9D.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const xe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:$e},Symbol.toStringTag,{value:"Module"}));export{m as C,ke as E,J as M,w as O,de as R,ce as T,Ve as a,_e as b,$ as c,xe as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{af as r,ag as d,H as a,ah as p,M as h,ai as g,aj as l,N as C,ae as m,a6 as x,ak as u}from"./index-
|
|
1
|
+
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{af as r,ag as d,H as a,ah as p,M as h,ai as g,aj as l,N as C,ae as m,a6 as x,ak as u}from"./index-BiZvLxQh.js";let j=class extends r.PureComponent{constructor(){super(...arguments);s(this,"handleOnConnect",t=>{this.props.onConnect(t)});s(this,"handleRedirectToAuthDapp",()=>{if(!this.props.isConnected&&!this.props.isConnecting){const t=new URLSearchParams(window.location.search),o=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/builder":"";d(`${o}${t.get("redirectTo")||"/"}`)}})}render(){const{isConnected:t}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(p,{}),a.jsx(h.Page,{children:a.jsx(g,{onConnect:this.handleRedirectToAuthDapp,isConnected:t,handleLoginConnect:this.handleOnConnect})}),a.jsx(l,{})]})}};const P=n=>({isConnected:m(n),isConnecting:x(n)}),R=n=>({onConnect:e=>n(u(e))}),$=C(P,R)(j);export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.5.
|
|
1
|
+
.DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.5.4-14857361421.commit-815d0db/assets/scene-CZXq89b-.svg);margin-bottom:16px}.SceneDetailPage .deployments+.notice{color:var(--text);text-align:right;margin-top:8px}.SceneDetailPage .description-content{font-size:20px;font-weight:400}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x=Object.defineProperty;var h=(t,s,a)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var c=(t,s,a)=>h(t,typeof s!="symbol"?s+"":s,a);import{D as f,cc as g,H as e,bD as p,G as i,bm as u,M as l,cd as b,L as j,K as L,ce as v,bI as T,b8 as w,N as E,cf as N}from"./index-BiZvLxQh.js";import{L as _}from"./LandAction-BBw11feV.js";import{L as P}from"./LandProviderPage-BBXo4FKe.js";import"./Back-DSw2t9ER.js";import"./NotFound-DqST62Hb.js";let R=class extends f.PureComponent{constructor(){super(...arguments);c(this,"state",{address:"",isValid:!0});c(this,"handleChange",(a,r)=>{this.setState({isValid:!r.value||g(r.value),address:r.value})})}render(){const{onTransfer:a}=this.props,{address:r,isValid:o}=this.state;return e.jsx(P,{className:"LandTransferPage",children:n=>{let d;const m=p(n.owner,r);return m?d=i("transfer_page.same_owner"):o||(d=i("transfer_page.invalid_address")),e.jsx(_,{land:n,title:i("transfer_page.title"),subtitle:e.jsx(u,{id:"transfer_page.subtitle",values:{name:e.jsx("strong",{children:n.name})}}),children:e.jsxs(l.Form,{onSubmit:()=>a(n,r),children:[e.jsx(b,{label:"Address",value:r,onChange:this.handleChange,placeholder:"0x...",error:!o||m,message:d}),e.jsx(l.Section,{className:"disclaimer",children:e.jsx("p",{className:"danger-text",children:e.jsx(u,{id:"transfer_page.disclaimer",values:{br:e.jsx("br",{})}})})}),e.jsxs(l.Row,{children:[e.jsx(j,{className:"cancel",to:L.landDetail(n.id),children:e.jsx(l.Button,{children:i("global.cancel")})}),e.jsx(v,{type:"submit",primary:!0,disabled:!r||!o||n.role!==T.OWNER||p(n.owner,r),network:w.Network.ETHEREUM,children:i("global.submit")})]})]})})}})}};const V=t=>({onTransfer:(s,a)=>t(N(s,a))}),B=E(void 0,V)(R);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
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{Z as f,D as d,aA as $,aB as
|
|
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{Z as f,D as d,aA as $,aB as m,aC as v,G as _,H as s,M as o,J as N,I as U,N as T,at as C,aD as V,aE as w,aF as k,aG as y,X as O,aH as M,ae as A,aI as G,aJ as J,aK as X,aL as H}from"./index-BiZvLxQh.js";import{S as z}from"./SignInRequired-MhyXItkL.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=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 b=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(Q);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()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.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:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.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:I.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:j,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:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.5.4-14857361421.commit-815d0db"};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:b=""}=this.props;if(!c)return s.jsx(z,{});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=${b}`),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:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(H(t))}),Ee=T(ie,de)(ce);export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as l,Z as E,
|
|
1
|
+
import{D as l,Z as E,du as w,K as I,bB as h,H as e,M as d,G as r,bA as H,N as y,de as B,dj as T,a6 as R,bw as A,cH as O,bK as P,bZ as D,cK as F}from"./index-BiZvLxQh.js";import{L as K}from"./LoggedInDetailPage.container-BacXg1fp.js";import{B as z}from"./Back-DSw2t9ER.js";import{N as G}from"./NotFound-DqST62Hb.js";import"./Navigation.container-BpqXxAPO.js";import"./selectors-CcV531E9.js";import"./SignInRequired-MhyXItkL.js";function M(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 t of a)if(t.land.id!==o.landId){n=t.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const t=h(a,n);return c&&t in c?c[t].land:void 0},[c]),f=l.useCallback((a,n)=>{const t=j(a,n);t&&u(t)},[]),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 t=h(a,n);return(!s||s.id!==t)&&g===t},[]),_=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(K,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(d.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(z,{absolute:!0,onClick:p}),e.jsxs(d.Narrow,{children:[e.jsx(d.Row,{children:e.jsx(d.Column,{children:e.jsxs(d.Section,{children:[e.jsx(d.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(H,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(d.Row,{className:"atlas-footer",children:[e.jsx(d.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(d.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(d.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(d.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(G,{})})}const Z=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:T(g,u),isLoading:R(i)||A(O(i),F)||P(i),landTiles:D(i)}},X=y(Z)(M);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bk as _,Z as b,D as c,K as d,H as s,ah as h,M as l,G as n,
|
|
1
|
+
import{bk as _,Z as b,D as c,K as d,H as s,ah as h,M as l,G as n,hJ as k,J as x,aj as g,N as v,hK as j,hL as C}from"./index-BiZvLxQh.js";import{a as N,N as T}from"./Navigation.container-BpqXxAPO.js";import"./selectors-CcV531E9.js";var r=(e=>(e.ACTIVE="active",e.COMING_SOON="coming_soon",e))(r||{});const E="_titleContainer_5ka3v_1",S="_backButton_5ka3v_8",B="_title_5ka3v_1",f="_templates_5ka3v_26",I="_subtitle_5ka3v_32",a={titleContainer:E,backButton:S,title:B,templates:f,subtitle:I},y=({templates:e,onLoadTemplates:u})=>{const i=_(),o=b();c.useEffect(()=>{u()},[u]);const p=c.useCallback(()=>{o.push(d.scenes())},[o]),m=c.useCallback(t=>{i==null||i.track("Go to template detail",{id:t.id,name:t.title,description:t.description}),o.push(d.templateDetail(t.id))},[i,o]);return s.jsxs(s.Fragment,{children:[s.jsx(h,{}),s.jsxs(l.Page,{isFullscreen:!0,className:"ScenesPage",children:[s.jsx(N,{activeTab:T.SCENES}),s.jsxs("div",{className:a.titleContainer,children:[s.jsx(l.Button,{className:a.backButton,basic:!0,icon:s.jsx(l.Icon,{name:"arrow alternate circle left outline"}),onClick:p,"aria-label":n("templates_page.back_to_scenes")}),s.jsx("h2",{className:a.title,children:n("templates_page.title")})]}),s.jsx("div",{className:a.templates,children:Object.values(e).map(t=>s.jsx(k,{title:t.title,description:t.description,videoSrc:t.video,imgSrc:t.thumbnail,subtitle:s.jsxs("span",{className:a.subtitle,children:[s.jsx(x,{name:"scene-parcel"}),n("templates_page.parcels",{size:t.layout.rows*t.layout.cols})]}),tag:t.templateStatus!==r.ACTIVE?{label:n("templates_page.coming_soon"),color:"#716B7C"}:void 0,disabled:t.templateStatus!==r.ACTIVE,onClick:m.bind(null,t)},t.id))})]}),s.jsx(g,{})]})},A=e=>({templates:j(e)}),G=e=>({onLoadTemplates:()=>e(C())}),F=v(A,G)(y);export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var S=Object.defineProperty;var L=(n,a,s)=>a in n?S(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s;var r=(n,a,s)=>L(n,typeof a!="symbol"?a+"":a,s);import{aB as b,D as x,dd as g,H as e,M as c,G as o,L as m,K as p,bm as j,ce as C,b8 as R,N as w,a_ as P,de as f,cO as k}from"./index-BiZvLxQh.js";import{L as v}from"./LandAction-BBw11feV.js";import{L as B}from"./LandProviderPage-BBXo4FKe.js";import"./Back-DSw2t9ER.js";import"./NotFound-DqST62Hb.js";const u=b.get("MARKETPLACE_WEB_URL","");class F extends x.PureComponent{constructor(){super(...arguments);r(this,"state",{selectedName:""});r(this,"handleChange",(s,i)=>{const{onFetchENS:l,land:t}=this.props,d=i.value;l(d,t),this.setState({selectedName:d})});r(this,"handleContinue",()=>{const{selectedName:s}=this.state,{onUpdateSubdomain:i,ensList:l}=this.props,t=l.find(d=>d.name===s);i(t.subdomain)})}render(){const{land:s,ensList:i,isLoading:l}=this.props,{selectedName:t}=this.state,d=i.map(({name:_,subdomain:E})=>({value:_,text:E})),h=i.find(_=>_.name===t),N=!h||g(h,s);return e.jsx(c.Form,{className:"LandSelectENSForm",children:!l&&d.length===0?e.jsxs(e.Fragment,{children:[e.jsx(c.Section,{size:"large",children:o("land_select_ens_page.empty_options_message")}),e.jsxs(c.Row,{children:[e.jsx(m,{className:"cancel",to:p.landDetail(s.id),children:e.jsx(c.Button,{children:o("global.cancel")})}),e.jsx(m,{to:`${u}/names/claim`,children:e.jsx(c.Button,{primary:!0,children:o("land_select_ens_page.claim_new_name")})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(c.Section,{size:"large",children:[e.jsxs("div",{className:"select-names",children:[e.jsx(c.Header,{sub:!0,className:"name",children:o("land_select_ens_page.select_name_title")}),e.jsx(c.Dropdown,{value:t,options:d,placeholder:o("land_select_ens_page.select_name_placeholder"),onChange:this.handleChange})]}),e.jsx("div",{className:"select-message",children:h&&g(h,s)?e.jsx("span",{className:"danger-text",children:o("land_select_ens_page.name_assigned")}):e.jsx(j,{id:"land_select_ens_page.click_to_claim_new_name",values:{click_here:e.jsx(m,{to:`${u}/names/claim`,children:o("global.click_here")})}})})]}),e.jsxs(c.Row,{children:[e.jsx(m,{className:"cancel",to:p.landDetail(s.id),children:e.jsx(c.Button,{children:o("global.cancel")})}),e.jsx(C,{type:"submit",disabled:N||l,primary:!0,onClick:this.handleContinue,loading:l,network:R.Network.ETHEREUM,children:o("global.continue")})]})]})})}}let D=class extends x.PureComponent{constructor(){super(...arguments);r(this,"handleUpdateSubdomain",(s,i)=>{const{history:l}=this.props;l.push(p.landAssignENS(s.id,i))})}render(){const{ensList:s,isLoading:i,onFetchENS:l}=this.props;return e.jsx(B,{children:t=>e.jsx(v,{land:t,title:o("land_select_ens_page.title"),subtitle:e.jsx(j,{id:"land_select_ens_page.subtitle",values:{land:e.jsx(m,{to:p.landDetail(t.id),children:t.name})}}),children:e.jsx(F,{land:t,ensList:s,isLoading:i,onUpdateSubdomain:d=>this.handleUpdateSubdomain(t,d),onFetchENS:l})})})}};const U=n=>({ensList:f(n)}),A=n=>({onFetchENS:(a,s)=>n(k(a,s))}),z=w(U,A)(P(D));export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var f=Object.defineProperty;var R=(l,o,s)=>o in l?f(l,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[o]=s;var x=(l,o,s)=>R(l,typeof o!="symbol"?o+"":o,s);import{D as g,K as m,H as e,aZ as B,M as t,N,a_ as O,bQ as z,bR as H,aA as P,bB as _,bS as A,bT as F,bI as j,bU as C,G as a,bM as $,bA as X,bC as E,bV as Y,bW as W,bX as U,bY as V,bZ as J,b_ as Z,aW as G,b$ as K,X as Q}from"./index-BiZvLxQh.js";import{L as q}from"./LandProviderPage-BBXo4FKe.js";import{B as ee}from"./Back-DSw2t9ER.js";import{J as se}from"./JumpIn.container-C_Bd2Q2L.js";import{R as te}from"./RentalPeriod-BorPFM4k.js";import{S as oe}from"./SceneStats.container-Bnai63Cy.js";import"./NotFound-DqST62Hb.js";import"./index-B1823bDj.js";import"./date-C_kTbrPh.js";let ie=class extends g.PureComponent{constructor(){super(...arguments);x(this,"handleOnClick",()=>{const{isLoading:s,history:i}=this.props;s&&i.push(m.activity())})}render(){const{ens:s,isLoading:i,onIconClick:n}=this.props;return e.jsx(B,{className:"ENSChip",text:i?e.jsxs(e.Fragment,{children:[s.subdomain,e.jsx(t.Loader,{active:!0,size:"tiny"})]}):s.subdomain,isActive:i,icon:i?"":"minus",onClick:this.handleOnClick,onIconClick:n})}};const ne=(l,o)=>{const{ens:s}=o;return{isLoading:z(l)[s.subdomain]||H(l)[s.subdomain]}},le=N(ne)(O(ie)),ae=l=>{const{deployment:o,onMouseEnter:s,onMouseLeave:i,onNavigate:n,onOpenModal:u,projects:c,disabled:r}=l,d=o.projectId&&o.projectId in c?c[o.projectId]:null,p=g.useCallback(()=>{r||s(o)},[s,r,o]),h=g.useCallback(()=>{r||i(o)},[i,r,o]),v=g.useCallback(()=>{d&&!r&&n(m.sceneDetail(d.id))},[n,d,r]),S=g.useCallback(()=>{u("DeployModal",{view:P.CLEAR_DEPLOYMENT,deploymentId:o.id})},[u,o]);return e.jsxs("div",{className:`Scene ${d&&!r?"clickable":""}`,onClick:v,onMouseEnter:p,onMouseLeave:h,children:[o.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${o.thumbnail})`}}):e.jsx("div",{className:"no-thumbnail"}),e.jsxs("div",{className:"stat",children:[e.jsx("div",{className:"title",title:o.name,children:o.name}),o.layout?e.jsxs("div",{className:"secondary-text",children:[o.layout.rows,"x",o.layout.cols]}):null]}),e.jsx(oe,{deployment:o}),e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,disabled:r,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:"Unpublish",onClick:S})})})]})},L=({children:l,land:o})=>{const s=g.Children.map(l,i=>g.isValidElement(i)?g.cloneElement(i,{disabled:o.roles.includes(j.LESSOR)}):i);return e.jsx(t.Popup,{content:a("land_detail_page.land_is_locked"),position:"top left",disabled:!o.roles.includes(j.LESSOR),trigger:e.jsx("span",{children:s})})};let re=class extends g.PureComponent{constructor(){super(...arguments);x(this,"state",{hovered:null,mouseX:0,mouseY:0,showTooltip:!1});x(this,"handleMouseEnter",s=>{this.setState({hovered:s,showTooltip:!1})});x(this,"handleMouseLeave",()=>{this.setState({hovered:null,showTooltip:!1})});x(this,"handleMouseMove",s=>{this.setState({mouseX:s.clientX,mouseY:s.clientY})});x(this,"handleHover",s=>(i,n)=>{const{deploymentsByCoord:u}=this.props,c=u[_(i,n)];c&&s.some(r=>r.id===c.id)?this.setState({hovered:c,showTooltip:!0}):this.setState({hovered:null,showTooltip:!1})});x(this,"handleClick",(s,i)=>{const{deploymentsByCoord:n,projects:u,onNavigate:c,onReplace:r,landTiles:d}=this.props,p=_(s,i),h=n[p];h&&h.projectId&&h.projectId in u?c(m.sceneDetail(h.projectId)):p in d&&r(m.landDetail(d[p].land.id))});x(this,"isHovered",(s,i)=>{const{deploymentsByCoord:n}=this.props,{hovered:u}=this.state,c=_(s,i),r=n[c];return!!r&&!!u&&u.id===r.id});x(this,"getHoverStrokeLayer",s=>(i,n)=>this.isHovered(i,n)?{color:A[s.role],scale:1.4}:null);x(this,"getHoverFillLayer",s=>(i,n)=>this.isHovered(i,n)?{color:F[s.role],scale:1.2}:null)}computeOccupiedLand(s,i){const{landTiles:n}=this.props;return i.reduce((c,r)=>c+r.parcels.filter(d=>{const p=n[d];return!!p&&p.land.id===s.id}).length,0)}renderDetail(s,i,n){const{ensList:u,parcelsAvailableToBuildEstates:c,projects:r,onNavigate:d,onOpenModal:p}=this.props,{hovered:h,mouseX:v,mouseY:S,showTooltip:y}=this.state,D=this.computeOccupiedLand(s,i),w=n&&(s.roles.includes(j.LESSOR)||s.roles.includes(j.TENANT))?n.lessor:s.owner,M=s.roles.includes(j.LESSOR),k=c[s.id],T=y&&h&&h.projectId&&h.projectId in r;return e.jsxs(e.Fragment,{children:[h&&y?e.jsxs("div",{className:"tooltip",style:{top:S,left:v},children:[h.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${h.thumbnail})`}}):null,e.jsx("div",{className:"name",children:h.name})]}):null,e.jsx(t.Section,{size:"large",children:e.jsxs(t.Row,{children:[e.jsx(ee,{absolute:!0,onClick:()=>d(m.land())}),e.jsx(t.Narrow,{children:e.jsxs(t.Row,{children:[e.jsx(t.Column,{children:e.jsxs(t.Row,{children:[e.jsx(t.Header,{size:"huge",children:s.name}),s.type===C.PARCEL?e.jsx(e.Fragment,{children:e.jsxs(t.Badge,{color:"#37333D",children:[e.jsx("i",{className:"pin"}),s.id]})}):e.jsxs(t.Badge,{color:"#37333D",children:[s.size," LAND"]}),e.jsx(se,{land:s})]})}),s.role===j.OWNER||s.role===j.LESSOR?e.jsx(t.Column,{className:"actions",align:"right",children:e.jsxs(t.Row,{children:[e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landTransfer(s.id)),children:a("land_detail_page.transfer")})}),e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landEdit(s.id)),children:a("global.edit")})}),e.jsx(L,{land:s,children:e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(t.Dropdown.Menu,{children:[k?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.build_estate"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.add_or_remove_parcels"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.dissolve_estate"),onClick:()=>p("DissolveModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.assign_name"),onClick:()=>d(m.landSelectENS(s.id))}),e.jsx(t.Dropdown.Divider,{})]}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})]})})})]})}):s.roles.includes(j.TENANT)&&n&&!$(n)?e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})})}):null]})})]})}),e.jsxs(t.Narrow,{children:[e.jsx(t.Section,{size:"large",children:e.jsx("div",{className:`atlas-wrapper ${T?"clickable":""}`,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove,children:e.jsx(X,{landId:s.id,layers:[this.getHoverStrokeLayer(s),this.getHoverFillLayer(s)],isDraggable:!0,zoom:s.size&&s.size>=1e3?.5:1,onHover:this.handleHover(i),onClick:this.handleClick})})}),e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.online_scenes")}),i.length===0?e.jsx(t.Empty,{height:100,children:a("global.none")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:i.map(b=>e.jsx(ae,{disabled:M,deployment:b,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onNavigate:d,onOpenModal:p,projects:r},b.id))}),e.jsx("div",{className:"notice",children:a("analytics.notice")})]})]}),u.length>0?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:e.jsx(t.Row,{children:e.jsx(t.Column,{children:a("land_detail_page.assigned_names")})})}),e.jsx("div",{className:"ens-list",children:u.map(b=>e.jsx(le,{ens:b,onIconClick:()=>p("UnsetENSContentModal",{ens:b,land:s})},b.subdomain))})]}):null,s.description?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.description")}),e.jsx("p",{children:s.description})]}):null,e.jsxs(t.Section,{className:"data",children:[e.jsxs(t.Stats,{title:a("global.role"),className:"role",children:[e.jsx(t.Header,{children:a(`roles.${s.role}`)}),n?e.jsx(te,{land:s,rental:n}):null]}),e.jsx(t.Stats,{title:a("land_detail_page.owner"),children:e.jsx(E,{address:w,size:"large"})}),n&&s.roles.includes(j.LESSOR)?e.jsx(t.Stats,{title:a("land_detail_page.tenant"),children:e.jsx(E,{address:n.tenant,size:"large"})}):null,s.operators.length>0?e.jsx(t.Stats,{title:a("land_detail_page.operated_by"),className:"operators",children:e.jsx(t.Row,{children:s.operators.map((b,I)=>e.jsx(E,{address:b,size:"large"},I))})}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Stats,{title:a("land_detail_page.total_land"),children:e.jsx(t.Header,{children:s.size})}),e.jsx(t.Stats,{title:a("land_detail_page.empty_land"),children:e.jsx(t.Header,{children:s.size-D})})]}):null]})]})]})}render(){return e.jsx(q,{className:"LandDetailPage",children:(s,{deployments:i,rental:n})=>this.renderDetail(s,i,n)})}};const de=l=>{const o=Y(l)||"";return{ensList:W(l,o),parcelsAvailableToBuildEstates:U(l),deploymentsByCoord:V(l),landTiles:J(l),projects:Z(l)}},ce=l=>({onNavigate:o=>l(G(o)),onReplace:o=>l(K(o)),onOpenModal:(o,s)=>l(Q(o,s))}),Ee=N(de,ce)(re);export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bv as be,Z as F,D as n,af as je,H as e,G as s,L as de,K as E,dE as me,M as a,N as U,eq as Ie,X as he,er as Se,es as Z,a1 as fe,dD as Ce,et as Ne,eu as ue,ev as ve,ew as ce,J as Re,ex as N,aZ as oe,ey as w,aH as we,ez as Le,eA as De,eB as Ee,eC as Ae,eD as Oe,bw as G,eE as Pe,eF as ie,eG as ye,eH as ke,eI as Me,eJ as He,eK as $e,eL as Be,eM as Fe,eN as Ue,eO as Ve,eP as ze}from"./index-C3HlqCBZ.js";import{B as qe,b as Ge,N as Ye}from"./Navigation.container-C8BTALTd.js";import{L as Ze}from"./LoggedInDetailPage.container-BMX1d7bi.js";import{O as ge}from"./OptionsDropdown-CkgY0ZQ8.js";import{a as B}from"./date-DfOx7gwH.js";import{C as _e}from"./CollectionStatus.container-CglSuZa1.js";import"./selectors-CYllvatO.js";import"./SignInRequired-CjXWxB7A.js";import"./index-CJk6cKNC.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:t,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(t);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[t]),u=n.useMemo(()=>new URLSearchParams(t).get("sortBy"),[t])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(t),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,t]),j=n.useCallback(()=>{const i=new URLSearchParams(t);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[t,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(t);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[t,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(t);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,t]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:t);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,t,u]),v=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,f=v?g<v:void 0;return{page:g,pages:v,hasMorePages:f,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:t,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(t.id),children:[e.jsx(me,{item:t}),e.jsxs(a.Card.Content,{children:[e.jsx("div",{className:"text",title:t.name,children:t.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${t.type}`)})]})]})]}),e.jsx(a.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:t.name}),content:s("item_card.confirm_delete_content",{name:t.name}),confirmButton:e.jsx(a.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},et=je.memo(Xe),tt=(l,t)=>({onDeleteItem:()=>l(Ie(t.item)),onOpenModal:c=>l(he(c,{item:t.item}))}),at=U(void 0,tt)(et),lt="_ItemRow_xmdia_1",st="_image_xmdia_7",nt="_name_xmdia_21",ct="_title_xmdia_29",ot="_imageColumn_xmdia_30",it="_published_xmdia_35",D={ItemRow:lt,image:st,name:nt,title:ct,imageColumn:ot,published:it};function rt(l){const{item:t}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(t.id))},[c]);return e.jsxs(a.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(a.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:t}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:t}),e.jsx("div",{className:D.name,children:t.name})]})]})}),e.jsx(a.Table.Cell,{width:3,children:B(t.createdAt,{addSuffix:!0})}),e.jsx(a.Table.Cell,{width:3,children:B(t.updatedAt,{addSuffix:!0})})]})}const dt=l=>{const{collection:t,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(t);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!t.isPublished&&e.jsx(ge,{className:fe({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(t.id,b),children:[e.jsx(Ce,{collectionId:t.id}),e.jsxs(a.Card.Content,{children:[e.jsxs("div",{className:"text",title:t.name,children:[e.jsx(_e,{collection:t})," ",t.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!t.isMappingComplete&&Ne(t.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(a.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(a.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:t.name}),content:s("collection_card.confirm_delete_content",{name:t.name}),confirmButton:e.jsx(a.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},mt=n.memo(dt),ht=(l,t)=>({itemCount:ue(l,t.collection.id)}),Ct=(l,t)=>({onDeleteCollection:()=>l(ve(t.collection))}),ut=U(ht,Ct)(mt),gt="_CollectionRow_k7d4q_1",_t="_image_k7d4q_7",xt="_name_k7d4q_16",pt="_title_k7d4q_24",Tt="_imageColumn_k7d4q_25",bt="_published_k7d4q_30",L={CollectionRow:gt,image:_t,name:xt,title:pt,imageColumn:Tt,published:bt};function jt(l){const{collection:t,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(t.id,Z(t)))},[d]),o=Z(t);return e.jsxs(a.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(a.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:t.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:t}),e.jsx("div",{className:L.name,children:t.name})]})]})}),e.jsx(a.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(a.Table.Cell,{width:2,children:c}),e.jsx(a.Table.Cell,{width:3,children:B(t.createdAt,{addSuffix:!0})}),e.jsx(a.Table.Cell,{width:3,children:B(t.updatedAt,{addSuffix:!0})}),e.jsx(a.Table.Cell,{width:3,children:t.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(a.Icon,{name:"check"})]}):null})]})}const It=(l,t)=>({itemCount:ue(l,t.collection.id)}),St=U(It)(jt);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 ft(l){const{address:t,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:v,onOpenModal:f,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&&t&&V(t)},[t,u]),n.useEffect(()=>{t&&(h===m.ITEMS?v(t,{page:p,limit:Y}):O(t,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[t,p,h,P.search,k,v,O]);const pe=n.useCallback(()=>{f("CreateThirdPartyCollectionModal")},[f]),$=n.useCallback(()=>{f(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[f,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)},[t,h,y]),te=n.useCallback(()=>e.jsx(a.Card.Group,{children:M?d.map((C,T)=>e.jsx(ut,{collection:C},T)):g?e.jsx(a.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(at,{item:C},T))}),[c,d,g,M,h]),ae=n.useCallback(()=>M?e.jsx(a.Section,{children:e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:d.map(C=>e.jsx(St,{collection:C},C.id))})]})}):e.jsx(a.Section,{children:e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:s("global.item")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(a.Table.Body,{children:c.map(C=>e.jsx(rt,{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(a.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(a.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(a.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(a.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(a.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(Re,{name:"cube"}),s("item_editor.open")]}),e.jsxs(a.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(a.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(a.Column,{align:"right",children:e.jsxs(a.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(a.Dropdown,{direction:"left",value:k,options:[{value:N.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:N.CREATED_AT_DESC,text:s("global.order.newest")},{value:N.CREATED_AT_ASC,text:s("global.order.oldest")},{value:N.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:N.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:N.NAME_DESC,text:s("global.order.name_desc")},{value:N.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,R=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(a.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(a.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsx(a.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(a.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(a.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(a.Row,{height:30,children:[e.jsx(a.Column,{children:e.jsx(a.Row,{children:!g&&!b&&!!R&&R>0&&e.jsx(a.Header,{sub:!0,children:s("collections_page.results",{count:R})})})}),ne()]})]})}),g||b||R===void 0?e.jsx(a.Loader,{active:!0,size:"large"}):R>0?e.jsxs(e.Fragment,{children:[r===w.GRID?te():r===w.LIST?ae():null,!!q&&q>1&&e.jsx(a.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(a.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,$,te,ae,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const Nt=l=>{const t=we(l),c=Le(l),d=t?De(l,t):[],r=t?Ee(l,t):null,o=Ae(l);return{items:d,address:t,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)}},vt=l=>({onSetView:t=>l(He(t)),onOpenModal:(t,c)=>l(he(t,c)),onFetchOrphanItems:(t,c)=>l($e(t,c)),onFetchCollections:(t,c)=>l(Be(t,c)),onFetchOrphanItem:t=>l(Fe(t))}),kt=U(Nt,vt)(ft);export{kt as default};
|
|
1
|
+
import{bv as be,Z as F,D as n,af as je,H as e,G as s,L as de,K as E,dC as me,M as a,N as U,eo as Ie,X as he,ep as Se,eq as Z,a1 as fe,dB as Ce,er as Ne,es as ue,et as ve,eu as oe,J as Re,ev as N,aZ as ce,ew as w,aH as we,ex as Le,ey as De,ez as Ee,eA as Ae,eB as Oe,bw as G,eC as ye,eD as ie,eE as Pe,eF as ke,eG as Me,eH as He,eI as $e,eJ as Be,eK as Fe,eL as Ue,eM as Ve,eN as ze}from"./index-BiZvLxQh.js";import{B as qe,b as Ge,N as Ye}from"./Navigation.container-BpqXxAPO.js";import{L as Ze}from"./LoggedInDetailPage.container-BacXg1fp.js";import{O as ge}from"./OptionsDropdown-BC4A5J96.js";import{a as B}from"./date-C_kTbrPh.js";import{C as _e}from"./CollectionStatus.container-D94PszBl.js";import"./selectors-CcV531E9.js";import"./SignInRequired-MhyXItkL.js";import"./index-B1823bDj.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:t,pathname:o}=be(),d=F(),r=d.push.bind(d),c=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(t);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[t]),u=n.useMemo(()=>new URLSearchParams(t).get("sortBy"),[t])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(t),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??c),I=(_-1)*p;return[_,p,I]},[c,t]),j=n.useCallback(()=>{const i=new URLSearchParams(t);i.set("page",(g+1).toString()),r(`${o}?${i.toString()}`)},[t,g,r,o]),S=n.useCallback(i=>{const _=new URLSearchParams(t);_.set("page",i.toString()),r(`${o}?${_.toString()}`)},[t,r,o]),O=n.useCallback(i=>{const _=new URLSearchParams(t);_.set("page","1"),_.set("sortBy",i),r(`${o}?${_.toString()}`)},[o,r,t]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:t);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${o}?${I.toString()}`)},[o,r,t,u]),v=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,f=v?g<v:void 0;return{page:g,pages:v,hasMorePages:f,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:t,onDeleteItem:o,onOpenModal:d}=l,[r,c]=n.useState(!1),x=n.useCallback(()=>c(!1),[c]),u=n.useCallback(()=>c(!0),[c]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{c(!1),o()},[c,o]);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(t.id),children:[e.jsx(me,{item:t}),e.jsxs(a.Card.Content,{children:[e.jsx("div",{className:"text",title:t.name,children:t.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${t.type}`)})]})]})]}),e.jsx(a.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:t.name}),content:s("item_card.confirm_delete_content",{name:t.name}),confirmButton:e.jsx(a.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},et=je.memo(Xe),tt=(l,t)=>({onDeleteItem:()=>l(Ie(t.item)),onOpenModal:o=>l(he(o,{item:t.item}))}),at=U(void 0,tt)(et),lt="_ItemRow_xmdia_1",st="_image_xmdia_7",nt="_name_xmdia_21",ot="_title_xmdia_29",ct="_imageColumn_xmdia_30",it="_published_xmdia_35",D={ItemRow:lt,image:st,name:nt,title:ot,imageColumn:ct,published:it};function rt(l){const{item:t}=l,o=F(),d=n.useCallback(()=>{o.push(E.itemDetail(t.id))},[o]);return e.jsxs(a.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(a.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:t}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:t}),e.jsx("div",{className:D.name,children:t.name})]})]})}),e.jsx(a.Table.Cell,{width:3,children:B(t.createdAt,{addSuffix:!0})}),e.jsx(a.Table.Cell,{width:3,children:B(t.updatedAt,{addSuffix:!0})})]})}const dt=l=>{const{collection:t,onDeleteCollection:o,itemCount:d}=l,[r,c]=n.useState(!1),x=n.useCallback(()=>c(!1),[c]),u=n.useCallback(()=>c(!0),[c]),g=n.useCallback(()=>{c(!1),o()},[c,o]),b=Z(t);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!t.isPublished&&e.jsx(ge,{className:fe({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(t.id,b),children:[e.jsx(Ce,{collectionId:t.id}),e.jsxs(a.Card.Content,{children:[e.jsxs("div",{className:"text",title:t.name,children:[e.jsx(_e,{collection:t})," ",t.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!t.isMappingComplete&&Ne(t.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(a.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(a.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:t.name}),content:s("collection_card.confirm_delete_content",{name:t.name}),confirmButton:e.jsx(a.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},mt=n.memo(dt),ht=(l,t)=>({itemCount:ue(l,t.collection.id)}),Ct=(l,t)=>({onDeleteCollection:()=>l(ve(t.collection))}),ut=U(ht,Ct)(mt),gt="_CollectionRow_k7d4q_1",_t="_image_k7d4q_7",xt="_name_k7d4q_16",pt="_title_k7d4q_24",Tt="_imageColumn_k7d4q_25",bt="_published_k7d4q_30",L={CollectionRow:gt,image:_t,name:xt,title:pt,imageColumn:Tt,published:bt};function jt(l){const{collection:t,itemCount:o}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(t.id,Z(t)))},[d]),c=Z(t);return e.jsxs(a.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(a.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:t.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:t}),e.jsx("div",{className:L.name,children:t.name})]})]})}),e.jsx(a.Table.Cell,{width:3,children:s(`collection.type.${c}`)}),e.jsx(a.Table.Cell,{width:2,children:o}),e.jsx(a.Table.Cell,{width:3,children:B(t.createdAt,{addSuffix:!0})}),e.jsx(a.Table.Cell,{width:3,children:B(t.updatedAt,{addSuffix:!0})}),e.jsx(a.Table.Cell,{width:3,children:t.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(a.Icon,{name:"check"})]}):null})]})}const It=(l,t)=>({itemCount:ue(l,t.collection.id)}),St=U(It)(jt);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 ft(l){const{address:t,items:o,collections:d,view:r,collectionsPaginationData:c,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:v,onOpenModal:f,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:y,changeFilter:P,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:c==null?void 0:c.total}),h=y.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(y.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&t&&V(t)},[t,u]),n.useEffect(()=>{t&&(h===m.ITEMS?v(t,{page:p,limit:Y}):O(t,{page:p,limit:Y,q:y.search??void 0,type:h===m.STANDARD_COLLECTIONS?oe.STANDARD:oe.THIRD_PARTY,sort:k}))},[t,p,h,y.search,k,v,O]);const pe=n.useCallback(()=>{f("CreateThirdPartyCollectionModal")},[f]),$=n.useCallback(()=>{f(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[f,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{P("search",T.value)},500)},[P]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&P("section",C)},[t,h,P]),te=n.useCallback(()=>e.jsx(a.Card.Group,{children:M?d.map((C,T)=>e.jsx(ut,{collection:C},T)):g?e.jsx(a.Loader,{size:"large",active:!0}):o.map((C,T)=>e.jsx(at,{item:C},T))}),[o,d,g,M,h]),ae=n.useCallback(()=>M?e.jsx(a.Section,{children:e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:d.map(C=>e.jsx(St,{collection:C},C.id))})]})}):e.jsx(a.Section,{children:e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:s("global.item")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(a.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(a.Table.Body,{children:o.map(C=>e.jsx(rt,{item:C},C.id))})]})}),[o,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(a.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(a.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(a.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(a.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(a.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(Re,{name:"cube"}),s("item_editor.open")]}),e.jsxs(a.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(a.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(a.Column,{align:"right",children:e.jsxs(a.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(a.Dropdown,{direction:"left",value:k,options:[{value:N.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:N.CREATED_AT_DESC,text:s("global.order.newest")},{value:N.CREATED_AT_ASC,text:s("global.order.oldest")},{value:N.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:N.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:N.NAME_DESC,text:s("global.order.name_desc")},{value:N.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(ce,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(ce,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=c==null?void 0:c.total,T=x==null?void 0:x.total,R=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(a.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(a.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsx(a.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(a.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(a.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(a.Row,{height:30,children:[e.jsx(a.Column,{children:e.jsx(a.Row,{children:!g&&!b&&!!R&&R>0&&e.jsx(a.Header,{sub:!0,children:s("collections_page.results",{count:R})})})}),ne()]})]})}),g||b||R===void 0?e.jsx(a.Loader,{active:!0,size:"large"}):R>0?e.jsxs(e.Fragment,{children:[r===w.GRID?te():r===w.LIST?ae():null,!!q&&q>1&&e.jsx(a.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(a.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,c,x,r,u,g,b,A,j,S,le,$,te,ae,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const Nt=l=>{const t=we(l),o=Le(l),d=t?De(l,t):[],r=t?Ee(l,t):null,c=Ae(l);return{items:d,address:t,collections:o,collectionsPaginationData:c,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(ye(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:Pe(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},vt=l=>({onSetView:t=>l(He(t)),onOpenModal:(t,o)=>l(he(t,o)),onFetchOrphanItems:(t,o)=>l($e(t,o)),onFetchCollections:(t,o)=>l(Be(t,o)),onFetchOrphanItem:t=>l(Fe(t))}),kt=U(Nt,vt)(ft);export{kt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _=Object.defineProperty;var E=(n,t,a)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>E(n,typeof t!="symbol"?t+"":t,a);import{D as v,H as e,bm as R,G as r,
|
|
1
|
+
var _=Object.defineProperty;var E=(n,t,a)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>E(n,typeof t!="symbol"?t+"":t,a);import{D as v,H as e,bm as R,G as r,bz as T,M as s,K as k,bA as y,bB as D,bC as I,bD as f,bE as C,N as O,a_ as F,bF as H,bG as $,bH as h,bI as g,aZ as S,bJ as G,bK as B,bL as V}from"./index-BiZvLxQh.js";import{N as W}from"./Navigation.container-BpqXxAPO.js";import{L as z}from"./LoggedInDetailPage.container-BacXg1fp.js";import{R as K}from"./RentalPeriod-BorPFM4k.js";import"./selectors-CcV531E9.js";import"./SignInRequired-MhyXItkL.js";import"./index-B1823bDj.js";const M=n=>n.ui.land,Z=n=>M(n).view;class A extends v.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(R,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(R,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,C)?1:f(t,C)?-1:n>t?1:-1;let J=class extends v.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(K,{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 X=(n,t)=>{const{land:a}=t,o=H(n)[a.id]||[],d=$(n,a);return{deployments:o,rental:d}},Y=O(X)(F(J)),b=20;let Q=class extends v.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(S,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(S,{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(Y,{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(z,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(V(t))}),he=O(U,ee)(Q);export{he as default};
|