@streamlayer/react-ui 1.23.4 → 1.24.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.
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
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
|
|
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
|
|
11
|
-
const
|
|
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
|
-
}),
|
|
15
|
+
}), x = ({
|
|
16
16
|
openedQuestion: t
|
|
17
17
|
}) => {
|
|
18
18
|
var s, o;
|
|
19
19
|
const {
|
|
20
|
-
sdk:
|
|
20
|
+
sdk: r
|
|
21
21
|
} = a();
|
|
22
|
-
return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */
|
|
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:
|
|
25
|
-
}) : ((o = t == null ? void 0 : t.attributes) == null ? void 0 : o.attributes.case) === "tweet" ? /* @__PURE__ */
|
|
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:
|
|
27
|
+
controlVideo: r == null ? void 0 : r.controlVideoPlayer
|
|
28
28
|
}) : null;
|
|
29
|
-
},
|
|
29
|
+
}, d = ({
|
|
30
30
|
extendedQuestion: t,
|
|
31
|
-
vote:
|
|
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
|
|
39
|
-
vote:
|
|
38
|
+
return i ? /* @__PURE__ */ e(f, {
|
|
39
|
+
vote: r,
|
|
40
40
|
close: s,
|
|
41
41
|
openedQuestion: i,
|
|
42
42
|
isLoading: !!o
|
|
43
|
-
}) : /* @__PURE__ */
|
|
44
|
-
},
|
|
43
|
+
}) : /* @__PURE__ */ e(b, {});
|
|
44
|
+
}, H = ({
|
|
45
45
|
gamification: t
|
|
46
46
|
}) => {
|
|
47
47
|
var i;
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
48
|
+
const r = n(t.openedQuestion.$store), s = n(t.openedQuestion.$extendedStore);
|
|
49
|
+
if (!r)
|
|
50
50
|
return null;
|
|
51
|
-
const o =
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
children: [/* @__PURE__ */
|
|
51
|
+
const o = r.type;
|
|
52
|
+
return /* @__PURE__ */ u(h, {
|
|
53
|
+
children: [/* @__PURE__ */ e(c, {
|
|
54
54
|
close: t.closeQuestion,
|
|
55
|
-
type: ((i =
|
|
56
|
-
}), o === "question" && /* @__PURE__ */
|
|
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__ */
|
|
61
|
-
openedQuestion:
|
|
62
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
68
|
+
H as Question
|
|
69
69
|
};
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
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
|
-
},
|
|
13
|
+
}, g = () => {
|
|
13
14
|
console.log("video player handled cb");
|
|
14
|
-
},
|
|
15
|
-
const r =
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
22
|
-
videoPlayerController:
|
|
24
|
+
onDeepLinkHandled: S,
|
|
25
|
+
videoPlayerController: g,
|
|
23
26
|
event: r.event,
|
|
24
27
|
children: [
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
38
|
+
H as MastersStory
|
|
40
39
|
};
|