@streamlayer/react-ui 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/app/Features/Gamification/Tabs.js +13 -13
- package/lib/app/app/Features/Gamification/index.js +66 -62
- package/lib/app/app/Navigation/index.d.ts +4 -0
- package/lib/app/app/Navigation/index.js +88 -48
- package/lib/app/app/index.js +82 -79
- package/lib/app/app/story/index.js +27 -24
- package/lib/app/app/useApp.d.ts +2 -0
- package/lib/app/app/useApp.js +8 -7
- package/lib/app/app/useAppContext.d.ts +2 -0
- package/lib/app/app/useAppContext.js +6 -5
- package/lib/assets/style.css +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/index.d.ts +5 -3
- package/lib/ui/navigation/index.js +11 -12
- package/lib/ui/navigation/masters.js +1 -1
- package/lib/ui/navigation/styles.d.ts +5 -0
- package/lib/ui/navigation/styles.js +16 -0
- package/lib/ui/theme/theme.js +8 -10
- package/package.json +14 -14
- package/lib/app/app/Navigation/SDKPillNode.d.ts +0 -1
- package/lib/app/app/Navigation/SDKPillNode.js +0 -9
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { TabsContainer as D, TabsNavContainer as
|
|
1
|
+
import { jsxs as u, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { cx as T } from "@linaria/core";
|
|
3
|
+
import { useStore as h } from "@nanostores/react";
|
|
4
|
+
import { TabsContainer as D, TabsNavContainer as C, SDKWhiteContainer as S, UserSummaryContainer as v, SDKContentContainer as A, LeaderboardContainer as I } from "../../styles.js";
|
|
5
5
|
import { scrollIntoAppView as L } from "../../../useSdkScroll.js";
|
|
6
6
|
import { useState as P, useTransition as V, useEffect as E } from "react";
|
|
7
7
|
import { ActivePages as a, Tabs as K } from "../../../../ui/gamification/tabs/index.js";
|
|
8
8
|
import { Leaderboard as F } from "./Leaderboard.js";
|
|
9
9
|
import { QuestionsList as O } from "./QuestionsList.js";
|
|
10
10
|
import { UserSummary as Q } from "./UserSummary.js";
|
|
11
|
-
const G = ({ gamification: r, className:
|
|
12
|
-
const { tabsShown:
|
|
11
|
+
const G = ({ gamification: r, className: l, scrollStore: t, scrollNode: b, appNode: m, style: f, responsiveStore: n }) => {
|
|
12
|
+
const { tabsShown: c } = h(t, { keys: ["tabsShown"] }), [i, w] = P(a.HOME), [, y] = V(), { sdkInDesktopView: d, screen: g } = h(n, { keys: ["sdkInDesktopView"] }), k = (s) => {
|
|
13
13
|
y(() => {
|
|
14
|
-
var
|
|
15
|
-
w(s), d === !1 && (((
|
|
14
|
+
var p;
|
|
15
|
+
w(s), d === !1 && (((p = m.current) == null ? void 0 : p.getBoundingClientRect().y) || 0) < 0 && L(m, g.size, { behavior: "instant" });
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
E(() => t.subscribe((s) => {
|
|
@@ -23,9 +23,9 @@ const G = ({ gamification: r, className: u, scrollStore: t, scrollNode: l, appNo
|
|
|
23
23
|
n.get().sdkInDesktopView ? t.setKey("tabsShown", s.scrollDirection === "backward") : t.setKey("tabsShown", s.scrollDirection === "forward");
|
|
24
24
|
}), [t, n]);
|
|
25
25
|
let o = "0px";
|
|
26
|
-
return d ? o =
|
|
26
|
+
return d ? o = c ? "0px" : "calc(0px - var(--header-height))" : o = c ? "var(--header-height)" : "0px", /* @__PURE__ */ u(D, { className: T(l, "SL-Tabs"), style: f, children: [
|
|
27
27
|
/* @__PURE__ */ e(
|
|
28
|
-
|
|
28
|
+
C,
|
|
29
29
|
{
|
|
30
30
|
style: {
|
|
31
31
|
top: o
|
|
@@ -33,11 +33,11 @@ const G = ({ gamification: r, className: u, scrollStore: t, scrollNode: l, appNo
|
|
|
33
33
|
children: /* @__PURE__ */ e(K, { activePage: i, toggleActivePage: k })
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
i === a.HOME && /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ e(
|
|
36
|
+
i === a.HOME && /* @__PURE__ */ u(x, { children: [
|
|
37
|
+
/* @__PURE__ */ e(S, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(Q, { userSummary: r.userSummary }) }) }),
|
|
38
38
|
/* @__PURE__ */ e(A, { style: { flex: 1 }, children: /* @__PURE__ */ e(O, { openQuestion: r.openQuestion, store: r.feedList.getStore() }) })
|
|
39
39
|
] }),
|
|
40
|
-
i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(F, { scrollStore: t, scrollNode:
|
|
40
|
+
i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(F, { scrollStore: t, scrollNode: b, gamification: r }) })
|
|
41
41
|
] });
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
@@ -1,88 +1,92 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { jsx as o, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { cx as l } from "@linaria/core";
|
|
3
|
+
import { styled as f } from "@linaria/react";
|
|
4
|
+
import { useStore as c } from "@nanostores/react";
|
|
5
|
+
import { SDKWhiteContainer as k } from "../../styles.js";
|
|
6
|
+
import { useAppContext as v } from "../../useAppContext.js";
|
|
7
|
+
import { useHideTransition as S } from "../../../../hooks/showIn.js";
|
|
8
|
+
import { VoteHeader as U } from "../../../../ui/gamification/detail/header/index.js";
|
|
9
|
+
import { UserStatistics as I } from "../../../../ui/gamification/user-statistics/index.js";
|
|
10
|
+
import { ModalPortal as y } from "../../../../ui/modal/index.js";
|
|
11
|
+
import { ShowIn as A } from "../../../../ui/show-in/index.js";
|
|
12
|
+
import { Question as O } from "./Question.js";
|
|
13
|
+
import { Tabs as b } from "./Tabs.js";
|
|
14
|
+
const w = () => A, u = /* @__PURE__ */ f(w())({
|
|
13
15
|
name: "OpenedContainer",
|
|
14
16
|
class: "ouvguos",
|
|
15
17
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
18
|
+
}), d = "t1eu4lbg", D = /* @__PURE__ */ f("div")({
|
|
17
19
|
name: "UserContainer",
|
|
18
|
-
class: "
|
|
20
|
+
class: "uuv2xqo",
|
|
19
21
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
22
|
+
}), H = ({
|
|
21
23
|
correct: e,
|
|
22
|
-
incorrect:
|
|
24
|
+
incorrect: t
|
|
23
25
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
},
|
|
26
|
+
const n = e + t;
|
|
27
|
+
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
28
|
+
}, P = ({
|
|
27
29
|
gamification: e,
|
|
28
|
-
scrollStore:
|
|
29
|
-
className:
|
|
30
|
-
appNode:
|
|
31
|
-
scrollNode:
|
|
32
|
-
responsiveStore:
|
|
33
|
-
}) => /* @__PURE__ */
|
|
34
|
-
appNode:
|
|
35
|
-
scrollStore:
|
|
36
|
-
scrollNode:
|
|
37
|
-
className:
|
|
30
|
+
scrollStore: t,
|
|
31
|
+
className: n,
|
|
32
|
+
appNode: a,
|
|
33
|
+
scrollNode: r,
|
|
34
|
+
responsiveStore: s
|
|
35
|
+
}) => /* @__PURE__ */ o(b, {
|
|
36
|
+
appNode: a,
|
|
37
|
+
scrollStore: t,
|
|
38
|
+
scrollNode: r,
|
|
39
|
+
className: n,
|
|
38
40
|
gamification: e,
|
|
39
|
-
responsiveStore:
|
|
40
|
-
}),
|
|
41
|
+
responsiveStore: s
|
|
42
|
+
}), W = ({
|
|
41
43
|
gamification: e,
|
|
42
|
-
className:
|
|
43
|
-
appNode:
|
|
44
|
-
responsiveStore:
|
|
44
|
+
className: t,
|
|
45
|
+
appNode: n,
|
|
46
|
+
responsiveStore: a
|
|
45
47
|
}) => {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
} =
|
|
48
|
+
const {
|
|
49
|
+
topNavigation: r
|
|
50
|
+
} = v(), s = c(e.openedQuestion.$store), i = c(e.openedUser), {
|
|
51
|
+
sdkInDesktopView: h
|
|
52
|
+
} = c(a, {
|
|
49
53
|
keys: ["sdkInDesktopView"]
|
|
50
54
|
}), {
|
|
51
|
-
hiding:
|
|
52
|
-
onAnimationEnd:
|
|
53
|
-
} =
|
|
54
|
-
if (!
|
|
55
|
+
hiding: m,
|
|
56
|
+
onAnimationEnd: p
|
|
57
|
+
} = S();
|
|
58
|
+
if (!n.current || !s && !i)
|
|
55
59
|
return null;
|
|
56
|
-
const
|
|
57
|
-
className: r,
|
|
58
|
-
hiding:
|
|
59
|
-
onAnimationEnd:
|
|
60
|
-
children: /* @__PURE__ */
|
|
60
|
+
const C = s ? /* @__PURE__ */ o(u, {
|
|
61
|
+
className: l(t, !r && d),
|
|
62
|
+
hiding: m,
|
|
63
|
+
onAnimationEnd: p,
|
|
64
|
+
children: /* @__PURE__ */ o(O, {
|
|
61
65
|
gamification: e
|
|
62
66
|
})
|
|
63
|
-
}) :
|
|
64
|
-
className: r,
|
|
65
|
-
hiding:
|
|
66
|
-
onAnimationEnd:
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
children: [/* @__PURE__ */
|
|
67
|
+
}) : i ? /* @__PURE__ */ o(u, {
|
|
68
|
+
className: l(t, !r && d),
|
|
69
|
+
hiding: m,
|
|
70
|
+
onAnimationEnd: p,
|
|
71
|
+
children: /* @__PURE__ */ x(D, {
|
|
72
|
+
children: [/* @__PURE__ */ o(U, {
|
|
69
73
|
label: "Friend's Rank",
|
|
70
74
|
close: e.closeUser
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
-
...
|
|
74
|
-
successRate:
|
|
75
|
+
}), /* @__PURE__ */ o(k, {
|
|
76
|
+
children: /* @__PURE__ */ o(I, {
|
|
77
|
+
...i,
|
|
78
|
+
successRate: H(i)
|
|
75
79
|
})
|
|
76
80
|
})]
|
|
77
81
|
})
|
|
78
82
|
}) : null;
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
container:
|
|
81
|
-
useContainer: !
|
|
82
|
-
children:
|
|
83
|
+
return /* @__PURE__ */ o(y, {
|
|
84
|
+
container: n,
|
|
85
|
+
useContainer: !h,
|
|
86
|
+
children: C
|
|
83
87
|
});
|
|
84
88
|
};
|
|
85
89
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
P as GamificationOverlay,
|
|
91
|
+
W as GamificationOverlayStandalone
|
|
88
92
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
export declare const SDKHeader: import('react').ForwardRefExoticComponent<{
|
|
3
|
+
sdk: StreamLayerSDK;
|
|
4
|
+
className?: string;
|
|
5
|
+
} & import('react').RefAttributes<HTMLDivElement | null>>;
|
|
2
6
|
export declare const SDKNavigation: import('react').ForwardRefExoticComponent<{
|
|
3
7
|
sdk: StreamLayerSDK;
|
|
4
8
|
className?: string;
|
|
@@ -1,72 +1,112 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Navigation as A, NavigationItems as
|
|
10
|
-
|
|
1
|
+
import { jsxs as v, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cx as S } from "@linaria/core";
|
|
3
|
+
import { styled as n } from "@linaria/react";
|
|
4
|
+
import { useStore as m } from "@nanostores/react";
|
|
5
|
+
import { forwardRef as y, useMemo as h } from "react";
|
|
6
|
+
import { AvailableFeatures as I } from "@streamlayer/sdk-web-features";
|
|
7
|
+
import { FeatureType as u } from "@streamlayer/sdk-web-types";
|
|
8
|
+
import { SvgIcon as g } from "../../../ui/icons/index.js";
|
|
9
|
+
import { Navigation as A, NavigationItems as C } from "../../../ui/navigation/index.js";
|
|
10
|
+
import { Button as t } from "../../../ui/navigation/button/index.js";
|
|
11
|
+
const F = () => g, x = /* @__PURE__ */ n(F())({
|
|
11
12
|
name: "ButtonIcon",
|
|
12
13
|
class: "b11wpe79",
|
|
13
14
|
propsAsIs: !0
|
|
14
|
-
}),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
}), N = /* @__PURE__ */ n("div")({
|
|
16
|
+
name: "Container",
|
|
17
|
+
class: "calnblm",
|
|
18
|
+
propsAsIs: !1
|
|
19
|
+
}), b = /* @__PURE__ */ n("div")({
|
|
20
|
+
name: "Title",
|
|
21
|
+
class: "t1438p52",
|
|
22
|
+
propsAsIs: !1
|
|
23
|
+
}), B = /* @__PURE__ */ n("div")({
|
|
24
|
+
name: "CloseIconWrap",
|
|
25
|
+
class: "c17srj38",
|
|
26
|
+
propsAsIs: !1
|
|
27
|
+
}), j = () => g, w = /* @__PURE__ */ n(j())({
|
|
28
|
+
name: "CloseIcon",
|
|
29
|
+
class: "clqia8k",
|
|
30
|
+
propsAsIs: !0
|
|
31
|
+
}), G = "hf5w958", H = y(({
|
|
32
|
+
sdk: s,
|
|
33
|
+
className: c
|
|
34
|
+
}, l) => {
|
|
35
|
+
const i = () => {
|
|
36
|
+
s.closeFeature();
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ v(A, {
|
|
39
|
+
className: S(c, G),
|
|
40
|
+
children: [/* @__PURE__ */ v(N, {
|
|
41
|
+
children: [/* @__PURE__ */ o(b, {
|
|
42
|
+
children: "Live Challenge"
|
|
43
|
+
}), /* @__PURE__ */ o(B, {
|
|
44
|
+
onClick: i,
|
|
45
|
+
children: /* @__PURE__ */ o(w, {
|
|
46
|
+
name: "icon-cross"
|
|
47
|
+
})
|
|
48
|
+
})]
|
|
49
|
+
}), /* @__PURE__ */ o("div", {
|
|
50
|
+
ref: l
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
}), R = y(({
|
|
54
|
+
sdk: s,
|
|
55
|
+
className: c
|
|
56
|
+
}, l) => {
|
|
57
|
+
const i = m(s.sdkStore.organizationSettings), r = m(s.sdkStore.streamSettings), a = m(s.getActiveFeature()), f = h(() => {
|
|
58
|
+
const e = (r == null ? void 0 : r.data) || (i == null ? void 0 : i.data);
|
|
59
|
+
return e != null && e.overlays ? e.overlays : [];
|
|
60
|
+
}, [i, r]), p = h(() => [...f.filter(({
|
|
61
|
+
enableSdkButton: e,
|
|
62
|
+
type: d
|
|
63
|
+
}) => d === u.GAMES || e).map((e) => ({
|
|
64
|
+
id: e.type,
|
|
65
|
+
onClick: () => s.openFeature(e.type),
|
|
66
|
+
disabled: !(e.type in I),
|
|
67
|
+
label: e.name,
|
|
68
|
+
icon: /* @__PURE__ */ o("img", {
|
|
69
|
+
src: e.icon,
|
|
31
70
|
alt: ""
|
|
32
71
|
}),
|
|
33
72
|
/** multiplied by 10 to add the ability to insert custom buttons between our buttons */
|
|
34
|
-
position:
|
|
35
|
-
}))].sort((
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
className:
|
|
38
|
-
children: [
|
|
39
|
-
children: [/* @__PURE__ */
|
|
73
|
+
position: e.position * 10
|
|
74
|
+
}))].sort((e, d) => e.position - d.position), [f, s]);
|
|
75
|
+
return /* @__PURE__ */ v(A, {
|
|
76
|
+
className: c,
|
|
77
|
+
children: [p.length !== 0 && /* @__PURE__ */ o(C, {
|
|
78
|
+
children: [/* @__PURE__ */ o(t, {
|
|
40
79
|
id: "Channels",
|
|
41
|
-
onClick: () =>
|
|
80
|
+
onClick: () => s.closeFeature(),
|
|
42
81
|
label: "Channels",
|
|
43
82
|
active: a === 0
|
|
44
|
-
}, "Channels"), ...
|
|
45
|
-
...
|
|
46
|
-
active:
|
|
83
|
+
}, "Channels"), ...p.map((e) => e.id === u.GAMES ? /* @__PURE__ */ o(t, {
|
|
84
|
+
...e,
|
|
85
|
+
active: e.id === a,
|
|
47
86
|
label: "StreamLayer +",
|
|
48
87
|
id: "featuredGroups",
|
|
49
|
-
icon: /* @__PURE__ */
|
|
88
|
+
icon: /* @__PURE__ */ o(x, {
|
|
50
89
|
name: "icon-btn-feature-groups",
|
|
51
|
-
"data-selected":
|
|
90
|
+
"data-selected": e.id === a
|
|
52
91
|
})
|
|
53
|
-
},
|
|
54
|
-
...
|
|
92
|
+
}, e.id) : /* @__PURE__ */ o(t, {
|
|
93
|
+
...e,
|
|
55
94
|
icon: void 0,
|
|
56
|
-
active:
|
|
57
|
-
},
|
|
58
|
-
}), !
|
|
59
|
-
children: [/* @__PURE__ */
|
|
95
|
+
active: e.id === a
|
|
96
|
+
}, e.id))]
|
|
97
|
+
}), !p.length && /* @__PURE__ */ o(C, {
|
|
98
|
+
children: [/* @__PURE__ */ o(t, {
|
|
60
99
|
id: "empty",
|
|
61
100
|
label: "No Features...",
|
|
62
101
|
active: !1,
|
|
63
102
|
disabled: !0
|
|
64
103
|
}, "empty")]
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
-
ref:
|
|
104
|
+
}), /* @__PURE__ */ o("div", {
|
|
105
|
+
ref: l
|
|
67
106
|
})]
|
|
68
107
|
});
|
|
69
108
|
});
|
|
70
109
|
export {
|
|
71
|
-
|
|
110
|
+
H as SDKHeader,
|
|
111
|
+
R as SDKNavigation
|
|
72
112
|
};
|
package/lib/app/app/index.js
CHANGED
|
@@ -1,118 +1,121 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { cx as v } from "@linaria/core";
|
|
2
3
|
import { useStore as N } from "@nanostores/react";
|
|
3
|
-
import { SDKContainer as
|
|
4
|
-
import { useSdkFeature as
|
|
4
|
+
import { SDKContainer as g, SDKScrollContainer as F } from "./styles.js";
|
|
5
|
+
import { useSdkFeature as x } from "../useSdkFeature.js";
|
|
5
6
|
import { useSdkResponsive as A } from "../useSdkResponsive.js";
|
|
6
7
|
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
|
-
const P = ({
|
|
8
|
+
import { useAnalyticsListener as m, newTabLinkListener as L, appScrollListener as b, appClickListener as C } from "../../hooks/analytics.js";
|
|
9
|
+
import { useRef as d, useMemo as y, useEffect as K } from "react";
|
|
10
|
+
import { resetCss as c } from "../../ui/theme/theme.js";
|
|
11
|
+
import { ActiveFeature as j, StandaloneFeature as E } from "./Features/index.js";
|
|
12
|
+
import { SDKNavigation as R, SDKHeader as k } from "./Navigation/index.js";
|
|
13
|
+
import { SDKNotifications as w } from "./Notifications/index.js";
|
|
14
|
+
import { useAppApp as H } from "./useApp.js";
|
|
15
|
+
import { AppContext as I } from "./useAppContext.js";
|
|
16
|
+
const M = ({
|
|
17
17
|
sdk: e,
|
|
18
|
-
className:
|
|
18
|
+
className: n,
|
|
19
19
|
scrollStore: r,
|
|
20
|
-
appNode:
|
|
21
|
-
scrollNode:
|
|
22
|
-
responsiveStore:
|
|
20
|
+
appNode: a,
|
|
21
|
+
scrollNode: s,
|
|
22
|
+
responsiveStore: o
|
|
23
23
|
}) => {
|
|
24
|
-
const [,
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
27
|
-
scrollNode:
|
|
28
|
-
appNode:
|
|
24
|
+
const [, i] = x(e);
|
|
25
|
+
return /* @__PURE__ */ l(j, {
|
|
26
|
+
className: n,
|
|
27
|
+
scrollNode: s,
|
|
28
|
+
appNode: a,
|
|
29
29
|
scrollStore: r,
|
|
30
|
-
feature:
|
|
31
|
-
responsiveStore:
|
|
30
|
+
feature: i,
|
|
31
|
+
responsiveStore: o,
|
|
32
32
|
sdk: e
|
|
33
33
|
});
|
|
34
|
-
},
|
|
34
|
+
}, P = ({
|
|
35
35
|
sdk: e,
|
|
36
|
-
className:
|
|
36
|
+
className: n,
|
|
37
37
|
appNode: r,
|
|
38
|
-
responsiveStore:
|
|
38
|
+
responsiveStore: a
|
|
39
39
|
}) => {
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
className:
|
|
40
|
+
const s = N(e.featuresList.getStore());
|
|
41
|
+
return s ? Array.from(s, (o) => {
|
|
42
|
+
const i = e.getFeature(o);
|
|
43
|
+
return i ? /* @__PURE__ */ l(E, {
|
|
44
|
+
className: n,
|
|
45
45
|
appNode: r,
|
|
46
|
-
feature:
|
|
47
|
-
responsiveStore:
|
|
46
|
+
feature: i,
|
|
47
|
+
responsiveStore: a,
|
|
48
48
|
sdk: e
|
|
49
|
-
},
|
|
49
|
+
}, o) : null;
|
|
50
50
|
}) : null;
|
|
51
|
-
},
|
|
51
|
+
}, $ = ({
|
|
52
52
|
sdk: e,
|
|
53
|
-
topNavigation:
|
|
53
|
+
topNavigation: n
|
|
54
54
|
}) => {
|
|
55
|
-
const r =
|
|
55
|
+
const r = d(null), a = d(null), [s] = A(r), [o, i] = D(r, s), {
|
|
56
56
|
sdkReady: p,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
activeFeature: u,
|
|
58
|
+
isLogged: S
|
|
59
|
+
} = H(e), t = !!p;
|
|
60
|
+
m(r, {
|
|
61
|
+
enabled: t,
|
|
61
62
|
event: "click",
|
|
62
63
|
listener: L
|
|
63
|
-
}),
|
|
64
|
-
enabled:
|
|
64
|
+
}), m(o, {
|
|
65
|
+
enabled: t,
|
|
65
66
|
event: "scrollend",
|
|
66
|
-
listener:
|
|
67
|
+
listener: b,
|
|
67
68
|
useDomNode: !0
|
|
68
|
-
}),
|
|
69
|
-
enabled:
|
|
69
|
+
}), m(o, {
|
|
70
|
+
enabled: t,
|
|
70
71
|
event: "click",
|
|
71
72
|
listener: C,
|
|
72
73
|
useDomNode: !0
|
|
73
74
|
});
|
|
74
|
-
const
|
|
75
|
-
sdk: e
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
const h = y(() => ({
|
|
76
|
+
sdk: e,
|
|
77
|
+
topNavigation: n
|
|
78
|
+
}), [e, n]);
|
|
79
|
+
return K(() => {
|
|
78
80
|
import("./Features/Gamification/gamification-feature.js");
|
|
79
|
-
}, []), /* @__PURE__ */
|
|
80
|
-
value:
|
|
81
|
-
children: /* @__PURE__ */
|
|
81
|
+
}, []), console.log("sdkEnabled", t), console.log("activeFeature", u), /* @__PURE__ */ l(I.Provider, {
|
|
82
|
+
value: h,
|
|
83
|
+
children: /* @__PURE__ */ f(g, {
|
|
82
84
|
ref: r,
|
|
83
|
-
className:
|
|
84
|
-
children: [
|
|
85
|
-
className:
|
|
85
|
+
className: n ? "" : "c10llmat",
|
|
86
|
+
children: [t && n && /* @__PURE__ */ l(R, {
|
|
87
|
+
className: c,
|
|
88
|
+
sdk: e,
|
|
89
|
+
ref: a
|
|
90
|
+
}), t && !n && !!u && /* @__PURE__ */ l(k, {
|
|
91
|
+
className: v(c, "sl-hide-on-modal"),
|
|
86
92
|
sdk: e,
|
|
87
|
-
ref:
|
|
88
|
-
}),
|
|
89
|
-
className: m,
|
|
90
|
-
ref: i
|
|
91
|
-
}), /* @__PURE__ */ u(v, {
|
|
93
|
+
ref: a
|
|
94
|
+
}), /* @__PURE__ */ f(F, {
|
|
92
95
|
className: "sl-hide-on-modal",
|
|
93
|
-
ref:
|
|
94
|
-
"data-nav":
|
|
95
|
-
children: [
|
|
96
|
+
ref: o,
|
|
97
|
+
"data-nav": t.toString(),
|
|
98
|
+
children: [t && /* @__PURE__ */ l(w, {
|
|
96
99
|
sdk: e,
|
|
97
|
-
scrollNode:
|
|
98
|
-
headerNode:
|
|
100
|
+
scrollNode: o,
|
|
101
|
+
headerNode: a,
|
|
99
102
|
appNode: r,
|
|
100
|
-
scrollStore:
|
|
101
|
-
responsiveStore:
|
|
102
|
-
}),
|
|
103
|
-
scrollStore:
|
|
104
|
-
responsiveStore:
|
|
105
|
-
scrollNode:
|
|
103
|
+
scrollStore: i,
|
|
104
|
+
responsiveStore: s
|
|
105
|
+
}), t && /* @__PURE__ */ l(M, {
|
|
106
|
+
scrollStore: i,
|
|
107
|
+
responsiveStore: s,
|
|
108
|
+
scrollNode: o,
|
|
106
109
|
appNode: r,
|
|
107
|
-
className:
|
|
110
|
+
className: c,
|
|
108
111
|
sdk: e
|
|
109
|
-
}),
|
|
110
|
-
responsiveStore:
|
|
112
|
+
}), t && /* @__PURE__ */ l(P, {
|
|
113
|
+
responsiveStore: s,
|
|
111
114
|
appNode: r,
|
|
112
|
-
className:
|
|
115
|
+
className: c,
|
|
113
116
|
sdk: e
|
|
114
117
|
})]
|
|
115
|
-
}),
|
|
118
|
+
}), t && !S && /* @__PURE__ */ l("div", {
|
|
116
119
|
style: {
|
|
117
120
|
display: "flex",
|
|
118
121
|
alignItems: "center",
|
|
@@ -126,5 +129,5 @@ const P = ({
|
|
|
126
129
|
});
|
|
127
130
|
};
|
|
128
131
|
export {
|
|
129
|
-
|
|
132
|
+
$ as App
|
|
130
133
|
};
|