@streamlayer/react-ui 0.27.2 → 0.28.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.
Files changed (33) hide show
  1. package/lib/fedex-a8dcc7b2.js +4 -0
  2. package/lib/index.js +30 -29
  3. package/lib/ui/app/Features/FeatureProvider.js +14 -0
  4. package/lib/ui/app/Features/Gamification/Leaderboard.js +48 -0
  5. package/lib/ui/app/Features/Gamification/Question.js +102 -0
  6. package/lib/ui/app/Features/Gamification/QuestionsList.js +16 -0
  7. package/lib/ui/app/Features/Gamification/Tabs.js +47 -0
  8. package/lib/ui/app/Features/Gamification/UserSummary.js +17 -0
  9. package/lib/ui/app/Features/Gamification/index.js +67 -0
  10. package/lib/ui/app/Features/Highlights/Insight.js +31 -0
  11. package/lib/ui/app/Features/Highlights/Insights.js +16 -0
  12. package/lib/ui/app/Features/Highlights/index.js +33 -0
  13. package/lib/ui/app/Features/index.js +64 -0
  14. package/lib/ui/app/Navigation/index.js +31 -0
  15. package/lib/ui/app/Notifications/index.js +18 -0
  16. package/lib/ui/app/index.js +88 -0
  17. package/lib/ui/app/styles.js +8 -0
  18. package/lib/ui/app/useSdkFeature.js +24 -0
  19. package/lib/ui/demo/DemoPoints.js +14 -14
  20. package/lib/ui/demo/Gamification.js +3 -2
  21. package/lib/ui/demo/Highlights.js +3 -2
  22. package/lib/ui/demo/components/Question.js +50 -49
  23. package/lib/ui/demo/components/index.js +15 -14
  24. package/lib/ui/demo/index.js +3 -2
  25. package/lib/ui/navigation/index.js +13 -0
  26. package/lib/ui/navigation/styles.js +46 -0
  27. package/lib/utils/components/developer.js +30 -24
  28. package/lib/utils/components/envToggle.js +4 -4
  29. package/lib/utils/components/eventInput.js +10 -10
  30. package/lib/utils/components/sdkKey.js +10 -3
  31. package/lib/utils/createDemo.js +33 -20
  32. package/lib/utils/decorators/styles.js +3 -7
  33. package/package.json +6 -6
@@ -0,0 +1,4 @@
1
+ const M = "data:image/svg+xml;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S43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";
2
+ export {
3
+ M as i
4
+ };
package/lib/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { QuestionInApp as Vo } from "./ui/notifications/notification/question-inapp/index.js";
2
- import { Login as No } from "./ui/login/index.js";
3
- import { Onboarding as Uo } from "./ui/gamification/onboarding/index.js";
4
- import { ActivePages as ko, Navigation as qo } from "./ui/gamification/navigation/index.js";
5
- import { LeaderboardItemDetail as zo } from "./ui/gamification/leaderboard-item-detail/index.js";
6
- import { Question as Co } from "./ui/gamification/question/index.js";
7
- import { QuestionList as Fo } from "./ui/gamification/question-list/index.js";
8
- import { UserStatistics as Ho } from "./ui/gamification/user-statistics/index.js";
9
- import { Vote as Ko } from "./ui/gamification/vote/index.js";
10
- import { Demo as Ro } from "./ui/demo/index.js";
11
- import { Points as Xo } from "./ui/gamification/points/index.js";
12
- import { StreamLayerThemeProvider as Zo } from "./ui/theme/index.js";
13
- import { ThemeVariables as $o, theme as or, themeStr as rr } from "./ui/theme/theme.js";
1
+ import { QuestionInApp as yo } from "./ui/notifications/notification/question-inapp/index.js";
2
+ import { Login as Oo } from "./ui/login/index.js";
3
+ import { Onboarding as jo } from "./ui/gamification/onboarding/index.js";
4
+ import { ActivePages as qo, Navigation as wo } from "./ui/gamification/navigation/index.js";
5
+ import { LeaderboardItemDetail as Bo } from "./ui/gamification/leaderboard-item-detail/index.js";
6
+ import { Question as Eo } from "./ui/gamification/question/index.js";
7
+ import { QuestionList as Go } from "./ui/gamification/question-list/index.js";
8
+ import { UserStatistics as Jo } from "./ui/gamification/user-statistics/index.js";
9
+ import { Vote as Mo } from "./ui/gamification/vote/index.js";
10
+ import { Demo as Wo } from "./ui/demo/index.js";
11
+ import { Points as Yo } from "./ui/gamification/points/index.js";
12
+ import { StreamLayerThemeProvider as _o } from "./ui/theme/index.js";
13
+ import { ThemeVariables as or, theme as rr, themeStr as tr } from "./ui/theme/theme.js";
14
14
  import "react/jsx-runtime";
