@streamlayer/react-ui 1.23.0 → 1.23.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,25 +1,33 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { useState as m, useEffect as f } from "react";
3
- import { useStore as c } from "@streamlayer/react-polyfills";
4
- import { FeatureType as p } from "@streamlayer/sdk-web-types";
5
- import { Points as S } from "../../../ui/gamification/points/index.js";
6
- const a = ({ gamification: r }) => {
7
- const o = r.userSummary.$store, [t, u] = m(0);
8
- return f(() => {
9
- const i = o.subscribe((e) => {
2
+ import { useState as c, useEffect as a, useCallback as f } from "react";
3
+ import { useStore as p } from "@streamlayer/react-polyfills";
4
+ import { eventBus as l } from "@streamlayer/sdk-web-interfaces";
5
+ import { FeatureType as S } from "@streamlayer/sdk-web-types";
6
+ import { Points as y } from "../../../ui/gamification/points/index.js";
7
+ const P = ({ gamification: t }) => {
8
+ const o = t.userSummary.$store, [r, i] = c(0);
9
+ a(() => {
10
+ const u = o.subscribe((e) => {
10
11
  var s;
11
- (s = e == null ? void 0 : e.summary) != null && s.points && u(e.summary.points);
12
+ (s = e == null ? void 0 : e.summary) != null && s.points && i(e.summary.points);
12
13
  });
13
14
  return () => {
14
- i();
15
+ u();
15
16
  };
16
- }, [o]), /* @__PURE__ */ n(S, { points: t });
17
- }, b = ({ sdk: r }) => {
18
- if (!c(r.featuresList.getStore()))
17
+ }, [o]);
18
+ const m = f(() => {
19
+ l.emit("interactions", {
20
+ action: "tap",
21
+ payload: {}
22
+ });
23
+ }, []);
24
+ return /* @__PURE__ */ n(y, { onClick: m, points: r });
25
+ }, x = ({ sdk: t }) => {
26
+ if (!p(t.featuresList.getStore()))
19
27
  return null;
20
- const t = r.getFeature(p.GAMES);
21
- return t ? /* @__PURE__ */ n(a, { gamification: t }) : null;
28
+ const r = t.getFeature(S.GAMES);
29
+ return r ? /* @__PURE__ */ n(P, { gamification: r }) : null;
22
30
  };
23
31
  export {
24
- b as StreamLayerSDKPoints
32
+ x as StreamLayerSDKPoints
25
33
  };
@@ -1,14 +1,14 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { QuestionImages as e } from "@streamlayer/sdk-web-types";
3
- import { VideoPlayer as h } from "../../../../video-player/index.js";
4
- import { InsightContainer as o, ImageContainer as u, Image as p, InsightContent as I, Title as g, Description as f, ActionBtn as C } from "./styles.js";
5
- const V = ({ video: r, image: n, imageMode: c, heading: l, body: m, action: s, controlVideo: a }) => /* @__PURE__ */ i(o, { children: [
6
- (r == null ? void 0 : r.url) && /* @__PURE__ */ t(h, { source: r.url, poster: r.thumbnailUrl, controlVideo: a }),
7
- n && !(r != null && r.url) && /* @__PURE__ */ t(u, { "data-rounded": c === e.ROUNDED, children: /* @__PURE__ */ t(p, { src: n, alt: l }) }),
8
- /* @__PURE__ */ i(I, { children: [
9
- /* @__PURE__ */ t(g, { children: l }),
10
- /* @__PURE__ */ t(f, { children: m }),
11
- s && /* @__PURE__ */ t(C, { "data-a": "intr", onClick: s, children: "View Insight" })
1
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
+ import { QuestionImages as h } from "@streamlayer/sdk-web-types";
3
+ import { VideoPlayer as o } from "../../../../video-player/index.js";
4
+ import { InsightContainer as u, ImageContainer as a, Image as p, InsightContent as I, Title as g, Description as f, ActionBtn as C } from "./styles.js";
5
+ const V = ({ video: r, image: t, imageMode: i, heading: l, body: m, action: s, controlVideo: e }) => /* @__PURE__ */ c(u, { children: [
6
+ (r == null ? void 0 : r.url) && /* @__PURE__ */ n(o, { source: r.url, poster: r.thumbnailUrl, controlVideo: e }),
7
+ t && !(r != null && r.url) && /* @__PURE__ */ n(a, { "data-rounded": i === h.ROUNDED, children: /* @__PURE__ */ n(p, { src: t, alt: l }) }),
8
+ /* @__PURE__ */ c(I, { children: [
9
+ /* @__PURE__ */ n(g, { children: l }),
10
+ /* @__PURE__ */ n(f, { children: m }),
11
+ s && /* @__PURE__ */ n(C, { onClick: s, children: "View Insight" })
12
12
  ] })
13
13
  ] });
14
14
  export {
@@ -1,9 +1,9 @@
1
- import { jsx as r, jsxs as e } from "react/jsx-runtime";
2
- import { SvgIcon as m } from "../../../../icons/index.js";
3
- import { Container as c, Content as a, Title as l } from "./styles.js";
4
- const f = ({ title: n, onClick: o, className: i, style: t }) => /* @__PURE__ */ r(c, { "data-a": "intr", onClick: o, className: i, style: t, children: /* @__PURE__ */ e(a, { children: [
5
- /* @__PURE__ */ r(m, { name: "iconUp" }),
6
- n && /* @__PURE__ */ r(l, { children: n })
1
+ import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
+ import { SvgIcon as e } from "../../../../icons/index.js";
3
+ import { Container as d, Content as m, Title as c } from "./styles.js";
4
+ const f = ({ title: n, onClick: t, className: a, style: i }) => /* @__PURE__ */ r(d, { "data-a": "intr", onClick: t, className: a, style: i, children: /* @__PURE__ */ o(m, { "data-a": "intr", children: [
5
+ /* @__PURE__ */ r(e, { "data-a": "intr", name: "iconUp" }),
6
+ n && /* @__PURE__ */ r(c, { "data-a": "intr", children: n })
7
7
  ] }) });
8
8
  export {
9
9
  f as Pill
@@ -1,11 +1,11 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { TwitterContent as n } from "../../../../questions/twitter/index.js";
3
3
  import { Container as o, QuoteWrap as l, Quote as c, ActionBtn as m } from "./styles.js";
4
- const f = ({ action: i, ...e }) => /* @__PURE__ */ r(o, { children: [
4
+ const s = ({ action: i, ...e }) => /* @__PURE__ */ r(o, { children: [
5
5
  e.title && /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(c, { children: e.title }) }),
6
6
  /* @__PURE__ */ t(n, { ...e }),
7
- i && /* @__PURE__ */ t(m, { "data-a": "intr", onClick: i, children: "View Insight" })
7
+ i && /* @__PURE__ */ t(m, { onClick: i, children: "View Insight" })
8
8
  ] });
9
9
  export {
10
- f as Tweet
10
+ s as Tweet
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -69,19 +69,19 @@
69
69
  "react-window": "^1.8.10",
70
70
  "react-window-infinite-loader": "^1.0.9",
71
71
  "uuid": "^11.1.0",
72
- "@streamlayer/feature-gamification": "^1.16.9",
73
- "@streamlayer/react-polyfills": "^0.1.16",
74
- "@streamlayer/sdk-web": "^1.10.9",
75
- "@streamlayer/sdk-web-analytics": "^1.7.9",
76
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.35",
77
- "@streamlayer/sdk-web-api": "^1.8.9",
78
- "@streamlayer/sdk-web-core": "^1.11.11",
79
- "@streamlayer/sdk-web-features": "^1.0.56",
80
- "@streamlayer/sdk-web-interfaces": "^1.5.0",
81
- "@streamlayer/sdk-web-logger": "^1.0.56",
82
- "@streamlayer/sdk-web-notifications": "^1.3.18",
83
- "@streamlayer/sdk-web-storage": "^1.0.56",
84
- "@streamlayer/sdk-web-types": "^1.10.13"
72
+ "@streamlayer/feature-gamification": "^1.16.10",
73
+ "@streamlayer/sdk-web": "^1.10.10",
74
+ "@streamlayer/react-polyfills": "^0.1.17",
75
+ "@streamlayer/sdk-web-analytics": "^1.7.10",
76
+ "@streamlayer/sdk-web-anonymous-auth": "^1.1.36",
77
+ "@streamlayer/sdk-web-api": "^1.8.10",
78
+ "@streamlayer/sdk-web-core": "^1.11.12",
79
+ "@streamlayer/sdk-web-features": "^1.0.57",
80
+ "@streamlayer/sdk-web-interfaces": "^1.5.1",
81
+ "@streamlayer/sdk-web-logger": "^1.0.57",
82
+ "@streamlayer/sdk-web-notifications": "^1.3.19",
83
+ "@streamlayer/sdk-web-storage": "^1.0.57",
84
+ "@streamlayer/sdk-web-types": "^1.10.14"
85
85
  },
86
86
  "nx": {
87
87
  "implicitDependencies": [
@@ -121,7 +121,7 @@
121
121
  "vite-plugin-svgr": "^4.2.0",
122
122
  "vite-svg-loader": "^5.1.0",
123
123
  "vite-tsconfig-paths": "^5.0.1",
124
- "@streamlayer/react": "^1.15.0"
124
+ "@streamlayer/react": "^1.15.1"
125
125
  },
126
126
  "dependencies": {
127
127
  "@dailymotion/vast-client": "^6.2.0",