@streamlayer/react 0.27.2 → 0.28.1

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.
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-6ab0a925.cjs"),i=require("@nanostores/react"),p=require("react"),x=require("@streamlayer/sdk-web-types");require("react-countdown-circle-timer");require("./cjs/useStreamLayerApp.js");require("@streamlayer/sdk-web");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-storage");require("@streamlayer/sdk-web-notifications");require("@streamlayer/sl-eslib/interactive/interactive.common_pb");require("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb");require("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb");require("@streamlayer/sl-eslib/sports/events/events_connect");require("@streamlayer/sl-eslib/sdkSettings/client/client_connect");require("@streamlayer/sl-eslib/users/users_connect");require("react-auth-code-input");require("react-phone-number-input");require("@connectrpc/connect");require("@connectrpc/connect-web");const m=()=>t.q,f=()=>t.q,j=t.styled_default("div")({name:"a",class:"acysrl1",propsAsIs:!1}),h=t.styled_default("div")({name:"l",class:"lo57cjm",propsAsIs:!1}),y=t.styled_default(m())({name:"p",class:"p14kwh4y",propsAsIs:!0}),v=t.styled_default("span")({name:"s",class:"sxun7sq",propsAsIs:!1}),q=t.styled_default("button")({name:"c",class:"c1i8ida8",propsAsIs:!1}),g=t.styled_default(f())({name:"g",class:"g1m0xfmw",propsAsIs:!0}),d=({type:s,close:r,label:n})=>{const l=s?t.o[s]:{label:n,iconName:void 0};return e.jsxs(j,{children:[e.jsxs(h,{children:[(l==null?void 0:l.iconName)&&e.jsx(y,{name:l.iconName}),(l==null?void 0:l.label)&&e.jsx(v,{children:l.label})]}),e.jsx(q,{onClick:r,children:e.jsx(g,{name:"icon-cross"})})]})};const b=t.styled_default("div")({name:"n",class:"n1aopxp8",propsAsIs:!1}),_=({children:s,style:r,className:n})=>e.jsx(b,{style:r,className:n,children:s});const S=t.styled_default("div")({name:"e",class:"e18unvw4",propsAsIs:!1}),A=t.styled_default("div")({name:"r",class:"rs0uvk8",propsAsIs:!1}),I=t.styled_default("h3")({name:"n",class:"n1hem4g7",propsAsIs:!1}),$=t.styled_default("div")({name:"i",class:"i193lbwv",propsAsIs:!1}),Q=t.styled_default("a")({name:"a",class:"a1dka9qs",propsAsIs:!1}),k=t.styled_default("div")({name:"l",class:"l1un98tk",propsAsIs:!1}),w=({created:s,title:r,instantView:n})=>{const l=new Date(s),a=l.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}),c=l.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return e.jsxs(S,{children:[e.jsxs(k,{children:[a,"・",c]}),(n==null?void 0:n.video)&&e.jsx(t.w,{source:n.video.url,poster:n.video.thumbnailUrl}),e.jsxs(A,{children:[e.jsx(I,{children:(n==null?void 0:n.heading)||r}),e.jsx($,{children:n==null?void 0:n.body}),(n==null?void 0:n.webLink)&&e.jsxs(Q,{href:n==null?void 0:n.webLink.url,target:"_blank",children:["Explore more of the Masters History",e.jsx(t.q,{name:"icon-external-link"})]})]})]})};const N=t.styled_default("div")({name:"d",class:"dk8r1eq",propsAsIs:!1}),L=({openedQuestion:s})=>{var r;return((r=s==null?void 0:s.attributes)==null?void 0:r.attributes.case)==="insight"?e.jsx(w,{created:s.attributes.created,...s.attributes.attributes.value}):null},U=({extendedQuestion:s,vote:r})=>{const{loading:n,data:l}=s;return!n&&l?e.jsx(t.Y,{vote:r,openedQuestion:l}):null},E=({gamification:s})=>{var r;const n=i.useStore(s.openedQuestion.$store),l=i.useStore(s.openedQuestion.$extendedStore);if(!n)return null;const a=n.type;return e.jsxs(N,{children:[e.jsx(d,{close:s.closeQuestion,type:((r=n.attributes)==null?void 0:r.type)||x.QuestionType.UNSET}),a==="question"&&e.jsx(U,{vote:s.submitAnswer,extendedQuestion:l}),a!=="question"&&e.jsx(L,{openedQuestion:n})]})},M=({leaderboardList:s,openUser:r})=>{const{data:n}=i.useStore(s.$store);return e.jsx(t.j,{fetchMore:s.fetchMore,items:n,openItemDetail:r})},D=({store:s,openQuestion:r})=>{const n=i.useStore(s);return n!=null&&n.data?e.jsx(t.C,{openQuestion:r,questions:n.data}):e.jsx("div",{children:"wait questions..."})},O=({store:s})=>{const{data:r}=i.useStore(s);return r!=null&&r.summary?e.jsx(t.v,{...r.summary,...r.percentage}):e.jsx("div",{children:"wait user..."})},T=({gamification:s})=>{const[r,n]=p.useState(t.h.HOME);return e.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs(t.e,{children:[e.jsx(t.p$1,{activePage:r,toggleActivePage:n}),r===t.h.HOME&&e.jsx(O,{store:s.userSummary.getStore()})]}),r===t.h.HOME&&e.jsx(t.a$1,{children:e.jsx(D,{openQuestion:s.openQuestion,store:s.feedList.getStore()})}),r===t.h.LEADERBOARD&&e.jsx(t.a$1,{style:{flex:"1 1 auto",paddingTop:0,paddingBottom:0},children:e.jsx(M,{openUser:s.openUser,leaderboardList:s.leaderboardList})})]})};const H=()=>_,o=t.styled_default(H())({name:"m",class:"m1ph66cs",propsAsIs:!0}),R=t.styled_default("div")({name:"x",class:"xorme7i",propsAsIs:!1}),u=({gamification:s,className:r})=>{const n=i.useStore(s.openedQuestion.$store),l=i.useStore(s.openedUser);return e.jsxs(e.Fragment,{children:[n&&e.jsx(o,{className:r,children:e.jsx(E,{gamification:s})}),l&&e.jsx(o,{className:r,children:e.jsxs(R,{children:[e.jsx(d,{label:"Friend's Rank",close:s.closeUser}),e.jsx(t.e,{children:e.jsx(t.v,{...l})})]})}),e.jsx(t.r,{className:r,"data-nav":"true",children:e.jsx(T,{gamification:s})})]})};exports.GamificationOverlay=u;exports.default=u;