@cuemath/leap 2.8.24-rj-2 → 2.8.25-rj-1
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/dist/features/circle-games/leaderboard/comps/info-bar/info-bar-styled.js +12 -0
- package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar-styled.js.map +1 -0
- package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar.js +30 -0
- package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar.js.map +1 -0
- package/dist/features/circle-games/leaderboard/leaderboard-styled.js +20 -16
- package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard.js +129 -74
- package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/package.json +1 -1
@@ -0,0 +1,12 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import e from "../../../../ui/layout/flex-view.js";
|
3
|
+
const t = o(e)`
|
4
|
+
padding: ${({ paddingX: r, paddingY: p }) => `${p}px ${r}px`};
|
5
|
+
margin: ${({ marginX: r, marginY: p }) => `${p}px ${r}px`};
|
6
|
+
border-width: 1px;
|
7
|
+
border-style: solid;
|
8
|
+
`;
|
9
|
+
export {
|
10
|
+
t as InfoBarWrapper
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=info-bar-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"info-bar-styled.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/info-bar/info-bar-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport interface IInfoBarWrapperProps {\n paddingX?: number;\n paddingY?: number;\n marginX?: number;\n marginY?: number;\n}\n\nexport const InfoBarWrapper = styled(FlexView)<IInfoBarWrapperProps>`\n padding: ${({ paddingX, paddingY }) => `${paddingY}px ${paddingX}px`};\n margin: ${({ marginX, marginY }) => `${marginY}px ${marginX}px`};\n border-width: 1px;\n border-style: solid;\n`;\n"],"names":["InfoBarWrapper","styled","FlexView","paddingX","paddingY","marginX","marginY"],"mappings":";;AAWa,MAAAA,IAAiBC,EAAOC,CAAQ;AAAA,aAChC,CAAC,EAAE,UAAAC,GAAU,UAAAC,QAAe,GAAGA,CAAQ,MAAMD,CAAQ,IAAI;AAAA,YAC1D,CAAC,EAAE,SAAAE,GAAS,SAAAC,QAAc,GAAGA,CAAO,MAAMD,CAAO,IAAI;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import { useMemo as l } from "react";
|
3
|
+
import p from "../../../../ui/text/text.js";
|
4
|
+
import { InfoBarWrapper as s } from "./info-bar-styled.js";
|
5
|
+
const b = (o) => ({ backgroundColor: `${o}_6`, borderColor: `${o}_4` }), $ = ({
|
6
|
+
children: o,
|
7
|
+
hue: r,
|
8
|
+
marginX: t = 0,
|
9
|
+
marginY: n = 0,
|
10
|
+
paddingX: m = 0,
|
11
|
+
paddingY: d = 0
|
12
|
+
}) => {
|
13
|
+
const { backgroundColor: a, borderColor: c } = l(() => b(r), [r]);
|
14
|
+
return /* @__PURE__ */ e(
|
15
|
+
s,
|
16
|
+
{
|
17
|
+
$background: a,
|
18
|
+
$borderColor: c,
|
19
|
+
marginX: t,
|
20
|
+
marginY: n,
|
21
|
+
paddingX: m,
|
22
|
+
paddingY: d,
|
23
|
+
children: /* @__PURE__ */ e(p, { $renderAs: "body2", children: o })
|
24
|
+
}
|
25
|
+
);
|
26
|
+
};
|
27
|
+
export {
|
28
|
+
$ as default
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=info-bar.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"info-bar.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/info-bar/info-bar.tsx"],"sourcesContent":["import type { TColorNames, THueNames } from '../../../../ui/types';\nimport type { IInfoBarProps } from './info-bar-types';\n\nimport { useMemo } from 'react';\n\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './info-bar-styled';\n\nconst computeColorsFromHue = (\n hue: THueNames,\n): { backgroundColor: TColorNames; borderColor: TColorNames } => {\n return { backgroundColor: `${hue}_6`, borderColor: `${hue}_4` };\n};\n\nconst InfoBar: React.FC<IInfoBarProps> = ({\n children,\n hue,\n marginX = 0,\n marginY = 0,\n paddingX = 0,\n paddingY = 0,\n}) => {\n const { backgroundColor, borderColor } = useMemo(() => computeColorsFromHue(hue), [hue]);\n\n return (\n <Styled.InfoBarWrapper\n $background={backgroundColor}\n $borderColor={borderColor}\n marginX={marginX}\n marginY={marginY}\n paddingX={paddingX}\n paddingY={paddingY}\n >\n <Text $renderAs=\"body2\">{children}</Text>\n </Styled.InfoBarWrapper>\n );\n};\n\nexport default InfoBar;\n"],"names":["computeColorsFromHue","hue","InfoBar","children","marginX","marginY","paddingX","paddingY","backgroundColor","borderColor","useMemo","jsx","Styled.InfoBarWrapper","Text"],"mappings":";;;;AAQA,MAAMA,IAAuB,CAC3BC,OAEO,EAAE,iBAAiB,GAAGA,CAAG,MAAM,aAAa,GAAGA,CAAG,SAGrDC,IAAmC,CAAC;AAAA,EACxC,UAAAC;AAAA,EACA,KAAAF;AAAA,EACA,SAAAG,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AACb,MAAM;AACE,QAAA,EAAE,iBAAAC,GAAiB,aAAAC,EAAA,IAAgBC,EAAQ,MAAMV,EAAqBC,CAAG,GAAG,CAACA,CAAG,CAAC;AAGrF,SAAA,gBAAAU;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAaJ;AAAA,MACb,cAAcC;AAAA,MACd,SAAAL;AAAA,MACA,SAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MAEA,UAAC,gBAAAI,EAAAE,GAAA,EAAK,WAAU,SAAS,UAAAV,GAAS;AAAA,IAAA;AAAA,EAAA;AAGxC;"}
|
@@ -1,32 +1,33 @@
|
|
1
1
|
import t from "styled-components";
|
2
2
|
import { ARC_BUTTON_BOTTOM_OFFSET as i } from "../../ui/arc-button/constants.js";
|
3
|
-
import
|
4
|
-
|
3
|
+
import e from "../../ui/layout/flex-view.js";
|
4
|
+
import { BANNER_HEIGHT as n } from "./comps/banner/constants.js";
|
5
|
+
const s = t.div`
|
5
6
|
flex-direction: column;
|
6
7
|
overflow: hidden;
|
7
8
|
height: 100vh;
|
8
9
|
max-height: 100%;
|
9
10
|
position: relative;
|
10
|
-
`,
|
11
|
+
`, c = t.div`
|
11
12
|
background: ${({ theme: o }) => o.colors.BLACK_1};
|
12
13
|
height: 100%;
|
13
14
|
position: relative;
|
14
15
|
width: 100%;
|
15
|
-
`,
|
16
|
+
`, h = t.div`
|
16
17
|
position: absolute;
|
17
18
|
top: 0;
|
18
19
|
width: 100%;
|
19
20
|
z-index: 10;
|
20
|
-
`,
|
21
|
+
`, l = t.div`
|
21
22
|
background: transparent;
|
22
23
|
position: absolute;
|
23
24
|
overflow: auto;
|
24
25
|
width: 100%;
|
25
26
|
flex: 1;
|
26
27
|
height: 100%;
|
27
|
-
padding-top: ${
|
28
|
+
padding-top: ${n}px;
|
28
29
|
padding-bottom: ${i}px;
|
29
|
-
`,
|
30
|
+
`, m = t.div`
|
30
31
|
position: absolute;
|
31
32
|
display: flex;
|
32
33
|
top: 5px;
|
@@ -35,7 +36,7 @@ const a = t.div`
|
|
35
36
|
height: 100%;
|
36
37
|
align-items: center;
|
37
38
|
justify-content: center;
|
38
|
-
`,
|
39
|
+
`, x = t.div`
|
39
40
|
position: absolute;
|
40
41
|
bottom: 0;
|
41
42
|
width: 100%;
|
@@ -44,7 +45,7 @@ const a = t.div`
|
|
44
45
|
justify-content: center;
|
45
46
|
width: 150%;
|
46
47
|
height: 150%;
|
47
|
-
`,
|
48
|
+
`, f = t.div`
|
48
49
|
background: ${({ theme: o }) => o.colors.YELLOW_6};
|
49
50
|
min-height: 32px;
|
50
51
|
width: 100%;
|
@@ -53,14 +54,17 @@ const a = t.div`
|
|
53
54
|
align-items: center;
|
54
55
|
justify-content: center;
|
55
56
|
`;
|
57
|
+
t(e)`
|
58
|
+
padding: 16px;
|
59
|
+
`;
|
56
60
|
export {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
x as ActionButtonWrapper,
|
62
|
+
f as Banner,
|
63
|
+
h as BannerWrapper,
|
64
|
+
l as ItemsWrapper,
|
65
|
+
s as Leaderboard,
|
66
|
+
c as LeaderboardContainer,
|
67
|
+
m as TournamentBannerCustContainer,
|
64
68
|
g as TrophyWrapper
|
65
69
|
};
|
66
70
|
//# sourceMappingURL=leaderboard-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"leaderboard-styled.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ARC_BUTTON_BOTTOM_OFFSET } from '../../ui/arc-button/constants';\nimport { BANNER_HEIGHT } from './comps/banner/constants';\n\nexport const Leaderboard = styled.div`\n flex-direction: column;\n overflow: hidden;\n height: 100vh;\n max-height: 100%;\n position: relative;\n`;\n\nexport const LeaderboardContainer = styled.div`\n background: ${({ theme }) => theme.colors.BLACK_1};\n height: 100%;\n position: relative;\n width: 100%;\n`;\n\nexport const BannerWrapper = styled.div`\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 10;\n`;\n\nexport const ItemsWrapper = styled.div<{ topInset: number }>`\n background: transparent;\n position: absolute;\n overflow: auto;\n width: 100%;\n flex: 1;\n height: 100%;\n padding-top: ${BANNER_HEIGHT}px;\n padding-bottom: ${ARC_BUTTON_BOTTOM_OFFSET}px;\n`;\n\nexport const TournamentBannerCustContainer = styled.div`\n position: absolute;\n display: flex;\n top: 5px;\n right: -2px;\n width: 200px;\n height: 100%;\n align-items: center;\n justify-content: center;\n`;\n\nexport const ActionButtonWrapper = styled.div`\n position: absolute;\n bottom: 0;\n width: 100%;\n`;\n\nexport const TrophyWrapper = styled.div`\n display: flex;\n justify-content: center;\n width: 150%;\n height: 150%;\n`;\n\nexport const Banner = styled.div`\n background: ${({ theme }) => theme.colors.YELLOW_6};\n min-height: 32px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n`;\n"],"names":["Leaderboard","styled","LeaderboardContainer","theme","BannerWrapper","ItemsWrapper","BANNER_HEIGHT","ARC_BUTTON_BOTTOM_OFFSET","TournamentBannerCustContainer","ActionButtonWrapper","TrophyWrapper","Banner"],"mappings":"
|
1
|
+
{"version":3,"file":"leaderboard-styled.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ARC_BUTTON_BOTTOM_OFFSET } from '../../ui/arc-button/constants';\nimport FlexView from '../../ui/layout/flex-view';\nimport { BANNER_HEIGHT } from './comps/banner/constants';\n\nexport const Leaderboard = styled.div`\n flex-direction: column;\n overflow: hidden;\n height: 100vh;\n max-height: 100%;\n position: relative;\n`;\n\nexport const LeaderboardContainer = styled.div`\n background: ${({ theme }) => theme.colors.BLACK_1};\n height: 100%;\n position: relative;\n width: 100%;\n`;\n\nexport const BannerWrapper = styled.div`\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 10;\n`;\n\nexport const ItemsWrapper = styled.div<{ topInset: number }>`\n background: transparent;\n position: absolute;\n overflow: auto;\n width: 100%;\n flex: 1;\n height: 100%;\n padding-top: ${BANNER_HEIGHT}px;\n padding-bottom: ${ARC_BUTTON_BOTTOM_OFFSET}px;\n`;\n\nexport const TournamentBannerCustContainer = styled.div`\n position: absolute;\n display: flex;\n top: 5px;\n right: -2px;\n width: 200px;\n height: 100%;\n align-items: center;\n justify-content: center;\n`;\n\nexport const ActionButtonWrapper = styled.div`\n position: absolute;\n bottom: 0;\n width: 100%;\n`;\n\nexport const TrophyWrapper = styled.div`\n display: flex;\n justify-content: center;\n width: 150%;\n height: 150%;\n`;\n\nexport const Banner = styled.div`\n background: ${({ theme }) => theme.colors.YELLOW_6};\n min-height: 32px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n`;\n\nexport const InfoContainer = styled(FlexView)`\n padding: 16px;\n`;\n"],"names":["Leaderboard","styled","LeaderboardContainer","theme","BannerWrapper","ItemsWrapper","BANNER_HEIGHT","ARC_BUTTON_BOTTOM_OFFSET","TournamentBannerCustContainer","ActionButtonWrapper","TrophyWrapper","Banner","FlexView"],"mappings":";;;;AAMO,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQrBC,IAAuBD,EAAO;AAAA,gBAC3B,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA,GAMtCC,IAAgBH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBI,IAAeJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAOlBK,CAAa;AAAA,oBACVC,CAAwB;AAAA,GAG/BC,IAAgCP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWvCQ,IAAsBR,EAAO;AAAA;AAAA;AAAA;AAAA,GAM7BS,IAAgBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBU,IAASV,EAAO;AAAA,gBACb,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASvBF,EAAOW,CAAQ;AAAA;AAAA;"}
|
@@ -1,144 +1,199 @@
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
2
|
-
import { useState as
|
3
|
-
import { ILLUSTRATIONS as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
2
|
+
import { useState as p, useCallback as J, useEffect as K } from "react";
|
3
|
+
import { ILLUSTRATIONS as Q } from "../../../assets/illustrations/illustrations.js";
|
4
|
+
import Y from "../../../assets/line-icons/icons/cross.js";
|
5
|
+
import T from "../../ui/layout/flex-view.js";
|
6
|
+
import { CircularLoader as Z } from "../../ui/loader/circular-loader/circular-loader.js";
|
7
|
+
import d from "../../ui/text/text.js";
|
8
|
+
import { useCircleSounds as D } from "../hooks/use-circle-sounds/use-circle-sounds.js";
|
9
|
+
import { Banner as u } from "./comps/banner/banner.js";
|
10
|
+
import w from "./comps/info-bar/info-bar.js";
|
11
|
+
import { LeaderboardItemWithObserver as ee } from "./comps/leaderboard-item/leaderboard-item.js";
|
12
|
+
import { NavigationButton as re } from "./comps/navigation-button/navigation-button.js";
|
13
|
+
import { Timer as ne } from "./comps/timer/timer.js";
|
14
|
+
import { ELeaderboardType as n } from "./enums/leaderboard-type-enum.js";
|
15
|
+
import { Leaderboard as te, LeaderboardContainer as oe, BannerWrapper as ie, TournamentBannerCustContainer as se, TrophyWrapper as me, ItemsWrapper as ce, Banner as ae, ActionButtonWrapper as pe } from "./leaderboard-styled.js";
|
16
|
+
import { useTimer as de } from "./hooks/useTimer.js";
|
17
|
+
const h = {
|
18
|
+
[n.ALL_TIME_STREAK]: () => import("../../../assets/lotties/circle/elite-circle-lottie.json.js"),
|
19
|
+
[n.ALL_TIME]: () => import("../../../assets/lotties/circle/elite-circle-lottie.json.js"),
|
20
|
+
[n.BI_WEEKLY]: () => import("../../../assets/lotties/circle/tournament-ripple-lottie.json.js")
|
18
21
|
}, i = [
|
19
22
|
{
|
20
23
|
name: "TOURNAMENT",
|
21
|
-
type:
|
24
|
+
type: n.BI_WEEKLY
|
22
25
|
},
|
23
26
|
{
|
24
27
|
name: "STREAK STARS",
|
25
|
-
type:
|
28
|
+
type: n.ALL_TIME_STREAK
|
26
29
|
},
|
27
30
|
{
|
28
31
|
name: "ALL TIME",
|
29
|
-
type:
|
32
|
+
type: n.ALL_TIME
|
30
33
|
}
|
31
|
-
],
|
34
|
+
], xe = ({
|
32
35
|
leaderboardData: m,
|
33
|
-
type: E =
|
34
|
-
userId:
|
35
|
-
onClose:
|
36
|
-
isLoading:
|
36
|
+
type: E = n.BI_WEEKLY,
|
37
|
+
userId: M,
|
38
|
+
onClose: N,
|
39
|
+
isLoading: a,
|
40
|
+
showInfoBar: F,
|
41
|
+
onInfoBarDismiss: I,
|
42
|
+
streakReduction: H
|
37
43
|
}) => {
|
38
|
-
var
|
39
|
-
const [s,
|
44
|
+
var S, B, C, x, W, k, R;
|
45
|
+
const [s, f] = p(
|
40
46
|
i.findIndex((r) => E === r.type)
|
41
|
-
), [
|
47
|
+
), [t, O] = p(((S = m == null ? void 0 : m[E]) == null ? void 0 : S.leaderboardPlayers) || []), [L, j] = p({
|
42
48
|
current: 0,
|
43
49
|
end: 0
|
44
|
-
}), [
|
45
|
-
|
46
|
-
},
|
47
|
-
|
50
|
+
}), [v, y] = de(0), [l, X] = p(!1), U = (B = t == null ? void 0 : t[0]) == null ? void 0 : B.points, G = ((C = t == null ? void 0 : t[0]) == null ? void 0 : C.streakDays) || 0, { playButtonSound: g } = D(), [_, V] = p(F), b = H > 0, A = J(() => {
|
51
|
+
V(!1), I();
|
52
|
+
}, [I]), q = () => {
|
53
|
+
g(), f((r) => r - 1 < 0 ? i.length - 1 : r - 1);
|
54
|
+
}, z = () => {
|
55
|
+
g(), f((r) => r + 1 === i.length ? 0 : r + 1);
|
48
56
|
};
|
49
|
-
return
|
50
|
-
|
51
|
-
}, [
|
52
|
-
var
|
53
|
-
const r = (
|
57
|
+
return K(() => {
|
58
|
+
y(0);
|
59
|
+
}, [y]), K(() => {
|
60
|
+
var $;
|
61
|
+
const r = ($ = i[s]) == null ? void 0 : $.type, o = r && (m == null ? void 0 : m[r]);
|
54
62
|
if (o) {
|
55
|
-
const
|
56
|
-
r ===
|
63
|
+
const P = o.leaderboardPlayers || [];
|
64
|
+
r === n.BI_WEEKLY && (j({
|
57
65
|
current: o.currentTimestamp,
|
58
66
|
end: o.endTimestamp
|
59
|
-
}), o.currentTimestamp > o.endTimestamp && (
|
67
|
+
}), o.currentTimestamp > o.endTimestamp && (P.splice(10), X(!0))), O([...P]);
|
60
68
|
}
|
61
|
-
}, [s, m]), /* @__PURE__ */ e(
|
62
|
-
/* @__PURE__ */ c(
|
63
|
-
((
|
64
|
-
|
69
|
+
}, [s, m]), /* @__PURE__ */ e(te, { children: /* @__PURE__ */ c(oe, { children: [
|
70
|
+
/* @__PURE__ */ c(ie, { children: [
|
71
|
+
((x = i[s]) == null ? void 0 : x.type) === n.BI_WEEKLY && /* @__PURE__ */ e(
|
72
|
+
u,
|
65
73
|
{
|
66
|
-
isLoading:
|
74
|
+
isLoading: a || t.length === 0,
|
67
75
|
bgFromTopPosition: -120,
|
68
76
|
bgFromRightPosition: -110,
|
69
|
-
primaryText:
|
70
|
-
secondaryText:
|
77
|
+
primaryText: l ? /* @__PURE__ */ e("span", { children: "New Tournament" }) : /* @__PURE__ */ e("span", { children: "Tournament" }),
|
78
|
+
secondaryText: l ? /* @__PURE__ */ e("span", { children: "Starts Soon" }) : /* @__PURE__ */ c("span", { children: [
|
71
79
|
" ",
|
72
80
|
/* @__PURE__ */ e(
|
73
|
-
|
81
|
+
ne,
|
74
82
|
{
|
75
|
-
fromTimestamp:
|
83
|
+
fromTimestamp: v + L.current,
|
76
84
|
endTimestamp: L.end
|
77
85
|
}
|
78
86
|
),
|
79
87
|
" ",
|
80
88
|
"left"
|
81
89
|
] }),
|
82
|
-
lottiePromise:
|
83
|
-
custEle: /* @__PURE__ */ e(
|
90
|
+
lottiePromise: h[n.BI_WEEKLY],
|
91
|
+
custEle: /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e("img", { src: Q.TROPHY_CIRCLE }) }) })
|
84
92
|
}
|
85
93
|
),
|
86
|
-
((
|
87
|
-
|
94
|
+
((W = i[s]) == null ? void 0 : W.type) === n.ALL_TIME_STREAK && /* @__PURE__ */ e(
|
95
|
+
u,
|
88
96
|
{
|
89
|
-
isLoading:
|
97
|
+
isLoading: a,
|
90
98
|
bgFromTopPosition: -140,
|
91
99
|
bgFromRightPosition: -90,
|
92
100
|
primaryText: /* @__PURE__ */ e("span", { children: "Streak Stars" }),
|
93
101
|
secondaryText: /* @__PURE__ */ e("span", { children: "Top 50" }),
|
94
|
-
lottiePromise:
|
102
|
+
lottiePromise: h[n.ALL_TIME_STREAK]
|
95
103
|
}
|
96
104
|
),
|
97
|
-
((
|
98
|
-
|
105
|
+
((k = i[s]) == null ? void 0 : k.type) === n.ALL_TIME && /* @__PURE__ */ e(
|
106
|
+
u,
|
99
107
|
{
|
100
|
-
isLoading:
|
108
|
+
isLoading: a,
|
101
109
|
bgFromTopPosition: -140,
|
102
110
|
bgFromRightPosition: -90,
|
103
111
|
primaryText: /* @__PURE__ */ e("span", { children: "Elite Circle" }),
|
104
112
|
secondaryText: /* @__PURE__ */ e("span", { children: "Top 50" }),
|
105
|
-
lottiePromise:
|
113
|
+
lottiePromise: h[n.ALL_TIME]
|
106
114
|
}
|
107
115
|
)
|
108
116
|
] }),
|
109
|
-
|
110
|
-
!
|
111
|
-
|
112
|
-
|
117
|
+
a && /* @__PURE__ */ e(Z, {}),
|
118
|
+
!a && t && /* @__PURE__ */ c(ce, { topInset: 0, children: [
|
119
|
+
_ && !b && /* @__PURE__ */ e(
|
120
|
+
w,
|
121
|
+
{
|
122
|
+
children: /* @__PURE__ */ c(
|
123
|
+
T,
|
124
|
+
{
|
125
|
+
$flexDirection: "row",
|
126
|
+
$alignItems: "center",
|
127
|
+
$justifyContent: "space-between",
|
128
|
+
children: [
|
129
|
+
/* @__PURE__ */ e(d, { $renderAs: "ab2", $color: "WHITE_T_87", children: "Streak saved for the day! Come back tomorrow to keep increasing it." }),
|
130
|
+
/* @__PURE__ */ e(Y, { cursor: "pointer", color: "WHITE", onClick: A })
|
131
|
+
]
|
132
|
+
}
|
133
|
+
),
|
134
|
+
hue: "GREEN",
|
135
|
+
marginX: 16,
|
136
|
+
marginY: 16,
|
137
|
+
paddingX: 16,
|
138
|
+
paddingY: 16
|
139
|
+
}
|
140
|
+
),
|
141
|
+
_ && b && /* @__PURE__ */ e(
|
142
|
+
w,
|
143
|
+
{
|
144
|
+
children: /* @__PURE__ */ c(
|
145
|
+
T,
|
146
|
+
{
|
147
|
+
$flexDirection: "row",
|
148
|
+
$alignItems: "center",
|
149
|
+
$justifyContent: "space-between",
|
150
|
+
children: [
|
151
|
+
/* @__PURE__ */ c(T, { children: [
|
152
|
+
/* @__PURE__ */ e(d, { $renderAs: "ab2", $color: "WHITE_T_87", children: "Keep building your streak by completing an activity each day." }),
|
153
|
+
/* @__PURE__ */ e(d, { $renderAs: "ab2", $color: "WHITE_T_87", children: "For each day missed, your streak reduces by 1." })
|
154
|
+
] }),
|
155
|
+
/* @__PURE__ */ e(Y, { cursor: "pointer", color: "WHITE", onClick: A })
|
156
|
+
]
|
157
|
+
}
|
158
|
+
),
|
159
|
+
hue: "YELLOW",
|
160
|
+
marginX: 16,
|
161
|
+
marginY: 16,
|
162
|
+
paddingX: 16,
|
163
|
+
paddingY: 16
|
164
|
+
}
|
165
|
+
),
|
166
|
+
l && ((R = i[s]) == null ? void 0 : R.type) === n.BI_WEEKLY && /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(d, { $renderAs: "ab3", $color: "WHITE", children: "Congratulating winners of the last tournament!" }) }),
|
167
|
+
t.map((r) => {
|
113
168
|
var o;
|
114
169
|
return /* @__PURE__ */ e(
|
115
|
-
|
170
|
+
ee,
|
116
171
|
{
|
117
172
|
player: r,
|
118
173
|
rank: r.rank,
|
119
|
-
maxStreakDays:
|
120
|
-
maxPoints:
|
174
|
+
maxStreakDays: G,
|
175
|
+
maxPoints: U,
|
121
176
|
leaderboardType: (o = i[s]) == null ? void 0 : o.type,
|
122
|
-
isActive: r.userId ===
|
177
|
+
isActive: r.userId === M
|
123
178
|
},
|
124
179
|
r.rank
|
125
180
|
);
|
126
181
|
})
|
127
182
|
] }),
|
128
|
-
/* @__PURE__ */ e(
|
129
|
-
|
183
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(
|
184
|
+
re,
|
130
185
|
{
|
131
|
-
labels: Object.values(
|
132
|
-
onLeftClick:
|
133
|
-
onRightClick:
|
186
|
+
labels: Object.values(n),
|
187
|
+
onLeftClick: q,
|
188
|
+
onRightClick: z,
|
134
189
|
currIndex: s,
|
135
|
-
onClose:
|
136
|
-
disableSwipe:
|
190
|
+
onClose: N,
|
191
|
+
disableSwipe: a || t.length === 0
|
137
192
|
}
|
138
193
|
) })
|
139
194
|
] }) });
|
140
195
|
};
|
141
196
|
export {
|
142
|
-
|
197
|
+
xe as Leaderboard
|
143
198
|
};
|
144
199
|
//# sourceMappingURL=leaderboard.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"leaderboard.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard.tsx"],"sourcesContent":["import type {\n ILeaderboardPlayerWithPoints,\n ILeaderboardPlayerWithStreak,\n} from './dal/use-get-leaderboard-dal/use-get-leaderboard-dal-types';\nimport type { ILeaderboardProps } from './leaderboard-types';\n\nimport { useState, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport Text from '../../ui/text/text';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { Banner } from './comps/banner/banner';\nimport { LeaderboardItemWithObserver } from './comps/leaderboard-item/leaderboard-item';\nimport { NavigationButton } from './comps/navigation-button/navigation-button';\nimport { Timer } from './comps/timer/timer';\nimport { ELeaderboardType } from './enums/leaderboard-type-enum';\nimport { useTimer } from './hooks';\nimport * as Styled from './leaderboard-styled';\n\n// lazy load banner lotties\nconst BANNER_LOTTIES: Record<ELeaderboardType, () => Promise<Record<string, unknown>>> = {\n [ELeaderboardType.ALL_TIME_STREAK]: () =>\n import('../../../assets/lotties/circle/elite-circle-lottie.json'),\n [ELeaderboardType.ALL_TIME]: () =>\n import('../../../assets/lotties/circle/elite-circle-lottie.json'),\n [ELeaderboardType.BI_WEEKLY]: () =>\n import('../../../assets/lotties/circle/tournament-ripple-lottie.json'),\n};\n\nconst leaderboards = [\n {\n name: 'TOURNAMENT',\n type: ELeaderboardType.BI_WEEKLY,\n },\n {\n name: 'STREAK STARS',\n type: ELeaderboardType.ALL_TIME_STREAK,\n },\n {\n name: 'ALL TIME',\n type: ELeaderboardType.ALL_TIME,\n },\n];\n\nexport const Leaderboard = ({\n leaderboardData,\n type = ELeaderboardType.BI_WEEKLY,\n userId,\n onClose,\n isLoading,\n}: ILeaderboardProps) => {\n const [currentLeaderBoardIndex, setCurrentLeaderboardIndex] = useState(\n leaderboards.findIndex(leaderboard => type === leaderboard.type),\n );\n\n const [currLeaderboardData, setCurrLeaderboardData] = useState<\n (ILeaderboardPlayerWithPoints | ILeaderboardPlayerWithStreak)[] | []\n >(leaderboardData?.[type]?.leaderboardPlayers || []);\n\n const [currLeaderboardTimeStamps, setCurrLeaderboardTimeStamps] = useState<{\n current: number;\n end: number;\n }>({\n current: 0,\n end: 0,\n });\n\n const [time, setTimer] = useTimer(0);\n const [isTournamentEnded, setIsTournamentEnded] = useState(false);\n const maxPoints = (currLeaderboardData?.[0] as ILeaderboardPlayerWithPoints)?.points;\n const maxStreakDays = (currLeaderboardData?.[0] as ILeaderboardPlayerWithStreak)?.streakDays || 0;\n const { playButtonSound } = useCircleSounds();\n\n const handlePrevious = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev - 1 < 0) {\n return leaderboards.length - 1;\n }\n\n return prev - 1;\n });\n };\n\n const handleNext = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev + 1 === leaderboards.length) {\n return 0;\n }\n\n return prev + 1;\n });\n };\n\n useEffect(() => {\n setTimer(0);\n }, [setTimer]);\n\n useEffect(() => {\n const currType = leaderboards[currentLeaderBoardIndex]?.type;\n const currLeaderboard = currType && leaderboardData?.[currType];\n\n if (currLeaderboard) {\n const leaderboardList = currLeaderboard.leaderboardPlayers || [];\n\n if (currType === ELeaderboardType.BI_WEEKLY) {\n setCurrLeaderboardTimeStamps({\n current: currLeaderboard.currentTimestamp,\n end: currLeaderboard.endTimestamp,\n });\n\n if (currLeaderboard.currentTimestamp > currLeaderboard.endTimestamp) {\n leaderboardList.splice(10);\n setIsTournamentEnded(true);\n }\n }\n\n setCurrLeaderboardData([...leaderboardList]);\n }\n }, [currentLeaderBoardIndex, leaderboardData]);\n\n return (\n <Styled.Leaderboard>\n <Styled.LeaderboardContainer>\n <Styled.BannerWrapper>\n {/* tournament banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Banner\n isLoading={isLoading || currLeaderboardData.length === 0}\n bgFromTopPosition={-120}\n bgFromRightPosition={-110}\n primaryText={\n isTournamentEnded ? <span>New Tournament</span> : <span>Tournament</span>\n }\n secondaryText={\n isTournamentEnded ? (\n <span>Starts Soon</span>\n ) : (\n <span>\n {' '}\n <Timer\n fromTimestamp={(time as number) + currLeaderboardTimeStamps.current}\n endTimestamp={currLeaderboardTimeStamps.end}\n />{' '}\n {'left'}\n </span>\n )\n }\n lottiePromise={BANNER_LOTTIES[ELeaderboardType.BI_WEEKLY]}\n custEle={\n <Styled.TournamentBannerCustContainer>\n <Styled.TrophyWrapper>\n <img src={ILLUSTRATIONS.TROPHY_CIRCLE} />\n </Styled.TrophyWrapper>\n </Styled.TournamentBannerCustContainer>\n }\n />\n )}\n\n {/* top streak banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME_STREAK && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Streak Stars</span>}\n secondaryText={<span>Top 50</span>}\n lottiePromise={BANNER_LOTTIES[ELeaderboardType.ALL_TIME_STREAK]}\n />\n )}\n\n {/* elite circle banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Elite Circle</span>}\n secondaryText={<span>Top 50</span>}\n lottiePromise={BANNER_LOTTIES[ELeaderboardType.ALL_TIME]}\n />\n )}\n </Styled.BannerWrapper>\n\n {isLoading && <CircularLoader />}\n\n {!isLoading && currLeaderboardData && (\n <Styled.ItemsWrapper topInset={0}>\n {isTournamentEnded &&\n leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Styled.Banner>\n <Text $renderAs=\"ab3\" $color=\"WHITE\">\n Congratulating winners of the last tournament!\n </Text>\n </Styled.Banner>\n )}\n {currLeaderboardData.map(player => {\n return (\n <LeaderboardItemWithObserver\n key={player.rank}\n player={player}\n rank={player.rank}\n maxStreakDays={maxStreakDays}\n maxPoints={maxPoints}\n leaderboardType={leaderboards[currentLeaderBoardIndex]?.type}\n isActive={player.userId === userId}\n />\n );\n })}\n </Styled.ItemsWrapper>\n )}\n\n <Styled.ActionButtonWrapper>\n <NavigationButton\n labels={Object.values(ELeaderboardType)}\n onLeftClick={handlePrevious}\n onRightClick={handleNext}\n currIndex={currentLeaderBoardIndex}\n onClose={onClose}\n disableSwipe={isLoading || currLeaderboardData.length === 0}\n />\n </Styled.ActionButtonWrapper>\n </Styled.LeaderboardContainer>\n </Styled.Leaderboard>\n );\n};\n"],"names":["BANNER_LOTTIES","ELeaderboardType","leaderboards","Leaderboard","leaderboardData","type","userId","onClose","isLoading","currentLeaderBoardIndex","setCurrentLeaderboardIndex","useState","leaderboard","currLeaderboardData","setCurrLeaderboardData","_a","currLeaderboardTimeStamps","setCurrLeaderboardTimeStamps","time","setTimer","useTimer","isTournamentEnded","setIsTournamentEnded","maxPoints","_b","maxStreakDays","_c","playButtonSound","useCircleSounds","handlePrevious","prev","handleNext","useEffect","currType","currLeaderboard","leaderboardList","Styled.Leaderboard","jsxs","Styled.LeaderboardContainer","Styled.BannerWrapper","_d","jsx","Banner","Timer","Styled.TournamentBannerCustContainer","Styled.TrophyWrapper","ILLUSTRATIONS","_e","_f","CircularLoader","Styled.ItemsWrapper","_g","Styled.Banner","Text","player","LeaderboardItemWithObserver","Styled.ActionButtonWrapper","NavigationButton"],"mappings":";;;;;;;;;;;;;AAqBA,MAAMA,IAAmF;AAAA,EACvF,CAACC,EAAiB,eAAe,GAAG,MAClC,OAAO,4DAAyD;AAAA,EAClE,CAACA,EAAiB,QAAQ,GAAG,MAC3B,OAAO,4DAAyD;AAAA,EAClE,CAACA,EAAiB,SAAS,GAAG,MAC5B,OAAO,iEAA8D;AACzE,GAEMC,IAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,MAAMD,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AACF,GAEaE,KAAc,CAAC;AAAA,EAC1B,iBAAAC;AAAA,EACA,MAAAC,IAAOJ,EAAiB;AAAA,EACxB,QAAAK;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,MAAyB;;AACjB,QAAA,CAACC,GAAyBC,CAA0B,IAAIC;AAAA,IAC5DT,EAAa,UAAU,CAAeU,MAAAP,MAASO,EAAY,IAAI;AAAA,EAAA,GAG3D,CAACC,GAAqBC,CAAsB,IAAIH,IAEpDI,IAAAX,KAAA,gBAAAA,EAAkBC,OAAlB,gBAAAU,EAAyB,uBAAsB,CAAA,CAAE,GAE7C,CAACC,GAA2BC,CAA4B,IAAIN,EAG/D;AAAA,IACD,SAAS;AAAA,IACT,KAAK;AAAA,EAAA,CACN,G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derboard.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard.tsx"],"sourcesContent":["import type {\n ILeaderboardPlayerWithPoints,\n ILeaderboardPlayerWithStreak,\n} from './dal/use-get-leaderboard-dal/use-get-leaderboard-dal-types';\nimport type { ILeaderboardProps } from './leaderboard-types';\n\nimport { useState, useEffect, useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport FlexView from '../../ui/layout/flex-view';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport Text from '../../ui/text/text';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { Banner } from './comps/banner/banner';\nimport InfoBar from './comps/info-bar/info-bar';\nimport { LeaderboardItemWithObserver } from './comps/leaderboard-item/leaderboard-item';\nimport { NavigationButton } from './comps/navigation-button/navigation-button';\nimport { Timer } from './comps/timer/timer';\nimport { ELeaderboardType } from './enums/leaderboard-type-enum';\nimport { useTimer } from './hooks';\nimport * as Styled from './leaderboard-styled';\n\n// lazy load banner lotties\nconst BANNER_LOTTIES: Record<ELeaderboardType, () => Promise<Record<string, unknown>>> = {\n [ELeaderboardType.ALL_TIME_STREAK]: () =>\n import('../../../assets/lotties/circle/elite-circle-lottie.json'),\n [ELeaderboardType.ALL_TIME]: () =>\n import('../../../assets/lotties/circle/elite-circle-lottie.json'),\n [ELeaderboardType.BI_WEEKLY]: () =>\n import('../../../assets/lotties/circle/tournament-ripple-lottie.json'),\n};\n\nconst leaderboards = [\n {\n name: 'TOURNAMENT',\n type: ELeaderboardType.BI_WEEKLY,\n },\n {\n name: 'STREAK STARS',\n type: ELeaderboardType.ALL_TIME_STREAK,\n },\n {\n name: 'ALL TIME',\n type: ELeaderboardType.ALL_TIME,\n },\n];\n\nexport const Leaderboard = ({\n leaderboardData,\n type = ELeaderboardType.BI_WEEKLY,\n userId,\n onClose,\n isLoading,\n showInfoBar: showInfoBarByDefault,\n onInfoBarDismiss,\n streakReduction,\n}: ILeaderboardProps) => {\n const [currentLeaderBoardIndex, setCurrentLeaderboardIndex] = useState(\n leaderboards.findIndex(leaderboard => type === leaderboard.type),\n );\n\n const [currLeaderboardData, setCurrLeaderboardData] = useState<\n (ILeaderboardPlayerWithPoints | ILeaderboardPlayerWithStreak)[] | []\n >(leaderboardData?.[type]?.leaderboardPlayers || []);\n\n const [currLeaderboardTimeStamps, setCurrLeaderboardTimeStamps] = useState<{\n current: number;\n end: number;\n }>({\n current: 0,\n end: 0,\n });\n\n const [time, setTimer] = useTimer(0);\n const [isTournamentEnded, setIsTournamentEnded] = useState(false);\n const maxPoints = (currLeaderboardData?.[0] as ILeaderboardPlayerWithPoints)?.points;\n const maxStreakDays = (currLeaderboardData?.[0] as ILeaderboardPlayerWithStreak)?.streakDays || 0;\n const { playButtonSound } = useCircleSounds();\n const [showInfoBar, setShowInfoBar] = useState(showInfoBarByDefault);\n\n const hasStreakReduced = streakReduction > 0;\n const handleInfoBarDismiss = useCallback(() => {\n setShowInfoBar(false);\n onInfoBarDismiss();\n }, [onInfoBarDismiss]);\n\n const handlePrevious = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev - 1 < 0) {\n return leaderboards.length - 1;\n }\n\n return prev - 1;\n });\n };\n\n const handleNext = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev + 1 === leaderboards.length) {\n return 0;\n }\n\n return prev + 1;\n });\n };\n\n useEffect(() => {\n setTimer(0);\n }, [setTimer]);\n\n useEffect(() => {\n const currType = leaderboards[currentLeaderBoardIndex]?.type;\n const currLeaderboard = currType && leaderboardData?.[currType];\n\n if (currLeaderboard) {\n const leaderboardList = currLeaderboard.leaderboardPlayers || [];\n\n if (currType === ELeaderboardType.BI_WEEKLY) {\n setCurrLeaderboardTimeStamps({\n current: currLeaderboard.currentTimestamp,\n end: currLeaderboard.endTimestamp,\n });\n\n if (currLeaderboard.currentTimestamp > currLeaderboard.endTimestamp) {\n leaderboardList.splice(10);\n setIsTournamentEnded(true);\n }\n }\n\n setCurrLeaderboardData([...leaderboardList]);\n }\n }, [currentLeaderBoardIndex, leaderboardData]);\n\n return (\n <Styled.Leaderboard>\n <Styled.LeaderboardContainer>\n <Styled.BannerWrapper>\n {/* tournament banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Banner\n isLoading={isLoading || currLeaderboardData.length === 0}\n bgFromTopPosition={-120}\n bgFromRightPosition={-110}\n primaryText={\n isTournamentEnded ? <span>New Tournament</span> : <span>Tournament</span>\n }\n secondaryText={\n isTournamentEnded ? (\n <span>Starts Soon</span>\n ) : (\n <span>\n {' '}\n <Timer\n fromTimestamp={(time as number) + currLeaderboardTimeStamps.current}\n endTimestamp={currLeaderboardTimeStamps.end}\n />{' '}\n {'left'}\n </span>\n )\n }\n lottiePromise={BANNER_LOTTIES[ELeaderboardType.BI_WEEKLY]}\n custEle={\n <Styled.TournamentBannerCustContainer>\n <Styled.TrophyWrapper>\n <img src={ILLUSTRATIONS.TROPHY_CIRCLE} />\n </Styled.TrophyWrapper>\n </Styled.TournamentBannerCustContainer>\n }\n />\n )}\n\n {/* top streak banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME_STREAK && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Streak Stars</span>}\n secondaryText={<span>Top 50</span>}\n lottiePromise={BANNER_LOTTIES[ELeaderboardType.ALL_TIME_STREAK]}\n />\n )}\n\n {/* elite circle banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Elite Circle</span>}\n secondaryText={<span>Top 50</span>}\n lottiePromise={BANNER_LOTTIES[ELeaderboardType.ALL_TIME]}\n />\n )}\n </Styled.BannerWrapper>\n\n {isLoading && <CircularLoader />}\n\n {!isLoading && currLeaderboardData && (\n <Styled.ItemsWrapper topInset={0}>\n {showInfoBar && !hasStreakReduced && (\n <InfoBar\n children={\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <Text $renderAs=\"ab2\" $color=\"WHITE_T_87\">\n Streak saved for the day! Come back tomorrow to keep increasing it.\n </Text>\n <CrossIcon cursor={'pointer'} color=\"WHITE\" onClick={handleInfoBarDismiss} />\n </FlexView>\n }\n hue=\"GREEN\"\n marginX={16}\n marginY={16}\n paddingX={16}\n paddingY={16}\n />\n )}\n\n {showInfoBar && hasStreakReduced && (\n <InfoBar\n children={\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <FlexView>\n <Text $renderAs=\"ab2\" $color=\"WHITE_T_87\">\n Keep building your streak by completing an activity each day.\n </Text>\n <Text $renderAs=\"ab2\" $color=\"WHITE_T_87\">\n For each day missed, your streak reduces by 1.\n </Text>\n </FlexView>\n <CrossIcon cursor={'pointer'} color=\"WHITE\" onClick={handleInfoBarDismiss} />\n </FlexView>\n }\n hue=\"YELLOW\"\n marginX={16}\n marginY={16}\n paddingX={16}\n paddingY={16}\n />\n )}\n\n {isTournamentEnded &&\n leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Styled.Banner>\n <Text $renderAs=\"ab3\" $color=\"WHITE\">\n Congratulating winners of the last tournament!\n </Text>\n </Styled.Banner>\n )}\n {currLeaderboardData.map(player => {\n return (\n <LeaderboardItemWithObserver\n key={player.rank}\n player={player}\n rank={player.rank}\n maxStreakDays={maxStreakDays}\n maxPoints={maxPoints}\n leaderboardType={leaderboards[currentLeaderBoardIndex]?.type}\n isActive={player.userId === userId}\n />\n );\n })}\n </Styled.ItemsWrapper>\n )}\n\n <Styled.ActionButtonWrapper>\n <NavigationButton\n labels={Object.values(ELeaderboardType)}\n onLeftClick={handlePrevious}\n onRightClick={handleNext}\n currIndex={currentLeaderBoardIndex}\n onClose={onClose}\n disableSwipe={isLoading || currLeaderboardData.length === 0}\n />\n </Styled.ActionButtonWrapper>\n </Styled.LeaderboardContainer>\n </Styled.Leaderboard>\n );\n};\n"],"names":["BANNER_LOTTIES","ELeaderboardType","leaderboards","Leaderboard","leaderboardData","type","userId","onClose","isLoading","showInfoBarByDefault","onInfoBarDismiss","streakReduction","currentLeaderBoardIndex","setCurrentLeaderboardIndex","useState","leaderboard","currLeaderboardData","setCurrLeaderboardData","_a","currLeaderboardTimeStamps","setCurrLeaderboardTimeStamps","time","setTimer","useTimer","isTournamentEnded","setIsTournamentEnded","maxPoints","_b","maxStreakDays","_c","playButtonSound","useCircleSounds","showInfoBar","setShowInfoBar","hasStreakReduced","handleInfoBarDismiss","useCallback","handlePrevious","prev","handleNext","useEffect","currType","currLeaderboard","leaderboardList","Styled.Leaderboard","jsxs","Styled.LeaderboardContainer","Styled.BannerWrapper","_d","jsx","Banner","Timer","Styled.TournamentBannerCustContainer","Styled.TrophyWrapper","ILLUSTRATIONS","_e","_f","CircularLoader","Styled.ItemsWrapper","InfoBar","FlexView","Text","CrossIcon","_g","Styled.Banner","player","LeaderboardItemWithObserver","Styled.ActionButtonWrapper","NavigationButton"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAMA,IAAmF;AAAA,EACvF,CAACC,EAAiB,eAAe,GAAG,MAClC,OAAO,4DAAyD;AAAA,EAClE,CAACA,EAAiB,QAAQ,GAAG,MAC3B,OAAO,4DAAyD;AAAA,EAClE,CAACA,EAAiB,SAAS,GAAG,MAC5B,OAAO,iEAA8D;AACzE,GAEMC,IAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,MAAMD,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AACF,GAEaE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,YACb,eAAArC;AAAA,YACA,WAAAF;AAAA,YACA,kBAAiBR,IAAAhB,EAAaU,CAAuB,MAApC,gBAAAM,EAAuC;AAAA,YACxD,UAAU+C,EAAO,WAAW3D;AAAA,UAAA;AAAA,UANvB2D,EAAO;AAAA,QAAA;AAAA,MAOd,CAEH;AAAA,IAAA,GACH;AAAA,IAGF,gBAAAhB,EAACkB,IAAA,EACC,UAAA,gBAAAlB;AAAA,MAACmB;AAAA,MAAA;AAAA,QACC,QAAQ,OAAO,OAAOnE,CAAgB;AAAA,QACtC,aAAaoC;AAAA,QACb,cAAcE;AAAA,QACd,WAAW3B;AAAA,QACX,SAAAL;AAAA,QACA,cAAcC,KAAaQ,EAAoB,WAAW;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
|
package/dist/index.d.ts
CHANGED
@@ -1348,6 +1348,9 @@ declare interface ILeaderboardProps {
|
|
1348
1348
|
userId: string;
|
1349
1349
|
onClose: () => void;
|
1350
1350
|
isLoading: boolean;
|
1351
|
+
showInfoBar: boolean;
|
1352
|
+
streakReduction: number;
|
1353
|
+
onInfoBarDismiss: () => void;
|
1351
1354
|
}
|
1352
1355
|
|
1353
1356
|
declare interface ILearningSheetData {
|
@@ -2740,7 +2743,7 @@ declare interface ITimeStampsResponseModel {
|
|
2740
2743
|
rush_hour_end_timestamp?: number;
|
2741
2744
|
}
|
2742
2745
|
|
2743
|
-
declare interface ITodaysContentTimeStamps {
|
2746
|
+
export declare interface ITodaysContentTimeStamps {
|
2744
2747
|
current: number;
|
2745
2748
|
startTimestamp: number;
|
2746
2749
|
endTimestamp: number;
|
@@ -3253,7 +3256,7 @@ export declare const JourneyProvider: FC<{
|
|
3253
3256
|
children: ReactNode;
|
3254
3257
|
}>;
|
3255
3258
|
|
3256
|
-
export declare const Leaderboard: ({ leaderboardData, type, userId, onClose, isLoading, }: ILeaderboardProps) => JSX_2.Element;
|
3259
|
+
export declare const Leaderboard: ({ leaderboardData, type, userId, onClose, isLoading, showInfoBar: showInfoBarByDefault, onInfoBarDismiss, streakReduction, }: ILeaderboardProps) => JSX_2.Element;
|
3257
3260
|
|
3258
3261
|
export declare const LearnosityPreloader: FC<PropsWithChildren<ILearnosityPreloaderProps>>;
|
3259
3262
|
|