@dcl/builder-site 7.21.3 → 7.21.4-20072676604.commit-b664d05
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-BH4iASqN.js → Back-BynbDivp.js} +1 -1
- package/assets/{CollectionProvider.container-y9Jvmd2k.js → CollectionProvider.container-D5CQnDMg.js} +1 -1
- package/assets/{CollectionStatus.container-8VY5P-G9.js → CollectionStatus.container-3ohPocER.js} +1 -1
- package/assets/{ConfirmDelete-Z-A-2vvv.js → ConfirmDelete-CsS30BV6.js} +1 -1
- package/assets/{FileSaver.min-DiDCSp2j.js → FileSaver.min-Cl06a4Ib.js} +1 -1
- package/assets/{ItemProvider.container-DA8pl8A9.js → ItemProvider.container-BxbHp3WI.js} +2 -2
- package/assets/{JumpIn.container-BPvEJxqR.js → JumpIn.container-DhDkycMJ.js} +1 -1
- package/assets/{LandAction-BJeDBqmt.js → LandAction-CWVaofVp.js} +1 -1
- package/assets/{LandProviderPage-BgqIdfZu.js → LandProviderPage-B0v3GZAN.js} +1 -1
- package/assets/{LoggedInDetailPage.container-B5mDhnN7.js → LoggedInDetailPage.container-DUhCPcHZ.js} +1 -1
- package/assets/{Navigation-Dn_mtSwj.css → Navigation-CUxcYWhj.css} +1 -1
- package/assets/{Navigation.container-BG_CnMDg.js → Navigation.container-C4IkoSf-.js} +1 -1
- package/assets/{NotFound-DAWudS_Z.js → NotFound-R4_SVQiM.js} +1 -1
- package/assets/{OptionsDropdown-f9w9xnmW.js → OptionsDropdown-us8wM9oB.js} +1 -1
- package/assets/{RentalPeriod-DlrHS4US.js → RentalPeriod-l_RdW6cQ.js} +1 -1
- package/assets/{SDKTag-BruIlmXa.js → SDKTag-WMhhtuJt.js} +1 -1
- package/assets/{SceneStats.container-i0oRy2td.js → SceneStats.container-BN07N_DZ.js} +1 -1
- package/assets/{SignInRequired-BMGdaPiz.js → SignInRequired-DXu9Lnyi.js} +1 -1
- package/assets/{ThirdPartyKindBadge-CQDK-LFn.js → ThirdPartyKindBadge-CPEJ7Im7.js} +1 -1
- package/assets/{dataReader-Ckx1R5wO.js → dataReader-BlvJSk7R.js} +1 -1
- package/assets/{date-DzUXriDN.js → date-I9Y85L5f.js} +1 -1
- package/assets/{fortmatic-D_mKXB26.js → fortmatic-BJv3hUDW.js} +1 -1
- package/assets/{hooks-DwyMtzUR.js → hooks-C1vW-Ivc.js} +1 -1
- package/assets/{index-CD7r65d9.js → index-1lu3gBYu.js} +1 -1
- package/assets/{index-Cb2Nv8e4.js → index-5NiuEoVx.js} +1 -1
- package/assets/{index-CK7loDTg.js → index-B7jP8Q5m.js} +1 -1
- package/assets/{index-SFdUqSzU.js → index-BI7GgFb3.js} +1 -1
- package/assets/{index-DjrUXlr_.js → index-BKTVBhGI.js} +1 -1
- package/assets/{index-DZ0qfWXS.js → index-B_dHaAQu.js} +1 -1
- package/assets/{index-D_qJF_xw.js → index-Bood3Bce.js} +1 -1
- package/assets/{index-mDO7H7su.js → index-BsFEl8gX.js} +1 -1
- package/assets/index-Bz0irhNB.js +1 -0
- package/assets/index-Bzqz0HYS.css +1 -0
- package/assets/{index-WRLiGxiK.js → index-C-GaOyrZ.js} +20 -20
- package/assets/{index-CALR_5-7.js → index-C8DyPldC.js} +1 -1
- package/assets/{index-BSctcvUm.js → index-CBpHG7sZ.js} +1 -1
- package/assets/{index-xUAHIxAf.js → index-CC94Lk6s.js} +1 -1
- package/assets/{index-4mJdEIGM.js → index-CCO2Avyx.js} +1 -1
- package/assets/{index-jpHpWzz7.js → index-CEsteZAp.js} +1 -1
- package/assets/index-CIYEP7v0.js +1 -0
- package/assets/{index-Du3Oc-TV.js → index-CIvKBBya.js} +1 -1
- package/assets/{index-ChBcKcjx.js → index-CKLp6Hup.js} +1 -1
- package/assets/{index-DLNPQDly.js → index-CNu1qaGD.js} +1 -1
- package/assets/{index-RO70OB-B.js → index-CZcDUkD1.js} +1 -1
- package/assets/index-Cc3x4kR0.js +2 -0
- package/assets/{index-CI__wCEJ.js → index-CdT1sm1s.js} +1 -1
- package/assets/{index-B4l6qeKE.js → index-CqIAQxaM.js} +1 -1
- package/assets/{index-GnkTn4Fe.js → index-CqPbErBR.js} +1 -1
- package/assets/{index-7T-bjAIM.js → index-CybcQcb-.js} +1 -1
- package/assets/{index-CJUkrZ8A.js → index-D5bIxLyr.js} +1 -1
- package/assets/{index-CN2LP9d-.css → index-DI7btb-_.css} +7 -7
- package/assets/{index-DTVDHWYK.js → index-DLGfvbda.js} +1 -1
- package/assets/{index-BhiBn5E3.js → index-DPjPckBP.js} +1 -1
- package/assets/{index-DjVcurf5.css → index-DTWySej6.css} +1 -1
- package/assets/index-DVdpc8LT.css +1 -0
- package/assets/{index-CgqPXLve.js → index-DXd3vmFE.js} +1 -1
- package/assets/index-DXq5OdPF.css +1 -0
- package/assets/{index-DU0QRR75.js → index-DZq8hgA_.js} +1 -1
- package/assets/{index-gVo-Rnlm.js → index-Db6lCEoL.js} +1 -1
- package/assets/{index-DvpNGIyH.js → index-Dbin4CZe.js} +1 -1
- package/assets/{index-Bzq9Ywqk.js → index-DfhGmNm2.js} +1 -1
- package/assets/{index-BQ9AG3-q.js → index-DkBcVZtV.js} +1 -1
- package/assets/{index-smF7REL4.css → index-Dl7zdDXY.css} +1 -1
- package/assets/{index-DVs4bzc4.js → index-Do_FW82o.js} +1 -1
- package/assets/{index-Dg9IEPvu.js → index-Dq3gvxnZ.js} +1 -1
- package/assets/{index-BEfy3-Da.js → index-DqtM4iLS.js} +2 -2
- package/assets/{index-CQ8MsnQX.js → index-Dut6SE52.js} +1 -1
- package/assets/index-KGFkJaYl.css +1 -0
- package/assets/{index-Bfv6sx5Q.js → index-e1KSIcYB.js} +1 -1
- package/assets/index-jZdf8jWG.js +1 -0
- package/assets/{index-b2ubx3JI.js → index-kxfDLB2J.js} +1 -1
- package/assets/{index-2ZtAjAFi.js → index-vv4Yct9z.js} +1 -1
- package/assets/{index.es-D6esfWd1.js → index.es-BJ4-Svcd.js} +4 -4
- package/assets/{selectors-B3KhVvOK.js → selectors-BobHRkyd.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-C1dxe408.css +0 -1
- package/assets/index-C8GItUFz.css +0 -1
- package/assets/index-CkGzsQfz.js +0 -2
- package/assets/index-D3YLv_dU.js +0 -1
- package/assets/index-D5aiIT9z.js +0 -1
- package/assets/index-D6kX3DpM.css +0 -1
- package/assets/index-D_3JN2VX.css +0 -1
- package/assets/index-gRT9OIVA.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-WRLiGxiK.js";import{d as Re}from"./hooks-DwyMtzUR.js";import{I as Le}from"./ItemProvider.container-DA8pl8A9.js";import{C as Be}from"./ConfirmDelete-Z-A-2vvv.js";import{L as Ue}from"./LoggedInDetailPage.container-B5mDhnN7.js";import{N as Oe}from"./NotFound-DAWudS_Z.js";import{B as Ae}from"./Back-BH4iASqN.js";import"./Navigation.container-BG_CnMDg.js";import"./selectors-B3KhVvOK.js";import"./SignInRequired-BMGdaPiz.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
1
|
+
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-C-GaOyrZ.js";import{d as Re}from"./hooks-C1vW-Ivc.js";import{I as Le}from"./ItemProvider.container-BxbHp3WI.js";import{C as Be}from"./ConfirmDelete-CsS30BV6.js";import{L as Ue}from"./LoggedInDetailPage.container-DUhCPcHZ.js";import{N as Oe}from"./NotFound-R4_SVQiM.js";import{B as Ae}from"./Back-BynbDivp.js";import"./Navigation.container-C4IkoSf-.js";import"./selectors-BobHRkyd.js";import"./SignInRequired-DXu9Lnyi.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ak as ie,N as e,S as a,M as n,J as i,fz as ae,fA as Ne,eY as k,cq as $e,aR as K,T as se,e_ as fe,fB as re,fC as Fe,a2 as A,fD as Ue,fE as ve,f7 as ee,cN as ue,fF as me,ej as ye,cO as We,bq as z,fG as He,eM as ke,fH as Oe,eD as ze,fm as Ee,b4 as Ye,a4 as Te,fI as Z,fJ as oe,R as B,e$ as Pe,eB as _e,fK as Ge,fL as qe,bp as te,fe as Qe,fd as Ve,ff as Je,f9 as Se,f1 as Re,Q as pe,fM as Ze,dN as Xe,ez as Ke,fi as es,fN as ss,fO as X,fP as as,fc as ts,eN as he,fQ as xe,aM as ns,cY as ls,fR as os,fS as is,ey as rs,fT as cs,fU as ds,b1 as us,f5 as y,fV as ms,eE as _s,P as O,fW as ge,a7 as ne,fX as ps,fg as le,fY as be,aa as hs,ab as w,fl as xs,fZ as gs,f_ as bs,f$ as Cs,g0 as js,g1 as Is}from"./index-WRLiGxiK.js";import{e as Ns}from"./hooks-DwyMtzUR.js";import{g as fs}from"./selector-CtnQnmhq.js";import{C as vs}from"./CollectionProvider.container-y9Jvmd2k.js";import{L as ys}from"./LoggedInDetailPage.container-B5mDhnN7.js";import{N as ks}from"./NotFound-DAWudS_Z.js";import{B as Es}from"./Back-BH4iASqN.js";import{C as Ts}from"./CollectionStatus.container-8VY5P-G9.js";import{J as Ps}from"./JumpIn.container-BPvEJxqR.js";import{C as Ss}from"./ConfirmDelete-Z-A-2vvv.js";import"./Navigation.container-BG_CnMDg.js";import"./selectors-B3KhVvOK.js";import"./SignInRequired-BMGdaPiz.js";const Rs=({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=ie.memo(Rs),ws=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:m,onPush:c,onInit:b}=s;i.useEffect(()=>{l.isPublished&&b()},[l,b]);const p=o.length>ae,I=i.useMemo(()=>o.length===0||!o.every(Ne)||p,[o,p]);let C;if(l.isPublished)l.isApproved?u?C=e.jsx(Ce,{type:"push"}):t===k.UNSYNCED?C=e.jsx(a.Button,{primary:!0,compact:!0,onClick:c,children:n("collection_detail_page.push_changes")}):C=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):C=e.jsx(Ce,{type:"publish"});else{const j=e.jsx($e,{disabled:I,primary:!0,compact:!0,onClick:m,network:K.Network.MATIC,children:n("collection_detail_page.publish")});if(I){let N;o.length>ae?N=n("collection_detail_page.publish_reason_max_items",{maxItems:ae}):o.length===0?N=n("collection_detail_page.publish_reason_no_items"):N=n("collection_detail_page.publish_reason_items_not_complete"),C=e.jsx(a.Popup,{content:N,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:j}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else C=j}return C},Ms=ie.memo(ws),Ds=(s,l)=>{const{id:o}=l.collection,t=fe(s);return{items:re(s,o),status:t[o],hasPendingCuration:Fe(s,o)}},Ls=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(A("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(A("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(Ue(o))}},je=se(Ds,Ls)(Ms),Bs="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",$s="_menu_1a07a_13",Fs="_disabled_1a07a_13",Us="_item_1a07a_13",Ie={dropdown:Bs,ellipsis:As,menu:$s,disabled:Fs,item:Us},Ws=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},m=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},c=()=>{o("AddExistingItemModal",{collectionId:s.id})},b=()=>{t(s)},p=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?p?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:m})]}):null:ee(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:c}),e.jsx(Ss,{name:s.name,onDelete:b,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})]})})},Hs=(s,l)=>({wallet:ye(s),items:re(s,l.collection.id),name:We(s)||"",isForumPostLoading:z(ke(s),He)}),Os=s=>({onOpenModal:(l,o)=>s(A(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),zs=se(Hs,Os)(Ws),Ys=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ie.memo(Ys),qs=(s,l)=>{const{itemId:o}=l;return{isEnabled:Ee(s)[o]===k.UNSYNCED}},Qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(A("ResetItemModal",{itemId:o}))}},Vs=se(qs,Qs)(Gs),Js="_itemImage_10lcv_1",Zs="_itemStatus_10lcv_9",Xs="_mana_10lcv_13",Ks="_grid_10lcv_19",ea="_row_10lcv_30",sa="_avatarColumn_10lcv_35",aa="_avatarContainer_10lcv_40",ta="_info_10lcv_44",na="_nameWrapper_10lcv_49",la="_badgeContainer_10lcv_54",oa="_badge_10lcv_54",ia="_name_10lcv_49",ra="_linkAction_10lcv_76",ca="_subtitle_10lcv_80",da="_itemActions_10lcv_86",ua="_removeSaleButton_10lcv_93",ma="_status_10lcv_98",_a="_ready_10lcv_112",pa="_notReady_10lcv_117",ha="_incomplete_10lcv_122",xa="_published_10lcv_126",ga="_underReview_10lcv_131",ba="_unsynced_10lcv_132",Ca="_alertIcon_10lcv_137",ja="_check_10lcv_148",Ia="_contextMenuButton_10lcv_152",Na="_contextMenu_10lcv_152",r={itemImage:Js,itemStatus:Zs,mana:Xs,grid:Ks,row:ea,avatarColumn:sa,avatarContainer:aa,info:ta,nameWrapper:na,badgeContainer:la,badge:oa,name:ia,linkAction:ra,subtitle:ca,itemActions:da,removeSaleButton:ua,status:ma,ready:_a,notReady:pa,incomplete:ha,published:xa,underReview:ga,unsynced:ba,alertIcon:Ca,check:ja,contextMenuButton:Ia,contextMenu:Na},fa=25;function va({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,isOffchainPublicItemOrdersEnabledVariants:m,collection:c,status:b,ethAddress:p,wallet:I,loadingTradeIds:C,isCancellingItemOrder:j}){const N=Ye(),f=Te(),x=I&&Z(c,I),E=I&&u&&oe(c,I),Y=!u||E&&t.tradeId||x,T=i.useMemo(()=>{var R,W,Q;return((Q=(W=(R=m==null?void 0:m.payload)==null?void 0:R.value)==null?void 0:W.trim())==null?void 0:Q.toLocaleLowerCase())===(p==null?void 0:p.toLocaleLowerCase())},[m,p]),P=i.useCallback(()=>{if(u&&E&&!T){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),M=i.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),S=i.useCallback(()=>{l([t]),f.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Pe.COLLECTIONS}),N==null||N.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?Ge(t.urn):qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,f]),$=i.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),G=i.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:c})},[t,s,c]),D=i.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),L=i.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),F=i.useCallback(()=>!t.price||T?e.jsx("div",{className:`link ${r.linkAction}`,onClick:te(P),children:n("collection_item.set_price")}):t.price===Qe.toString()||u&&!x&&!t.tradeId?e.jsx("span",{children:"-"}):Ve(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:r.mana,network:K.Network.MATIC,showTooltip:!0,children:Je(t.price)}),[t,x,u,P]),q=i.useCallback(()=>b===k.UNSYNCED?e.jsxs("div",{className:`${r.unsynced} ${r.status}`,children:[e.jsx("div",{className:r.alertIcon}),n("collection_item.unsynced")]}):b===k.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${r.underReview} ${r.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${r.published} ${r.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ne(t)?e.jsxs("div",{className:`${r.ready} ${r.status}`,children:[e.jsx(a.Icon,{className:r.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Se(t)&&!(Re in t.contents)?e.jsxs("div",{className:`${r.notReady} ${r.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:te(S),className:`link ${r.linkAction}`,children:n("collection_item.edit_item")}),[S,t,b]),U=i.useCallback(()=>e.jsx("div",{className:r.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:r.action,onClick:te(),children:e.jsxs(a.Dropdown.Menu,{className:r.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:B.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:M}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:S}),!c.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:G}),Ze(c,t,p)&&!ee(c)?e.jsxs(e.Fragment,{children:[t.price&&Y?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:P}):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:$})]})]}):null]})})}),[c,t,p,M,S,G,P,$]),v=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${r.row}`,children:[e.jsx(a.Table.Cell,{className:`${r.avatarColumn}`,width:t.name.length>fa?6:5,children:e.jsx(pe,{to:B.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:r.avatarContainer,children:[e.jsx(Xe,{className:r.itemImage,item:t}),e.jsx("div",{className:r.info,children:e.jsx("div",{className:r.nameWrapper,children:e.jsxs("div",{className:r.name,title:t.name,children:[e.jsx(Ke,{className:r.itemStatus,item:t}),t.name,e.jsx("div",{className:r.badgeContainer,children:e.jsx(es,{className:r.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:r.column,children:t.rarity&&v.category?e.jsx(ss,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`${t.type}.category.${v.category}`)}):null}),X(t)&&as(v)?e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`emote.play_mode.${v.loop?"loop":"simple"}.text`)}):null}):null,u&&!c.isPublished?null:e.jsx(a.Table.Cell,{className:r.column,children:F()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:r.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ts(t)]})}):null,e.jsx(a.Table.Cell,{children:q()}),u&&!x&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!E,onClick:D,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:r.removeSaleButton,onClick:L,loading:j&&C.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:r.contextMenuButton,children:U()})]})}const ya=(s,l)=>{const o=Ee(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ns(s),status:o[l.item.id],wallet:ls(s),isOffchainPublicItemOrdersEnabled:os(s),isOffchainPublicItemOrdersEnabledVariants:is(s),isCancellingItemOrder:z(he(s),xe),loadingTradeIds:t}},ka=s=>({onOpenModal:(l,o)=>s(A(l,o)),onDeleteItem:l=>s(rs(l)),onSetItems:l=>s(cs(l)),onRemoveFromSale:l=>s(ds(l,!0))}),Ea=se(ya,ka)(va);function Ta({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:m,onOpenModal:c,isLoading:b,onFetchCollectionForumPostReply:p}){const I=us(),C=i.useMemo(()=>new URLSearchParams(I.search).get("tab"),[I]),[j,N]=i.useState(C||y.WEARABLE),f=Te(),x=u===B.collections(),E=i.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&p(s.id)},[s,p]);i.useEffect(()=>{s&&E()},[s]);const Y=i.useCallback(()=>{c("MintItemsModal",{collectionId:s.id})},[s,c]),T=i.useCallback(()=>{c("CreateSingleItemModal",{collectionId:s.id})},[s,c]),P=i.useCallback(()=>{s&&!s.isPublished&&c("EditCollectionNameModal",{collection:s})},[s,c]),M=i.useCallback(()=>{s&&c("SellCollectionModal",{collectionId:s.id,isOnSale:oe(s,l)||Z(s,l)})},[s,l,c]),S=i.useCallback(()=>{x?f.goBack():f.push(B.collections())},[f,x]),$=i.useCallback(()=>{s&&f.push(ms(s,o),{fromParam:Pe.COLLECTIONS})},[f,s,o]),G=i.useCallback((d,h="")=>{const _=window.open(d,h);_&&_.focus()},[]),D=i.useCallback(()=>{s&&s.isPublished&&s.forumLink&&G(s.forumLink,"_blank")},[s]),L=i.useCallback(d=>{N(d),f.push(B.collectionDetail(s.id,_s.STANDARD,{tab:j}))},[s,f]),F=i.useCallback(d=>{const h=d===y.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:h.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),q=i.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"})}),[]),U=i.useCallback(d=>{if(!s)return null;const h=ee(s),_=d.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Ps,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:h||!_}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:h||!_,onClick:$,children:[e.jsx(O,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),_&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:h,onClick:T,children:[e.jsx(O,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,$,T]),v=i.useCallback(()=>{if(!s)return null;const d=Z(s,l),h=oe(s,l);return d?e.jsx(ge,{network:K.Network.MATIC,children:_=>e.jsx(a.Button,{className:ne("action-button",d?"basic":"primary"),disabled:t||!_,onClick:M,children:e.jsx("span",{className:"text",children:d?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})}):h?null:e.jsx(ge,{network:K.Network.MATIC,children:_=>e.jsxs(a.Button,{className:ne("action-button",h?"secondary":"primary"),disabled:t||!_,onClick:M,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})})},[s,M]),R=i.useCallback((d="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:h,last_read_post_number:_}=s.forumPostReply,V=h-(_??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:d,children:V})}return null},[s]),W=i.useCallback(()=>!(s!=null&&s.isApproved)||![k.UNSYNCED,k.UNDER_REVIEW].includes(m)?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.${m}_collection_message`,{br:e.jsx("br",{})})})]}),m===k.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:D,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),R("medium")]}):null,m===k.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,m,R,D]),Q=i.useCallback(d=>{if(!s)return null;const h=ps(s,l.address),_=ee(s),V=Z(s,l),J=d.some(X),H=d.some(le),we=J?d.some(g=>X(g)&&!g.price):!1,Me=H?d.some(g=>le(g)&&!g.price):!1,De=H&&d.some(g=>Se(g)&&!(Re in g.contents)),de=J&&!H,Le=H&&!J,Be=d.filter(g=>Le?le(g):de?X(g):g.type===j),Ae=J&&H;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:ne({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(Es,{absolute:!0,onClick:S}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:_?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(Ts,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:P,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(O,{name:"edit",className:"edit-collection-name"}),V?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:!h,onClick:Y,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:D,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?R():null]}):null,!(s.isPublished&&s.isApproved)&&m!==k.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?v():null,be(s,l.address)?e.jsx(zs,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[W(),Ae?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:j===y.WEARABLE,onClick:()=>L(y.WEARABLE),children:[e.jsx(O,{name:"wearable"}),n("collection_detail_page.wearables"),Me?F(y.WEARABLE):De?q():null]}),e.jsxs(a.Tabs.Tab,{active:j===y.EMOTE,onClick:()=>L(y.EMOTE),children:[e.jsx(O,{name:"emote"}),n("collection_detail_page.emotes"),we?F(y.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:U(d)})]}):e.jsx("div",{className:"secondary-actions",children:U(d)}),d.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")}),j===y.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,s.isPublished?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}):null,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")}),!V&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Be.map(g=>e.jsx(Ea,{collection:s,item:g},g.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:_,onClick:T,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[j,m,l,s,T,U,P,F,L,W,v,L,D,q,R,Y,S]),ce=l!==null&&s!==null&&be(s,l.address);return e.jsx(vs,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:d,isLoadingCollectionItems:h,items:_})=>e.jsx(ys,{className:"CollectionDetailPage",hasNavigation:!ce&&!b&&!d,isLoading:b||d||h,children:ce?Q(_):e.jsx(ks,{})})})}const Pa=()=>{const s=hs(),l=Ns()||"",o=w(ye),t=w(x=>xs(x,l)),u=w(fe),m=w(gs),c=w(ke),b=w(x=>re(x,l)),p=w(fs),I=i.useMemo(()=>m||z(c,Cs),[m,c]),C=u[l],j=z(c,js)||z(c,Is),N=i.useCallback((x,E)=>s(A(x,E)),[s]),f=i.useCallback(x=>s(bs(x)),[s]);return e.jsx(Ta,{wallet:o,collection:t,isOnSaleLoading:I,isLoading:j,items:b,status:C,lastLocation:p,onOpenModal:N,onFetchCollectionForumPostReply:f})},za=Pa;export{za as default};
|
|
1
|
+
import{ak as ie,N as e,S as a,M as n,J as i,fz as ae,fA as Ne,eY as k,cq as $e,aR as K,T as se,e_ as fe,fB as re,fC as Fe,a2 as A,fD as Ue,fE as ve,f7 as ee,cN as ue,fF as me,ej as ye,cO as We,bq as z,fG as He,eM as ke,fH as Oe,eD as ze,fm as Ee,b4 as Ye,a4 as Te,fI as Z,fJ as oe,R as B,e$ as Pe,eB as _e,fK as Ge,fL as qe,bp as te,fe as Qe,fd as Ve,ff as Je,f9 as Se,f1 as Re,Q as pe,fM as Ze,dN as Xe,ez as Ke,fi as es,fN as ss,fO as X,fP as as,fc as ts,eN as he,fQ as xe,aM as ns,cY as ls,fR as os,fS as is,ey as rs,fT as cs,fU as ds,b1 as us,f5 as y,fV as ms,eE as _s,P as O,fW as ge,a7 as ne,fX as ps,fg as le,fY as be,aa as hs,ab as w,fl as xs,fZ as gs,f_ as bs,f$ as Cs,g0 as js,g1 as Is}from"./index-C-GaOyrZ.js";import{e as Ns}from"./hooks-C1vW-Ivc.js";import{g as fs}from"./selector-CtnQnmhq.js";import{C as vs}from"./CollectionProvider.container-D5CQnDMg.js";import{L as ys}from"./LoggedInDetailPage.container-DUhCPcHZ.js";import{N as ks}from"./NotFound-R4_SVQiM.js";import{B as Es}from"./Back-BynbDivp.js";import{C as Ts}from"./CollectionStatus.container-3ohPocER.js";import{J as Ps}from"./JumpIn.container-DhDkycMJ.js";import{C as Ss}from"./ConfirmDelete-CsS30BV6.js";import"./Navigation.container-C4IkoSf-.js";import"./selectors-BobHRkyd.js";import"./SignInRequired-DXu9Lnyi.js";const Rs=({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=ie.memo(Rs),ws=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:m,onPush:c,onInit:b}=s;i.useEffect(()=>{l.isPublished&&b()},[l,b]);const p=o.length>ae,I=i.useMemo(()=>o.length===0||!o.every(Ne)||p,[o,p]);let C;if(l.isPublished)l.isApproved?u?C=e.jsx(Ce,{type:"push"}):t===k.UNSYNCED?C=e.jsx(a.Button,{primary:!0,compact:!0,onClick:c,children:n("collection_detail_page.push_changes")}):C=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):C=e.jsx(Ce,{type:"publish"});else{const j=e.jsx($e,{disabled:I,primary:!0,compact:!0,onClick:m,network:K.Network.MATIC,children:n("collection_detail_page.publish")});if(I){let N;o.length>ae?N=n("collection_detail_page.publish_reason_max_items",{maxItems:ae}):o.length===0?N=n("collection_detail_page.publish_reason_no_items"):N=n("collection_detail_page.publish_reason_items_not_complete"),C=e.jsx(a.Popup,{content:N,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:j}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else C=j}return C},Ms=ie.memo(ws),Ds=(s,l)=>{const{id:o}=l.collection,t=fe(s);return{items:re(s,o),status:t[o],hasPendingCuration:Fe(s,o)}},Ls=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(A("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(A("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(Ue(o))}},je=se(Ds,Ls)(Ms),Bs="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",$s="_menu_1a07a_13",Fs="_disabled_1a07a_13",Us="_item_1a07a_13",Ie={dropdown:Bs,ellipsis:As,menu:$s,disabled:Fs,item:Us},Ws=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},m=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},c=()=>{o("AddExistingItemModal",{collectionId:s.id})},b=()=>{t(s)},p=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?p?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:m})]}):null:ee(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:c}),e.jsx(Ss,{name:s.name,onDelete:b,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})]})})},Hs=(s,l)=>({wallet:ye(s),items:re(s,l.collection.id),name:We(s)||"",isForumPostLoading:z(ke(s),He)}),Os=s=>({onOpenModal:(l,o)=>s(A(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),zs=se(Hs,Os)(Ws),Ys=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ie.memo(Ys),qs=(s,l)=>{const{itemId:o}=l;return{isEnabled:Ee(s)[o]===k.UNSYNCED}},Qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(A("ResetItemModal",{itemId:o}))}},Vs=se(qs,Qs)(Gs),Js="_itemImage_10lcv_1",Zs="_itemStatus_10lcv_9",Xs="_mana_10lcv_13",Ks="_grid_10lcv_19",ea="_row_10lcv_30",sa="_avatarColumn_10lcv_35",aa="_avatarContainer_10lcv_40",ta="_info_10lcv_44",na="_nameWrapper_10lcv_49",la="_badgeContainer_10lcv_54",oa="_badge_10lcv_54",ia="_name_10lcv_49",ra="_linkAction_10lcv_76",ca="_subtitle_10lcv_80",da="_itemActions_10lcv_86",ua="_removeSaleButton_10lcv_93",ma="_status_10lcv_98",_a="_ready_10lcv_112",pa="_notReady_10lcv_117",ha="_incomplete_10lcv_122",xa="_published_10lcv_126",ga="_underReview_10lcv_131",ba="_unsynced_10lcv_132",Ca="_alertIcon_10lcv_137",ja="_check_10lcv_148",Ia="_contextMenuButton_10lcv_152",Na="_contextMenu_10lcv_152",r={itemImage:Js,itemStatus:Zs,mana:Xs,grid:Ks,row:ea,avatarColumn:sa,avatarContainer:aa,info:ta,nameWrapper:na,badgeContainer:la,badge:oa,name:ia,linkAction:ra,subtitle:ca,itemActions:da,removeSaleButton:ua,status:ma,ready:_a,notReady:pa,incomplete:ha,published:xa,underReview:ga,unsynced:ba,alertIcon:Ca,check:ja,contextMenuButton:Ia,contextMenu:Na},fa=25;function va({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,isOffchainPublicItemOrdersEnabledVariants:m,collection:c,status:b,ethAddress:p,wallet:I,loadingTradeIds:C,isCancellingItemOrder:j}){const N=Ye(),f=Te(),x=I&&Z(c,I),E=I&&u&&oe(c,I),Y=!u||E&&t.tradeId||x,T=i.useMemo(()=>{var R,W,Q;return((Q=(W=(R=m==null?void 0:m.payload)==null?void 0:R.value)==null?void 0:W.trim())==null?void 0:Q.toLocaleLowerCase())===(p==null?void 0:p.toLocaleLowerCase())},[m,p]),P=i.useCallback(()=>{if(u&&E&&!T){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),M=i.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),S=i.useCallback(()=>{l([t]),f.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Pe.COLLECTIONS}),N==null||N.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?Ge(t.urn):qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,f]),$=i.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),G=i.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:c})},[t,s,c]),D=i.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),L=i.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),F=i.useCallback(()=>!t.price||T?e.jsx("div",{className:`link ${r.linkAction}`,onClick:te(P),children:n("collection_item.set_price")}):t.price===Qe.toString()||u&&!x&&!t.tradeId?e.jsx("span",{children:"-"}):Ve(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:r.mana,network:K.Network.MATIC,showTooltip:!0,children:Je(t.price)}),[t,x,u,P]),q=i.useCallback(()=>b===k.UNSYNCED?e.jsxs("div",{className:`${r.unsynced} ${r.status}`,children:[e.jsx("div",{className:r.alertIcon}),n("collection_item.unsynced")]}):b===k.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${r.underReview} ${r.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${r.published} ${r.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ne(t)?e.jsxs("div",{className:`${r.ready} ${r.status}`,children:[e.jsx(a.Icon,{className:r.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Se(t)&&!(Re in t.contents)?e.jsxs("div",{className:`${r.notReady} ${r.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:te(S),className:`link ${r.linkAction}`,children:n("collection_item.edit_item")}),[S,t,b]),U=i.useCallback(()=>e.jsx("div",{className:r.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:r.action,onClick:te(),children:e.jsxs(a.Dropdown.Menu,{className:r.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:B.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:M}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:S}),!c.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:G}),Ze(c,t,p)&&!ee(c)?e.jsxs(e.Fragment,{children:[t.price&&Y?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:P}):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:$})]})]}):null]})})}),[c,t,p,M,S,G,P,$]),v=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${r.row}`,children:[e.jsx(a.Table.Cell,{className:`${r.avatarColumn}`,width:t.name.length>fa?6:5,children:e.jsx(pe,{to:B.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:r.avatarContainer,children:[e.jsx(Xe,{className:r.itemImage,item:t}),e.jsx("div",{className:r.info,children:e.jsx("div",{className:r.nameWrapper,children:e.jsxs("div",{className:r.name,title:t.name,children:[e.jsx(Ke,{className:r.itemStatus,item:t}),t.name,e.jsx("div",{className:r.badgeContainer,children:e.jsx(es,{className:r.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:r.column,children:t.rarity&&v.category?e.jsx(ss,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`${t.type}.category.${v.category}`)}):null}),X(t)&&as(v)?e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`emote.play_mode.${v.loop?"loop":"simple"}.text`)}):null}):null,u&&!c.isPublished?null:e.jsx(a.Table.Cell,{className:r.column,children:F()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:r.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ts(t)]})}):null,e.jsx(a.Table.Cell,{children:q()}),u&&!x&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!E,onClick:D,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:r.removeSaleButton,onClick:L,loading:j&&C.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:r.contextMenuButton,children:U()})]})}const ya=(s,l)=>{const o=Ee(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ns(s),status:o[l.item.id],wallet:ls(s),isOffchainPublicItemOrdersEnabled:os(s),isOffchainPublicItemOrdersEnabledVariants:is(s),isCancellingItemOrder:z(he(s),xe),loadingTradeIds:t}},ka=s=>({onOpenModal:(l,o)=>s(A(l,o)),onDeleteItem:l=>s(rs(l)),onSetItems:l=>s(cs(l)),onRemoveFromSale:l=>s(ds(l,!0))}),Ea=se(ya,ka)(va);function Ta({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:m,onOpenModal:c,isLoading:b,onFetchCollectionForumPostReply:p}){const I=us(),C=i.useMemo(()=>new URLSearchParams(I.search).get("tab"),[I]),[j,N]=i.useState(C||y.WEARABLE),f=Te(),x=u===B.collections(),E=i.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&p(s.id)},[s,p]);i.useEffect(()=>{s&&E()},[s]);const Y=i.useCallback(()=>{c("MintItemsModal",{collectionId:s.id})},[s,c]),T=i.useCallback(()=>{c("CreateSingleItemModal",{collectionId:s.id})},[s,c]),P=i.useCallback(()=>{s&&!s.isPublished&&c("EditCollectionNameModal",{collection:s})},[s,c]),M=i.useCallback(()=>{s&&c("SellCollectionModal",{collectionId:s.id,isOnSale:oe(s,l)||Z(s,l)})},[s,l,c]),S=i.useCallback(()=>{x?f.goBack():f.push(B.collections())},[f,x]),$=i.useCallback(()=>{s&&f.push(ms(s,o),{fromParam:Pe.COLLECTIONS})},[f,s,o]),G=i.useCallback((d,h="")=>{const _=window.open(d,h);_&&_.focus()},[]),D=i.useCallback(()=>{s&&s.isPublished&&s.forumLink&&G(s.forumLink,"_blank")},[s]),L=i.useCallback(d=>{N(d),f.push(B.collectionDetail(s.id,_s.STANDARD,{tab:j}))},[s,f]),F=i.useCallback(d=>{const h=d===y.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:h.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),q=i.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"})}),[]),U=i.useCallback(d=>{if(!s)return null;const h=ee(s),_=d.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Ps,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:h||!_}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:h||!_,onClick:$,children:[e.jsx(O,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),_&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:h,onClick:T,children:[e.jsx(O,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,$,T]),v=i.useCallback(()=>{if(!s)return null;const d=Z(s,l),h=oe(s,l);return d?e.jsx(ge,{network:K.Network.MATIC,children:_=>e.jsx(a.Button,{className:ne("action-button",d?"basic":"primary"),disabled:t||!_,onClick:M,children:e.jsx("span",{className:"text",children:d?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})}):h?null:e.jsx(ge,{network:K.Network.MATIC,children:_=>e.jsxs(a.Button,{className:ne("action-button",h?"secondary":"primary"),disabled:t||!_,onClick:M,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})})},[s,M]),R=i.useCallback((d="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:h,last_read_post_number:_}=s.forumPostReply,V=h-(_??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:d,children:V})}return null},[s]),W=i.useCallback(()=>!(s!=null&&s.isApproved)||![k.UNSYNCED,k.UNDER_REVIEW].includes(m)?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.${m}_collection_message`,{br:e.jsx("br",{})})})]}),m===k.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:D,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),R("medium")]}):null,m===k.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,m,R,D]),Q=i.useCallback(d=>{if(!s)return null;const h=ps(s,l.address),_=ee(s),V=Z(s,l),J=d.some(X),H=d.some(le),we=J?d.some(g=>X(g)&&!g.price):!1,Me=H?d.some(g=>le(g)&&!g.price):!1,De=H&&d.some(g=>Se(g)&&!(Re in g.contents)),de=J&&!H,Le=H&&!J,Be=d.filter(g=>Le?le(g):de?X(g):g.type===j),Ae=J&&H;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:ne({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(Es,{absolute:!0,onClick:S}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:_?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(Ts,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:P,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(O,{name:"edit",className:"edit-collection-name"}),V?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:!h,onClick:Y,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:D,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?R():null]}):null,!(s.isPublished&&s.isApproved)&&m!==k.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?v():null,be(s,l.address)?e.jsx(zs,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[W(),Ae?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:j===y.WEARABLE,onClick:()=>L(y.WEARABLE),children:[e.jsx(O,{name:"wearable"}),n("collection_detail_page.wearables"),Me?F(y.WEARABLE):De?q():null]}),e.jsxs(a.Tabs.Tab,{active:j===y.EMOTE,onClick:()=>L(y.EMOTE),children:[e.jsx(O,{name:"emote"}),n("collection_detail_page.emotes"),we?F(y.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:U(d)})]}):e.jsx("div",{className:"secondary-actions",children:U(d)}),d.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")}),j===y.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,s.isPublished?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}):null,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")}),!V&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Be.map(g=>e.jsx(Ea,{collection:s,item:g},g.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:_,onClick:T,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[j,m,l,s,T,U,P,F,L,W,v,L,D,q,R,Y,S]),ce=l!==null&&s!==null&&be(s,l.address);return e.jsx(vs,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:d,isLoadingCollectionItems:h,items:_})=>e.jsx(ys,{className:"CollectionDetailPage",hasNavigation:!ce&&!b&&!d,isLoading:b||d||h,children:ce?Q(_):e.jsx(ks,{})})})}const Pa=()=>{const s=hs(),l=Ns()||"",o=w(ye),t=w(x=>xs(x,l)),u=w(fe),m=w(gs),c=w(ke),b=w(x=>re(x,l)),p=w(fs),I=i.useMemo(()=>m||z(c,Cs),[m,c]),C=u[l],j=z(c,js)||z(c,Is),N=i.useCallback((x,E)=>s(A(x,E)),[s]),f=i.useCallback(x=>s(bs(x)),[s]);return e.jsx(Ta,{wallet:o,collection:t,isOnSaleLoading:I,isLoading:j,items:b,status:C,lastLocation:p,onOpenModal:N,onFetchCollectionForumPostReply:f})},za=Pa;export{za 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.21.
|
|
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.21.4-20072676604.commit-b664d05/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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._dropdown_1a07a_1{border:1px solid var(--gray);border-radius:0 5px 5px 0;border-left:0}._ellipsis_1a07a_9{margin:auto!important}._dropdown_1a07a_1 ._menu_1a07a_13>._disabled_1a07a_13._item_1a07a_13{pointer-events:all}._dropdown_1a07a_1 ._menu_1a07a_13>._disabled_1a07a_13._item_1a07a_13 a{cursor:default}._itemImage_10lcv_1{min-width:48px;max-width:48px;height:48px;padding:5px;margin-right:24px}._itemStatus_10lcv_9{margin-right:4px}._mana_10lcv_13{font-size:15px!important;font-weight:400;line-height:0}._grid_10lcv_19{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_10lcv_19:hover{background-color:#24212966;color:var(--text)}._row_10lcv_30{align-items:center;font-size:15px}._avatarColumn_10lcv_35{align-items:center;flex-direction:inherit!important}._avatarContainer_10lcv_40{display:flex}._info_10lcv_44{width:calc(100% - 80px);display:flex}._nameWrapper_10lcv_49{display:flex;align-items:center}._badgeContainer_10lcv_54{margin-left:8px}._badge_10lcv_54{background-color:#37333d}._badge_10lcv_54:before{filter:none}._name_10lcv_49{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;text-decoration:underline}._linkAction_10lcv_76{text-transform:uppercase}._subtitle_10lcv_80{margin-top:2px;color:var(--secondary-text);text-transform:uppercase}._itemActions_10lcv_86{display:flex;align-items:center;justify-content:flex-end;width:100%}._removeSaleButton_10lcv_93.ui.button.secondary{background:#fff;color:#000}._status_10lcv_98{padding:4px 10px 4px 8px;border-radius:32px;align-items:center;width:fit-content;text-transform:uppercase;font-weight:700;font-size:12px}._status_10lcv_98 i{margin-right:5px}._ready_10lcv_112{color:#63b4f6;background:#2196f333}._notReady_10lcv_117{background:#fb3b3b33;color:#e97177}._incomplete_10lcv_122{color:var(--primary)}._published_10lcv_126{color:#65d890;background:#34ce7733}._underReview_10lcv_131,._unsynced_10lcv_132{color:#fe9c2a;background:#fe9c2a33}._alertIcon_10lcv_137{display:inline-block;margin-right:.25rem;height:15px;width:15px;vertical-align:text-bottom;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M-1-1h16v16H-1z'/%3e%3cpath%20fill='%23FFF'%20d='M7%2013.667A6.667%206.667%200%201%201%207%20.333a6.667%206.667%200%200%201%200%2013.334zM7%2012.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011zm0-8.833c.368%200%20.667.298.667.666V7a.667.667%200%200%201-1.334%200V4.333c0-.368.299-.666.667-.666zM7%209a.667.667%200%201%201%200%201.333A.667.667%200%200%201%207%209z'/%3e%3c/g%3e%3c/svg%3e") no-repeat;background-size:contain;filter:invert(64%) sepia(34%) saturate(797%) hue-rotate(331deg) brightness(140%) contrast(98%)}._check_10lcv_148{margin-left:2px}._contextMenuButton_10lcv_152{width:18px!important;background-color:transparent!important;box-shadow:none!important}._contextMenu_10lcv_152{background-color:var(--smart-grey)!important}.CollectionDetailPage>.ui.container>.dcl.section{margin-bottom:48px}.CollectionDetailPage .header-column{flex:none;width:calc(100% - 300px)}.CollectionDetailPage .header-row{width:100%}.CollectionDetailPage .header-row .ui.header.name{line-height:29px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CollectionDetailPage .edit-collection-name{display:none;margin-left:16px;margin-bottom:2px}.CollectionDetailPage .section:not(.is-published) .header-row:hover .edit-collection-name{display:inline-block}.CollectionDetailPage .ui.circular.label.badge-on-sale{margin-left:1em;padding:.5em .667em!important;color:var(--text);background-color:var(--primary);text-transform:uppercase}.CollectionDetailPage .section:not(.is-published) .header-row:hover{cursor:pointer}.CollectionDetailPage .ui.toggle.on-sale{text-transform:uppercase;margin-right:16px}.CollectionDetailPage .ui.toggle.on-sale>label{white-space:nowrap}.CollectionDetailPage .ui.toggle.checkbox input.hidden:focus+label,.CollectionDetailPage .ui.toggle.on-sale input.hidden+label{padding-left:40px;color:var(--secondary-text)!important}.CollectionDetailPage .dcl.row.actions>.ui.button.action-button{border:1px solid rgba(115,110,125,.4);border-radius:5px;padding:9px 20px;white-space:nowrap}.CollectionDetailPage .left.actions .ui.dropdown{margin-left:8px;border:1px solid rgba(115,110,125,.4);border-radius:5px}.CollectionDetailPage .actions .ui.button.basic.action-button>.text{color:var(--primary)}.CollectionDetailPage .actions .ui.button.compact{padding:10px}.CollectionDetailPage .actions .popup-button{margin-left:16px}.CollectionDetailPage .dcl.row.left.actions.grow.shrink{margin-left:12px}.CollectionDetailPage .actions-container{margin-left:auto}.CollectionDetailPage .Notice{margin-bottom:32px}.CollectionDetailPage .ui.grid.equal.width>.row>.column{padding-left:0}.CollectionDetailPage .dcl.narrow>.empty{padding:200px 0;width:100%;border-radius:8px;border:1px solid var(--divider);justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px}.CollectionDetailPage .sparkles{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.4-20072676604.commit-b664d05/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}.CollectionDetailPage .CollectionItem:first-child .grid{border-top:1px solid var(--divider)}.CollectionDetailPage .narrow.dcl{width:100%;max-width:1200px}.CollectionDetailPage .CollectionStatus{width:16px;height:16px;margin-bottom:6px;margin-right:12px}.CollectionDetailPage .empty-collection-title{font-weight:500;font-size:17px;line-height:26px;color:#fff;padding-bottom:8px;display:inline-block}.CollectionDetailPage .ui.basic.button.empty-action-button{border:1px solid rgba(115,110,125,.4);border-radius:5px;padding:8px 58px;margin-top:32px;color:var(--primary)}.CollectionDetailPage .ui.basic.button.empty-action-button span{color:var(--primary);font-weight:600}.CollectionDetailPage .ui.container .dcl.back{position:absolute}.CollectionDetailPage .dcl.column.left.shrink.name-container{min-width:0}.CollectionDetailPage .Icon.wearable,.CollectionDetailPage .Icon.emote{margin-right:12px;filter:brightness(100)}.CollectionDetailPage .dcl.tab{display:inline-flex;align-items:center}.CollectionDetailPage .dcl.tab i.circle.icon{margin-left:5px;color:#ff3d61}.CollectionDetailPage .dcl.tabs.fullscreen .ui.container{border-bottom:1px solid rgba(115,110,125,.32)}.CollectionDetailPage.toast.move-item-to-another-collection{padding:0;margin-bottom:96px}.CollectionDetailPage.toast.move-item-to-another-collection>div{margin:16px}.CollectionDetailPage.toast.move-item-to-another-collection .title{color:var(--text);font-size:17px;font-weight:600;line-height:26px;margin-bottom:0}.CollectionDetailPage.toast.move-item-to-another-collection .body{display:flex;flex-direction:column;max-width:348px}.CollectionDetailPage.toast.move-item-to-another-collection .body .description{color:var(--text);font-size:15px;line-height:24px;letter-spacing:0px;margin-bottom:8px}.CollectionDetailPage.toast.move-item-to-another-collection .body .cta{font-size:13px;font-weight:600;line-height:18px;text-transform:uppercase}.CollectionDetailPage.toast.move-item-to-another-collection .toast-icon{margin-right:16px}.CollectionDetailPage.toast.move-item-to-another-collection .toast-icon .two-way-arrow-icon{background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='%23242129'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.9395%2024.375C20.8612%2024.481%2020.7309%2024.5417%2020.5989%2024.5417C20.5023%2024.5417%2020.4041%2024.5086%2020.3145%2024.4459L14.2202%2020.1759C14.0799%2020.0776%2014%2019.9299%2014%2019.7707C14%2019.6115%2014.0817%2019.4638%2014.222%2019.3655L20.3188%2015.0959C20.4084%2015.0332%2020.5118%2015%2020.6084%2015C20.8181%2015%2021.0402%2015.1593%2021.0402%2015.4637V18.0513H32.7371C33.0518%2018.0513%2033.2776%2018.3291%2033.2776%2018.6437V20.8986C33.2776%2021.2132%2033.0518%2021.4752%2032.7371%2021.4752H21.0402V24.078C21.0402%2024.1917%2020.999%2024.2944%2020.9395%2024.375ZM27.6837%2024.0846L33.7783%2028.3545C33.9186%2028.4527%2034%2028.5996%2034%2028.7588C34%2028.918%2033.9201%2029.0647%2033.7798%2029.163L27.687%2033.4306C27.5983%2033.4928%2027.5037%2033.5221%2027.4081%2033.5226C27.1994%2033.5213%2027.0003%2033.3698%2027.0003%2033.0668V30.4791H15.2609C14.9462%2030.4791%2014.6995%2030.2013%2014.6995%2029.8867V27.6318C14.6995%2027.3172%2014.9462%2027.0552%2015.2609%2027.0552H27.0003V24.4523C27.0003%2024.1479%2027.2009%2023.9886%2027.4106%2023.9886C27.5073%2023.9886%2027.5941%2024.0218%2027.6837%2024.0846ZM27.4081%2033.5226C27.4071%2033.5226%2027.4061%2033.5226%2027.4052%2033.5226H27.4108C27.4099%2033.5226%2027.409%2033.5226%2027.4081%2033.5226Z'%20fill='white'/%3e%3c/svg%3e");height:48px;width:48px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab{display:inline-flex;position:absolute;right:0;padding:19px 0}.CollectionDetailPage .dcl.narrow .secondary-actions{display:flex;justify-content:flex-end}.CollectionDetailPage .secondary-actions.tab .button.action-button,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button{display:flex;align-items:center}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button:not(:last-child),.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button:not(:last-child){margin-right:24px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.basic.inverted{border:1px solid rgba(115,110,125,.4);border-radius:5px;box-shadow:none!important;padding:7px 20px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button>.Icon,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button>.Icon{margin-right:5px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button.add-items,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button.add-items{border:1px solid rgba(115,110,125,.4);padding:7px 20px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button span,.CollectionDetailPage .dcl.narrow .secondary-actions .button span{color:var(--primary)}.CollectionDetailPage .badge-forum-unread-posts{margin-left:8px;color:var(--text);background-color:var(--primary)}.CollectionDetailPage .unsynced-collection.container{display:flex;padding:24px 30px;margin:24px 0;border-radius:8px;background-color:var(--dark-two);align-items:center;text-align:justify}.CollectionDetailPage .unsynced-collection.message{flex:1}.CollectionDetailPage .unsynced-collection.title{margin:0;font-size:15px;font-weight:600;line-height:24px}.CollectionDetailPage .unsynced-collection.text{font-size:15px;font-weight:400;line-height:24px}.CollectionDetailPage .unsynced-collection.alert-icon{margin-right:30px;height:36px;width:36px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M-1-1h16v16H-1z'/%3e%3cpath%20fill='%23FFF'%20d='M7%2013.667A6.667%206.667%200%201%201%207%20.333a6.667%206.667%200%200%201%200%2013.334zM7%2012.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011zm0-8.833c.368%200%20.667.298.667.666V7a.667.667%200%200%201-1.334%200V4.333c0-.368.299-.666.667-.666zM7%209a.667.667%200%201%201%200%201.333A.667.667%200%200%201%207%209z'/%3e%3c/g%3e%3c/svg%3e") no-repeat;background-size:contain;filter:invert(64%) sepia(34%) saturate(797%) hue-rotate(331deg) brightness(160%) contrast(98%)}.CollectionDetailPage .unsynced-collection.action-button{padding:7px 12px}.CollectionDetailPage .unsynced-collection.action-button .badge-forum-unread-posts{background-color:var(--text-on-primary);color:var(--primary)}.CollectionDetailPage.toast.deleted-item{padding:0;width:480px}.CollectionDetailPage.toast.deleted-item .toast-info{align-items:center;margin:16px}.CollectionDetailPage.toast.deleted-item .title{font-size:17px;font-weight:600;line-height:26px;margin-bottom:0}.CollectionDetailPage.toast.deleted-item .body .description{font-size:15px;font-weight:400;line-height:24px}.CollectionDetailPage.toast.deleted-item .toast-icon .delete-icon{background:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='%23242129'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.5693%2015.0303H17.2345C16.8856%2015.0303%2016.6029%2015.3131%2016.6029%2015.662V17.6462H31.5093V15.6619C31.5093%2015.3131%2031.2265%2015.0303%2030.8777%2015.0303H26.5428V14.2108C26.5428%2014.0944%2026.4485%2014%2026.3321%2014H21.7801C21.6636%2014%2021.5693%2014.0944%2021.5693%2014.2108V15.0303ZM28.7541%2034C29.2936%2034%2029.7372%2033.5746%2029.7598%2033.0355L30.4308%2018.8701H17.6812L18.3522%2033.0355C18.3748%2033.5746%2018.8184%2034%2019.3579%2034H28.7541ZM21.5216%2021.9797C21.7474%2021.9797%2021.9305%2022.1628%2021.9305%2022.3885V30.4815C21.9305%2030.7074%2021.7473%2030.8903%2021.5216%2030.8903H20.8677C20.6419%2030.8903%2020.4589%2030.7073%2020.4589%2030.4815V22.3885C20.4589%2022.1628%2020.6421%2021.9797%2020.8677%2021.9797H21.5216ZM24.3829%2021.9797C24.6087%2021.9797%2024.7917%2022.1628%2024.7917%2022.3885V30.4815C24.7917%2030.7074%2024.6087%2030.8903%2024.3829%2030.8903H23.7291C23.5033%2030.8903%2023.3203%2030.7073%2023.3203%2030.4815V22.3885C23.3203%2022.1628%2023.5034%2021.9797%2023.7291%2021.9797H24.3829ZM27.2443%2021.9797C27.4701%2021.9797%2027.6531%2022.1628%2027.6531%2022.3885V30.4815C27.6531%2030.7074%2027.47%2030.8903%2027.2443%2030.8903H26.5904C26.3646%2030.8903%2026.1816%2030.7073%2026.1816%2030.4815V22.3885C26.1816%2022.1628%2026.3647%2021.9797%2026.5904%2021.9797H27.2443Z'%20fill='white'/%3e%3c/svg%3e") no-repeat;background-size:contain;height:48px;width:48px}.CollectionDetailPage.popup-mint,.CollectionDetailPage.popup-mint:before{background-color:var(--smart-grey)!important}.toast-info .body{max-width:450px;overflow:hidden}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-WRLiGxiK.js";import{a as we,N as ss}from"./Navigation.container-BG_CnMDg.js";import{L as ts}from"./LoggedInDetailPage.container-B5mDhnN7.js";import"./selectors-B3KhVvOK.js";import"./SignInRequired-BMGdaPiz.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",S={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>a(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
1
|
+
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-C-GaOyrZ.js";import{a as we,N as ss}from"./Navigation.container-C4IkoSf-.js";import{L as ts}from"./LoggedInDetailPage.container-DUhCPcHZ.js";import"./selectors-BobHRkyd.js";import"./SignInRequired-DXu9Lnyi.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",S={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>a(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.4-20072676604.commit-b664d05/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{c0 as x,c1 as b,cm as j,hT as ge,gC as w,gO as fe,a4 as me,J as A,hU as K,R as ve,N as o,M as c,S as l,dM as pe,eZ as J,bQ as V,T as re,aM as Ce,eC as Te,a2 as we,eE as xe,ak as _e,eF as O,b6 as be,hV as ye,eH as Ee,eK as De,ej as Oe,bd as Se,hW as Pe,ad as je,bq as $,hX as Me,eM as Ne,gF as Le,eP as Ue,eT as ke,hY as Re,eV as Ye,hZ as Ae}from"./index-WRLiGxiK.js";import{d as Ie,e as We,c as Fe}from"./selectors-B3KhVvOK.js";import{N as Be}from"./NotFound-DAWudS_Z.js";import{L as He}from"./LoggedInDetailPage.container-B5mDhnN7.js";import{N as qe}from"./Navigation.container-BG_CnMDg.js";import{C as $e}from"./CollectionStatus.container-8VY5P-G9.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-CQDK-LFn.js";import{s as I,a as Ve}from"./date-DzUXriDN.js";import{g as X,e as Xe,l as Ke}from"./index-BQ9AG3-q.js";import"./SignInRequired-BMGdaPiz.js";function Je(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Je(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),C=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(C+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(C,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?C+1:p.getTime()>=B.getTime()?C:C-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),C=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,C),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ct=/^'([^]*?)'?$/,Tt=/''/g,wt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,C,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Ke,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=j((C=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&C!==void 0?C:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:R},de=B.match(pt).map(function(T){var y=T[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(T,L.formatLong)}return T}).join("").match(vt).map(function(T){if(T==="''")return"'";var y=T[0];if(y==="'")return _t(T);var Y=ct[y];if(Y)return mt(T)&&te(T,t,String(n)),ft(T)&&te(T,t,String(n)),Y(le,T,L.localize,ce);if(y.match(wt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return T}).join("");return de}function _t(n){var t=n.match(Ct);return t?t[1].replace(Tt,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return w.APPROVED;if(t.status==="rejected")return w.REJECTED}else{if(!t&&fe(n))return w.DISABLED;if(t&&t.status==="rejected")return w.REJECTED}return t&&t.status==="pending"&&t.assignee?w.UNDER_REVIEW:w.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=K.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case w.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case w.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case w.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case w.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case w.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),C=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx($e,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:J(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:J(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(C,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(C,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==w.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,K.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:Ce(n),itemCount:Te(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(we(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...w,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,C=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:C.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:qe.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:$(Me(n),Re),isLoadingCollectionsData:$(Ne(n),Ye)||$(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
|
|
1
|
+
var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{c0 as x,c1 as b,cm as j,hT as ge,gC as w,gO as fe,a4 as me,J as A,hU as K,R as ve,N as o,M as c,S as l,dM as pe,eZ as J,bQ as V,T as re,aM as Ce,eC as Te,a2 as we,eE as xe,ak as _e,eF as O,b6 as be,hV as ye,eH as Ee,eK as De,ej as Oe,bd as Se,hW as Pe,ad as je,bq as $,hX as Me,eM as Ne,gF as Le,eP as Ue,eT as ke,hY as Re,eV as Ye,hZ as Ae}from"./index-C-GaOyrZ.js";import{d as Ie,e as We,c as Fe}from"./selectors-BobHRkyd.js";import{N as Be}from"./NotFound-R4_SVQiM.js";import{L as He}from"./LoggedInDetailPage.container-DUhCPcHZ.js";import{N as qe}from"./Navigation.container-C4IkoSf-.js";import{C as $e}from"./CollectionStatus.container-3ohPocER.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-CPEJ7Im7.js";import{s as I,a as Ve}from"./date-I9Y85L5f.js";import{g as X,e as Xe,l as Ke}from"./index-DkBcVZtV.js";import"./SignInRequired-DXu9Lnyi.js";function Je(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Je(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),C=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(C+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(C,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?C+1:p.getTime()>=B.getTime()?C:C-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),C=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,C),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ct=/^'([^]*?)'?$/,Tt=/''/g,wt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,C,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Ke,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=j((C=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&C!==void 0?C:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:R},de=B.match(pt).map(function(T){var y=T[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(T,L.formatLong)}return T}).join("").match(vt).map(function(T){if(T==="''")return"'";var y=T[0];if(y==="'")return _t(T);var Y=ct[y];if(Y)return mt(T)&&te(T,t,String(n)),ft(T)&&te(T,t,String(n)),Y(le,T,L.localize,ce);if(y.match(wt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return T}).join("");return de}function _t(n){var t=n.match(Ct);return t?t[1].replace(Tt,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return w.APPROVED;if(t.status==="rejected")return w.REJECTED}else{if(!t&&fe(n))return w.DISABLED;if(t&&t.status==="rejected")return w.REJECTED}return t&&t.status==="pending"&&t.assignee?w.UNDER_REVIEW:w.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=K.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case w.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case w.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case w.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case w.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case w.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),C=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx($e,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:J(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:J(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(C,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(C,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==w.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,K.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:Ce(n),itemCount:Te(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(we(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...w,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,C=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:C.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:qe.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:$(Me(n),Re),isLoadingCollectionsData:$(Ne(n),Ye)||$(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./index-
|
|
1
|
+
import{a as g}from"./index-DqtM4iLS.js";import"./index-C-GaOyrZ.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var 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{ak as r,al as d,N as a,am as p,S as h,an as g,ao as l,T as C,aj as m,ad as x,ap 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{ak as r,al as d,N as a,am as p,S as h,an as g,ao as l,T as C,aj as m,ad as x,ap as u}from"./index-C-GaOyrZ.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)}),S=n=>({onConnect:e=>n(u(e))}),T=C(P,S)(j);export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as f,B as a}from"./index-
|
|
1
|
+
import{q as f,B as a}from"./index-C-GaOyrZ.js";var l=function(o,r){if(typeof Blob>"u"||!(o instanceof Blob))throw new Error("first argument must be a Blob");if(typeof r!="function")throw new Error("second argument must be a function");const e=new FileReader;function n(t){e.removeEventListener("loadend",n,!1),t.error?r(t.error):r(null,a.from(e.result))}e.addEventListener("loadend",n,!1),e.readAsArrayBuffer(o)};const u=f(l),s=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}));export{s as i};
|