15
15
  import "react";
16
16
  import "./icon-exit-6a55bb8f.js";
@@ -69,6 +69,7 @@ import "./ui/gamification/vote/components/voting-header/index.js";
69
69
  import "./ui/gamification/vote/components/voting-header/styles.js";
70
70
  import "./ui/gamification/vote/components/voting-header/components/points/index.js";
71
71
  import "./ui/gamification/vote/components/voting-header/components/points/styles.js";
72
+ import "./fedex-a8dcc7b2.js";
72
73
  import "./ui/gamification/insight/styles.js";
73
74
  import "./ui/gamification/insight-list/styles.js";
74
75
  import "./ui/gamification/detailed-insight/styles.js";
@@ -91,20 +92,20 @@ import "./ui/gamification/points/styles.js";
91
92
  import "./ui/icons/index.js";
92
93
  import "@linaria/core";
93
94
  export {
94
- ko as ActivePages,
95
- Ro as Demo,
96
- zo as LeaderboardItemDetail,
97
- No as Login,
98
- qo as Navigation,
99
- Uo as Onboarding,
100
- Xo as Points,
101
- Co as Question,
102
- Vo as QuestionInApp,
103
- Fo as QuestionList,
104
- Zo as StreamLayerThemeProvider,
105
- $o as ThemeVariables,
106
- Ho as UserStatistics,
107
- Ko as Vote,
108
- or as theme,
109
- rr as themeStr
95
+ qo as ActivePages,
96
+ Wo as Demo,
97
+ Bo as LeaderboardItemDetail,
98
+ Oo as Login,
99
+ wo as Navigation,
100
+ jo as Onboarding,
101
+ Yo as Points,
102
+ Eo as Question,
103
+ yo as QuestionInApp,
104
+ Go as QuestionList,
105
+ _o as StreamLayerThemeProvider,
106
+ or as ThemeVariables,
107
+ Jo as UserStatistics,
108
+ Mo as Vote,
109
+ rr as theme,
110
+ tr as themeStr
110
111
  };
