@streamlayer/react-ui 1.7.1 → 1.8.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 +0 -1
- package/lib/app/app/Advertisement/index.js +59 -71
- package/lib/app/app/Insight/index.d.ts +0 -1
- package/lib/app/app/Insight/index.js +36 -47
- package/lib/app/app/story/insight/index.js +31 -34
- package/lib/app/app/story/insight/video.d.ts +0 -1
- package/lib/app/app/story/insight/video.js +14 -14
- package/lib/app/app/story/promotion/content.d.ts +1 -3
- package/lib/app/app/story/promotion/content.js +10 -13
- package/lib/app/app/story/promotion/index.js +2 -3
- package/lib/ui/advertisement/index.d.ts +2 -3
- package/lib/ui/advertisement/index.js +25 -27
- package/package.json +15 -15
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
2
|
export declare const AdvertisementUIWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export type StreamLayerSDKAdvertisementProps = {
|
|
4
|
-
event?: string;
|
|
5
4
|
isMobileScreen?: boolean;
|
|
6
5
|
persistent?: boolean;
|
|
7
6
|
skipTypeCheck?: boolean;
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { useAnalyticsListener as
|
|
5
|
-
import {
|
|
6
|
-
import { eventBus as
|
|
7
|
-
import { FeatureType as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const I = /* @__PURE__ */ v("div")({
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { styled as p } from "@linaria/react";
|
|
3
|
+
import { useStore as f } from "@nanostores/react";
|
|
4
|
+
import { useAnalyticsListener as v } from "../../../hooks/analytics.js";
|
|
5
|
+
import { useRef as y } from "react";
|
|
6
|
+
import { eventBus as c } from "@streamlayer/sdk-web-interfaces";
|
|
7
|
+
import { FeatureType as A, PromotionType as g } from "@streamlayer/sdk-web-types";
|
|
8
|
+
import { AdvertisementUI as b } from "../../../ui/advertisement/index.js";
|
|
9
|
+
const S = /* @__PURE__ */ p("div")({
|
|
11
10
|
name: "AdvertisementUIWrap",
|
|
12
11
|
class: "aa6pjif",
|
|
13
12
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const r =
|
|
18
|
-
|
|
13
|
+
}), h = (n) => {
|
|
14
|
+
const t = n.target;
|
|
15
|
+
if (t instanceof HTMLAnchorElement && t.target === "_blank") {
|
|
16
|
+
const r = t.getAttribute("data-promo-id") || "", i = t.getAttribute("data-promo-type") || g.UNSET;
|
|
17
|
+
t.getAttribute("data-analytics") === "button" && c.emit("advertisement", {
|
|
19
18
|
action: "buttonSelect",
|
|
20
19
|
payload: {
|
|
21
20
|
advertisementId: r,
|
|
22
21
|
advertisementType: i
|
|
23
22
|
}
|
|
24
|
-
}),
|
|
23
|
+
}), t.getAttribute("data-analytics") === "banner" && c.emit("advertisement", {
|
|
25
24
|
action: "bannerSelect",
|
|
26
25
|
payload: {
|
|
27
26
|
advertisementId: r,
|
|
@@ -29,83 +28,72 @@ const I = /* @__PURE__ */ v("div")({
|
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
|
-
},
|
|
33
|
-
gamification:
|
|
34
|
-
layoutMode:
|
|
31
|
+
}, I = ({
|
|
32
|
+
gamification: n,
|
|
33
|
+
layoutMode: t,
|
|
35
34
|
skipTypeCheck: r,
|
|
36
35
|
sidebar: i,
|
|
37
|
-
banner:
|
|
38
|
-
notification:
|
|
39
|
-
isMobileScreen:
|
|
40
|
-
persistent:
|
|
36
|
+
banner: o,
|
|
37
|
+
notification: m,
|
|
38
|
+
isMobileScreen: l,
|
|
39
|
+
persistent: d
|
|
41
40
|
}) => {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
|
-
[m, a]
|
|
47
|
-
);
|
|
48
|
-
A(s, {
|
|
49
|
-
enabled: !!o,
|
|
41
|
+
const a = y(null), e = f(n.advertisement.$store);
|
|
42
|
+
v(a, {
|
|
43
|
+
enabled: !!e.data,
|
|
50
44
|
event: "click",
|
|
51
|
-
listener:
|
|
45
|
+
listener: h
|
|
52
46
|
});
|
|
53
|
-
const
|
|
54
|
-
return
|
|
55
|
-
ref:
|
|
47
|
+
const u = !o && !i;
|
|
48
|
+
return e.data === void 0 || !d && e.isViewed ? null : /* @__PURE__ */ s(S, {
|
|
49
|
+
ref: a,
|
|
56
50
|
style: {
|
|
57
|
-
height:
|
|
51
|
+
height: u ? "auto" : "100%"
|
|
58
52
|
},
|
|
59
|
-
className:
|
|
60
|
-
children: /* @__PURE__ */
|
|
53
|
+
className: l ? "mobile-view" : "",
|
|
54
|
+
children: /* @__PURE__ */ s(b, {
|
|
61
55
|
skipTypeCheck: r,
|
|
62
56
|
sidebar: i,
|
|
63
|
-
banner:
|
|
64
|
-
advertisement:
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
banner: o,
|
|
58
|
+
advertisement: e.data,
|
|
59
|
+
close: e.close,
|
|
60
|
+
layoutMode: t,
|
|
61
|
+
isNotification: m
|
|
67
62
|
})
|
|
68
|
-
})
|
|
69
|
-
},
|
|
70
|
-
sdk:
|
|
71
|
-
sidebar:
|
|
63
|
+
});
|
|
64
|
+
}, D = ({
|
|
65
|
+
sdk: n,
|
|
66
|
+
sidebar: t,
|
|
72
67
|
banner: r,
|
|
73
68
|
skipTypeCheck: i,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
notification: s
|
|
69
|
+
layoutMode: o,
|
|
70
|
+
isMobileScreen: m,
|
|
71
|
+
persistent: l,
|
|
72
|
+
notification: d
|
|
79
73
|
}) => {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
y(() => {
|
|
84
|
-
n ? t.createEventSession(n) : m();
|
|
85
|
-
}, [n, m, t]);
|
|
86
|
-
const o = p(t.featuresList.getStore());
|
|
87
|
-
if (e && r)
|
|
88
|
-
return /* @__PURE__ */ l("div", {
|
|
74
|
+
const a = f(n.featuresList.getStore());
|
|
75
|
+
if (t && r)
|
|
76
|
+
return /* @__PURE__ */ s("div", {
|
|
89
77
|
style: {
|
|
90
78
|
color: "red"
|
|
91
79
|
},
|
|
92
80
|
children: "define either sidebar or banner, not both."
|
|
93
81
|
});
|
|
94
|
-
if (!
|
|
82
|
+
if (!a)
|
|
95
83
|
return null;
|
|
96
|
-
const
|
|
97
|
-
return
|
|
98
|
-
gamification:
|
|
99
|
-
sidebar:
|
|
84
|
+
const e = n.getFeature(A.GAMES);
|
|
85
|
+
return e ? /* @__PURE__ */ s(I, {
|
|
86
|
+
gamification: e,
|
|
87
|
+
sidebar: t,
|
|
100
88
|
banner: r,
|
|
101
|
-
layoutMode:
|
|
102
|
-
isMobileScreen:
|
|
103
|
-
persistent:
|
|
104
|
-
notification:
|
|
89
|
+
layoutMode: o,
|
|
90
|
+
isMobileScreen: m,
|
|
91
|
+
persistent: l,
|
|
92
|
+
notification: d,
|
|
105
93
|
skipTypeCheck: i
|
|
106
94
|
}) : null;
|
|
107
95
|
};
|
|
108
96
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
S as AdvertisementUIWrap,
|
|
98
|
+
D as StreamLayerSDKAdvertisement
|
|
111
99
|
};
|
|
@@ -1,69 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import {
|
|
5
|
-
import { FeatureType as
|
|
6
|
-
import { Question as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const v = () => y, x = /* @__PURE__ */ d(v())({
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { styled as m } from "@linaria/react";
|
|
3
|
+
import { useStore as c } from "@nanostores/react";
|
|
4
|
+
import { useRef as i, useEffect as d } from "react";
|
|
5
|
+
import { FeatureType as l } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { Question as Q } from "../Features/Gamification/Question.js";
|
|
7
|
+
import { ShowIn as S } from "../../../ui/show-in/index.js";
|
|
8
|
+
const y = () => Q, I = /* @__PURE__ */ m(y())({
|
|
10
9
|
name: "QuestionWrap",
|
|
11
10
|
class: "q10hhsxv",
|
|
12
11
|
propsAsIs: !0
|
|
13
|
-
}),
|
|
12
|
+
}), h = ({
|
|
14
13
|
gamification: e,
|
|
15
|
-
persistent:
|
|
16
|
-
hideHeader:
|
|
14
|
+
persistent: s,
|
|
15
|
+
hideHeader: p,
|
|
17
16
|
insightId: r
|
|
18
17
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
18
|
+
const t = i(""), u = c(e.openedQuestion.$store);
|
|
19
|
+
return d(() => r ? (!s || e.isOpenedQuestion(r) || (t.current = r, e.getFeedItem(r).then((n) => {
|
|
20
|
+
t.current === r && e.openQuestion(r, n);
|
|
22
21
|
})), () => {
|
|
23
|
-
|
|
24
|
-
}) : e.
|
|
25
|
-
data:
|
|
22
|
+
t.current = "";
|
|
23
|
+
}) : (e.activeQuestionId.subscribe(({
|
|
24
|
+
data: o
|
|
26
25
|
}) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}) => m === "insight" && (c == null ? void 0 : c.status) === w.ACTIVE);
|
|
32
|
-
p && (!t || e.isOpenedQuestion(p.id) || e.openQuestion(p.id, p));
|
|
33
|
-
}
|
|
34
|
-
}), [e, t, r]), n ? /* @__PURE__ */ i(V, {
|
|
26
|
+
var n;
|
|
27
|
+
o && ((n = o.feedItem) == null ? void 0 : n.type) === "insight" && (!s || e.isOpenedQuestion(o.feedItem.id) || (t.current = o.feedItem.id, e.openQuestion(o.feedItem.id, o.feedItem))), !o && t.current && (e.closeQuestion(t.current), t.current = "");
|
|
28
|
+
}), () => {
|
|
29
|
+
}), [e, s, r]), u ? /* @__PURE__ */ f(S, {
|
|
35
30
|
style: {
|
|
36
31
|
height: "100%"
|
|
37
32
|
},
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
hideHeader:
|
|
33
|
+
children: /* @__PURE__ */ f(I, {
|
|
34
|
+
hideHeader: p,
|
|
40
35
|
gamification: e,
|
|
41
36
|
hideSponsor: !0
|
|
42
37
|
})
|
|
43
38
|
}) : null;
|
|
44
|
-
},
|
|
39
|
+
}, D = ({
|
|
45
40
|
sdk: e,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
hideHeader: s
|
|
41
|
+
persistent: s,
|
|
42
|
+
insightId: p,
|
|
43
|
+
hideHeader: r
|
|
50
44
|
}) => {
|
|
51
|
-
|
|
52
|
-
deactivate: n
|
|
53
|
-
} = A(e);
|
|
54
|
-
if (l(() => {
|
|
55
|
-
t ? e.createEventSession(t) : n();
|
|
56
|
-
}, [t, n, e]), !S(e.featuresList.getStore()))
|
|
45
|
+
if (!c(e.featuresList.getStore()))
|
|
57
46
|
return null;
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
insightId:
|
|
61
|
-
persistent:
|
|
62
|
-
hideHeader:
|
|
63
|
-
gamification:
|
|
47
|
+
const u = e.getFeature(l.GAMES);
|
|
48
|
+
return u ? /* @__PURE__ */ f(h, {
|
|
49
|
+
insightId: p,
|
|
50
|
+
persistent: s,
|
|
51
|
+
hideHeader: r,
|
|
52
|
+
gamification: u
|
|
64
53
|
}) : null;
|
|
65
54
|
};
|
|
66
55
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
I as QuestionWrap,
|
|
57
|
+
D as StreamLayerSDKInsight
|
|
69
58
|
};
|
|
@@ -1,58 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { styled as d } from "@linaria/react";
|
|
3
3
|
import { StreamLayerProvider as u, useStreamLayer as p } from "@streamlayer/react";
|
|
4
4
|
import { StreamLayerSDKInsight as c } from "../../Insight/index.js";
|
|
5
5
|
import { StreamLayerThemeProvider as y } from "../../../../ui/theme/index.js";
|
|
6
6
|
import { useStreamLayerDebug as f } from "../../../../utils/debug/index.js";
|
|
7
7
|
import { customTheme as l } from "./styles.js";
|
|
8
|
-
import { Video as
|
|
9
|
-
const
|
|
8
|
+
import { Video as h } from "./video.js";
|
|
9
|
+
const v = /* @__PURE__ */ d("div")({
|
|
10
10
|
name: "Body",
|
|
11
11
|
class: "buit6hv",
|
|
12
12
|
propsAsIs: !1
|
|
13
13
|
}), S = ({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
insightId: n
|
|
14
|
+
hideHeader: t,
|
|
15
|
+
insightId: o
|
|
17
16
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
17
|
+
const e = p();
|
|
18
|
+
return e ? /* @__PURE__ */ r(y, {
|
|
20
19
|
customTheme: l,
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
-
hideHeader:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
insightId: n,
|
|
20
|
+
children: /* @__PURE__ */ r(c, {
|
|
21
|
+
hideHeader: t,
|
|
22
|
+
sdk: e,
|
|
23
|
+
insightId: o,
|
|
26
24
|
persistent: !0
|
|
27
25
|
})
|
|
28
26
|
}) : null;
|
|
29
27
|
}, D = ({
|
|
30
|
-
sdkKey:
|
|
31
|
-
eventId:
|
|
32
|
-
layoutMode:
|
|
33
|
-
insightId:
|
|
34
|
-
production:
|
|
28
|
+
sdkKey: t,
|
|
29
|
+
eventId: o,
|
|
30
|
+
layoutMode: e,
|
|
31
|
+
insightId: s,
|
|
32
|
+
production: n,
|
|
35
33
|
onlyInsight: i,
|
|
36
34
|
hideHeader: a
|
|
37
35
|
}) => {
|
|
38
|
-
const
|
|
39
|
-
sdkKey:
|
|
40
|
-
eventId:
|
|
41
|
-
production:
|
|
36
|
+
const m = f({
|
|
37
|
+
sdkKey: t,
|
|
38
|
+
eventId: o,
|
|
39
|
+
production: n
|
|
42
40
|
});
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
sdkKey:
|
|
45
|
-
|
|
41
|
+
return /* @__PURE__ */ r(u, {
|
|
42
|
+
sdkKey: m.sdkKey,
|
|
43
|
+
event: m.event,
|
|
44
|
+
production: m.env === "production",
|
|
46
45
|
autoEnable: !0,
|
|
47
|
-
children: i ? /* @__PURE__ */
|
|
48
|
-
insightId:
|
|
49
|
-
hideHeader: a
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
layoutMode: n,
|
|
55
|
-
event: t.event
|
|
46
|
+
children: i ? /* @__PURE__ */ r(S, {
|
|
47
|
+
insightId: s,
|
|
48
|
+
hideHeader: a
|
|
49
|
+
}) : /* @__PURE__ */ r(v, {
|
|
50
|
+
children: /* @__PURE__ */ r(h, {
|
|
51
|
+
insightId: s,
|
|
52
|
+
layoutMode: e
|
|
56
53
|
})
|
|
57
54
|
})
|
|
58
55
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useStreamLayer as
|
|
4
|
-
import { StreamLayerSDKInsight as
|
|
5
|
-
import { StreamLayerThemeProvider as
|
|
6
|
-
import { VideoFrame as
|
|
7
|
-
const
|
|
8
|
-
const r =
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ e(
|
|
12
|
-
/* @__PURE__ */ e(
|
|
1
|
+
import { jsxs as o, Fragment as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as l } from "react";
|
|
3
|
+
import { useStreamLayer as h } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerSDKInsight as i } from "../../Insight/index.js";
|
|
5
|
+
import { StreamLayerThemeProvider as n } from "../../../../ui/theme/index.js";
|
|
6
|
+
import { VideoFrame as c, customTheme as s, VideoPlayerWrap as p, InsightContainerMobile as u, InsightContainerOverlay as f, InsightContainerLBar as g } from "./styles.js";
|
|
7
|
+
const x = ({ insightId: t, layoutMode: a }) => {
|
|
8
|
+
const r = h(), m = l(null);
|
|
9
|
+
return /* @__PURE__ */ o(d, { children: [
|
|
10
|
+
/* @__PURE__ */ o(c, { ref: m, "data-testid": "video-frame", children: [
|
|
11
|
+
/* @__PURE__ */ e(a === "cover" ? f : g, { children: r && /* @__PURE__ */ e(n, { customTheme: s, children: /* @__PURE__ */ e(i, { sdk: r, insightId: t, persistent: !0 }) }) }),
|
|
12
|
+
/* @__PURE__ */ e(p, { 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 F = ({ event: t, insightId: o, layoutMode: m }) => {
|
|
|
22
22
|
}
|
|
23
23
|
) }) })
|
|
24
24
|
] }),
|
|
25
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ e(u, { children: r && /* @__PURE__ */ e(n, { customTheme: s, children: /* @__PURE__ */ e(i, { sdk: r, insightId: t, persistent: !0 }) }) })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
x 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 m } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerSDKAdvertisement as o } from "../../Advertisement/index.js";
|
|
5
|
+
import { theme as i } from "../../../../ui/theme/theme.js";
|
|
6
|
+
const a = /* @__PURE__ */ r("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c1g3vhjc",
|
|
9
9
|
propsAsIs: !1
|
|
@@ -11,17 +11,14 @@ const d = /* @__PURE__ */ r("div")({
|
|
|
11
11
|
name: "Div",
|
|
12
12
|
class: "d1626h38",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return s ? /* @__PURE__ */ e(d, {
|
|
19
|
-
className: a,
|
|
14
|
+
}), c = () => {
|
|
15
|
+
const s = m();
|
|
16
|
+
return s ? /* @__PURE__ */ e(a, {
|
|
17
|
+
className: i,
|
|
20
18
|
"data-testid": "overlay",
|
|
21
19
|
children: [/* @__PURE__ */ e(n, {
|
|
22
20
|
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", {}), "-------------"]
|
|
23
|
-
}), /* @__PURE__ */ t(
|
|
24
|
-
event: m,
|
|
21
|
+
}), /* @__PURE__ */ t(o, {
|
|
25
22
|
sdk: s,
|
|
26
23
|
persistent: !0
|
|
27
24
|
}), /* @__PURE__ */ e(n, {
|
|
@@ -30,5 +27,5 @@ const d = /* @__PURE__ */ r("div")({
|
|
|
30
27
|
}) : null;
|
|
31
28
|
};
|
|
32
29
|
export {
|
|
33
|
-
|
|
30
|
+
c as Content
|
|
34
31
|
};
|
|
@@ -30,6 +30,7 @@ const b = /* @__PURE__ */ r("div")({
|
|
|
30
30
|
return /* @__PURE__ */ e(f, {
|
|
31
31
|
children: /* @__PURE__ */ p(l, {
|
|
32
32
|
sdkKey: o.sdkKey,
|
|
33
|
+
event: o.event,
|
|
33
34
|
production: o.env === "production",
|
|
34
35
|
autoEnable: !0,
|
|
35
36
|
children: [/* @__PURE__ */ e(b, {
|
|
@@ -43,9 +44,7 @@ const b = /* @__PURE__ */ r("div")({
|
|
|
43
44
|
})
|
|
44
45
|
}), /* @__PURE__ */ e("h3", {
|
|
45
46
|
children: "Overlay View (should appear between two text blocks)"
|
|
46
|
-
}), /* @__PURE__ */ e(u, {
|
|
47
|
-
event: o.event
|
|
48
|
-
})]
|
|
47
|
+
}), /* @__PURE__ */ e(u, {})]
|
|
49
48
|
})
|
|
50
49
|
});
|
|
51
50
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Advertisement } from '@streamlayer/feature-gamification';
|
|
2
2
|
export declare const AdvertisementUI: React.FC<{
|
|
3
|
-
advertisement: Advertisement
|
|
4
|
-
data: Exclude<Advertisement['data'], undefined>;
|
|
5
|
-
};
|
|
3
|
+
advertisement: Advertisement;
|
|
6
4
|
layoutMode?: 'cover' | 'side-by-side';
|
|
7
5
|
sidebar?: 'left' | 'right';
|
|
8
6
|
banner?: 'top' | 'bottom';
|
|
7
|
+
close?: () => void;
|
|
9
8
|
isNotification?: boolean;
|
|
10
9
|
skipTypeCheck?: boolean;
|
|
11
10
|
}>;
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
] });
|
|
26
|
-
};
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { PromotionType as r } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { Banner as c } from "./banner/index.js";
|
|
4
|
+
import { Notification as y } from "./notification/index.js";
|
|
5
|
+
import { Overlay as u } from "./overlay/index.js";
|
|
6
|
+
import { Sidebar as A } from "./sidebar/index.js";
|
|
7
|
+
import { OverlayContainer as a } from "./overlay/styles.js";
|
|
8
|
+
const d = (i) => (i == null ? void 0 : i.type) === r.INGAME_IAB11_LBAR || (i == null ? void 0 : i.type) === r.INGAME_IAB21_LBAR, e = (i) => (i == null ? void 0 : i.type) === r.INGAME_IAB11 || (i == null ? void 0 : i.type) === r.INGAME_IAB21, C = ({
|
|
9
|
+
advertisement: i,
|
|
10
|
+
close: f,
|
|
11
|
+
skipTypeCheck: l,
|
|
12
|
+
layoutMode: s = "side-by-side",
|
|
13
|
+
sidebar: n,
|
|
14
|
+
isNotification: I,
|
|
15
|
+
banner: t
|
|
16
|
+
}) => I && i.notification ? /* @__PURE__ */ o(y, { notification: i.notification, promotionId: i.question.id }) : !n && !t && (l || e(i.promotion)) ? /* @__PURE__ */ o(a, { className: "PromoOverlayContainer", children: /* @__PURE__ */ o(u, { promotionId: i.question.id, promotion: i.promotion, onClose: f }) }) : n && (l || d(i.promotion)) ? /* @__PURE__ */ o(A, { className: "PromoSidebarContainer", direction: n, hiding: !1, children: /* @__PURE__ */ o(u, { promotionId: i.question.id, promotion: i.promotion, onClose: f }) }) : t ? /* @__PURE__ */ o(
|
|
17
|
+
c,
|
|
18
|
+
{
|
|
19
|
+
promotionId: i.question.id,
|
|
20
|
+
hiding: !1,
|
|
21
|
+
promotion: i.promotion,
|
|
22
|
+
direction: t
|
|
23
|
+
}
|
|
24
|
+
) : null;
|
|
27
25
|
export {
|
|
28
|
-
|
|
26
|
+
C as AdvertisementUI
|
|
29
27
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@lottiefiles/react-lottie-player": "^3.5.4",
|
|
54
|
-
"@streamlayer/sl-eslib": "^5.
|
|
54
|
+
"@streamlayer/sl-eslib": "^5.123.1",
|
|
55
55
|
"@types/lodash.throttle": "^4.1.9",
|
|
56
56
|
"lodash.throttle": "^4.1.1",
|
|
57
57
|
"nanoid": "3.3.7",
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
"react-virtualized-auto-sizer": "^1.0.24",
|
|
60
60
|
"react-window": "^1.8.10",
|
|
61
61
|
"react-window-infinite-loader": "^1.0.9",
|
|
62
|
-
"@streamlayer/feature-gamification": "^1.
|
|
63
|
-
"@streamlayer/sdk-web": "^1.
|
|
64
|
-
"@streamlayer/sdk-web-analytics": "^1.
|
|
65
|
-
"@streamlayer/sdk-web-anonymous-auth": "^1.0.
|
|
66
|
-
"@streamlayer/sdk-web-api": "^1.
|
|
67
|
-
"@streamlayer/sdk-web-
|
|
68
|
-
"@streamlayer/sdk-web-
|
|
69
|
-
"@streamlayer/sdk-web-interfaces": "^1.1.
|
|
70
|
-
"@streamlayer/sdk-web-logger": "^1.0.
|
|
71
|
-
"@streamlayer/sdk-web-notifications": "^1.1.
|
|
72
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
73
|
-
"@streamlayer/sdk-web-types": "^1.
|
|
62
|
+
"@streamlayer/feature-gamification": "^1.6.0",
|
|
63
|
+
"@streamlayer/sdk-web": "^1.3.0",
|
|
64
|
+
"@streamlayer/sdk-web-analytics": "^1.3.0",
|
|
65
|
+
"@streamlayer/sdk-web-anonymous-auth": "^1.0.17",
|
|
66
|
+
"@streamlayer/sdk-web-api": "^1.5.0",
|
|
67
|
+
"@streamlayer/sdk-web-features": "^1.0.17",
|
|
68
|
+
"@streamlayer/sdk-web-core": "^1.4.0",
|
|
69
|
+
"@streamlayer/sdk-web-interfaces": "^1.1.12",
|
|
70
|
+
"@streamlayer/sdk-web-logger": "^1.0.17",
|
|
71
|
+
"@streamlayer/sdk-web-notifications": "^1.1.12",
|
|
72
|
+
"@streamlayer/sdk-web-storage": "^1.0.17",
|
|
73
|
+
"@streamlayer/sdk-web-types": "^1.6.0"
|
|
74
74
|
},
|
|
75
75
|
"nx": {
|
|
76
76
|
"implicitDependencies": [
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
"vite-plugin-svgr": "^4.2.0",
|
|
112
112
|
"vite-svg-loader": "^5.1.0",
|
|
113
113
|
"vite-tsconfig-paths": "^5.0.1",
|
|
114
|
-
"@streamlayer/react": "^1.
|
|
114
|
+
"@streamlayer/react": "^1.5.0"
|
|
115
115
|
}
|
|
116
116
|
}
|