@streamlayer/react-ui 1.8.2 → 1.10.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 +23 -22
- package/lib/app/app/Features/Gamification/index.js +1 -1
- package/lib/app/app/Insight/index.d.ts +2 -0
- package/lib/app/app/Insight/index.js +28 -24
- package/lib/app/app/Navigation/SDKPillNode.d.ts +1 -0
- package/lib/app/app/Navigation/SDKPillNode.js +9 -0
- 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 +2 -0
- package/lib/app/app/index.js +114 -85
- 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 +0 -14
- package/lib/app/app/useApp.js +14 -44
- 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/questions/insight/index.js +21 -20
- package/lib/ui/theme/masters-theme.js +36 -13
- package/lib/ui/theme/theme.js +22 -21
- 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
|
@@ -1,163 +1,175 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
1
|
+
import { jsxs as y, Fragment as b, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { cx as V } from "@linaria/core";
|
|
3
3
|
import { useStore as g } from "@nanostores/react";
|
|
4
|
-
import { useAppContext as
|
|
5
|
-
import { scrollIntoAppView as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { r as
|
|
8
|
-
import { eventBus as
|
|
9
|
-
import { NotificationType as
|
|
10
|
-
import { QuestionTypeData as
|
|
11
|
-
import { Notification as
|
|
12
|
-
import { PredictionResult as
|
|
13
|
-
import { Onboarding as
|
|
14
|
-
import { HiddenContainer as
|
|
15
|
-
const
|
|
16
|
-
const [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
|
|
4
|
+
import { useAppContext as O } from "../useAppContext.js";
|
|
5
|
+
import { scrollIntoAppView as T } from "../../useSdkScroll.js";
|
|
6
|
+
import { useState as k, useMemo as D, useEffect as h, useRef as E, useCallback as w } from "react";
|
|
7
|
+
import { r as R } from "../../../index-B1QdimmR.js";
|
|
8
|
+
import { eventBus as q } from "@streamlayer/sdk-web-interfaces";
|
|
9
|
+
import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
|
|
10
|
+
import { QuestionTypeData as C } from "../../../ui/gamification/constants.js";
|
|
11
|
+
import { Notification as N } from "../../../ui/gamification/question/notification/index.js";
|
|
12
|
+
import { PredictionResult as x } from "../../../ui/gamification/question/notification/prediction-result/index.js";
|
|
13
|
+
import { Onboarding as P } from "./Onboarding/index.js";
|
|
14
|
+
import { HiddenContainer as z, Container as A, InnerContainer as B, NotificationRefreshing as S, Pill as v } from "./styles.js";
|
|
15
|
+
const H = (i) => {
|
|
16
|
+
const [e, d] = k(0), s = E(null), l = D(() => new ResizeObserver((o) => {
|
|
17
|
+
var c;
|
|
18
|
+
for (const r of o)
|
|
19
|
+
if (r.contentBoxSize) {
|
|
20
|
+
const t = (c = s.current) == null ? void 0 : c.getBoundingClientRect();
|
|
21
|
+
t && d(t.height);
|
|
22
|
+
}
|
|
23
|
+
}), []), n = w((o) => {
|
|
24
|
+
s.current = o;
|
|
25
|
+
}, []), f = w((o) => {
|
|
26
|
+
d(o);
|
|
26
27
|
}, []);
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
return h(() => {
|
|
29
|
+
const o = s.current;
|
|
30
|
+
return o ? (l.observe(o), () => {
|
|
31
|
+
l.unobserve(o);
|
|
32
|
+
}) : () => {
|
|
33
|
+
};
|
|
34
|
+
}, [i]), h(() => () => {
|
|
35
|
+
l.disconnect();
|
|
36
|
+
}), [n, e, f];
|
|
37
|
+
}, Q = ({
|
|
38
|
+
sdk: i,
|
|
39
|
+
notification: e,
|
|
40
|
+
appNode: d,
|
|
41
|
+
responsiveStore: s
|
|
33
42
|
}) => {
|
|
34
|
-
var
|
|
43
|
+
var r, t;
|
|
35
44
|
const {
|
|
36
|
-
sdkInDesktopView:
|
|
37
|
-
} = g(
|
|
45
|
+
sdkInDesktopView: l
|
|
46
|
+
} = g(s, {
|
|
38
47
|
keys: ["sdkInDesktopView"]
|
|
39
48
|
}), {
|
|
40
49
|
sdk: n
|
|
41
|
-
} =
|
|
42
|
-
return
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
-
ref:
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
...
|
|
50
|
+
} = O(), [f, o, c] = H(e.id);
|
|
51
|
+
return e.type === p.QUESTION ? /* @__PURE__ */ y(b, {
|
|
52
|
+
children: [/* @__PURE__ */ u(z, {
|
|
53
|
+
ref: f,
|
|
54
|
+
children: /* @__PURE__ */ u(N, {
|
|
55
|
+
...e
|
|
47
56
|
})
|
|
48
|
-
}), /* @__PURE__ */
|
|
57
|
+
}), /* @__PURE__ */ y(A, {
|
|
49
58
|
style: {
|
|
50
|
-
height:
|
|
59
|
+
height: e.hiding ? 0 : o
|
|
51
60
|
},
|
|
52
|
-
hiding:
|
|
53
|
-
children: [/* @__PURE__ */
|
|
61
|
+
hiding: e.hiding,
|
|
62
|
+
children: [/* @__PURE__ */ u(B, {
|
|
54
63
|
style: {
|
|
55
64
|
height: "100%"
|
|
56
65
|
},
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
...
|
|
66
|
+
children: /* @__PURE__ */ u(N, {
|
|
67
|
+
...e,
|
|
59
68
|
controlVideo: n == null ? void 0 : n.controlVideoPlayer
|
|
60
69
|
})
|
|
61
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ u(S, {}, e.id)]
|
|
62
71
|
})]
|
|
63
|
-
}) :
|
|
72
|
+
}) : e.type === p.QUESTION_RESOLVED && ((t = (r = e.data) == null ? void 0 : r.question) != null && t.predictionResult) ? /* @__PURE__ */ u(x, {
|
|
64
73
|
style: {
|
|
65
|
-
height:
|
|
74
|
+
height: e.hiding ? 0 : o
|
|
66
75
|
},
|
|
67
|
-
saveHeight:
|
|
68
|
-
close:
|
|
69
|
-
hiding:
|
|
70
|
-
...
|
|
71
|
-
}) :
|
|
76
|
+
saveHeight: c,
|
|
77
|
+
close: e.close,
|
|
78
|
+
hiding: e.hiding,
|
|
79
|
+
...e.data.question
|
|
80
|
+
}) : e.type === p.ONBOARDING ? /* @__PURE__ */ u(P, {
|
|
72
81
|
style: {
|
|
73
|
-
height:
|
|
82
|
+
height: e.hiding ? 0 : o
|
|
74
83
|
},
|
|
75
|
-
saveHeight:
|
|
76
|
-
sdk:
|
|
77
|
-
notification:
|
|
78
|
-
sdkInDesktopView:
|
|
79
|
-
appNode:
|
|
80
|
-
responsiveStore:
|
|
84
|
+
saveHeight: c,
|
|
85
|
+
sdk: i,
|
|
86
|
+
notification: e,
|
|
87
|
+
sdkInDesktopView: l,
|
|
88
|
+
appNode: d,
|
|
89
|
+
responsiveStore: s
|
|
81
90
|
}) : null;
|
|
82
|
-
},
|
|
83
|
-
pill:
|
|
84
|
-
setPill:
|
|
85
|
-
appNode:
|
|
86
|
-
headerNode:
|
|
87
|
-
scrollNode:
|
|
91
|
+
}, U = "p7vfi6t", j = ({
|
|
92
|
+
pill: i,
|
|
93
|
+
setPill: e,
|
|
94
|
+
appNode: d,
|
|
95
|
+
headerNode: s,
|
|
96
|
+
scrollNode: l,
|
|
88
97
|
responsiveStore: n,
|
|
89
|
-
scrollStore:
|
|
98
|
+
scrollStore: f
|
|
90
99
|
}) => {
|
|
91
|
-
var
|
|
100
|
+
var m, a;
|
|
92
101
|
const {
|
|
93
|
-
screen:
|
|
102
|
+
screen: o
|
|
94
103
|
} = g(n, {
|
|
95
104
|
keys: ["screen"]
|
|
96
105
|
}), {
|
|
97
|
-
tabsShown:
|
|
98
|
-
scrollPosition:
|
|
99
|
-
} = g(
|
|
106
|
+
tabsShown: c,
|
|
107
|
+
scrollPosition: r
|
|
108
|
+
} = g(f, {
|
|
100
109
|
keys: ["tabsShown", "scrollPosition"]
|
|
101
110
|
});
|
|
102
111
|
h(() => {
|
|
103
|
-
n.get().sdkInDesktopView ?
|
|
104
|
-
}, [
|
|
105
|
-
const
|
|
106
|
-
return !
|
|
107
|
-
title:
|
|
112
|
+
n.get().sdkInDesktopView ? r < 50 && e(null) : r > -50 && e(null);
|
|
113
|
+
}, [r, n, e]);
|
|
114
|
+
const t = n.get().sdkInDesktopView ? d : s;
|
|
115
|
+
return !i || !t.current ? null : R.createPortal(/* @__PURE__ */ u(v, {
|
|
116
|
+
title: i.type === p.QUESTION_RESOLVED ? "Prediction result" : `New ${((a = C[(m = i.data) == null ? void 0 : m.questionType]) == null ? void 0 : a.label) || "notification"}`,
|
|
108
117
|
onClick: () => {
|
|
109
118
|
var I;
|
|
110
|
-
n.get().sdkInDesktopView ? (I =
|
|
119
|
+
n.get().sdkInDesktopView ? (I = l.current) == null || I.scrollTo({
|
|
111
120
|
top: 0,
|
|
112
121
|
behavior: "smooth"
|
|
113
|
-
}) :
|
|
122
|
+
}) : T(d, o.size, {
|
|
114
123
|
behavior: "smooth"
|
|
115
|
-
}),
|
|
124
|
+
}), e(null);
|
|
116
125
|
},
|
|
117
|
-
className:
|
|
118
|
-
}),
|
|
119
|
-
},
|
|
120
|
-
sdk:
|
|
121
|
-
headerNode:
|
|
122
|
-
scrollNode:
|
|
123
|
-
responsiveStore:
|
|
124
|
-
appNode:
|
|
126
|
+
className: V(c && U, "sl-pill-button")
|
|
127
|
+
}), t.current);
|
|
128
|
+
}, oe = ({
|
|
129
|
+
sdk: i,
|
|
130
|
+
headerNode: e,
|
|
131
|
+
scrollNode: d,
|
|
132
|
+
responsiveStore: s,
|
|
133
|
+
appNode: l,
|
|
125
134
|
scrollStore: n
|
|
126
135
|
}) => {
|
|
127
|
-
const [
|
|
136
|
+
const [f] = k(i.getNotificationsStore()), o = g(f), [c, r] = k(null), t = D(() => i.getActiveNotification(), [i, o]);
|
|
128
137
|
return h(() => {
|
|
129
|
-
|
|
138
|
+
t && q.emit("notification", {
|
|
130
139
|
action: "rendered",
|
|
131
140
|
payload: {
|
|
132
|
-
questionId:
|
|
133
|
-
questionType:
|
|
141
|
+
questionId: t.data.questionId,
|
|
142
|
+
questionType: t.data.questionType
|
|
134
143
|
}
|
|
135
144
|
});
|
|
136
|
-
}, [
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
}, [t]), h(() => {
|
|
146
|
+
const {
|
|
147
|
+
sdkInDesktopView: m,
|
|
148
|
+
sdkInView: a
|
|
149
|
+
} = s.get();
|
|
150
|
+
t && (m || a) && (!m && a && r(t), m && window.requestAnimationFrame(() => {
|
|
151
|
+
n.get().scrollPosition !== 0 && r(t);
|
|
139
152
|
}));
|
|
140
|
-
}, [
|
|
141
|
-
|
|
142
|
-
}, [
|
|
143
|
-
children: [!
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
scrollNode: u,
|
|
153
|
+
}, [t]), h(() => {
|
|
154
|
+
t || r(null);
|
|
155
|
+
}, [t]), /* @__PURE__ */ y(b, {
|
|
156
|
+
children: [!c && t && /* @__PURE__ */ u(Q, {
|
|
157
|
+
appNode: l,
|
|
158
|
+
sdk: i,
|
|
159
|
+
notification: t,
|
|
160
|
+
responsiveStore: s
|
|
161
|
+
}), c && /* @__PURE__ */ u(j, {
|
|
162
|
+
pill: c,
|
|
163
|
+
setPill: r,
|
|
164
|
+
appNode: l,
|
|
165
|
+
notification: t,
|
|
166
|
+
headerNode: e,
|
|
167
|
+
scrollNode: d,
|
|
156
168
|
scrollStore: n,
|
|
157
|
-
responsiveStore:
|
|
169
|
+
responsiveStore: s
|
|
158
170
|
})]
|
|
159
171
|
});
|
|
160
172
|
};
|
|
161
173
|
export {
|
|
162
|
-
|
|
174
|
+
oe as SDKNotifications
|
|
163
175
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { useState as c, useEffect as
|
|
4
|
-
import { FeatureStatus as
|
|
5
|
-
import { FeatureType as
|
|
6
|
-
import { Points as
|
|
2
|
+
import { useStore as f } from "@nanostores/react";
|
|
3
|
+
import { useState as c, useEffect as l } from "react";
|
|
4
|
+
import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
+
import { FeatureType as p } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { Points as S } from "../../../ui/gamification/points/index.js";
|
|
7
7
|
const a = ({ gamification: e }) => {
|
|
8
|
-
const s = e.userSummary.$store, [r,
|
|
9
|
-
return
|
|
10
|
-
const
|
|
8
|
+
const s = e.userSummary.$store, [r, m] = c(0);
|
|
9
|
+
return l(() => {
|
|
10
|
+
const i = s.subscribe((t) => {
|
|
11
11
|
var o;
|
|
12
|
-
(o = t == null ? void 0 : t.summary) != null && o.points &&
|
|
12
|
+
(o = t == null ? void 0 : t.summary) != null && o.points && m(t.summary.points);
|
|
13
13
|
});
|
|
14
14
|
return () => {
|
|
15
|
-
|
|
15
|
+
i();
|
|
16
16
|
};
|
|
17
|
-
}, [s]), /* @__PURE__ */ n(
|
|
18
|
-
e.status.get() ===
|
|
17
|
+
}, [s]), /* @__PURE__ */ n(S, { points: r, onClick: () => {
|
|
18
|
+
e.status.get() === u.Suspended ? e.openFeature() : e.status.get() === u.Ready && e.closeFeature(!1);
|
|
19
19
|
} });
|
|
20
|
-
},
|
|
21
|
-
if (!
|
|
20
|
+
}, k = ({ sdk: e }) => {
|
|
21
|
+
if (!f(e.featuresList.getStore()))
|
|
22
22
|
return null;
|
|
23
|
-
const r = e.getFeature(
|
|
23
|
+
const r = e.getFeature(p.GAMES);
|
|
24
24
|
return r ? /* @__PURE__ */ n(a, { gamification: r }) : null;
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
k as StreamLayerSDKPoints
|
|
28
28
|
};
|
package/lib/app/app/index.d.ts
CHANGED
package/lib/app/app/index.js
CHANGED
|
@@ -1,100 +1,129 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { SDKContainer as
|
|
4
|
-
import { useSdkFeature as
|
|
5
|
-
import { useSdkResponsive as
|
|
1
|
+
import { jsx as s, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as N } from "@nanostores/react";
|
|
3
|
+
import { SDKContainer as h, SDKScrollContainer as v } from "./styles.js";
|
|
4
|
+
import { useSdkFeature as g } from "../useSdkFeature.js";
|
|
5
|
+
import { useSdkResponsive as A } from "../useSdkResponsive.js";
|
|
6
6
|
import { useSdkScroll as D } from "../useSdkScroll.js";
|
|
7
|
-
import { useAnalyticsListener as
|
|
8
|
-
import { useRef as
|
|
9
|
-
import { resetCss as
|
|
10
|
-
import { ActiveFeature as
|
|
11
|
-
import { SDKNavigation as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
import { useAnalyticsListener as c, newTabLinkListener as L, appScrollListener as x, appClickListener as C } from "../../hooks/analytics.js";
|
|
8
|
+
import { useRef as f, useMemo as F, useEffect as b } from "react";
|
|
9
|
+
import { resetCss as m } from "../../ui/theme/theme.js";
|
|
10
|
+
import { ActiveFeature as y, StandaloneFeature as K } from "./Features/index.js";
|
|
11
|
+
import { SDKNavigation as j } from "./Navigation/index.js";
|
|
12
|
+
import { SDKPillNode as R } from "./Navigation/SDKPillNode.js";
|
|
13
|
+
import { SDKNotifications as k } from "./Notifications/index.js";
|
|
14
|
+
import { useAppApp as w } from "./useApp.js";
|
|
15
|
+
import { AppContext as E } from "./useAppContext.js";
|
|
16
|
+
const P = ({
|
|
17
|
+
sdk: e,
|
|
18
|
+
className: l,
|
|
19
|
+
scrollStore: r,
|
|
20
|
+
appNode: i,
|
|
21
|
+
scrollNode: n,
|
|
22
|
+
responsiveStore: t
|
|
23
|
+
}) => {
|
|
24
|
+
const [, a] = g(e);
|
|
25
|
+
return /* @__PURE__ */ s(y, {
|
|
26
|
+
className: l,
|
|
27
|
+
scrollNode: n,
|
|
28
|
+
appNode: i,
|
|
29
|
+
scrollStore: r,
|
|
30
|
+
feature: a,
|
|
31
|
+
responsiveStore: t,
|
|
32
|
+
sdk: e
|
|
33
|
+
});
|
|
34
|
+
}, I = ({
|
|
35
|
+
sdk: e,
|
|
36
|
+
className: l,
|
|
37
|
+
appNode: r,
|
|
38
|
+
responsiveStore: i
|
|
39
|
+
}) => {
|
|
40
|
+
const n = N(e.featuresList.getStore());
|
|
41
|
+
return n ? Array.from(n, (t) => {
|
|
42
|
+
const a = e.getFeature(t);
|
|
43
|
+
return a ? /* @__PURE__ */ s(K, {
|
|
44
|
+
className: l,
|
|
45
|
+
appNode: r,
|
|
46
|
+
feature: a,
|
|
47
|
+
responsiveStore: i,
|
|
26
48
|
sdk: e
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}, V = ({ sdk: e, className: n, appNode: t, responsiveStore: a }) => {
|
|
30
|
-
const o = h(e.featuresList.getStore());
|
|
31
|
-
return o ? Array.from(o, (r) => {
|
|
32
|
-
const s = e.getFeature(r);
|
|
33
|
-
return s ? /* @__PURE__ */ i(
|
|
34
|
-
j,
|
|
35
|
-
{
|
|
36
|
-
className: n,
|
|
37
|
-
appNode: t,
|
|
38
|
-
feature: s,
|
|
39
|
-
responsiveStore: a,
|
|
40
|
-
sdk: e
|
|
41
|
-
},
|
|
42
|
-
r
|
|
43
|
-
) : null;
|
|
49
|
+
}, t) : null;
|
|
44
50
|
}) : null;
|
|
45
|
-
}, Z = ({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
}, Z = ({
|
|
52
|
+
sdk: e,
|
|
53
|
+
topNavigation: l
|
|
54
|
+
}) => {
|
|
55
|
+
const r = f(null), i = f(null), [n] = A(r), [t, a] = D(r, n), {
|
|
56
|
+
sdkReady: p,
|
|
57
|
+
isLogged: d
|
|
58
|
+
} = w(e), o = !!p;
|
|
59
|
+
c(r, {
|
|
60
|
+
enabled: o,
|
|
61
|
+
event: "click",
|
|
62
|
+
listener: L
|
|
63
|
+
}), c(t, {
|
|
64
|
+
enabled: o,
|
|
51
65
|
event: "scrollend",
|
|
52
|
-
listener:
|
|
66
|
+
listener: x,
|
|
53
67
|
useDomNode: !0
|
|
54
|
-
}),
|
|
55
|
-
enabled:
|
|
68
|
+
}), c(t, {
|
|
69
|
+
enabled: o,
|
|
56
70
|
event: "click",
|
|
57
|
-
listener:
|
|
71
|
+
listener: C,
|
|
58
72
|
useDomNode: !0
|
|
59
73
|
});
|
|
60
|
-
const
|
|
61
|
-
|
|
74
|
+
const S = F(() => ({
|
|
75
|
+
sdk: e
|
|
76
|
+
}), [e]);
|
|
77
|
+
return b(() => {
|
|
62
78
|
import("./Features/Gamification/gamification-feature.js");
|
|
63
|
-
}, []), /* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
}, []), /* @__PURE__ */ s(E.Provider, {
|
|
80
|
+
value: S,
|
|
81
|
+
children: /* @__PURE__ */ u(h, {
|
|
82
|
+
ref: r,
|
|
83
|
+
className: l ? "" : "c10llmat",
|
|
84
|
+
children: [o && l && /* @__PURE__ */ s(j, {
|
|
85
|
+
className: m,
|
|
86
|
+
sdk: e,
|
|
87
|
+
ref: i
|
|
88
|
+
}), o && !l && /* @__PURE__ */ s(R, {
|
|
89
|
+
className: m,
|
|
90
|
+
ref: i
|
|
91
|
+
}), /* @__PURE__ */ u(v, {
|
|
92
|
+
className: "sl-hide-on-modal",
|
|
93
|
+
ref: t,
|
|
94
|
+
"data-nav": l && o.toString(),
|
|
95
|
+
children: [o && /* @__PURE__ */ s(k, {
|
|
69
96
|
sdk: e,
|
|
70
|
-
scrollNode:
|
|
71
|
-
headerNode:
|
|
72
|
-
appNode:
|
|
73
|
-
scrollStore:
|
|
74
|
-
responsiveStore:
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
responsiveStore: o,
|
|
82
|
-
scrollNode: r,
|
|
83
|
-
appNode: t,
|
|
84
|
-
className: u,
|
|
97
|
+
scrollNode: t,
|
|
98
|
+
headerNode: i,
|
|
99
|
+
appNode: r,
|
|
100
|
+
scrollStore: a,
|
|
101
|
+
responsiveStore: n
|
|
102
|
+
}), o && /* @__PURE__ */ s(P, {
|
|
103
|
+
scrollStore: a,
|
|
104
|
+
responsiveStore: n,
|
|
105
|
+
scrollNode: t,
|
|
106
|
+
appNode: r,
|
|
107
|
+
className: m,
|
|
85
108
|
sdk: e
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
style: {
|
|
109
|
+
}), o && /* @__PURE__ */ s(I, {
|
|
110
|
+
responsiveStore: n,
|
|
111
|
+
appNode: r,
|
|
112
|
+
className: m,
|
|
113
|
+
sdk: e
|
|
114
|
+
})]
|
|
115
|
+
}), o && !d && /* @__PURE__ */ s("div", {
|
|
116
|
+
style: {
|
|
117
|
+
display: "flex",
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
justifyContent: "center",
|
|
120
|
+
width: "100%",
|
|
121
|
+
height: "100%"
|
|
122
|
+
},
|
|
94
123
|
children: "You are not logged in."
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
});
|
|
98
127
|
};
|
|
99
128
|
export {
|
|
100
129
|
Z as App
|
|
@@ -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
|
};
|