@streamlayer/react 1.14.0 → 1.14.2
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/lib/cjs/advertisement.js +45 -45
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/index2.js +5 -5
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +13 -13
- package/lib/cjs/useStreamLayerApp2.js +7 -7
- package/lib/classic/cjs/advertisement.js +45 -45
- package/lib/classic/cjs/bet-pack.js +1 -1
- package/lib/classic/cjs/index2.js +5 -5
- package/lib/classic/cjs/masters2.js +3 -3
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +13 -13
- package/lib/classic/cjs/useStreamLayerApp2.js +7 -7
- package/lib/classic/es/advertisement.js +37744 -39730
- package/lib/classic/es/bet-pack.js +1 -1
- package/lib/classic/es/index.js +1 -1
- package/lib/classic/es/index2.js +1023 -1014
- package/lib/classic/es/masters2.js +281 -287
- package/lib/classic/es/notification.js +40 -40
- package/lib/classic/es/points.js +5 -5
- package/lib/classic/es/provider.js +2406 -2387
- package/lib/classic/es/useStreamLayerApp2.js +1579 -1568
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/masters.js +30 -30
- package/lib/dist/es/gamification-feature2.js +1 -1
- package/lib/dist/es/masters.js +5961 -5929
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +37744 -39730
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +1023 -1014
- package/lib/es/masters2.js +281 -287
- package/lib/es/notification.js +40 -40
- package/lib/es/points.js +5 -5
- package/lib/es/provider.js +2404 -2385
- package/lib/es/useStreamLayerApp2.js +1579 -1568
- package/lib/style.css +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("./masters.js"),u=require("react"),S=(t,r,n)=>{const a=r>=e.A$1.lg&&r<e.A$1.xl?75:52;t.current&&window.scrollTo({top:t.current.offsetTop-a,...n})},A=e.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),k=e.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),C=e.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),_=e.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var h=(t=>(t.HOME="home",t.LEADERBOARD="leaderboard",t))(h||{});const y=({title:t,active:r,onClick:n})=>s.jsx(C,{onClick:n,"data-selected":r,children:s.jsx(_,{children:t})}),$=({activePage:t="home",toggleActivePage:r})=>s.jsx(A,{children:s.jsxs(k,{"data-position":t==="home"?"left":"right",children:[s.jsx(y,{title:"Home",active:t==="home",onClick:()=>r("home")}),s.jsx(y,{title:"Friends",active:t==="leaderboard",onClick:()=>r("leaderboard")})]})}),N=e.styled_default("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),w=()=>e.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("./masters.js"),u=require("react"),S=(t,r,n)=>{const a=r>=e.A$1.lg&&r<e.A$1.xl?75:52;t.current&&window.scrollTo({top:t.current.offsetTop-a,...n})},A=e.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),k=e.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),C=e.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),_=e.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var h=(t=>(t.HOME="home",t.LEADERBOARD="leaderboard",t))(h||{});const y=({title:t,active:r,onClick:n})=>s.jsx(C,{onClick:n,"data-selected":r,children:s.jsx(_,{children:t})}),$=({activePage:t="home",toggleActivePage:r})=>s.jsx(A,{children:s.jsxs(k,{"data-position":t==="home"?"left":"right",children:[s.jsx(y,{title:"Home",active:t==="home",onClick:()=>r("home")}),s.jsx(y,{title:"Friends",active:t==="leaderboard",onClick:()=>r("leaderboard")})]})}),N=e.styled_default("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),w=()=>e.k1,M=e.styled_default(w())({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),T=e.styled_default("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),D=e.styled_default("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),E=e.styled_default("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),L=()=>e.k1,P=e.styled_default(L())({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),R=({title:t,description:r,onClick:n,className:a})=>{const[o]=e.f({type:"invitation",action:"sent",payload:{from:e.InvitationFrom.TITLE_CARD}});return s.jsxs(N,{onClick:o(n),className:a,children:[s.jsx(M,{name:"icon-friends"}),s.jsxs(T,{children:[s.jsx(D,{children:t}),s.jsx(E,{children:r})]}),s.jsx(P,{name:"icon-copy"})]})},F=e.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),q=e.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),O=e.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),U=e.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),z=e.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),B=e.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),H=e.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),V=()=>e.k1,Q=e.styled_default(V())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),K=({friendsRank:t,avatar:r,name:n,userId:a,points:o,isCurrentUser:l,style:d})=>s.jsxs(F,{"data-name":a,style:d,children:[s.jsx(q,{children:t||0}),s.jsxs(z,{children:[r?s.jsx(O,{alt:"leaderboard-item-avatar",src:r}):s.jsx(U,{children:e.I(n||"")}),s.jsxs(B,{children:[s.jsx(H,{children:n||""}),l&&s.jsx(Q,{name:"icon-star"})]})]}),s.jsx("div",{children:e.s(o)})]}),W=e.styled_default("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),G=({items:t,currentUserId:r,openItemDetail:n,fetchMore:a,scrollNode:o,hasMore:l})=>{const d=u.useCallback(i=>{const c=i.target.getAttribute("data-name");c&&n(c)},[n]);return s.jsx(e.InfiniteScroll,{loadMore:a,initialLoad:!1,hasMore:l,useWindow:!1,getScrollParent:()=>o.current,children:s.jsx(W,{onClick:d,children:t.map(i=>s.jsx(K,{...i,isCurrentUser:!!r&&r===i.userId},i.userId))})})},J=e.styled_default("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),X=({deepLink:t})=>s.jsx(J,{children:s.jsx(e.M,{inviteLink:t,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),Y=e.styled_default("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),Z=({gamification:t,scrollNode:r,scrollStore:n})=>{const a=u.useRef(null),{data:o,hasMore:l,loading:d,key:i}=e.useStore(t.leaderboardList.$store),{data:c}=e.useStore(t.deepLink.$store),[p,f]=e.T(a);return!o.length&&!d?s.jsx(X,{deepLink:c}):s.jsxs(s.Fragment,{children:[s.jsx(G,{items:o,scrollNode:r,scrollStore:n,fetchMore:t.leaderboardList.fetchMore,hasMore:l,openItemDetail:t.openUser,currentUserId:t.currentUserId.get()},i),c&&s.jsx(Y,{ref:a,children:s.jsx(R,{onClick:()=>p(c),title:"Invite Friends",description:"Challenge them now!"})}),f]})},ee=({store:t,openQuestion:r})=>{const{sdk:n}=e.p(),a=e.useStore(t);return s.jsx(e.k,{openQuestion:r,questions:a.data,controlVideo:n==null?void 0:n.controlVideoPlayer})},se=({userSummary:t})=>{var r;const[n,a]=u.useState(void 0);return u.useEffect(()=>{const o=t.$store.subscribe(l=>{l&&a(l)});return()=>{o()}},[t]),s.jsx(e.z,{loading:!(n!=null&&n.summary),...n==null?void 0:n.summary,successRate:(r=n==null?void 0:n.percentage)==null?void 0:r.correct})},te=({gamification:t,className:r,scrollStore:n,scrollNode:a,appNode:o,style:l,responsiveStore:d})=>{const{tabsShown:i}=e.useStore(n,{keys:["tabsShown"]}),c=e.useStore(t.friendsTabEnabled),[p,f]=u.useState(h.HOME),[,I]=e.useTransition(),{sdkInDesktopView:v,screen:g}=e.useStore(d,{keys:["sdkInDesktopView"]}),b=m=>{I(()=>{var j;f(m),v===!1&&(((j=o.current)==null?void 0:j.getBoundingClientRect().y)||0)<0&&S(o,g.size,{behavior:"instant"})})};u.useEffect(()=>n.subscribe(m=>{if(m.scrollPosition===0){n.setKey("tabsShown",!0);return}d.get().sdkInDesktopView?n.setKey("tabsShown",m.scrollDirection==="backward"):n.setKey("tabsShown",m.scrollDirection==="forward")}),[n,d]),u.useEffect(()=>{c||f(h.HOME)},[c]);let x="0px";return v?x=i?"0px":"calc(0px - var(--header-height))":x=i?"var(--header-height)":"0px",s.jsxs(e.l,{className:e.cx_default(r,"SL-Tabs"),style:l,children:[c&&s.jsx(e.S,{style:{top:x},children:s.jsx($,{activePage:p,toggleActivePage:b})}),p===h.HOME&&s.jsxs(s.Fragment,{children:[s.jsx(e.m,{children:s.jsx(e.d,{children:s.jsx(se,{userSummary:t.userSummary})})}),s.jsx(e.n,{style:{flex:1},children:s.jsx(ee,{openQuestion:t.openQuestion,store:t.feedList.getStore()})})]}),p===h.LEADERBOARD&&s.jsx(e.C,{children:s.jsx(Z,{scrollStore:n,scrollNode:a,gamification:t})})]})},ne=({gamification:t,scrollStore:r,className:n,appNode:a,scrollNode:o,responsiveStore:l})=>s.jsx(te,{appNode:a,scrollStore:r,scrollNode:o,className:n,gamification:t,responsiveStore:l});exports.default=ne;
|