@streamlayer/react-ui 1.9.0 → 1.11.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/app/Advertisement/index.d.ts +1 -0
- package/lib/app/app/Advertisement/index.js +78 -67
- package/lib/app/app/Features/Gamification/Question.d.ts +1 -0
- package/lib/app/app/Features/Gamification/Question.js +43 -41
- package/lib/app/app/Features/Gamification/Tabs.js +22 -21
- package/lib/app/app/Features/Gamification/index.js +66 -62
- package/lib/app/app/Insight/index.d.ts +2 -0
- package/lib/app/app/Insight/index.js +28 -24
- package/lib/app/app/Navigation/index.d.ts +4 -0
- package/lib/app/app/Navigation/index.js +88 -48
- package/lib/app/app/Notifications/index.js +125 -113
- package/lib/app/app/Points/index.js +16 -16
- package/lib/app/app/index.d.ts +1 -0
- package/lib/app/app/index.js +84 -83
- package/lib/app/app/story/index.js +27 -24
- package/lib/app/app/story/insight/index.d.ts +1 -0
- package/lib/app/app/story/insight/index.js +29 -26
- package/lib/app/app/story/insight/video.d.ts +1 -0
- package/lib/app/app/story/insight/video.js +13 -13
- package/lib/app/app/story/promotion/content.d.ts +3 -1
- package/lib/app/app/story/promotion/content.js +13 -10
- package/lib/app/app/story/promotion/index.d.ts +1 -0
- package/lib/app/app/story/promotion/index.js +34 -30
- package/lib/app/app/story/promotion/video.d.ts +1 -0
- package/lib/app/app/story/promotion/video.js +34 -31
- package/lib/app/app/styles.js +44 -0
- package/lib/app/app/useApp.d.ts +2 -14
- package/lib/app/app/useApp.js +14 -43
- package/lib/app/app/useAppContext.d.ts +2 -0
- package/lib/app/app/useAppContext.js +6 -5
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +2 -2
- package/lib/app/masters/Features/Gamification/Tabs.js +2 -2
- package/lib/app/masters/Features/Gamification/index.d.ts +2 -2
- package/lib/app/masters/Features/Gamification/index.js +1 -1
- package/lib/app/masters/Features/index.d.ts +2 -2
- package/lib/app/masters/Navigation/MastersNavigation/index.d.ts +1 -1
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +1 -1
- package/lib/app/masters/Notifications/Onboarding/index.js +4 -4
- package/lib/app/masters/Notifications/index.d.ts +2 -2
- package/lib/app/masters/Notifications/index.js +1 -1
- package/lib/app/masters/masters.js +23 -23
- package/lib/app/masters/styles.d.ts +20 -0
- package/lib/app/{styles.js → masters/styles.js} +15 -15
- package/lib/app/masters/useSdkResponsive.d.ts +15 -0
- package/lib/app/masters/useSdkResponsive.js +45 -0
- package/lib/app/masters/useSdkScroll.d.ts +12 -0
- package/lib/app/masters/useSdkScroll.js +50 -0
- package/lib/app/useSdkResponsive.d.ts +1 -0
- package/lib/app/useSdkResponsive.js +27 -29
- package/lib/app/useSdkScroll.js +25 -24
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/banner/index.js +14 -11
- package/lib/ui/advertisement/index.d.ts +3 -0
- package/lib/ui/advertisement/index.js +31 -10
- package/lib/ui/advertisement/notification/index.d.ts +1 -0
- package/lib/ui/advertisement/notification/index.js +30 -27
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +9 -0
- package/lib/ui/advertisement/notification/lower-third/index.js +37 -0
- package/lib/ui/advertisement/notification/lower-third/styles.d.ts +16 -0
- package/lib/ui/advertisement/notification/lower-third/styles.js +64 -0
- package/lib/ui/advertisement/overlay/index.d.ts +2 -0
- package/lib/ui/advertisement/overlay/index.js +58 -43
- package/lib/ui/advertisement/overlay/styles.d.ts +0 -2
- package/lib/ui/advertisement/overlay/styles.js +41 -52
- package/lib/ui/close-btn/index.d.ts +7 -0
- package/lib/ui/close-btn/index.js +47 -0
- package/lib/ui/gamification/detail/header/index.d.ts +2 -1
- package/lib/ui/gamification/detail/header/index.js +16 -15
- package/lib/ui/gamification/vote/styles.js +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/index.d.ts +5 -3
- package/lib/ui/navigation/index.js +11 -12
- package/lib/ui/navigation/masters.js +1 -1
- package/lib/ui/navigation/styles.d.ts +5 -0
- package/lib/ui/navigation/styles.js +16 -0
- package/lib/ui/questions/insight/index.js +21 -20
- package/lib/ui/theme/masters-theme.js +36 -13
- package/lib/ui/theme/theme.js +25 -26
- package/lib/ui/timer/index.d.ts +3 -1
- package/lib/ui/timer/index.js +54 -32
- package/lib/ui/video-player/index.d.ts +2 -0
- package/lib/ui/video-player/index.js +62 -51
- package/lib/ui/video-player/styles.d.ts +1 -0
- package/lib/ui/video-player/styles.js +7 -6
- package/package.json +15 -15
- /package/lib/app/{styles.d.ts → app/styles.d.ts} +0 -0
package/lib/app/app/index.js
CHANGED
|
@@ -1,120 +1,121 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as l, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { cx as v } from "@linaria/core";
|
|
3
|
+
import { useStore as N } from "@nanostores/react";
|
|
4
|
+
import { SDKContainer as g, SDKScrollContainer as F } from "./styles.js";
|
|
4
5
|
import { useSdkFeature as x } from "../useSdkFeature.js";
|
|
5
|
-
import { useSdkResponsive as
|
|
6
|
-
import { useSdkScroll as
|
|
7
|
-
import { useAnalyticsListener as m, newTabLinkListener as
|
|
8
|
-
import { useRef as
|
|
9
|
-
import { resetCss as
|
|
10
|
-
import { ActiveFeature as j, StandaloneFeature as
|
|
11
|
-
import { SDKNavigation as
|
|
12
|
-
import { SDKNotifications as
|
|
13
|
-
import { useAppApp as
|
|
14
|
-
import { AppContext as
|
|
15
|
-
const
|
|
6
|
+
import { useSdkResponsive as A } from "../useSdkResponsive.js";
|
|
7
|
+
import { useSdkScroll as D } from "../useSdkScroll.js";
|
|
8
|
+
import { useAnalyticsListener as m, newTabLinkListener as L, appScrollListener as b, appClickListener as C } from "../../hooks/analytics.js";
|
|
9
|
+
import { useRef as d, useMemo as y, useEffect as K } from "react";
|
|
10
|
+
import { resetCss as c } from "../../ui/theme/theme.js";
|
|
11
|
+
import { ActiveFeature as j, StandaloneFeature as E } from "./Features/index.js";
|
|
12
|
+
import { SDKNavigation as R, SDKHeader as k } from "./Navigation/index.js";
|
|
13
|
+
import { SDKNotifications as w } from "./Notifications/index.js";
|
|
14
|
+
import { useAppApp as H } from "./useApp.js";
|
|
15
|
+
import { AppContext as I } from "./useAppContext.js";
|
|
16
|
+
const M = ({
|
|
16
17
|
sdk: e,
|
|
17
18
|
className: n,
|
|
18
|
-
scrollStore:
|
|
19
|
-
appNode:
|
|
20
|
-
scrollNode:
|
|
19
|
+
scrollStore: r,
|
|
20
|
+
appNode: a,
|
|
21
|
+
scrollNode: s,
|
|
21
22
|
responsiveStore: o
|
|
22
23
|
}) => {
|
|
23
|
-
const [,
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
const [, i] = x(e);
|
|
25
|
+
return /* @__PURE__ */ l(j, {
|
|
25
26
|
className: n,
|
|
26
|
-
scrollNode:
|
|
27
|
-
appNode:
|
|
28
|
-
scrollStore:
|
|
29
|
-
feature:
|
|
27
|
+
scrollNode: s,
|
|
28
|
+
appNode: a,
|
|
29
|
+
scrollStore: r,
|
|
30
|
+
feature: i,
|
|
30
31
|
responsiveStore: o,
|
|
31
32
|
sdk: e
|
|
32
33
|
});
|
|
33
|
-
},
|
|
34
|
+
}, P = ({
|
|
34
35
|
sdk: e,
|
|
35
36
|
className: n,
|
|
36
|
-
appNode:
|
|
37
|
-
responsiveStore:
|
|
37
|
+
appNode: r,
|
|
38
|
+
responsiveStore: a
|
|
38
39
|
}) => {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
const
|
|
42
|
-
return
|
|
40
|
+
const s = N(e.featuresList.getStore());
|
|
41
|
+
return s ? Array.from(s, (o) => {
|
|
42
|
+
const i = e.getFeature(o);
|
|
43
|
+
return i ? /* @__PURE__ */ l(E, {
|
|
43
44
|
className: n,
|
|
44
|
-
appNode:
|
|
45
|
-
feature:
|
|
46
|
-
responsiveStore:
|
|
45
|
+
appNode: r,
|
|
46
|
+
feature: i,
|
|
47
|
+
responsiveStore: a,
|
|
47
48
|
sdk: e
|
|
48
49
|
}, o) : null;
|
|
49
50
|
}) : null;
|
|
50
|
-
},
|
|
51
|
+
}, $ = ({
|
|
51
52
|
sdk: e,
|
|
52
|
-
|
|
53
|
-
topNavigation: i
|
|
53
|
+
topNavigation: n
|
|
54
54
|
}) => {
|
|
55
|
-
const r =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
v(() => {
|
|
63
|
-
n ? (e.createEventSession(n), p(n)) : d();
|
|
64
|
-
}, [n, p, d, e]), m(r, {
|
|
65
|
-
enabled: a,
|
|
55
|
+
const r = d(null), a = d(null), [s] = A(r), [o, i] = D(r, s), {
|
|
56
|
+
sdkReady: p,
|
|
57
|
+
activeFeature: u,
|
|
58
|
+
isLogged: S
|
|
59
|
+
} = H(e), t = !!p;
|
|
60
|
+
m(r, {
|
|
61
|
+
enabled: t,
|
|
66
62
|
event: "click",
|
|
67
|
-
listener:
|
|
68
|
-
}), m(
|
|
69
|
-
enabled:
|
|
63
|
+
listener: L
|
|
64
|
+
}), m(o, {
|
|
65
|
+
enabled: t,
|
|
70
66
|
event: "scrollend",
|
|
71
|
-
listener:
|
|
67
|
+
listener: b,
|
|
72
68
|
useDomNode: !0
|
|
73
|
-
}), m(
|
|
74
|
-
enabled:
|
|
69
|
+
}), m(o, {
|
|
70
|
+
enabled: t,
|
|
75
71
|
event: "click",
|
|
76
|
-
listener:
|
|
72
|
+
listener: C,
|
|
77
73
|
useDomNode: !0
|
|
78
74
|
});
|
|
79
|
-
const
|
|
80
|
-
sdk: e
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
const h = y(() => ({
|
|
76
|
+
sdk: e,
|
|
77
|
+
topNavigation: n
|
|
78
|
+
}), [e, n]);
|
|
79
|
+
return K(() => {
|
|
83
80
|
import("./Features/Gamification/gamification-feature.js");
|
|
84
|
-
}, []), /* @__PURE__ */
|
|
85
|
-
value:
|
|
86
|
-
children: /* @__PURE__ */
|
|
81
|
+
}, []), console.log("sdkEnabled", t), console.log("activeFeature", u), /* @__PURE__ */ l(I.Provider, {
|
|
82
|
+
value: h,
|
|
83
|
+
children: /* @__PURE__ */ f(g, {
|
|
87
84
|
ref: r,
|
|
88
|
-
className:
|
|
89
|
-
children: [
|
|
90
|
-
className:
|
|
85
|
+
className: n ? "" : "c10llmat",
|
|
86
|
+
children: [t && n && /* @__PURE__ */ l(R, {
|
|
87
|
+
className: c,
|
|
88
|
+
sdk: e,
|
|
89
|
+
ref: a
|
|
90
|
+
}), t && !n && !!u && /* @__PURE__ */ l(k, {
|
|
91
|
+
className: v(c, "sl-hide-on-modal"),
|
|
91
92
|
sdk: e,
|
|
92
|
-
ref:
|
|
93
|
-
}), /* @__PURE__ */
|
|
93
|
+
ref: a
|
|
94
|
+
}), /* @__PURE__ */ f(F, {
|
|
94
95
|
className: "sl-hide-on-modal",
|
|
95
|
-
ref:
|
|
96
|
-
"data-nav":
|
|
97
|
-
children: [
|
|
96
|
+
ref: o,
|
|
97
|
+
"data-nav": t.toString(),
|
|
98
|
+
children: [t && /* @__PURE__ */ l(w, {
|
|
98
99
|
sdk: e,
|
|
99
|
-
scrollNode:
|
|
100
|
-
headerNode:
|
|
100
|
+
scrollNode: o,
|
|
101
|
+
headerNode: a,
|
|
101
102
|
appNode: r,
|
|
102
|
-
scrollStore:
|
|
103
|
-
responsiveStore:
|
|
104
|
-
}),
|
|
105
|
-
scrollStore:
|
|
106
|
-
responsiveStore:
|
|
107
|
-
scrollNode:
|
|
103
|
+
scrollStore: i,
|
|
104
|
+
responsiveStore: s
|
|
105
|
+
}), t && /* @__PURE__ */ l(M, {
|
|
106
|
+
scrollStore: i,
|
|
107
|
+
responsiveStore: s,
|
|
108
|
+
scrollNode: o,
|
|
108
109
|
appNode: r,
|
|
109
|
-
className:
|
|
110
|
+
className: c,
|
|
110
111
|
sdk: e
|
|
111
|
-
}),
|
|
112
|
-
responsiveStore:
|
|
112
|
+
}), t && /* @__PURE__ */ l(P, {
|
|
113
|
+
responsiveStore: s,
|
|
113
114
|
appNode: r,
|
|
114
|
-
className:
|
|
115
|
+
className: c,
|
|
115
116
|
sdk: e
|
|
116
117
|
})]
|
|
117
|
-
}),
|
|
118
|
+
}), t && !S && /* @__PURE__ */ l("div", {
|
|
118
119
|
style: {
|
|
119
120
|
display: "flex",
|
|
120
121
|
alignItems: "center",
|
|
@@ -128,5 +129,5 @@ const V = ({
|
|
|
128
129
|
});
|
|
129
130
|
};
|
|
130
131
|
export {
|
|
131
|
-
|
|
132
|
+
$ as App
|
|
132
133
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { styled as t } from "@linaria/react";
|
|
3
3
|
import { useEffect as i } from "react";
|
|
4
|
-
import { StreamLayerProvider as l, useStreamLayer as p } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerProvider as l, useStreamLayer as p, StreamLayerSDKEvent as m } from "@streamlayer/react";
|
|
5
5
|
import { App as c } from "../index.js";
|
|
6
|
-
import { StreamLayerThemeProvider as
|
|
7
|
-
import { useStreamLayerDebug as
|
|
8
|
-
import { Video as
|
|
9
|
-
const
|
|
6
|
+
import { StreamLayerThemeProvider as f } from "../../../ui/theme/index.js";
|
|
7
|
+
import { useStreamLayerDebug as u } from "../../../utils/debug/index.js";
|
|
8
|
+
import { Video as y } from "./video.js";
|
|
9
|
+
const a = () => {
|
|
10
10
|
console.log("deep link handled cb");
|
|
11
|
-
},
|
|
11
|
+
}, h = () => {
|
|
12
12
|
console.log("video player handled cb");
|
|
13
13
|
}, v = ({
|
|
14
14
|
event: o
|
|
@@ -16,44 +16,47 @@ const s = () => {
|
|
|
16
16
|
const e = p();
|
|
17
17
|
return i(() => {
|
|
18
18
|
e && e.openFeature(12);
|
|
19
|
-
}, [e]), e ? /* @__PURE__ */
|
|
20
|
-
children: /* @__PURE__ */ r(
|
|
19
|
+
}, [e, o]), e ? /* @__PURE__ */ s(f, {
|
|
20
|
+
children: [/* @__PURE__ */ r(m, {
|
|
21
|
+
event: o
|
|
22
|
+
}), /* @__PURE__ */ r(c, {
|
|
21
23
|
sdk: e,
|
|
22
24
|
event: o,
|
|
23
|
-
onDeepLinkHandled:
|
|
24
|
-
})
|
|
25
|
+
onDeepLinkHandled: a
|
|
26
|
+
})]
|
|
25
27
|
}) : null;
|
|
26
|
-
},
|
|
28
|
+
}, A = /* @__PURE__ */ t("div")({
|
|
27
29
|
name: "Container",
|
|
28
30
|
class: "c1a4qh28",
|
|
29
31
|
propsAsIs: !1
|
|
30
|
-
}),
|
|
32
|
+
}), S = /* @__PURE__ */ t("div")({
|
|
31
33
|
name: "Body",
|
|
32
34
|
class: "b9h8kuk",
|
|
33
35
|
propsAsIs: !1
|
|
34
|
-
}),
|
|
36
|
+
}), k = /* @__PURE__ */ t("div")({
|
|
35
37
|
name: "AppContainer",
|
|
36
38
|
class: "a1wkro2j",
|
|
37
39
|
propsAsIs: !1
|
|
38
|
-
}),
|
|
40
|
+
}), j = ({
|
|
39
41
|
sdkKey: o,
|
|
40
42
|
eventId: e,
|
|
41
|
-
production:
|
|
43
|
+
production: d
|
|
42
44
|
}) => {
|
|
43
|
-
const n =
|
|
45
|
+
const n = u({
|
|
44
46
|
sdkKey: o,
|
|
45
47
|
eventId: e,
|
|
46
|
-
production:
|
|
48
|
+
production: d
|
|
47
49
|
});
|
|
48
50
|
return /* @__PURE__ */ r(l, {
|
|
49
51
|
sdkKey: n.sdkKey,
|
|
50
52
|
production: n.env === "production",
|
|
51
53
|
autoEnable: !0,
|
|
52
|
-
onDeepLinkHandled:
|
|
53
|
-
videoPlayerController:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
onDeepLinkHandled: a,
|
|
55
|
+
videoPlayerController: h,
|
|
56
|
+
withAd: !1,
|
|
57
|
+
children: /* @__PURE__ */ s(S, {
|
|
58
|
+
children: [/* @__PURE__ */ r(y, {}), /* @__PURE__ */ r(A, {
|
|
59
|
+
children: /* @__PURE__ */ r(k, {
|
|
57
60
|
className: "StreamLayerSDK",
|
|
58
61
|
children: /* @__PURE__ */ r(v, {
|
|
59
62
|
event: n.event
|
|
@@ -64,5 +67,5 @@ const s = () => {
|
|
|
64
67
|
});
|
|
65
68
|
};
|
|
66
69
|
export {
|
|
67
|
-
|
|
70
|
+
j as AppStory
|
|
68
71
|
};
|
|
@@ -1,59 +1,62 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import { StreamLayerProvider as
|
|
4
|
-
import { StreamLayerSDKInsight as
|
|
5
|
-
import { StreamLayerThemeProvider as
|
|
6
|
-
import { useStreamLayerDebug as
|
|
2
|
+
import { styled as u } from "@linaria/react";
|
|
3
|
+
import { StreamLayerProvider as p, useStreamLayer as c } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerSDKInsight as y } from "../../Insight/index.js";
|
|
5
|
+
import { StreamLayerThemeProvider as f } from "../../../../ui/theme/index.js";
|
|
6
|
+
import { useStreamLayerDebug as h } from "../../../../utils/debug/index.js";
|
|
7
7
|
import { customTheme as l } from "./styles.js";
|
|
8
|
-
import { Video as
|
|
9
|
-
const
|
|
8
|
+
import { Video as v } from "./video.js";
|
|
9
|
+
const S = /* @__PURE__ */ u("div")({
|
|
10
10
|
name: "Body",
|
|
11
11
|
class: "buit6hv",
|
|
12
12
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
13
|
+
}), L = ({
|
|
14
14
|
hideHeader: t,
|
|
15
15
|
insightId: o
|
|
16
16
|
}) => {
|
|
17
|
-
const e =
|
|
18
|
-
return e ? /* @__PURE__ */ r(
|
|
17
|
+
const e = c();
|
|
18
|
+
return e ? /* @__PURE__ */ r(f, {
|
|
19
19
|
customTheme: l,
|
|
20
|
-
children: /* @__PURE__ */ r(
|
|
20
|
+
children: /* @__PURE__ */ r(y, {
|
|
21
21
|
hideHeader: t,
|
|
22
22
|
sdk: e,
|
|
23
23
|
insightId: o,
|
|
24
24
|
persistent: !0
|
|
25
25
|
})
|
|
26
26
|
}) : null;
|
|
27
|
-
},
|
|
27
|
+
}, P = ({
|
|
28
28
|
sdkKey: t,
|
|
29
29
|
eventId: o,
|
|
30
30
|
layoutMode: e,
|
|
31
|
-
insightId:
|
|
32
|
-
production:
|
|
33
|
-
onlyInsight:
|
|
34
|
-
|
|
31
|
+
insightId: n,
|
|
32
|
+
production: i,
|
|
33
|
+
onlyInsight: a,
|
|
34
|
+
skipAutoClose: s,
|
|
35
|
+
hideHeader: d
|
|
35
36
|
}) => {
|
|
36
|
-
const m =
|
|
37
|
+
const m = h({
|
|
37
38
|
sdkKey: t,
|
|
38
39
|
eventId: o,
|
|
39
|
-
production:
|
|
40
|
+
production: i
|
|
40
41
|
});
|
|
41
|
-
return /* @__PURE__ */ r(
|
|
42
|
+
return /* @__PURE__ */ r(p, {
|
|
42
43
|
sdkKey: m.sdkKey,
|
|
43
44
|
event: m.event,
|
|
44
45
|
production: m.env === "production",
|
|
45
46
|
autoEnable: !0,
|
|
46
|
-
children:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
children: a ? /* @__PURE__ */ r(L, {
|
|
48
|
+
skipAutoClose: s,
|
|
49
|
+
insightId: n,
|
|
50
|
+
hideHeader: d
|
|
51
|
+
}) : /* @__PURE__ */ r(S, {
|
|
52
|
+
children: /* @__PURE__ */ r(v, {
|
|
53
|
+
skipAutoClose: s,
|
|
54
|
+
insightId: n,
|
|
52
55
|
layoutMode: e
|
|
53
56
|
})
|
|
54
57
|
})
|
|
55
58
|
});
|
|
56
59
|
};
|
|
57
60
|
export {
|
|
58
|
-
|
|
61
|
+
P as InsightStory
|
|
59
62
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as i, Fragment as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c } from "react";
|
|
3
3
|
import { useStreamLayer as l } from "@streamlayer/react";
|
|
4
|
-
import { StreamLayerSDKInsight as
|
|
5
|
-
import { StreamLayerThemeProvider as
|
|
6
|
-
import { VideoFrame as
|
|
7
|
-
const
|
|
8
|
-
const r = l(),
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ e(
|
|
12
|
-
/* @__PURE__ */ e(
|
|
4
|
+
import { StreamLayerSDKInsight as n } from "../../Insight/index.js";
|
|
5
|
+
import { StreamLayerThemeProvider as s } from "../../../../ui/theme/index.js";
|
|
6
|
+
import { VideoFrame as p, customTheme as a, VideoPlayerWrap as u, InsightContainerMobile as f, InsightContainerOverlay as g, InsightContainerLBar as v } from "./styles.js";
|
|
7
|
+
const F = ({ insightId: t, layoutMode: m, skipAutoClose: o }) => {
|
|
8
|
+
const r = l(), d = c(null);
|
|
9
|
+
return /* @__PURE__ */ i(h, { children: [
|
|
10
|
+
/* @__PURE__ */ i(p, { ref: d, "data-testid": "video-frame", children: [
|
|
11
|
+
/* @__PURE__ */ e(m === "cover" ? g : v, { children: r && /* @__PURE__ */ e(s, { customTheme: a, children: /* @__PURE__ */ e(n, { skipAutoClose: o, sdk: r, insightId: t, persistent: !0 }) }) }),
|
|
12
|
+
/* @__PURE__ */ e(u, { children: /* @__PURE__ */ e("div", { className: "divAnchor", children: /* @__PURE__ */ e(
|
|
13
13
|
"video",
|
|
14
14
|
{
|
|
15
15
|
src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
|
|
@@ -22,9 +22,9 @@ const x = ({ insightId: t, layoutMode: a }) => {
|
|
|
22
22
|
}
|
|
23
23
|
) }) })
|
|
24
24
|
] }),
|
|
25
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ e(f, { children: r && /* @__PURE__ */ e(s, { customTheme: a, children: /* @__PURE__ */ e(n, { skipAutoClose: o, sdk: r, insightId: t, persistent: !0 }) }) })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
F as Video
|
|
30
30
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { styled as r } from "@linaria/react";
|
|
3
|
-
import { useStreamLayer as
|
|
4
|
-
import { StreamLayerSDKAdvertisement as
|
|
5
|
-
import { theme as
|
|
6
|
-
const
|
|
3
|
+
import { useStreamLayer as o } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerSDKAdvertisement as i } from "../../Advertisement/index.js";
|
|
5
|
+
import { theme as a } from "../../../../ui/theme/theme.js";
|
|
6
|
+
const d = /* @__PURE__ */ r("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c1g3vhjc",
|
|
9
9
|
propsAsIs: !1
|
|
@@ -11,14 +11,17 @@ const a = /* @__PURE__ */ r("div")({
|
|
|
11
11
|
name: "Div",
|
|
12
12
|
class: "d1626h38",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
}), h = ({
|
|
15
|
+
skipAutoClose: m
|
|
16
|
+
}) => {
|
|
17
|
+
const s = o();
|
|
18
|
+
return s ? /* @__PURE__ */ e(d, {
|
|
19
|
+
className: a,
|
|
18
20
|
"data-testid": "overlay",
|
|
19
21
|
children: [/* @__PURE__ */ e(n, {
|
|
20
22
|
children: ["Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. ", /* @__PURE__ */ t("br", {}), "-------------"]
|
|
21
|
-
}), /* @__PURE__ */ t(
|
|
23
|
+
}), /* @__PURE__ */ t(i, {
|
|
24
|
+
skipAutoClose: m,
|
|
22
25
|
sdk: s,
|
|
23
26
|
persistent: !0
|
|
24
27
|
}), /* @__PURE__ */ e(n, {
|
|
@@ -27,5 +30,5 @@ const a = /* @__PURE__ */ r("div")({
|
|
|
27
30
|
}) : null;
|
|
28
31
|
};
|
|
29
32
|
export {
|
|
30
|
-
|
|
33
|
+
h as Content
|
|
31
34
|
};
|
|
@@ -1,53 +1,57 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { StreamLayerProvider as
|
|
4
|
-
import { useStreamLayerDebug as
|
|
5
|
-
import { Content as
|
|
6
|
-
import { Video as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { styled as t } from "@linaria/react";
|
|
3
|
+
import { StreamLayerProvider as y } from "@streamlayer/react";
|
|
4
|
+
import { useStreamLayerDebug as v } from "../../../../utils/debug/index.js";
|
|
5
|
+
import { Content as b } from "./content.js";
|
|
6
|
+
import { Video as f } from "./video.js";
|
|
7
|
+
const u = /* @__PURE__ */ t("div")({
|
|
8
8
|
name: "Body",
|
|
9
9
|
class: "bqh4lcc",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), h = /* @__PURE__ */ t("div")({
|
|
12
12
|
name: "Main",
|
|
13
13
|
class: "mgga81b",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
16
|
-
isMobileScreen:
|
|
15
|
+
}), B = ({
|
|
16
|
+
isMobileScreen: n,
|
|
17
17
|
promotionId: s,
|
|
18
|
-
sdkKey:
|
|
19
|
-
eventId:
|
|
20
|
-
sidebar:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
sdkKey: i,
|
|
19
|
+
eventId: d,
|
|
20
|
+
sidebar: a,
|
|
21
|
+
skipAutoClose: r,
|
|
22
|
+
production: m,
|
|
23
|
+
banner: c,
|
|
24
|
+
layoutMode: p = "side-by-side"
|
|
24
25
|
}) => {
|
|
25
|
-
const o =
|
|
26
|
-
sdkKey:
|
|
27
|
-
eventId:
|
|
28
|
-
production:
|
|
26
|
+
const o = v({
|
|
27
|
+
sdkKey: i,
|
|
28
|
+
eventId: d,
|
|
29
|
+
production: m
|
|
29
30
|
});
|
|
30
|
-
return /* @__PURE__ */ e(
|
|
31
|
-
children: /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ e(h, {
|
|
32
|
+
children: /* @__PURE__ */ l(y, {
|
|
32
33
|
sdkKey: o.sdkKey,
|
|
33
34
|
event: o.event,
|
|
34
35
|
production: o.env === "production",
|
|
35
36
|
autoEnable: !0,
|
|
36
|
-
children: [/* @__PURE__ */ e(
|
|
37
|
-
children: /* @__PURE__ */ e(
|
|
37
|
+
children: [/* @__PURE__ */ e(u, {
|
|
38
|
+
children: /* @__PURE__ */ e(f, {
|
|
38
39
|
event: o.event,
|
|
39
|
-
banner:
|
|
40
|
-
sidebar:
|
|
41
|
-
layoutMode:
|
|
40
|
+
banner: c,
|
|
41
|
+
sidebar: a,
|
|
42
|
+
layoutMode: p,
|
|
42
43
|
promotionId: s,
|
|
43
|
-
|
|
44
|
+
skipAutoClose: r,
|
|
45
|
+
isMobileScreen: n
|
|
44
46
|
})
|
|
45
47
|
}), /* @__PURE__ */ e("h3", {
|
|
46
48
|
children: "Overlay View (should appear between two text blocks)"
|
|
47
|
-
}), /* @__PURE__ */ e(
|
|
49
|
+
}), /* @__PURE__ */ e(b, {
|
|
50
|
+
skipAutoClose: r
|
|
51
|
+
})]
|
|
48
52
|
})
|
|
49
53
|
});
|
|
50
54
|
};
|
|
51
55
|
export {
|
|
52
|
-
|
|
56
|
+
B as PromotionStory
|
|
53
57
|
};
|