@streamlayer/react 0.41.10 → 1.1.0
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/app/advertisement.d.ts +1 -0
- package/lib/app/app.d.ts +5 -3
- package/lib/app/auth.d.ts +0 -1
- package/lib/app/masters.d.ts +2 -1
- package/lib/app/provider.d.ts +5 -4
- package/lib/app/useStreamLayerApp.d.ts +8 -7
- package/lib/cjs/app.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +182 -14
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +9 -164
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +17 -0
- package/lib/dist/cjs/gamification-feature2.js +1 -0
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +92 -80
- package/lib/dist/es/gamification-feature2.js +115 -0
- package/lib/dist/es/index.js +7 -5
- package/lib/dist/es/masters.js +31532 -34905
- package/lib/dist/index.d.ts +234 -145
- package/lib/dist/style.css +1 -1
- package/lib/es/app.js +940 -11
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/gamification-feature2.js +4 -0
- package/lib/es/index.js +6 -14
- package/lib/es/index2.js +23159 -112
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +679 -23045
- package/lib/es/points.js +30 -33
- package/lib/es/useStreamLayerApp.js +3 -36
- package/lib/es/useStreamLayerApp2.js +17388 -0
- package/lib/index.d.ts +1 -1
- package/lib/masters.d.ts +2 -1
- package/lib/style.css +1 -1
- package/package.json +45 -40
- package/lib/cjs/index3.js +0 -1
- package/lib/es/index3.js +0 -246
package/lib/cjs/points.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),t=require("./index2.js"),o=require("./app.js"),d=require("./useStreamLayerApp2.js"),p=t.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),m=t.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),y=()=>t.c1,S=t.styled_default(y())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),f=t.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),j=t.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),x=t.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),v=({points:e,onClick:r})=>s.jsxs(p,{className:t.p,onClick:r,children:[s.jsx(m,{children:s.jsx(S,{name:"icon-trophy"})}),s.jsxs(f,{children:[s.jsx(j,{children:"Total points"}),s.jsx(x,{children:s.jsx(t.d,{value:e})})]})]}),h=({gamification:e})=>{const r=e.userSummary.$store,[l,u]=i.useState(0);return i.useEffect(()=>{const c=r.subscribe(n=>{var a;(a=n==null?void 0:n.summary)!=null&&a.points&&u(n.summary.points)});return()=>{c()}},[r]),s.jsx(v,{points:l,onClick:()=>{e.status.get()===t.FeatureStatus.Suspended&&e.openFeature()}})},g=({sdk:e})=>{if(!t.useStore(e.featuresList.getStore()))return null;const r=e.getFeature(d.SdkOverlayType.GAMES);return r?s.jsx(h,{gamification:r}):null},P=()=>{const e=o.useStreamLayer();return e?s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(o.i,{children:s.jsx(g,{sdk:e})})}):null};exports.StreamLayerSDKPoints=P;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useStreamLayerApp2.js");require("react");exports.useStreamLayerApp=e.useStreamLayerApp;
|