@streamlayer/react-ui 1.14.3 → 1.15.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/Features/Gamification/Leaderboard.js +9 -8
- package/lib/app/app/InApp/index.d.ts +4 -0
- package/lib/app/app/InApp/index.js +31 -0
- package/lib/app/app/Notifications/Onboarding/index.js +78 -72
- package/lib/app/app/story/index.d.ts +0 -1
- package/lib/app/app/story/index.js +39 -50
- package/lib/app/app/story/styles.d.ts +1 -0
- package/lib/app/app/story/styles.js +9 -4
- package/lib/app/app/story/video.js +28 -25
- package/lib/app/masters/Features/Gamification/Leaderboard.js +3 -2
- package/lib/assets/style.css +1 -1
- package/lib/ui/close-btn/index.d.ts +1 -1
- package/lib/ui/gamification/constants.d.ts +1 -0
- package/lib/ui/gamification/constants.js +11 -2
- package/lib/ui/gamification/points/index.js +7 -7
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +61 -0
- package/lib/ui/gamification/question/inapp/notification/index.d.ts +6 -0
- package/lib/ui/gamification/question/inapp/notification/index.js +38 -0
- package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/notification/styles.js +40 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/index.d.ts +2 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/index.js +24 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/styles.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/styles.js +24 -0
- package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +5 -0
- package/lib/ui/gamification/question/inapp/onboarding/index.js +50 -0
- package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/onboarding/styles.js +51 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.d.ts +6 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +57 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +12 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +59 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.js +19 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.js +26 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.js +38 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.js +33 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/prediction-result/index.js +7 -0
- package/lib/ui/gamification/question/inapp/prediction-result/styles.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/styles.js +9 -0
- package/lib/ui/gamification/question/index.d.ts +10 -1
- package/lib/ui/gamification/question/index.js +45 -36
- package/lib/ui/icons/index.d.ts +2 -3
- package/lib/ui/icons/index.js +72 -63
- package/lib/ui/questions/twitter/account/index.js +17 -17
- package/lib/ui/questions/twitter/index.d.ts +1 -0
- package/lib/ui/questions/twitter/index.js +2 -1
- package/lib/ui/theme/constants.d.ts +6 -0
- package/lib/ui/theme/constants.js +20 -14
- package/lib/ui/theme/index.d.ts +1 -0
- package/lib/ui/theme/index.js +4 -4
- package/lib/ui/theme/theme.js +2 -2
- package/lib/utils/decorators/container.js +10 -6
- package/lib/utils/decorators/styles.js +7 -2
- package/package.json +19 -14
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as r, jsxs as f, Fragment as L } from "react/jsx-runtime";
|
|
2
2
|
import { styled as h } from "@linaria/react";
|
|
3
|
-
import { useStore as
|
|
3
|
+
import { useStore as n } from "@nanostores/react";
|
|
4
4
|
import { useClipboardCopy as k } from "../../../useClipboardCopy.js";
|
|
5
5
|
import { useRef as u } from "react";
|
|
6
6
|
import { InviteLink as I } from "../../../../ui/gamification/invite-link/index.js";
|
|
7
7
|
import "react-virtualized-auto-sizer";
|
|
8
8
|
import "react-window";
|
|
9
9
|
import "react-window-infinite-loader";
|
|
10
|
+
import "@storybook/blocks";
|
|
10
11
|
import "../../../../ui/icons/index.js";
|
|
11
12
|
import "../../../../ui/gamification/leaderboard/list-item/styles.js";
|
|
12
13
|
/* empty css */
|
|
@@ -16,24 +17,24 @@ const C = /* @__PURE__ */ h("div")({
|
|
|
16
17
|
name: "InviteLinkContainer",
|
|
17
18
|
class: "i1odbhm4",
|
|
18
19
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
20
|
+
}), z = ({
|
|
20
21
|
gamification: e,
|
|
21
22
|
scrollNode: s,
|
|
22
23
|
scrollStore: p
|
|
23
24
|
}) => {
|
|
24
25
|
const t = u(null), {
|
|
25
|
-
data:
|
|
26
|
+
data: i,
|
|
26
27
|
hasMore: d,
|
|
27
28
|
loading: m,
|
|
28
29
|
key: l
|
|
29
|
-
} =
|
|
30
|
+
} = n(e.leaderboardList.$store), {
|
|
30
31
|
data: o
|
|
31
|
-
} =
|
|
32
|
-
return !
|
|
32
|
+
} = n(e.deepLink.$store), [a, c] = k(t);
|
|
33
|
+
return !i.length && !m ? /* @__PURE__ */ r(y, {
|
|
33
34
|
deepLink: o
|
|
34
35
|
}) : /* @__PURE__ */ f(L, {
|
|
35
36
|
children: [/* @__PURE__ */ r(b, {
|
|
36
|
-
items:
|
|
37
|
+
items: i,
|
|
37
38
|
scrollNode: s,
|
|
38
39
|
scrollStore: p,
|
|
39
40
|
fetchMore: e.leaderboardList.fetchMore,
|
|
@@ -51,5 +52,5 @@ const C = /* @__PURE__ */ h("div")({
|
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
z as Leaderboard
|
|
55
56
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as p } from "@nanostores/react";
|
|
3
|
+
import { useState as c, useMemo as s, useEffect as u } from "react";
|
|
4
|
+
import { eventBus as f } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
+
import { NotificationType as n } from "@streamlayer/sdk-web-notifications";
|
|
6
|
+
import { FeatureType as m, QuestionType as d } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { InAppNotification as l } from "../../../ui/gamification/question/inapp/notification/index.js";
|
|
8
|
+
import { InAppOnboarding as y } from "../../../ui/gamification/question/inapp/onboarding/index.js";
|
|
9
|
+
import { InAppPredictionResult as I } from "../../../ui/gamification/question/inapp/prediction-result/index.js";
|
|
10
|
+
const R = ({ sdk: o }) => {
|
|
11
|
+
const [r] = c(o.getNotificationsStore()), a = p(r), e = o.getFeature(m.GAMES), t = s(() => o.getActiveNotification(), [o, a]);
|
|
12
|
+
return u(() => {
|
|
13
|
+
t && f.emit("notification", {
|
|
14
|
+
action: "rendered",
|
|
15
|
+
payload: {
|
|
16
|
+
questionId: t.data.questionId,
|
|
17
|
+
questionType: t.data.questionType
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}, [t]), t && t.type === n.QUESTION_RESOLVED ? t.data.question && t.data.questionType === d.PREDICTION ? /* @__PURE__ */ i(
|
|
21
|
+
I,
|
|
22
|
+
{
|
|
23
|
+
action: t.action,
|
|
24
|
+
close: t.close,
|
|
25
|
+
...t.data.question
|
|
26
|
+
}
|
|
27
|
+
) : null : t && t.type === n.ONBOARDING ? t.data.onboarding ? /* @__PURE__ */ i(y, { open: e == null ? void 0 : e.openFeature, close: t.close, ...t.data.onboarding }) : null : t && /* @__PURE__ */ i(l, { ...t.data, action: t.action });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
R as StreamLayerSDKNotification
|
|
31
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
1
|
+
import { jsx as n, jsxs as w, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { styled as y } from "@linaria/react";
|
|
3
3
|
import { useStore as T } from "@nanostores/react";
|
|
4
|
-
import { useImagesPreload as
|
|
5
|
-
import { scrollIntoAppView as
|
|
6
|
-
import { useRef as
|
|
7
|
-
import { FeatureType as
|
|
8
|
-
import { OnboardingUI as
|
|
9
|
-
import { ModalPortal as
|
|
10
|
-
import { ShowIn as
|
|
11
|
-
import { Onboarding as
|
|
4
|
+
import { useImagesPreload as _ } from "../../../useImagesPreload.js";
|
|
5
|
+
import { scrollIntoAppView as E } from "../../../useSdkScroll.js";
|
|
6
|
+
import { useRef as M, useState as A, useMemo as F, useLayoutEffect as R, useEffect as V } from "react";
|
|
7
|
+
import { FeatureType as W } from "@streamlayer/sdk-web-types";
|
|
8
|
+
import { OnboardingUI as $ } from "../../../../ui/gamification/onboarding/index.js";
|
|
9
|
+
import { ModalPortal as j } from "../../../../ui/modal/index.js";
|
|
10
|
+
import { ShowIn as P } from "../../../../ui/show-in/index.js";
|
|
11
|
+
import { Onboarding as L } from "./Notification/index.js";
|
|
12
12
|
const C = [{
|
|
13
13
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
|
|
14
14
|
tagline: "",
|
|
15
|
-
headline: /* @__PURE__ */
|
|
16
|
-
children: ["Welcome to ", /* @__PURE__ */
|
|
15
|
+
headline: /* @__PURE__ */ w(O, {
|
|
16
|
+
children: ["Welcome to ", /* @__PURE__ */ n("br", {}), " Live Challenge"]
|
|
17
17
|
})
|
|
18
18
|
}, {
|
|
19
19
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
|
|
@@ -21,43 +21,48 @@ const C = [{
|
|
|
21
21
|
}, {
|
|
22
22
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
|
|
23
23
|
headline: "Win points and play against friends."
|
|
24
|
-
}],
|
|
24
|
+
}], q = /* @__PURE__ */ y("div")({
|
|
25
25
|
name: "OnboardingContainer",
|
|
26
26
|
class: "o1xni1kr",
|
|
27
27
|
propsAsIs: !1
|
|
28
|
-
}),
|
|
28
|
+
}), z = () => P, D = /* @__PURE__ */ y(z())({
|
|
29
29
|
name: "OnboardingNotificationContainer",
|
|
30
30
|
class: "o1vnouv7",
|
|
31
31
|
propsAsIs: !0
|
|
32
|
-
}),
|
|
32
|
+
}), x = /* @__PURE__ */ y("div")({
|
|
33
33
|
name: "InnerContainer",
|
|
34
34
|
class: "i59uefw",
|
|
35
35
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
36
|
+
}), G = /* @__PURE__ */ y("div")({
|
|
37
|
+
name: "OnboardingOverlap",
|
|
38
|
+
class: "ovnr8ov",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
}), U = ({
|
|
37
41
|
deepLink: l,
|
|
38
42
|
onboardingOpts: e,
|
|
39
43
|
notification: o,
|
|
40
|
-
gamification:
|
|
44
|
+
gamification: p,
|
|
41
45
|
loading: s,
|
|
42
|
-
sdk: d
|
|
46
|
+
sdk: d,
|
|
47
|
+
throttled: I
|
|
43
48
|
}) => {
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
var
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
+
var a, b, h, f, v, t, u;
|
|
50
|
+
const c = T(p.friends.getStore()), [r, k] = A(void 0), g = F(() => {
|
|
51
|
+
var m, S;
|
|
52
|
+
const i = d.getInviter();
|
|
53
|
+
return i ? (S = (m = c.data) == null ? void 0 : m.find(({
|
|
49
54
|
slId: B
|
|
50
|
-
}) => B ===
|
|
51
|
-
}, [
|
|
52
|
-
return
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
+
}) => B === i)) == null ? void 0 : S.name : "";
|
|
56
|
+
}, [c.data, d]);
|
|
57
|
+
return V(() => {
|
|
58
|
+
const i = l.$store.subscribe((m) => {
|
|
59
|
+
m && k(m.data);
|
|
55
60
|
});
|
|
56
61
|
return () => {
|
|
57
|
-
|
|
62
|
+
i();
|
|
58
63
|
};
|
|
59
|
-
}, [l.$store]), /* @__PURE__ */
|
|
60
|
-
children: /* @__PURE__ */
|
|
64
|
+
}, [l.$store]), /* @__PURE__ */ w(q, {
|
|
65
|
+
children: [/* @__PURE__ */ n($, {
|
|
61
66
|
loading: s,
|
|
62
67
|
rules: [{
|
|
63
68
|
label: "Answer as many questions as you like.",
|
|
@@ -69,94 +74,95 @@ const C = [{
|
|
|
69
74
|
label: "Top the leader board and best your friends.",
|
|
70
75
|
icon: "icon-trophy"
|
|
71
76
|
}],
|
|
72
|
-
rulesBtnLabel: (
|
|
73
|
-
rulesTitle: (
|
|
77
|
+
rulesBtnLabel: (a = e.rules) == null ? void 0 : a.buttonLabel,
|
|
78
|
+
rulesTitle: (b = e.rules) == null ? void 0 : b.heading,
|
|
74
79
|
termsTitle: "Terms and Conditions",
|
|
75
|
-
termsText: (
|
|
80
|
+
termsText: (h = e.rules) == null ? void 0 : h.terms,
|
|
76
81
|
steps: C,
|
|
77
|
-
primaryColor: (
|
|
78
|
-
inviteLink:
|
|
79
|
-
inviteCardTitle: (
|
|
80
|
-
inviteCardSubtext: (
|
|
81
|
-
inviteCardBtnLabel: (
|
|
82
|
+
primaryColor: (f = e.inviteCard) == null ? void 0 : f.iconColor,
|
|
83
|
+
inviteLink: r,
|
|
84
|
+
inviteCardTitle: (v = e.inviteCard) == null ? void 0 : v.heading,
|
|
85
|
+
inviteCardSubtext: (t = e.inviteCard) == null ? void 0 : t.subtext,
|
|
86
|
+
inviteCardBtnLabel: (u = e.inviteCard) == null ? void 0 : u.buttonLabel,
|
|
82
87
|
onClose: () => {
|
|
83
|
-
var
|
|
84
|
-
(
|
|
88
|
+
var i;
|
|
89
|
+
(i = o.close) == null || i.call(o);
|
|
85
90
|
},
|
|
86
|
-
gamification:
|
|
91
|
+
gamification: p,
|
|
87
92
|
sdk: d,
|
|
88
|
-
inviterName:
|
|
89
|
-
})
|
|
93
|
+
inviterName: g
|
|
94
|
+
}), I && /* @__PURE__ */ n(G, {})]
|
|
90
95
|
});
|
|
91
|
-
},
|
|
96
|
+
}, te = ({
|
|
92
97
|
sdk: l,
|
|
93
98
|
notification: e,
|
|
94
99
|
saveHeight: o,
|
|
95
|
-
style:
|
|
100
|
+
style: p,
|
|
96
101
|
appNode: s,
|
|
97
102
|
sdkInDesktopView: d,
|
|
98
|
-
responsiveStore:
|
|
103
|
+
responsiveStore: I
|
|
99
104
|
}) => {
|
|
100
|
-
const
|
|
101
|
-
graphicSrc:
|
|
102
|
-
}) =>
|
|
105
|
+
const c = M(null), r = e.data.onboarding, [k, g] = A(r == null ? void 0 : r.instantOpen), a = l.getFeature(W.GAMES), b = F(() => C == null ? void 0 : C.map(({
|
|
106
|
+
graphicSrc: t
|
|
107
|
+
}) => t), []), {
|
|
103
108
|
screen: h
|
|
104
|
-
} = T(
|
|
109
|
+
} = T(I, {
|
|
105
110
|
keys: ["screen"]
|
|
106
111
|
});
|
|
107
|
-
|
|
108
|
-
var
|
|
109
|
-
o(((
|
|
112
|
+
R(() => {
|
|
113
|
+
var t;
|
|
114
|
+
o(((t = c.current) == null ? void 0 : t.getBoundingClientRect().height) || 0);
|
|
110
115
|
}, [o]);
|
|
111
116
|
const {
|
|
112
117
|
loading: f,
|
|
113
118
|
throttled: v
|
|
114
|
-
} =
|
|
115
|
-
return
|
|
119
|
+
} = _(b);
|
|
120
|
+
return k && a && r && s.current ? /* @__PURE__ */ n(j, {
|
|
116
121
|
container: s,
|
|
117
122
|
useContainer: !d,
|
|
118
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ n(U, {
|
|
124
|
+
throttled: v,
|
|
119
125
|
notification: e,
|
|
120
|
-
setOpened:
|
|
126
|
+
setOpened: g,
|
|
121
127
|
gamification: a,
|
|
122
|
-
onboardingOpts:
|
|
128
|
+
onboardingOpts: r,
|
|
123
129
|
deepLink: a.deepLink,
|
|
124
130
|
loading: f,
|
|
125
131
|
renderToNode: s,
|
|
126
132
|
sdk: l
|
|
127
133
|
})
|
|
128
|
-
}) : /* @__PURE__ */
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
-
ref:
|
|
134
|
+
}) : /* @__PURE__ */ w(O, {
|
|
135
|
+
children: [/* @__PURE__ */ n(x, {
|
|
136
|
+
ref: c,
|
|
131
137
|
style: {
|
|
132
138
|
position: "absolute",
|
|
133
139
|
visibility: "hidden"
|
|
134
140
|
},
|
|
135
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ n(L, {
|
|
136
142
|
close: () => {
|
|
137
143
|
},
|
|
138
144
|
action: () => {
|
|
139
145
|
},
|
|
140
|
-
onboarding:
|
|
146
|
+
onboarding: r
|
|
141
147
|
})
|
|
142
|
-
}), /* @__PURE__ */
|
|
143
|
-
style:
|
|
148
|
+
}), /* @__PURE__ */ n(D, {
|
|
149
|
+
style: p,
|
|
144
150
|
hiding: e.hiding,
|
|
145
|
-
children: /* @__PURE__ */
|
|
146
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ n(x, {
|
|
152
|
+
children: /* @__PURE__ */ n(L, {
|
|
147
153
|
close: e.close,
|
|
148
154
|
action: () => {
|
|
149
|
-
var
|
|
150
|
-
|
|
155
|
+
var u;
|
|
156
|
+
g(!0), (((u = s.current) == null ? void 0 : u.getBoundingClientRect().y) || 0) < 0 && E(s, h.size, {
|
|
151
157
|
behavior: "smooth"
|
|
152
158
|
});
|
|
153
159
|
},
|
|
154
|
-
onboarding:
|
|
160
|
+
onboarding: r
|
|
155
161
|
})
|
|
156
162
|
})
|
|
157
163
|
})]
|
|
158
164
|
});
|
|
159
165
|
};
|
|
160
166
|
export {
|
|
161
|
-
|
|
167
|
+
te as Onboarding
|
|
162
168
|
};
|
|
@@ -1,76 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { styled as
|
|
3
|
-
import {
|
|
4
|
-
import { StreamLayerProvider as m, useStreamLayer as c, StreamLayerSDKEvent as f } from "@streamlayer/react";
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { styled as a } from "@linaria/react";
|
|
3
|
+
import { StreamLayerProvider as l, StreamLayerSDKEvent as d, useStreamLayer as c, useStreamLayerUI as m } from "@streamlayer/react";
|
|
5
4
|
import { App as u } from "../index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const a = () => {
|
|
5
|
+
import { useStreamLayerDebug as f } from "../../../utils/debug/index.js";
|
|
6
|
+
import { Video as y } from "./video.js";
|
|
7
|
+
const s = () => {
|
|
10
8
|
console.log("deep link handled cb");
|
|
11
9
|
}, v = () => {
|
|
12
10
|
console.log("video player handled cb");
|
|
13
|
-
},
|
|
14
|
-
|
|
11
|
+
}, h = ({
|
|
12
|
+
withSidebarNotification: n
|
|
15
13
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
event: o
|
|
23
|
-
}), /* @__PURE__ */ r(u, {
|
|
24
|
-
sdk: e,
|
|
25
|
-
event: o,
|
|
26
|
-
onDeepLinkHandled: a
|
|
27
|
-
})]
|
|
28
|
-
}) : null;
|
|
29
|
-
}, S = /* @__PURE__ */ s("div")({
|
|
14
|
+
const r = c(), e = m();
|
|
15
|
+
return !r || !e.app && !e.appNotification || !e.app && e.appNotification && !n ? null : /* @__PURE__ */ o(u, {
|
|
16
|
+
sdk: r,
|
|
17
|
+
onDeepLinkHandled: s
|
|
18
|
+
});
|
|
19
|
+
}, A = /* @__PURE__ */ a("div")({
|
|
30
20
|
name: "Container",
|
|
31
21
|
class: "c1a4qh28",
|
|
32
22
|
propsAsIs: !1
|
|
33
|
-
}),
|
|
23
|
+
}), S = /* @__PURE__ */ a("div")({
|
|
34
24
|
name: "Body",
|
|
35
25
|
class: "b9h8kuk",
|
|
36
26
|
propsAsIs: !1
|
|
37
|
-
}),
|
|
27
|
+
}), k = /* @__PURE__ */ a("div")({
|
|
38
28
|
name: "AppContainer",
|
|
39
29
|
class: "a1wkro2j",
|
|
40
30
|
propsAsIs: !1
|
|
41
|
-
}),
|
|
42
|
-
sdkKey:
|
|
43
|
-
eventId:
|
|
44
|
-
production:
|
|
45
|
-
|
|
46
|
-
friendsTab: l
|
|
31
|
+
}), P = ({
|
|
32
|
+
sdkKey: n,
|
|
33
|
+
eventId: r,
|
|
34
|
+
production: e,
|
|
35
|
+
friendsTab: p
|
|
47
36
|
}) => {
|
|
48
|
-
const
|
|
49
|
-
sdkKey:
|
|
50
|
-
eventId:
|
|
51
|
-
production:
|
|
37
|
+
const t = f({
|
|
38
|
+
sdkKey: n,
|
|
39
|
+
eventId: r,
|
|
40
|
+
production: e
|
|
52
41
|
});
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
sdkKey:
|
|
55
|
-
production:
|
|
42
|
+
return /* @__PURE__ */ i(l, {
|
|
43
|
+
sdkKey: t.sdkKey,
|
|
44
|
+
production: t.env === "production",
|
|
56
45
|
autoEnable: !0,
|
|
57
|
-
onDeepLinkHandled:
|
|
46
|
+
onDeepLinkHandled: s,
|
|
58
47
|
videoPlayerController: v,
|
|
59
48
|
withAd: !1,
|
|
60
|
-
friendsTab:
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
children: /* @__PURE__ */ r(A, {
|
|
67
|
-
event: n.event
|
|
49
|
+
friendsTab: p,
|
|
50
|
+
children: [/* @__PURE__ */ i(S, {
|
|
51
|
+
children: [/* @__PURE__ */ o(y, {}), /* @__PURE__ */ o(A, {
|
|
52
|
+
children: /* @__PURE__ */ o(k, {
|
|
53
|
+
children: /* @__PURE__ */ o(h, {
|
|
54
|
+
withSidebarNotification: !1
|
|
68
55
|
})
|
|
69
56
|
})
|
|
70
57
|
})]
|
|
71
|
-
})
|
|
58
|
+
}), /* @__PURE__ */ o(d, {
|
|
59
|
+
event: t.event
|
|
60
|
+
})]
|
|
72
61
|
});
|
|
73
62
|
};
|
|
74
63
|
export {
|
|
75
|
-
|
|
64
|
+
P as AppStory
|
|
76
65
|
};
|
|
@@ -2,3 +2,4 @@ export declare const PointsContainer: import('@linaria/react').StyledComponent<i
|
|
|
2
2
|
export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
4
|
export declare const LinkToLogin: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -3,11 +3,11 @@ const o = /* @__PURE__ */ s("div")({
|
|
|
3
3
|
name: "PointsContainer",
|
|
4
4
|
class: "p10yam33",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}),
|
|
6
|
+
}), n = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "VideoPlayerWrap",
|
|
8
8
|
class: "v13be41a",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), e = /* @__PURE__ */ s("div")({
|
|
11
11
|
name: "VideoFrame",
|
|
12
12
|
class: "v18d3gas",
|
|
13
13
|
propsAsIs: !1
|
|
@@ -15,10 +15,15 @@ const o = /* @__PURE__ */ s("div")({
|
|
|
15
15
|
name: "LinkToLogin",
|
|
16
16
|
class: "l1aq3x2u",
|
|
17
17
|
propsAsIs: !1
|
|
18
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
19
|
+
name: "NotificationContainer",
|
|
20
|
+
class: "n6hlblg",
|
|
21
|
+
propsAsIs: !1
|
|
18
22
|
});
|
|
19
23
|
export {
|
|
20
24
|
i as LinkToLogin,
|
|
25
|
+
r as NotificationContainer,
|
|
21
26
|
o as PointsContainer,
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
e as VideoFrame,
|
|
28
|
+
n as VideoPlayerWrap
|
|
24
29
|
};
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useCallback as m, useEffect as s } from "react";
|
|
3
3
|
import { useStreamLayer as d } from "@streamlayer/react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { VideoFrame as
|
|
7
|
-
const
|
|
8
|
-
const e = d(), [
|
|
9
|
-
|
|
4
|
+
import { StreamLayerSDKNotification as p } from "../InApp/index.js";
|
|
5
|
+
import { StreamLayerSDKPoints as c } from "../Points/index.js";
|
|
6
|
+
import { VideoFrame as u, PointsContainer as f, VideoPlayerWrap as h, NotificationContainer as y, LinkToLogin as g } from "./styles.js";
|
|
7
|
+
const P = () => {
|
|
8
|
+
const e = d(), [i, a] = l(!0), o = m(({ muted: n }) => {
|
|
9
|
+
a(n);
|
|
10
10
|
}, []);
|
|
11
11
|
return s(() => (e == null || e.addVideoPlayerController(o), () => {
|
|
12
12
|
e == null || e.removeVideoPlayerController(o);
|
|
13
|
-
}), [e, o]), /* @__PURE__ */
|
|
14
|
-
e && /* @__PURE__ */ r(
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
}), [e, o]), /* @__PURE__ */ t(u, { "data-testid": "video-frame", children: [
|
|
14
|
+
e && /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(c, { sdk: e }) }),
|
|
15
|
+
/* @__PURE__ */ t(h, { children: [
|
|
16
|
+
/* @__PURE__ */ r(
|
|
17
|
+
"video",
|
|
18
|
+
{
|
|
19
|
+
src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
|
|
20
|
+
muted: i,
|
|
21
|
+
width: "100%",
|
|
22
|
+
height: "100%",
|
|
23
|
+
autoplay: "autoplay",
|
|
24
|
+
loop: !0,
|
|
25
|
+
playsInline: !0,
|
|
26
|
+
playing: !0
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
e && /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(p, { sdk: e }) })
|
|
30
|
+
] }),
|
|
28
31
|
/* @__PURE__ */ r(
|
|
29
|
-
|
|
32
|
+
g,
|
|
30
33
|
{
|
|
31
34
|
href: "./iframe.html?args=&globals=viewport:appDesktop&id=app-login--login&viewMode=story",
|
|
32
35
|
rel: "noreferrer",
|
|
@@ -36,5 +39,5 @@ const S = () => {
|
|
|
36
39
|
] });
|
|
37
40
|
};
|
|
38
41
|
export {
|
|
39
|
-
|
|
42
|
+
P as Video
|
|
40
43
|
};
|
|
@@ -7,6 +7,7 @@ import { InviteLink as I } from "../../../../ui/gamification/invite-link/index.j
|
|
|
7
7
|
import "react-virtualized-auto-sizer";
|
|
8
8
|
import "react-window";
|
|
9
9
|
import "react-window-infinite-loader";
|
|
10
|
+
import "@storybook/blocks";
|
|
10
11
|
import "../../../../ui/icons/index.js";
|
|
11
12
|
import "../../../../ui/gamification/leaderboard/list-item/styles.js";
|
|
12
13
|
/* empty css */
|
|
@@ -16,7 +17,7 @@ const b = /* @__PURE__ */ h("div")({
|
|
|
16
17
|
name: "InviteLinkContainer",
|
|
17
18
|
class: "ij36hcn",
|
|
18
19
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
20
|
+
}), z = ({
|
|
20
21
|
gamification: e,
|
|
21
22
|
scrollNode: s,
|
|
22
23
|
scrollStore: p
|
|
@@ -51,5 +52,5 @@ const b = /* @__PURE__ */ h("div")({
|
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
z as Leaderboard
|
|
55
56
|
};
|