@@ -0,0 +1,14 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
3
+ import { useStore as e } from "@nanostores/react";
4
+ const c = ({
5
+ feature: i,
6
+ sdk: o,
7
+ children: n
8
+ }) => {
9
+ const d = e(i.status), { slStreamId: r } = e(o.sdkStore);
10
+ return r != null && r.loading ? /* @__PURE__ */ t("div", { children: "event is loading..." }) : r != null && r.data ? d !== u.Ready ? /* @__PURE__ */ t("div", { children: "wait feature..." }) : n : /* @__PURE__ */ t("div", { children: "event is forbidden..." });
11
+ };
12
+ export {
13
+ c as FeatureProvider
14
+ };
@@ -0,0 +1,48 @@
1
+ import { jsx as e, jsxs as c, Fragment as l } from "react/jsx-runtime";
2
+ import { useStore as u } from "@nanostores/react";
3
+ import { useState as b } from "react";
4
+ import { LeaderboardItemDetail as f } from "../../../gamification/leaderboard-item-detail/index.js";
5
+ import { LeaderboardList as I } from "../../../gamification/leaderboard-list/index.js";
6
+ import "../../../gamification/common-header/index.js";
7
+ import "../../../../icon-exit-6a55bb8f.js";
8
+ import "../../../gamification/common-header/styles.js";
9
+ import "@linaria/react";
10
+ import "../../../gamification/user-statistics/index.js";
11
+ import "../../../../utils/common.js";
12
+ import "../../../gamification/user-statistics/components/statistics/index.js";
13
+ import "../../../gamification/user-statistics/components/statistics/styles.js";
14
+ import "../../../gamification/user-statistics/components/rank/index.js";
15
+ import "../../../gamification/user-statistics/components/rank/styles.js";
16
+ import "../../../gamification/user-statistics/styles.js";
17
+ import "../../../gamification/leaderboard-item-detail/styles.js";
18
+ import "../../../gamification/leaderboard-invite-link/index.js";
19
+ import "../../../gamification/leaderboard-invite-link/styles.js";
20
+ import "../../../gamification/leaderboard-item/index.js";
21
+ import "../../../gamification/leaderboard-item/styles.js";
22
+ import "../../../gamification/leaderboard-list/styles.js";
23
+ const M = ({ store: p }) => {
24
+ const { data: r } = u(p), [i, s] = b(void 0);
25
+ if (!r)
26
+ return /* @__PURE__ */ e("div", { children: "wait leader board..." });
27
+ const o = (t) => {
28
+ var m;
29
+ const d = (m = r.find((n) => {
30
+ var a;
31
+ return ((a = n.attributes) == null ? void 0 : a.userId) === t;
32
+ })) == null ? void 0 : m.attributes;
33
+ s(d);
34
+ };
35
+ return /* @__PURE__ */ c(l, { children: [
36
+ i && /* @__PURE__ */ e(f, { comeBack: () => o(null), ...i }),
37
+ !i && /* @__PURE__ */ e(
38
+ I,
39
+ {
40
+ items: r.filter((t) => t.attributes).map((t) => t.attributes),
41
+ openItemDetail: o
42
+ }
43
+ )
44
+ ] });
45
+ };
46
+ export {
47
+ M as Leaderboard
48
+ };
@@ -0,0 +1,102 @@
1
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
+ import { styled as y } from "@linaria/react";
3
+ import { useState as d, useCallback as x, useMemo as c } from "react";
4
+ import { Vote as g } from "../../../gamification/vote/index.js";
5
+ import { VotingHeader as h } from "../../../gamification/vote/components/voting-header/index.js";
6
+ import { i as b } from "../../../../fedex-a8dcc7b2.js";
7
+ import "@streamlayer/sdk-web-types";
8
+ import "../../../../index-7045fbb2.js";
9
+ import "../../../gamification/vote/components/voting-option/styles.js";
10
+ import "../../../gamification/vote/styles.js";
11
+ import "../../../../icon-exit-6a55bb8f.js";
12
+ import "../../../gamification/vote/components/voting-header/components/timer/index.js";
13
+ import "react-countdown-circle-timer";
14
+ import "../../../theme/constants.js";
15
+ import "../../../gamification/vote/components/voting-header/components/timer/styles.js";
16
+ import "../../../gamification/vote/components/voting-header/styles.js";
17
+ import "../../../gamification/vote/components/voting-header/components/points/index.js";
18
+ import "../../../gamification/vote/components/voting-header/components/points/styles.js";
19
+ const k = y.div`
20
+ position: absolute;
21
+ top: 0;
22
+ background: var(--color-transparent-item);
23
+ width: 100%;
24
+ height: 100%;
25
+
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: flex-start;
29
+ flex-direction: column;
30
+
31
+ > div {
32
+ width: 100%;
33
+ background: #000;
34
+ animation: slide-in 0.3s ease-in;
35
+ }
36
+
37
+ @keyframes slide-in {
38
+ from {
39
+ transform: translateX(-100%);
40
+ }
41
+
42
+ to {
43
+ transform: translateX(0);
44
+ }
45
+ }
46
+ `, F = ({ openedQuestion: t, closeQuestion: a, vote: e }) => {
47
+ var s;
48
+ const [l, m] = d(!1), p = x(
49
+ (i) => {
50
+ m(i);
51
+ },
52
+ [m]
53
+ ), r = c(
54
+ () => t == null ? void 0 : t.answers.find((i) => i.youVoted === !0),
55
+ [t]
56
+ ), f = c(
57
+ () => !!(t != null && t.answers.find((i) => i.correct === !0)),
58
+ [t]
59
+ );
60
+ return t ? /* @__PURE__ */ o(k, { children: /* @__PURE__ */ n("div", { children: [
61
+ /* @__PURE__ */ o(
62
+ h,
63
+ {
64
+ points: (r == null ? void 0 : r.points) || 0,
65
+ questionAnswered: !!r,
66
+ questionAnsweredCorrectly: r == null ? void 0 : r.correct,
67
+ logo: b,
68
+ closeQuestion: a,
69
+ setTimeToExpire: p,
70
+ questionType: t.type
71
+ }
72
+ ),
73
+ /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
74
+ g,
75
+ {
76
+ title: t.subject,
77
+ feedbackMessages: (s = t.options) == null ? void 0 : s.options.value,
78
+ questionType: t.type,
79
+ questionId: t.id,
80
+ questionAnswered: !!r,
81
+ questionAnsweredCorrectly: r == null ? void 0 : r.correct,
82
+ options: t.answers.map((i) => ({
83
+ id: i.id,
84
+ title: i.text,
85
+ icon: i.icon,
86
+ type: t.type,
87
+ correct: i.correct,
88
+ percentage: i.percentage,
89
+ answered: i.youVoted,
90
+ disabled: !!r || t.marketClosed || l,
91
+ questionAnswered: !!r,
92
+ hasCorrectAnswer: f,
93
+ points: i.points,
94
+ onVote: e
95
+ }))
96
+ }
97
+ ) })
98
+ ] }) }) : null;
99
+ };
100
+ export {
101
+ F as Question
102
+ };
@@ -0,0 +1,16 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useStore as m } from "@nanostores/react";
3
+ import { QuestionList as s } from "../../../gamification/question-list/index.js";
4
+ import "../../../gamification/question/index.js";
5
+ import "@streamlayer/sdk-web-types";
6
+ import "../../../../icon-chevron-138a557c.js";
7
+ import "../../../gamification/question/styles.js";
8
+ import "@linaria/react";
9
+ import "../../../gamification/question-list/styles.js";
10
+ const L = ({ store: r, openQuestion: i }) => {
11
+ const t = m(r);
12
+ return t != null && t.data ? /* @__PURE__ */ o(s, { openQuestion: i, questions: t.data }) : /* @__PURE__ */ o("div", { children: "wait questions..." });
13
+ };
14
+ export {
15
+ L as QuestionsList
16
+ };
@@ -0,0 +1,47 @@
1
+ import { jsxs as e, Fragment as i, jsx as t } from "react/jsx-runtime";
2
+ import { useState as s } from "react";
3
+ import { ActivePages as m, Navigation as a } from "../../../gamification/navigation/index.js";
4
+ import { UserSummary as n } from "./UserSummary.js";
5
+ import { QuestionsList as u } from "./QuestionsList.js";
6
+ import { Leaderboard as g } from "./Leaderboard.js";
7
+ import "../../../gamification/navigation/styles.js";
8
+ import "@linaria/react";
9
+ import "@nanostores/react";
10
+ import "../../../gamification/user-statistics/index.js";
11
+ import "../../../../utils/common.js";
12
+ import "../../../gamification/user-statistics/components/statistics/index.js";
13
+ import "../../../gamification/user-statistics/components/statistics/styles.js";
14
+ import "../../../gamification/user-statistics/components/rank/index.js";
15
+ import "../../../gamification/user-statistics/components/rank/styles.js";
16
+ import "../../../gamification/user-statistics/styles.js";
17
+ import "../../../gamification/question-list/index.js";
18
+ import "../../../gamification/question/index.js";
19
+ import "@streamlayer/sdk-web-types";
20
+ import "../../../../icon-chevron-138a557c.js";
21
+ import "../../../gamification/question/styles.js";
22
+ import "../../../gamification/question-list/styles.js";
23
+ import "../../../gamification/leaderboard-item-detail/index.js";
24
+ import "../../../gamification/common-header/index.js";
25
+ import "../../../../icon-exit-6a55bb8f.js";
26
+ import "../../../gamification/common-header/styles.js";
27
+ import "../../../gamification/leaderboard-item-detail/styles.js";
28
+ import "../../../gamification/leaderboard-list/index.js";
29
+ import "../../../gamification/leaderboard-invite-link/index.js";
30
+ import "../../../gamification/leaderboard-invite-link/styles.js";
31
+ import "../../../gamification/leaderboard-item/index.js";
32
+ import "../../../gamification/leaderboard-item/styles.js";
33
+ import "../../../gamification/leaderboard-list/styles.js";
34
+ const J = ({ gamification: r }) => {
35
+ const [o, p] = s(m.HOME);
36
+ return /* @__PURE__ */ e(i, { children: [
37
+ /* @__PURE__ */ t(a, { activePage: o, toggleActivePage: p }),
38
+ o === m.HOME && /* @__PURE__ */ e(i, { children: [
39
+ /* @__PURE__ */ t(n, { store: r.userSummary.getStore() }),
40
+ /* @__PURE__ */ t(u, { openQuestion: r.openQuestion, store: r.questions.getStore() })
41
+ ] }),
42
+ o === m.LEADERBOARD && /* @__PURE__ */ t(g, { store: r.leaderboardList.getStore() })
43
+ ] });
44
+ };
45
+ export {
46
+ J as Tabs
47
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useStore as o } from "@nanostores/react";
3
+ import { UserStatistics as i } from "../../../gamification/user-statistics/index.js";
4
+ import "../../../../utils/common.js";
5
+ import "../../../gamification/user-statistics/components/statistics/index.js";
6
+ import "../../../gamification/user-statistics/components/statistics/styles.js";
7
+ import "@linaria/react";
8
+ import "../../../gamification/user-statistics/components/rank/index.js";
9
+ import "../../../gamification/user-statistics/components/rank/styles.js";
10
+ import "../../../gamification/user-statistics/styles.js";
11
+ const S = ({ store: m }) => {
12
+ const { data: r } = o(m);
13
+ return r != null && r.summary ? /* @__PURE__ */ t(i, { ...r.summary, ...r.percentage }) : /* @__PURE__ */ t("div", { children: "wait user..." });
14
+ };
15
+ export {
16
+ S as UserSummary
17
+ };
@@ -0,0 +1,67 @@
1
+ import { jsxs as m, Fragment as p, jsx as t } from "react/jsx-runtime";
2
+ import { useStore as i } from "@nanostores/react";
3
+ import { Tabs as e } from "./Tabs.js";
4
+ import { Question as s } from "./Question.js";
5
+ import "react";
6
+ import "../../../gamification/navigation/index.js";
7
+ import "../../../gamification/navigation/styles.js";
8
+ import "@linaria/react";
9
+ import "./UserSummary.js";
10
+ import "../../../gamification/user-statistics/index.js";
11
+ import "../../../../utils/common.js";
12
+ import "../../../gamification/user-statistics/components/statistics/index.js";
13
+ import "../../../gamification/user-statistics/components/statistics/styles.js";
14
+ import "../../../gamification/user-statistics/components/rank/index.js";
15
+ import "../../../gamification/user-statistics/components/rank/styles.js";
16
+ import "../../../gamification/user-statistics/styles.js";
17
+ import "./QuestionsList.js";
18
+ import "../../../gamification/question-list/index.js";
19
+ import "../../../gamification/question/index.js";
20
+ import "@streamlayer/sdk-web-types";
21
+ import "../../../../icon-chevron-138a557c.js";
22
+ import "../../../gamification/question/styles.js";
23
+ import "../../../gamification/question-list/styles.js";
24
+ import "./Leaderboard.js";
25
+ import "../../../gamification/leaderboard-item-detail/index.js";
26
+ import "../../../gamification/common-header/index.js";
27
+ import "../../../../icon-exit-6a55bb8f.js";
28
+ import "../../../gamification/common-header/styles.js";
29
+ import "../../../gamification/leaderboard-item-detail/styles.js";
30
+ import "../../../gamification/leaderboard-list/index.js";
31
+ import "../../../gamification/leaderboard-invite-link/index.js";
32
+ import "../../../gamification/leaderboard-invite-link/styles.js";
33
+ import "../../../gamification/leaderboard-item/index.js";
34
+ import "../../../gamification/leaderboard-item/styles.js";
35
+ import "../../../gamification/leaderboard-list/styles.js";
36
+ import "../../../gamification/vote/index.js";
37
+ import "../../../../index-7045fbb2.js";
38
+ import "../../../gamification/vote/components/voting-option/styles.js";
39
+ import "../../../gamification/vote/styles.js";
40
+ import "../../../gamification/vote/components/voting-header/index.js";
41
+ import "../../../gamification/vote/components/voting-header/components/timer/index.js";
42
+ import "react-countdown-circle-timer";
43
+ import "../../../theme/constants.js";
44
+ import "../../../gamification/vote/components/voting-header/components/timer/styles.js";
45
+ import "../../../gamification/vote/components/voting-header/styles.js";
46
+ import "../../../gamification/vote/components/voting-header/components/points/index.js";
47
+ import "../../../gamification/vote/components/voting-header/components/points/styles.js";
48
+ import "../../../../fedex-a8dcc7b2.js";
49
+ const to = ({
50
+ gamification: o
51
+ }) => {
52
+ const r = i(o.openedQuestion);
53
+ return /* @__PURE__ */ m(p, { children: [
54
+ r && /* @__PURE__ */ t(
55
+ s,
56
+ {
57
+ closeQuestion: o.closeQuestion,
58
+ vote: o.submitAnswer,
59
+ openedQuestion: r
60
+ }
61
+ ),
62
+ !r && /* @__PURE__ */ t(e, { gamification: o })
63
+ ] });
64
+ };
65
+ export {
66
+ to as GamificationOverlay
67
+ };
@@ -0,0 +1,31 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { DetailedInsight as L } from "../../../gamification/detailed-insight/index.js";
3
+ import "../../../gamification/common-header/index.js";
4
+ import "../../../../icon-exit-6a55bb8f.js";
5
+ import "../../../gamification/common-header/styles.js";
6
+ import "@linaria/react";
7
+ import "../../../gamification/detailed-insight/styles.js";
8
+ const j = ({ openedInsight: o, closeHighlights: r, closeInsight: s }) => {
9
+ var t, a, b, n, e;
10
+ const i = ((t = o.options) == null ? void 0 : t.options.case) === "factoid" ? {
11
+ image: o.options.options.value.image,
12
+ body: o.options.options.value.body,
13
+ webLink: (a = o.options.options.value.webLink) == null ? void 0 : a.url,
14
+ webLinkLabel: (b = o.options.options.value.webLink) == null ? void 0 : b.label
15
+ } : {}, l = o.subject || ((n = o.notification) == null ? void 0 : n.title), m = i.body || ((e = o.notification) == null ? void 0 : e.body);
16
+ return /* @__PURE__ */ p(
17
+ L,
18
+ {
19
+ image: i.image,
20
+ title: l,
21
+ description: m,
22
+ webLink: i.webLink,
23
+ webLinkLabel: i.webLinkLabel,
24
+ closeInsight: s,
25
+ closeHighlights: r
26
+ }
27
+ );
28
+ };
29
+ export {
30
+ j as Insight
31
+ };
@@ -0,0 +1,16 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { useStore as s } from "@nanostores/react";
3
+ import { InsightList as m } from "../../../gamification/insight-list/index.js";
4
+ import "../../../gamification/insight/index.js";
5
+ import "@streamlayer/sdk-web-types";
6
+ import "../../../../icon-chevron-138a557c.js";
7
+ import "../../../gamification/insight/styles.js";
8
+ import "@linaria/react";
9
+ import "../../../gamification/insight-list/styles.js";
10
+ const u = ({ highlights: r, store: o }) => {
11
+ const { data: t } = s(o);
12
+ return t ? /* @__PURE__ */ i(m, { insights: t, openInsight: r.openHighlight }) : /* @__PURE__ */ i("div", { children: "wait insights..." });
13
+ };
14
+ export {
15
+ u as Insights
16
+ };
@@ -0,0 +1,33 @@
1
+ import { jsxs as i, Fragment as m, jsx as r } from "react/jsx-runtime";
2
+ import { useStore as e } from "@nanostores/react";
3
+ import { Insight as p } from "../../../demo/components/Insight.js";
4
+ import { Insights as s } from "../../../demo/components/Insights.js";
5
+ import "../../../gamification/detailed-insight/index.js";
6
+ import "../../../gamification/common-header/index.js";
7
+ import "../../../../icon-exit-6a55bb8f.js";
8
+ import "../../../gamification/common-header/styles.js";
9
+ import "@linaria/react";
10
+ import "../../../gamification/detailed-insight/styles.js";
11
+ import "../../../gamification/insight-list/index.js";
12
+ import "../../../gamification/insight/index.js";
13
+ import "@streamlayer/sdk-web-types";
14
+ import "../../../../icon-chevron-138a557c.js";
15
+ import "../../../gamification/insight/styles.js";
16
+ import "../../../gamification/insight-list/styles.js";
17
+ const O = ({ highlights: o }) => {
18
+ const t = e(o.openedInsight);
19
+ return /* @__PURE__ */ i(m, { children: [
20
+ !t && o.insights && /* @__PURE__ */ r(s, { highlights: o, store: o.insights.getStore() }),
21
+ t && /* @__PURE__ */ r(
22
+ p,
23
+ {
24
+ openedInsight: t,
25
+ closeHighlights: o.closeFeature,
26
+ closeInsight: o.closeHighlight
27
+ }
28
+ )
29
+ ] });
30
+ };
31
+ export {
32
+ O as HighlightsOverlay
33
+ };
@@ -0,0 +1,64 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { FeatureType as o } from "@streamlayer/sdk-web-types";
3
+ import { useMemo as p } from "react";
4
+ import { GamificationOverlay as e } from "./Gamification/index.js";
5
+ import { HighlightsOverlay as n } from "./Highlights/index.js";
6
+ import { FeatureProvider as m } from "./FeatureProvider.js";
7
+ import "@nanostores/react";
8
+ import "./Gamification/Tabs.js";
9
+ import "../../gamification/navigation/index.js";
10
+ import "../../gamification/navigation/styles.js";
11
+ import "@linaria/react";
12
+ import "./Gamification/UserSummary.js";
13
+ import "../../gamification/user-statistics/index.js";
14
+ import "../../../utils/common.js";
15
+ import "../../gamification/user-statistics/components/statistics/index.js";
16
+ import "../../gamification/user-statistics/components/statistics/styles.js";
17
+ import "../../gamification/user-statistics/components/rank/index.js";
18
+ import "../../gamification/user-statistics/components/rank/styles.js";
19
+ import "../../gamification/user-statistics/styles.js";
20
+ import "./Gamification/QuestionsList.js";
21
+ import "../../gamification/question-list/index.js";
22
+ import "../../gamification/question/index.js";
23
+ import "../../../icon-chevron-138a557c.js";
24
+ import "../../gamification/question/styles.js";
25
+ import "../../gamification/question-list/styles.js";
26
+ import "./Gamification/Leaderboard.js";
27
+ import "../../gamification/leaderboard-item-detail/index.js";
28
+ import "../../gamification/common-header/index.js";
29
+ import "../../../icon-exit-6a55bb8f.js";
30
+ import "../../gamification/common-header/styles.js";
31
+ import "../../gamification/leaderboard-item-detail/styles.js";
32
+ import "../../gamification/leaderboard-list/index.js";
33
+ import "../../gamification/leaderboard-invite-link/index.js";
34
+ import "../../gamification/leaderboard-invite-link/styles.js";
35
+ import "../../gamification/leaderboard-item/index.js";
36
+ import "../../gamification/leaderboard-item/styles.js";
37
+ import "../../gamification/leaderboard-list/styles.js";
38
+ import "./Gamification/Question.js";
39
+ import "../../gamification/vote/index.js";
40
+ import "../../../index-7045fbb2.js";
41
+ import "../../gamification/vote/components/voting-option/styles.js";
42
+ import "../../gamification/vote/styles.js";
43
+ import "../../gamification/vote/components/voting-header/index.js";
44
+ import "../../gamification/vote/components/voting-header/components/timer/index.js";
45
+ import "react-countdown-circle-timer";
46
+ import "../../theme/constants.js";
47
+ import "../../gamification/vote/components/voting-header/components/timer/styles.js";
48
+ import "../../gamification/vote/components/voting-header/styles.js";
49
+ import "../../gamification/vote/components/voting-header/components/points/index.js";
50
+ import "../../gamification/vote/components/voting-header/components/points/styles.js";
51
+ import "../../../fedex-a8dcc7b2.js";
52
+ import "../../demo/components/Insight.js";
53
+ import "../../gamification/detailed-insight/index.js";
54
+ import "../../gamification/detailed-insight/styles.js";
55
+ import "../../demo/components/Insights.js";
56
+ import "../../gamification/insight-list/index.js";
57
+ import "../../gamification/insight/index.js";
58
+ import "../../gamification/insight/styles.js";
59
+ import "../../gamification/insight-list/styles.js";
60
+ import "@streamlayer/sdk-web-interfaces";
61
+ const yr = ({ sdk: i, feature: r }) => p(() => r ? r.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ t(m, { sdk: i, feature: r, children: /* @__PURE__ */ t(e, { gamification: r, sdk: i }) }) : r.featureConfig.get().type === o.HIGHLIGHTS ? /* @__PURE__ */ t(m, { sdk: i, feature: r, children: /* @__PURE__ */ t(n, { highlights: r, sdk: i }) }) : null : null, [i, r]);
62
+ export {
63
+ yr as ActiveFeature
64
+ };
@@ -0,0 +1,31 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { AvailableFeatures as e } from "@streamlayer/sdk-web-features";
3
+ import { useMemo as a } from "react";
4
+ import { useStore as b } from "@nanostores/react";
5
+ import { Navigation as v } from "../../navigation/index.js";
6
+ import "../../navigation/styles.js";
7
+ import "@linaria/react";
8
+ const N = ({ customOverlays: t, activeButton: s, sdk: p }) => {
9
+ const { streamSettings: i, organizationSettings: r } = b(p.sdkStore), n = a(() => {
10
+ const o = (i == null ? void 0 : i.data) || (r == null ? void 0 : r.data);
11
+ return o != null && o.overlays ? o.overlays : [];
12
+ }, [r, i]), l = a(
13
+ () => [
14
+ ...n.filter(({ enableSdkButton: o }) => o).map((o) => ({
15
+ id: o.type,
16
+ onClick: () => p.openFeature(o.type),
17
+ disabled: !(o.type in e),
18
+ label: o.name,
19
+ icon: o.icon,
20
+ /** multiplied by 10 to add the ability to insert custom buttons between our buttons */
21
+ position: o.position * 10
22
+ })),
23
+ ...Object.values(t).map(({ button: o }) => o)
24
+ ].sort((o, m) => o.position - m.position),
25
+ [n, p, t]
26
+ );
27
+ return /* @__PURE__ */ c(v, { buttons: l, activeButton: s });
28
+ };
29
+ export {
30
+ N as SDKNavigation
31
+ };
@@ -0,0 +1,18 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Notifications as i } from "../../notifications/index.js";
3
+ import "@nanostores/react";
4
+ import "../../notifications/notification/index.js";
5
+ import "@streamlayer/sdk-web-notifications";
6
+ import "react";
7
+ import "../../notifications/notification/onboarding-inapp/index.js";
8
+ import "../../notifications/notification/onboarding-inapp/styles.js";
9
+ import "@linaria/react";
10
+ import "../../notifications/notification/question-inapp/index.js";
11
+ import "../../../icon-exit-6a55bb8f.js";
12
+ import "../../notifications/notification/question-inapp/styles.js";
13
+ import "../../notifications/notification/styles.js";
14
+ import "../../notifications/styles.js";
15
+ const u = ({ sdk: o }) => /* @__PURE__ */ t(i, { notificationsStore: o.getNotificationsStore() });
16
+ export {
17
+ u as SDKNotifications
18
+ };