@streamlayer/react 0.41.2 → 0.41.3
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/gamification-feature.js +1 -1
- package/lib/cjs/index2.js +10 -9
- package/lib/cjs/masters2.js +35 -37
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/index.js +71 -72
- package/lib/dist/es/index.js +13710 -13613
- package/lib/dist/index.d.ts +28 -10
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +2 -2
- package/lib/es/index2.js +40 -39
- package/lib/es/masters2.js +7619 -7585
- package/lib/es/points.js +5 -5
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +9 -9
package/lib/cjs/points.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./index2.js"),d=require("@nanostores/react"),a=require("react"),p=require("@streamlayer/sdk-web-interfaces"),m=require("@streamlayer/sdk-web-types"),t=require("./index3.js");require("react-countup");const y=require("./app.js");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const S=t.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),f=t.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),x=()=>t.r1,j=t.styled_default(x())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),q=t.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),v=t.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),g=t.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),h=({points:s,onClick:r})=>e.jsxs(S,{className:o.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./index2.js"),d=require("@nanostores/react"),a=require("react"),p=require("@streamlayer/sdk-web-interfaces"),m=require("@streamlayer/sdk-web-types"),t=require("./index3.js");require("react-countup");const y=require("./app.js");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const S=t.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),f=t.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),x=()=>t.r1,j=t.styled_default(x())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),q=t.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),v=t.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),g=t.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),h=({points:s,onClick:r})=>e.jsxs(S,{className:o.p$1,onClick:r,children:[e.jsx(f,{children:e.jsx(j,{name:"icon-trophy"})}),e.jsxs(q,{children:[e.jsx(v,{children:"Total points"}),e.jsx(g,{children:e.jsx(t.d,{value:s})})]})]}),P=({gamification:s})=>{const r=s.userSummary.$store,[u,l]=a.useState(0);return a.useEffect(()=>{const c=r.subscribe(n=>{var i;(i=n==null?void 0:n.summary)!=null&&i.points&&l(n.summary.points)});return()=>{c()}},[r]),e.jsx(h,{points:u,onClick:()=>{s.status.get()===p.FeatureStatus.Suspended&&s.openFeature()}})},b=({sdk:s})=>{if(!d.useStore(s.featuresList.getStore()))return null;const r=s.getFeature(m.FeatureType.GAMES);return r?e.jsx(P,{gamification:r}):null},A=()=>{const s=y.useStreamLayer();return s?e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(o.p,{children:e.jsx(b,{sdk:s})})}):null};exports.StreamLayerSDKPoints=A;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@streamlayer/sdk-web"),l=require("react"),p=({sdkKey:t,plugins:o,production:s,autoEnable:a,onDeepLinkHandled:i,videoPlayerController:c})=>{const[f,u]=l.useState(null);return l.useEffect(()=>{let r=!1;if(!t)return console.error("streamlayer sdk key should be provided"),u(e=>(e!==null&&typeof e.disableApp=="function"&&e.disableApp(),null)),()=>{r=!0};const n=d.StreamLayer(t,s,a,{version:"0.41.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@streamlayer/sdk-web"),l=require("react"),p=({sdkKey:t,plugins:o,production:s,autoEnable:a,onDeepLinkHandled:i,videoPlayerController:c})=>{const[f,u]=l.useState(null);return l.useEffect(()=>{let r=!1;if(!t)return console.error("streamlayer sdk key should be provided"),u(e=>(e!==null&&typeof e.disableApp=="function"&&e.disableApp(),null)),()=>{r=!0};const n=d.StreamLayer(t,s,a,{version:"0.41.3",onDeepLinkHandled:i,videoPlayerController:c});if(o)for(const e of o)n.use(e);return n.ready().then(e=>{r||u(e.sdk)}).catch(e=>console.log(e)),()=>{r=!0,n.close(function(e){if(e)throw e})}},[t,s]),f};exports.useStreamLayerApp=p;
|