@streamlayer/react-ui 1.23.4 → 1.23.5

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,69 +1,69 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { styled as u } from "@linaria/react";
1
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
+ import { styled as l } from "@linaria/react";
3
3
  import { useMastersContext as a } from "../../useMastersContext.js";
4
- import { useStore as l } from "@streamlayer/react-polyfills";
4
+ import { useStore as n } from "@streamlayer/react-polyfills";
5
5
  import { QuestionType as m } from "@streamlayer/sdk-web-types";
6
6
  import { VoteHeader as c } from "../../../../ui/gamification/detail/header/index.js";
7
7
  import { Sponsor as p } from "../../../../ui/gamification/detail/sponsor/index.js";
8
8
  import { Vote as f, VoteSkeleton as b } from "../../../../ui/gamification/vote/index.js";
9
9
  import { InsightDetails as y } from "../../../../ui/gamification/vote/insight-details/index.js";
10
- import { TwitterDetails as S } from "../../../../ui/gamification/vote/twitter-details/index.js";
11
- const V = /* @__PURE__ */ u("div")({
10
+ import { TwitterDetails as V } from "../../../../ui/gamification/vote/twitter-details/index.js";
11
+ const h = /* @__PURE__ */ l("div")({
12
12
  name: "QuestionContainer",
13
13
  class: "qwgkhsv",
14
14
  propsAsIs: !1
15
- }), g = ({
15
+ }), x = ({
16
16
  openedQuestion: t
17
17
  }) => {
18
18
  var s, o;
19
19
  const {
20
- sdk: e
20
+ sdk: r
21
21
  } = a();
22
- return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ r(y, {
22
+ return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ e(y, {
23
23
  ...t.attributes.attributes.value,
24
- controlVideo: e == null ? void 0 : e.controlVideoPlayer
25
- }) : ((o = t == null ? void 0 : t.attributes) == null ? void 0 : o.attributes.case) === "tweet" ? /* @__PURE__ */ r(S, {
24
+ controlVideo: r == null ? void 0 : r.controlVideoPlayer
25
+ }) : ((o = t == null ? void 0 : t.attributes) == null ? void 0 : o.attributes.case) === "tweet" ? /* @__PURE__ */ e(V, {
26
26
  ...t.attributes.attributes.value,
27
- controlVideo: e == null ? void 0 : e.controlVideoPlayer
27
+ controlVideo: r == null ? void 0 : r.controlVideoPlayer
28
28
  }) : null;
29
- }, h = ({
29
+ }, d = ({
30
30
  extendedQuestion: t,
31
- vote: e,
31
+ vote: r,
32
32
  close: s
33
33
  }) => {
34
34
  const {
35
35
  loading: o,
36
36
  data: i
37
37
  } = t;
38
- return localStorage.getItem("SL_DEBUG") && console.log("QuestionDetail", t), i ? /* @__PURE__ */ r(f, {
39
- vote: e,
38
+ return i ? /* @__PURE__ */ e(f, {
39
+ vote: r,
40
40
  close: s,
41
41
  openedQuestion: i,
42
42
  isLoading: !!o
43
- }) : /* @__PURE__ */ r(b, {});
44
- }, L = ({
43
+ }) : /* @__PURE__ */ e(b, {});
44
+ }, H = ({
45
45
  gamification: t
46
46
  }) => {
47
47
  var i;
48
- const e = l(t.openedQuestion.$store), s = l(t.openedQuestion.$extendedStore);
49
- if (!e)
48
+ const r = n(t.openedQuestion.$store), s = n(t.openedQuestion.$extendedStore);
49
+ if (!r)
50
50
  return null;
51
- const o = e.type;
52
- return /* @__PURE__ */ n(V, {
53
- children: [/* @__PURE__ */ r(c, {
51
+ const o = r.type;
52
+ return /* @__PURE__ */ u(h, {
53
+ children: [/* @__PURE__ */ e(c, {
54
54
  close: t.closeQuestion,
55
- type: ((i = e.attributes) == null ? void 0 : i.type) || m.UNSET
56
- }), o === "question" && /* @__PURE__ */ r(h, {
55
+ type: ((i = r.attributes) == null ? void 0 : i.type) || m.UNSET
56
+ }), o === "question" && /* @__PURE__ */ e(d, {
57
57
  vote: t.submitAnswer,
58
58
  close: t.closeQuestion,
59
59
  extendedQuestion: s
60
- }), o !== "question" && /* @__PURE__ */ r(g, {
61
- openedQuestion: e
62
- }), /* @__PURE__ */ r(p, {
60
+ }), o !== "question" && /* @__PURE__ */ e(x, {
61
+ openedQuestion: r
62
+ }), /* @__PURE__ */ e(p, {
63
63
  mastersApp: !0
64
64
  })]
65
65
  });
66
66
  };
67
67
  export {
68
- L as Question
68
+ H as Question
69
69
  };
@@ -1,40 +1,39 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { MastersStreamLayerProvider as d, useStreamLayer as i } from "@streamlayer/react/masters";
3
- import { MastersApp as l } from "../masters.js";
4
- import { StreamLayerMastersThemeProvider as a } from "../../../ui/theme/masters.js";
5
- import { useStreamLayerDebug as c } from "../../../utils/debug/index.js";
6
- import { MobileHeader as s, HostAppContent as t, Body as p, Video as h, Container as m, AppContainer as u, BackToTop as y, BackToTopLink as k } from "./components.js";
7
- const T = ({ betPack: o }) => {
8
- const r = i();
9
- return r ? /* @__PURE__ */ e(a, { style: { height: "100%" }, children: /* @__PURE__ */ e(l, { sdk: r, betPack: o, useContainer: !0 }) }) : null;
10
- }, v = () => {
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { useState as l, Fragment as c } from "react";
3
+ import { MastersStreamLayerProvider as s, useStreamLayer as a } from "@streamlayer/react/masters";
4
+ import { MastersApp as p } from "../masters.js";
5
+ import { StreamLayerMastersThemeProvider as m } from "../../../ui/theme/masters.js";
6
+ import { useStreamLayerDebug as h } from "../../../utils/debug/index.js";
7
+ import { MobileHeader as u, Body as y, Container as k, AppContainer as T, HostAppContent as f, BackToTop as v, BackToTopLink as C } from "./components.js";
8
+ const L = ({ betPack: o }) => {
9
+ const r = a();
10
+ return r ? /* @__PURE__ */ e(m, { style: { height: "100%" }, children: /* @__PURE__ */ e(p, { sdk: r, betPack: o, useContainer: !0 }) }) : null;
11
+ }, S = () => {
11
12
  console.log("deep link handled cb");
12
- }, f = () => {
13
+ }, g = () => {
13
14
  console.log("video player handled cb");
14
- }, M = ({ betPack: o }) => {
15
- const r = c();
16
- return /* @__PURE__ */ n(
17
- d,
15
+ }, H = ({ betPack: o }) => {
16
+ const r = h(), [n, t] = l(0), i = () => {
17
+ t(n + 1);
18
+ };
19
+ return /* @__PURE__ */ e(c, { children: /* @__PURE__ */ d(
20
+ s,
18
21
  {
19
22
  sdkKey: r.sdkKey,
20
23
  production: r.env === "production",
21
- onDeepLinkHandled: v,
22
- videoPlayerController: f,
24
+ onDeepLinkHandled: S,
25
+ videoPlayerController: g,
23
26
  event: r.event,
24
27
  children: [
25
- /* @__PURE__ */ e(s, { children: "header" }),
26
- /* @__PURE__ */ e(t, { children: "...host app content..." }),
27
- /* @__PURE__ */ n(p, { children: [
28
- /* @__PURE__ */ e(h, {}),
29
- /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(u, { className: "StreamLayerSDK", children: /* @__PURE__ */ e(T, { betPack: o }) }) }) })
30
- ] }),
31
- /* @__PURE__ */ e(t, { style: { height: 3e3 }, children: "...host app content..." }),
32
- /* @__PURE__ */ e(y, { onClick: () => document.documentElement.scrollTop = 0, children: "BackToTop" }),
33
- /* @__PURE__ */ e(k, { href: "#", children: "BackToTop Link" })
28
+ /* @__PURE__ */ e(u, { onClick: () => i(), children: "header" }),
29
+ /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(T, { className: "StreamLayerSDK", children: /* @__PURE__ */ e(L, { betPack: o }) }) }) }) }),
30
+ /* @__PURE__ */ e(f, { style: { height: 3e3 }, children: "...host app content..." }),
31
+ /* @__PURE__ */ e(v, { onClick: () => document.documentElement.scrollTop = 0, children: "BackToTop" }),
32
+ /* @__PURE__ */ e(C, { href: "#", children: "BackToTop Link" })
34
33
  ]
35
34
  }
36
- );
35
+ ) }, n);
37
36
  };
38
37
  export {
39
- M as MastersStory
38
+ H as MastersStory
40
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.23.4",
3
+ "version": "1.23.5",
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.13",
73
- "@streamlayer/react-polyfills": "^0.1.20",
74
- "@streamlayer/sdk-web": "^1.10.13",
75
- "@streamlayer/sdk-web-analytics": "^1.7.13",
76
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.39",
77
- "@streamlayer/sdk-web-api": "^1.8.13",
78
- "@streamlayer/sdk-web-core": "^1.11.15",
79
- "@streamlayer/sdk-web-features": "^1.0.60",
80
- "@streamlayer/sdk-web-interfaces": "^1.5.4",
81
- "@streamlayer/sdk-web-logger": "^1.0.60",
82
- "@streamlayer/sdk-web-notifications": "^1.3.22",
83
- "@streamlayer/sdk-web-storage": "^1.0.60",
84
- "@streamlayer/sdk-web-types": "^1.10.17"
72
+ "@streamlayer/feature-gamification": "^1.16.14",
73
+ "@streamlayer/react-polyfills": "^0.1.21",
74
+ "@streamlayer/sdk-web": "^1.10.14",
75
+ "@streamlayer/sdk-web-anonymous-auth": "^1.1.40",
76
+ "@streamlayer/sdk-web-analytics": "^1.7.14",
77
+ "@streamlayer/sdk-web-api": "^1.8.14",
78
+ "@streamlayer/sdk-web-core": "^1.11.16",
79
+ "@streamlayer/sdk-web-features": "^1.0.61",
80
+ "@streamlayer/sdk-web-interfaces": "^1.5.5",
81
+ "@streamlayer/sdk-web-logger": "^1.0.61",
82
+ "@streamlayer/sdk-web-notifications": "^1.3.23",
83
+ "@streamlayer/sdk-web-storage": "^1.0.61",
84
+ "@streamlayer/sdk-web-types": "^1.10.18"
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.4"
124
+ "@streamlayer/react": "^1.15.5"
125
125
  },
126
126
  "dependencies": {
127
127
  "@dailymotion/vast-client": "^6.2.0",