@cuemath/leap 3.3.25 → 3.3.26-akm-2
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/game-launcher/comps/circular-game-card/circular-game-card-styled.js +48 -0
- package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.js +72 -0
- package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/circular-game-card/constants.js +7 -0
- package/dist/features/circle-games/game-launcher/comps/circular-game-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/game-card-content/constants.js +6 -0
- package/dist/features/circle-games/game-launcher/comps/game-card-content/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.js +62 -0
- package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content.js +13 -0
- package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +2 -7
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js +12 -5
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher-v2.js +159 -0
- package/dist/features/circle-games/game-launcher/game-launcher-v2.js.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +0 -138
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +0 -105
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +0 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +0 -219
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +0 -8
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +0 -286
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js +0 -10
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +0 -137
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +0 -14
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +0 -230
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import i from "styled-components";
|
|
2
|
+
import { GAME_LAUNCHER_SIZE as e } from "../card-container/constants.js";
|
|
3
|
+
import { BORDER_WIDTH as o, GAME_LAUNCHER_ASSET_PADDING as t } from "./constants.js";
|
|
4
|
+
const d = i.div`
|
|
5
|
+
position: absolute;
|
|
6
|
+
z-index: 5;
|
|
7
|
+
height: ${e}px;
|
|
8
|
+
width: ${e}px;
|
|
9
|
+
border-radius: 50%;
|
|
10
|
+
border: ${o}px solid #fff;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
`, s = i.div`
|
|
13
|
+
position: absolute;
|
|
14
|
+
height: ${e + t}px;
|
|
15
|
+
width: ${e + t}px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
top: ${-t / 2 - o}px;
|
|
18
|
+
left: ${-t / 2 - o}px;
|
|
19
|
+
z-index: 4;
|
|
20
|
+
`;
|
|
21
|
+
i.div`
|
|
22
|
+
position: absolute;
|
|
23
|
+
width: ${e}px;
|
|
24
|
+
height: ${e}px;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
background: transparent;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
flex: 1;
|
|
33
|
+
|
|
34
|
+
transform-origin: center;
|
|
35
|
+
transform: rotate(0deg); // change dynamically if needed
|
|
36
|
+
`;
|
|
37
|
+
const p = i.img`
|
|
38
|
+
position: absolute;
|
|
39
|
+
width: 100%;
|
|
40
|
+
object-fit: contain;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
`;
|
|
43
|
+
export {
|
|
44
|
+
d as CircularGameCardWrapper,
|
|
45
|
+
p as DisplayNameImage,
|
|
46
|
+
s as ProgressRingLottieContainer
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=circular-game-card-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circular-game-card-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING, BORDER_WIDTH } from './constants';\n\nexport const CircularGameCardWrapper = styled.div`\n position: absolute;\n z-index: 5;\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n border-radius: 50%;\n border: ${BORDER_WIDTH}px solid #fff;\n cursor: pointer;\n`;\n\nexport const ProgressRingLottieContainer = styled.div`\n position: absolute;\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n border-radius: 50%;\n top: ${-GAME_LAUNCHER_ASSET_PADDING / 2 - BORDER_WIDTH}px;\n left: ${-GAME_LAUNCHER_ASSET_PADDING / 2 - BORDER_WIDTH}px;\n z-index: 4;\n`;\n\nexport const GameCardSegmentWrapper = styled.div`\n position: absolute;\n width: ${GAME_LAUNCHER_SIZE}px;\n height: ${GAME_LAUNCHER_SIZE}px;\n border-radius: 50%;\n background: transparent;\n overflow: hidden;\n\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n transform-origin: center;\n transform: rotate(0deg); // change dynamically if needed\n`;\n\nexport const DisplayNameImage = styled.img`\n position: absolute;\n width: 100%;\n object-fit: contain;\n pointer-events: none;\n`;\n"],"names":["CircularGameCardWrapper","styled","GAME_LAUNCHER_SIZE","BORDER_WIDTH","ProgressRingLottieContainer","GAME_LAUNCHER_ASSET_PADDING","DisplayNameImage"],"mappings":";;;AAKO,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA,YAGlCC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA,YAEjBC,CAAY;AAAA;AAAA,GAIXC,IAA8BH,EAAO;AAAA;AAAA,YAEtCC,IAAqBG,CAA2B;AAAA,WACjDH,IAAqBG,CAA2B;AAAA;AAAA,SAElD,CAACA,IAA8B,IAAIF,CAAY;AAAA,UAC9C,CAACE,IAA8B,IAAIF,CAAY;AAAA;AAAA;AAInBF,EAAO;AAAA;AAAA,WAElCC,CAAkB;AAAA,YACjBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcvB,MAAMI,IAAmBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as n, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { memo as g, forwardRef as v, useRef as d, useState as i, useCallback as o, useImperativeHandle as k, useMemo as I } from "react";
|
|
3
|
+
import { LOTTIE as y } from "../../../../../assets/lottie/lottie.js";
|
|
4
|
+
import F from "../../../../ui/lottie-animation/lottie-animation.js";
|
|
5
|
+
import { CardContainer as H } from "../card-container/card-container.js";
|
|
6
|
+
import { GameCardContent as N } from "../game-card-content/game-card-content.js";
|
|
7
|
+
import { CircularGameCardWrapper as j, ProgressRingLottieContainer as O, DisplayNameImage as U } from "./circular-game-card-styled.js";
|
|
8
|
+
const w = ({ data: e, label: t, initialValue: m = 0, value: l, maxValue: s = 1 }, T) => {
|
|
9
|
+
const a = d(null), [R, c] = i(t), p = d(null), [C, b] = i(!1), [A, E] = i("WHITE_T_87"), L = o(() => {
|
|
10
|
+
c(e.name);
|
|
11
|
+
}, [e.name]), P = o(() => {
|
|
12
|
+
c(t);
|
|
13
|
+
}, [t]), h = o(() => {
|
|
14
|
+
var r;
|
|
15
|
+
(r = e == null ? void 0 : e.onPress) == null || r.call(e);
|
|
16
|
+
}, [e]), G = o((r) => {
|
|
17
|
+
b(!0), E(r);
|
|
18
|
+
}, []);
|
|
19
|
+
k(T, () => ({
|
|
20
|
+
labelRef: a,
|
|
21
|
+
circularCardWrapperRef: p,
|
|
22
|
+
startLabelAnimation: G
|
|
23
|
+
}));
|
|
24
|
+
const f = I(() => {
|
|
25
|
+
if (s <= 0)
|
|
26
|
+
return;
|
|
27
|
+
const r = 92, u = r / s, S = Math.min(u * m, r), W = Math.min(u * l + 1, r);
|
|
28
|
+
return [S, W];
|
|
29
|
+
}, [m, s, l]), M = I(
|
|
30
|
+
() => ({
|
|
31
|
+
renderer: "canvas",
|
|
32
|
+
autoplay: !0,
|
|
33
|
+
loop: !1,
|
|
34
|
+
initialSegment: f
|
|
35
|
+
}),
|
|
36
|
+
[f]
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ n(
|
|
39
|
+
H,
|
|
40
|
+
{
|
|
41
|
+
ref: p,
|
|
42
|
+
labelRef: a,
|
|
43
|
+
label: R,
|
|
44
|
+
isAnimated: C,
|
|
45
|
+
onMouseLeave: P,
|
|
46
|
+
onMouseEnter: L,
|
|
47
|
+
labelColor: C ? A : "WHITE_T_60",
|
|
48
|
+
children: /* @__PURE__ */ _(j, { onClick: h, children: [
|
|
49
|
+
/* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(
|
|
50
|
+
F,
|
|
51
|
+
{
|
|
52
|
+
src: y.LEVELUP_RINGS,
|
|
53
|
+
settings: M,
|
|
54
|
+
animateOnIntersect: !0
|
|
55
|
+
}
|
|
56
|
+
) }),
|
|
57
|
+
/* @__PURE__ */ n(N, { card: e.card, isCompleted: e.isCompleted }),
|
|
58
|
+
/* @__PURE__ */ n(
|
|
59
|
+
U,
|
|
60
|
+
{
|
|
61
|
+
src: e.displayNameImage || void 0,
|
|
62
|
+
alt: `${e.name} label`
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] })
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}, K = g(v(w));
|
|
69
|
+
export {
|
|
70
|
+
K as CircularGameCard
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=circular-game-card.js.map
|
package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circular-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type { ICircularGameCardProps, ICircularGameCardRefs } from './circular-game-card-types';\nimport type { ForwardRefRenderFunction } from 'react';\n\nimport React, {\n forwardRef,\n memo,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { CardContainer } from '../card-container/card-container';\nimport { GameCardContent } from '../game-card-content/game-card-content';\nimport * as Styled from './circular-game-card-styled';\n\nconst CircularGameCardComponent: ForwardRefRenderFunction<\n ICircularGameCardRefs,\n ICircularGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const cardWrapperRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n //to be used as per design specs\n const onMouseEnter = useCallback(() => {\n setLabel(data.name);\n }, [data.name]);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n const onCardClick = useCallback(() => {\n data?.onPress?.();\n }, [data]);\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n circularCardWrapperRef: cardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <CardContainer\n ref={cardWrapperRef}\n labelRef={labelRef}\n label={label}\n isAnimated={isAnimated}\n onMouseLeave={onMouseLeave}\n onMouseEnter={onMouseEnter}\n labelColor={isAnimated ? animatedColor : 'WHITE_T_60'}\n >\n <Styled.CircularGameCardWrapper onClick={onCardClick}>\n <Styled.ProgressRingLottieContainer>\n <LottieAnimation\n src={LOTTIE.LEVELUP_RINGS}\n settings={levelUpAnimationSettings}\n animateOnIntersect\n />\n </Styled.ProgressRingLottieContainer>\n <GameCardContent card={data.card} isCompleted={data.isCompleted} />\n\n <Styled.DisplayNameImage\n src={data.displayNameImage || undefined}\n alt={`${data.name} label`}\n />\n </Styled.CircularGameCardWrapper>\n </CardContainer>\n );\n};\n\nexport const CircularGameCard = memo(forwardRef(CircularGameCardComponent));\n"],"names":["CircularGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","useRef","label","setLabel","useState","cardWrapperRef","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","onMouseEnter","useCallback","onMouseLeave","onCardClick","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","jsx","CardContainer","jsxs","Styled.CircularGameCardWrapper","Styled.ProgressRingLottieContainer","LottieAnimation","LOTTIE","GameCardContent","Styled.DisplayNameImage","CircularGameCard","memo","forwardRef"],"mappings":";;;;;;;AAoBA,MAAMA,IAGF,CAAC,EAAE,MAAAC,GAAM,OAAOC,GAAmB,cAAAC,IAAe,GAAG,OA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IAElB,CAACA,CAAiB;AAAA,EAAA;AAIlB,SAAA,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKrB;AAAA,MACL,UAAAL;AAAA,MACA,OAAAE;AAAA,MACA,YAAAI;AAAA,MACA,cAAAM;AAAA,MACA,cAAAF;AAAA,MACA,YAAYJ,IAAaE,IAAgB;AAAA,MAEzC,UAAC,gBAAAmB,EAAAC,GAAA,EAA+B,SAASf,GACvC,UAAA;AAAA,QAAC,gBAAAY,EAAAI,GAAA,EACC,UAAA,gBAAAJ;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,KAAKC,EAAO;AAAA,YACZ,UAAUP;AAAA,YACV,oBAAkB;AAAA,UAAA;AAAA,QAAA,GAEtB;AAAA,0BACCQ,GAAgB,EAAA,MAAMtC,EAAK,MAAM,aAAaA,EAAK,aAAa;AAAA,QAEjE,gBAAA+B;AAAA,UAACQ;AAAAA,UAAA;AAAA,YACC,KAAKvC,EAAK,oBAAoB;AAAA,YAC9B,KAAK,GAAGA,EAAK,IAAI;AAAA,UAAA;AAAA,QACnB;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEawC,IAAmBC,EAAKC,EAAW3C,CAAyB,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/circular-game-card/constants.ts"],"sourcesContent":["import { GAME_LAUNCHER_SIZE } from '../card-container/constants';\n\nexport const GAME_LAUNCHER_ASSET_PADDING = (GAME_LAUNCHER_SIZE * 17.5) / 100;\n\nexport const BORDER_WIDTH = 2;\n"],"names":["GAME_LAUNCHER_ASSET_PADDING","GAME_LAUNCHER_SIZE","BORDER_WIDTH"],"mappings":";AAEa,MAAAA,IAA+BC,IAAqB,OAAQ,KAE5DC,IAAe;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/game-card-content/constants.ts"],"sourcesContent":["import { GAME_LAUNCHER_SIZE } from '../card-container/constants';\n\nexport const ASSET_CONTAINER_SIZE = Math.ceil((GAME_LAUNCHER_SIZE * 120) / 100);\n"],"names":["ASSET_CONTAINER_SIZE","GAME_LAUNCHER_SIZE"],"mappings":";AAEO,MAAMA,IAAuB,KAAK,KAAMC,IAAqB,MAAO,GAAG;"}
|
package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
import { GAME_LAUNCHER_SIZE as r } from "../card-container/constants.js";
|
|
3
|
+
import { ASSET_CONTAINER_SIZE as e } from "./constants.js";
|
|
4
|
+
const s = t.div`
|
|
5
|
+
position: absolute;
|
|
6
|
+
width: ${r}px;
|
|
7
|
+
height: ${r}px;
|
|
8
|
+
border-radius: 50%;
|
|
9
|
+
background: transparent;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
flex: 1;
|
|
16
|
+
|
|
17
|
+
transform-origin: center;
|
|
18
|
+
transform: rotate(0deg); // change dynamically if needed
|
|
19
|
+
`, d = t.div`
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 50%;
|
|
22
|
+
left: 50%;
|
|
23
|
+
transform: translate(-50%, -50%);
|
|
24
|
+
|
|
25
|
+
width: ${e}px;
|
|
26
|
+
height: ${e}px;
|
|
27
|
+
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background: ${({ theme: n }) => n.colors.WHITE_T_15};
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
`, l = t.div`
|
|
42
|
+
position: absolute;
|
|
43
|
+
height: ${e}px;
|
|
44
|
+
width: ${e}px;
|
|
45
|
+
z-index: 5;
|
|
46
|
+
backdrop-filter: blur(16px);
|
|
47
|
+
-webkit-backdrop-filter: blur(16px);
|
|
48
|
+
/* pointer-events: none; */
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
`, p = t.div`
|
|
53
|
+
position: absolute;
|
|
54
|
+
z-index: 6;
|
|
55
|
+
`;
|
|
56
|
+
export {
|
|
57
|
+
d as AssetContainer,
|
|
58
|
+
l as CircularOverlay,
|
|
59
|
+
s as GameCardSegmentWrapper,
|
|
60
|
+
p as IconWrapper
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=game-card-content-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-card-content-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../card-container/constants';\nimport { ASSET_CONTAINER_SIZE } from './constants';\n\nexport const GameCardSegmentWrapper = styled.div`\n position: absolute;\n width: ${GAME_LAUNCHER_SIZE}px;\n height: ${GAME_LAUNCHER_SIZE}px;\n border-radius: 50%;\n background: transparent;\n overflow: hidden;\n\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n transform-origin: center;\n transform: rotate(0deg); // change dynamically if needed\n`;\n\nexport const AssetContainer = styled.div`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n width: ${ASSET_CONTAINER_SIZE}px;\n height: ${ASSET_CONTAINER_SIZE}px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n overflow: hidden;\n background-color: transparent;\n z-index: 1;\n flex-shrink: 0;\n\n &:hover {\n background: ${({ theme }) => theme.colors.WHITE_T_15};\n cursor: pointer;\n }\n`;\n\nexport const CircularOverlay = styled.div`\n position: absolute;\n height: ${ASSET_CONTAINER_SIZE}px;\n width: ${ASSET_CONTAINER_SIZE}px;\n z-index: 5;\n backdrop-filter: blur(16px);\n -webkit-backdrop-filter: blur(16px);\n /* pointer-events: none; */\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const IconWrapper = styled.div`\n position: absolute;\n z-index: 6;\n`;\n"],"names":["GameCardSegmentWrapper","styled","GAME_LAUNCHER_SIZE","AssetContainer","ASSET_CONTAINER_SIZE","theme","CircularOverlay","IconWrapper"],"mappings":";;;AAKO,MAAMA,IAAyBC,EAAO;AAAA;AAAA,WAElCC,CAAkB;AAAA,YACjBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAcjBC,IAAiBF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAM1BG,CAAoB;AAAA,YACnBA,CAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAYd,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,GAK3CC,IAAkBL,EAAO;AAAA;AAAA,YAE1BG,CAAoB;AAAA,WACrBA,CAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUlBG,IAAcN,EAAO;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as o } from "react";
|
|
3
|
+
import i from "../../../../../assets/line-icons/icons/check.js";
|
|
4
|
+
import m from "../../../../ui/lottie-animation/lottie-animation.js";
|
|
5
|
+
import { GameCardSegmentWrapper as a, AssetContainer as c, CircularOverlay as s, IconWrapper as p } from "./game-card-content-styled.js";
|
|
6
|
+
const d = { renderer: "canvas", loop: !0 }, u = o(({ isCompleted: e, card: t }) => /* @__PURE__ */ n(a, { children: [
|
|
7
|
+
/* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(m, { src: t, settings: d, animateOnIntersect: !0 }) }),
|
|
8
|
+
e && /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(i, { color: "#fff", height: 40, width: 40 }) }) })
|
|
9
|
+
] }));
|
|
10
|
+
export {
|
|
11
|
+
u as GameCardContent
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=game-card-content.js.map
|
package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-card-content.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/game-card-content/game-card-content.tsx"],"sourcesContent":["import type { IGameCardContentProps } from './game-card-content-types';\n\nimport { memo } from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './game-card-content-styled';\n\nconst renderSettings = { renderer: 'canvas', loop: true };\n\nexport const GameCardContent = memo(({ isCompleted, card }: IGameCardContentProps) => {\n return (\n <Styled.GameCardSegmentWrapper>\n <Styled.AssetContainer>\n <LottieAnimation src={card} settings={renderSettings} animateOnIntersect />\n </Styled.AssetContainer>\n\n {isCompleted && (\n <Styled.CircularOverlay>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.CircularOverlay>\n )}\n </Styled.GameCardSegmentWrapper>\n );\n});\n"],"names":["renderSettings","GameCardContent","memo","isCompleted","card","jsxs","Styled.GameCardSegmentWrapper","jsx","Styled.AssetContainer","LottieAnimation","Styled.CircularOverlay","Styled.IconWrapper","CheckIcon"],"mappings":";;;;;AAQA,MAAMA,IAAiB,EAAE,UAAU,UAAU,MAAM,GAAK,GAE3CC,IAAkBC,EAAK,CAAC,EAAE,aAAAC,GAAa,MAAAC,QAEhD,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,EAAC,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAE,GAAA,EAAgB,KAAKL,GAAM,UAAUJ,GAAgB,oBAAkB,GAAA,CAAC,EAC3E,CAAA;AAAA,EAECG,KACE,gBAAAI,EAAAG,GAAA,EACC,UAAA,gBAAAH,EAACI,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EAAU,OAAM,QAAO,QAAQ,IAAI,OAAO,GAAA,CAAI,EACjD,CAAA,GACF;AAEJ,EAAA,CAAA,CAEH;"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { GAME_LAUNCHER_SIZE as E } from "../card-container/constants.js";
|
|
2
|
-
const A = E * 17.5 / 100,
|
|
2
|
+
const A = E * 17.5 / 100, R = 5;
|
|
3
3
|
export {
|
|
4
|
-
o as ASSET_CONTAINER_SIZE,
|
|
5
|
-
R as ASSET_OFFSET_X,
|
|
6
|
-
T as ASSET_OFFSET_Y,
|
|
7
|
-
c as BORDER_WIDTH,
|
|
8
4
|
A as GAME_LAUNCHER_ASSET_PADDING,
|
|
9
|
-
|
|
10
|
-
n as delta
|
|
5
|
+
R as GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH
|
|
11
6
|
};
|
|
12
7
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/constants.ts"],"sourcesContent":["import { GAME_LAUNCHER_SIZE } from '../card-container/constants';\n\nexport const GAME_LAUNCHER_ASSET_PADDING = (GAME_LAUNCHER_SIZE * 17.5) / 100;\n\n// to show the stroke of the card below points, this width needs to be reduced\nexport const GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH = 5;\n\n// asset container needs to be 350/400 % of GAME LAUNCHER SIZE\nexport const ASSET_CONTAINER_SIZE = Math.ceil((GAME_LAUNCHER_SIZE * 87.5) / 100);\n\n// ASSET x-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_X = (GAME_LAUNCHER_SIZE / 2) * (37.5 / 100);\n\n// ASSET y-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_Y = (GAME_LAUNCHER_SIZE / 2) * (12.5 / 100);\n\nconst RADIAN = Math.PI / 180;\n\nexport const BORDER_WIDTH = 2;\n\n// delta created by a segment from x axis is 30deg\n// sin30 = delta/(CARD_SIZE/2)\nexport const delta =\n Math.sin(30 * RADIAN) * (GAME_LAUNCHER_SIZE / 2 - GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH);\n"],"names":["GAME_LAUNCHER_ASSET_PADDING","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH"
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/constants.ts"],"sourcesContent":["import { GAME_LAUNCHER_SIZE } from '../card-container/constants';\n\nexport const GAME_LAUNCHER_ASSET_PADDING = (GAME_LAUNCHER_SIZE * 17.5) / 100;\n\n// to show the stroke of the card below points, this width needs to be reduced\nexport const GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH = 5;\n\n// asset container needs to be 350/400 % of GAME LAUNCHER SIZE\nexport const ASSET_CONTAINER_SIZE = Math.ceil((GAME_LAUNCHER_SIZE * 87.5) / 100);\n\n// ASSET x-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_X = (GAME_LAUNCHER_SIZE / 2) * (37.5 / 100);\n\n// ASSET y-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_Y = (GAME_LAUNCHER_SIZE / 2) * (12.5 / 100);\n\nconst RADIAN = Math.PI / 180;\n\nexport const BORDER_WIDTH = 2;\n\n// delta created by a segment from x axis is 30deg\n// sin30 = delta/(CARD_SIZE/2)\nexport const delta =\n Math.sin(30 * RADIAN) * (GAME_LAUNCHER_SIZE / 2 - GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH);\n"],"names":["GAME_LAUNCHER_ASSET_PADDING","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH"],"mappings":";AAEa,MAAAA,IAA+BC,IAAqB,OAAQ,KAG5DC,IAA2C;"}
|
package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProjectType as i } from "../../../games/web-view/enums/project-type-enum.js";
|
|
2
|
-
const
|
|
2
|
+
const r = (t) => {
|
|
3
3
|
let s = null;
|
|
4
4
|
return t && (s = {
|
|
5
5
|
points: t.points,
|
|
@@ -8,6 +8,9 @@ const a = (t) => {
|
|
|
8
8
|
streakDaysBeforeReduction: t.streak_days_before_reduction,
|
|
9
9
|
streakStatus: t.streak_status,
|
|
10
10
|
tournamentRank: t.tournament_rank,
|
|
11
|
+
progress: t.progress,
|
|
12
|
+
dailyPoints: t.daily_points,
|
|
13
|
+
dailyTarget: t.daily_target,
|
|
11
14
|
projects: {},
|
|
12
15
|
timestamps: {
|
|
13
16
|
startTimestamp: t.timestamps.start_timestamp,
|
|
@@ -24,7 +27,9 @@ const a = (t) => {
|
|
|
24
27
|
cardLottie: e.card,
|
|
25
28
|
tutorial: e.tutorial,
|
|
26
29
|
variant: e.variant,
|
|
27
|
-
isPlayed: e.played
|
|
30
|
+
isPlayed: e.played,
|
|
31
|
+
displayNameImage: e.display_name_image || ""
|
|
32
|
+
// optional
|
|
28
33
|
}))
|
|
29
34
|
}), t.projects.puzzles && (s.projects.puzzles = {
|
|
30
35
|
label: t.projects.puzzles.label,
|
|
@@ -38,7 +43,8 @@ const a = (t) => {
|
|
|
38
43
|
variant: e.variant,
|
|
39
44
|
question: e.question,
|
|
40
45
|
isHintSeen: e.is_hint_seen,
|
|
41
|
-
solved: e.solved
|
|
46
|
+
solved: e.solved,
|
|
47
|
+
displayNameImage: e.display_name_image || ""
|
|
42
48
|
}))
|
|
43
49
|
}), t.projects.lessons && (s.projects.lessons = {
|
|
44
50
|
label: t.projects.lessons.label,
|
|
@@ -53,7 +59,8 @@ const a = (t) => {
|
|
|
53
59
|
sessionId: e.session_id,
|
|
54
60
|
miniGameIdentifier: e.mini_game_identifier,
|
|
55
61
|
targetQuestions: e.target_questions,
|
|
56
|
-
status: e.status
|
|
62
|
+
status: e.status,
|
|
63
|
+
displayNameImage: e.display_name_image || ""
|
|
57
64
|
}))
|
|
58
65
|
}), t.projects.tables && (s.projects.tables = {
|
|
59
66
|
label: t.projects.tables.label,
|
|
@@ -68,6 +75,6 @@ const a = (t) => {
|
|
|
68
75
|
})), s;
|
|
69
76
|
};
|
|
70
77
|
export {
|
|
71
|
-
|
|
78
|
+
r as transformCircleHomeData
|
|
72
79
|
};
|
|
73
80
|
//# sourceMappingURL=helper.js.map
|
package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.ts"],"sourcesContent":["import type { IGetCircleHomeResponseModel } from '../../api/get-content-for-today/get-circle-home-api-types';\nimport type {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nimport { ProjectType } from '../../../games/web-view/enums';\n\nexport const transformCircleHomeData = (data: IGetCircleHomeResponseModel | null) => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakReduction: data.streak_reduction,\n streakDaysBeforeReduction: data.streak_days_before_reduction,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {},\n timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n };\n\n if (data.projects.games) {\n circleHomeDetails.projects.games = {\n label: data.projects.games.label,\n type: ProjectType.GAME,\n initialProgressValue: 0,\n data: data.projects.games.data.map(game => ({\n id: game.id,\n name: game.name,\n cardLottie: game.card,\n tutorial: game.tutorial,\n variant: game.variant,\n isPlayed: game.played,\n })),\n };\n }\n\n if (data.projects.puzzles) {\n circleHomeDetails.projects.puzzles = {\n label: data.projects.puzzles.label,\n type: ProjectType.PUZZLE,\n initialProgressValue: 0,\n data: data.projects.puzzles.data.map(puzzle => ({\n id: puzzle.id,\n name: puzzle.name,\n cardLottie: puzzle.card,\n tutorial: puzzle.tutorial,\n variant: puzzle.variant,\n question: puzzle.question,\n isHintSeen: puzzle.is_hint_seen,\n solved: puzzle.solved,\n })),\n };\n }\n\n if (data.projects.lessons) {\n circleHomeDetails.projects.lessons = {\n label: data.projects.lessons.label,\n type: ProjectType.LESSON,\n initialProgressValue: 0,\n data: data.projects.lessons.data.map(lesson => ({\n id: lesson.id,\n name: lesson.name,\n cardLottie: lesson.card,\n tutorial: lesson.tutorial,\n variant: lesson.variant,\n sessionId: lesson.session_id,\n miniGameIdentifier: lesson.mini_game_identifier,\n targetQuestions: lesson.target_questions,\n status: lesson.status,\n })),\n };\n }\n\n if (data.projects.tables) {\n circleHomeDetails.projects.tables = {\n label: data.projects.tables.label,\n type: ProjectType.TABLE,\n data: {\n infiniteModeHighScore: data.projects.tables.data.infinite_mode_high_score,\n tableList: data.projects.tables.data.table_wise_details.map(table => ({\n tableNumber: table.table_number,\n stars: table.stars as TTableMode[],\n })),\n },\n };\n }\n }\n\n return circleHomeDetails;\n};\n"],"names":["transformCircleHomeData","data","circleHomeDetails","ProjectType","game","puzzle","lesson","table"],"mappings":";AASa,MAAAA,IAA0B,CAACC,MAA6C;AACnF,MAAIC,IAA+C;AAEnD,SAAID,MACkBC,IAAA;AAAA,IAClB,QAAQD,EAAK;AAAA,IACb,YAAYA,EAAK;AAAA,IACjB,iBAAiBA,EAAK;AAAA,IACtB,2BAA2BA,EAAK;AAAA,IAChC,cAAcA,EAAK;AAAA,IACnB,gBAAgBA,EAAK;AAAA,IACrB,UAAU,CAAC;AAAA,IACX,YAAY;AAAA,MACV,gBAAgBA,EAAK,WAAW;AAAA,MAChC,cAAcA,EAAK,WAAW;AAAA,MAC9B,SAASA,EAAK,WAAW;AAAA,IAC3B;AAAA,EAAA,GAGEA,EAAK,SAAS,UAChBC,EAAkB,SAAS,QAAQ;AAAA,IACjC,OAAOD,EAAK,SAAS,MAAM;AAAA,IAC3B,MAAME,EAAY;AAAA,IAClB,sBAAsB;AAAA,IACtB,MAAMF,EAAK,SAAS,MAAM,KAAK,IAAI,CAASG,OAAA;AAAA,MAC1C,IAAIA,EAAK;AAAA,MACT,MAAMA,EAAK;AAAA,MACX,YAAYA,EAAK;AAAA,MACjB,UAAUA,EAAK;AAAA,MACf,SAASA,EAAK;AAAA,MACd,UAAUA,EAAK;AAAA,IAAA,
|
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.ts"],"sourcesContent":["import type { IGetCircleHomeResponseModel } from '../../api/get-content-for-today/get-circle-home-api-types';\nimport type {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nimport { ProjectType } from '../../../games/web-view/enums';\n\nexport const transformCircleHomeData = (data: IGetCircleHomeResponseModel | null) => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakReduction: data.streak_reduction,\n streakDaysBeforeReduction: data.streak_days_before_reduction,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n progress: data.progress,\n dailyPoints: data.daily_points,\n dailyTarget: data.daily_target,\n projects: {},\n timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n };\n\n if (data.projects.games) {\n circleHomeDetails.projects.games = {\n label: data.projects.games.label,\n type: ProjectType.GAME,\n initialProgressValue: 0,\n data: data.projects.games.data.map(game => ({\n id: game.id,\n name: game.name,\n cardLottie: game.card,\n tutorial: game.tutorial,\n variant: game.variant,\n isPlayed: game.played,\n displayNameImage: game.display_name_image || '', // optional\n })),\n };\n }\n\n if (data.projects.puzzles) {\n circleHomeDetails.projects.puzzles = {\n label: data.projects.puzzles.label,\n type: ProjectType.PUZZLE,\n initialProgressValue: 0,\n data: data.projects.puzzles.data.map(puzzle => ({\n id: puzzle.id,\n name: puzzle.name,\n cardLottie: puzzle.card,\n tutorial: puzzle.tutorial,\n variant: puzzle.variant,\n question: puzzle.question,\n isHintSeen: puzzle.is_hint_seen,\n solved: puzzle.solved,\n displayNameImage: puzzle.display_name_image || '',\n })),\n };\n }\n\n if (data.projects.lessons) {\n circleHomeDetails.projects.lessons = {\n label: data.projects.lessons.label,\n type: ProjectType.LESSON,\n initialProgressValue: 0,\n data: data.projects.lessons.data.map(lesson => ({\n id: lesson.id,\n name: lesson.name,\n cardLottie: lesson.card,\n tutorial: lesson.tutorial,\n variant: lesson.variant,\n sessionId: lesson.session_id,\n miniGameIdentifier: lesson.mini_game_identifier,\n targetQuestions: lesson.target_questions,\n status: lesson.status,\n displayNameImage: lesson.display_name_image || '',\n })),\n };\n }\n\n if (data.projects.tables) {\n circleHomeDetails.projects.tables = {\n label: data.projects.tables.label,\n type: ProjectType.TABLE,\n data: {\n infiniteModeHighScore: data.projects.tables.data.infinite_mode_high_score,\n tableList: data.projects.tables.data.table_wise_details.map(table => ({\n tableNumber: table.table_number,\n stars: table.stars as TTableMode[],\n })),\n },\n };\n }\n }\n\n return circleHomeDetails;\n};\n"],"names":["transformCircleHomeData","data","circleHomeDetails","ProjectType","game","puzzle","lesson","table"],"mappings":";AASa,MAAAA,IAA0B,CAACC,MAA6C;A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AQA,EAAO;AAAA,MACf,kBAAkBA,EAAO,sBAAsB;AAAA,IAAA,EAC/C;AAAA,EAAA,IAIFJ,EAAK,SAAS,YAChBC,EAAkB,SAAS,UAAU;AAAA,IACnC,OAAOD,EAAK,SAAS,QAAQ;AAAA,IAC7B,MAAME,EAAY;AAAA,IAClB,sBAAsB;AAAA,IACtB,MAAMF,EAAK,SAAS,QAAQ,KAAK,IAAI,CAAWK,OAAA;AAAA,MAC9C,IAAIA,EAAO;AAAA,MACX,MAAMA,EAAO;AAAA,MACb,YAAYA,EAAO;AAAA,MACnB,UAAUA,EAAO;AAAA,MACjB,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,MAClB,oBAAoBA,EAAO;AAAA,MAC3B,iBAAiBA,EAAO;AAAA,MACxB,QAAQA,EAAO;AAAA,MACf,kBAAkBA,EAAO,sBAAsB;AAAA,IAAA,EAC/C;AAAA,EAAA,IAIFL,EAAK,SAAS,WAChBC,EAAkB,SAAS,SAAS;AAAA,IAClC,OAAOD,EAAK,SAAS,OAAO;AAAA,IAC5B,MAAME,EAAY;AAAA,IAClB,MAAM;AAAA,MACJ,uBAAuBF,EAAK,SAAS,OAAO,KAAK;AAAA,MACjD,WAAWA,EAAK,SAAS,OAAO,KAAK,mBAAmB,IAAI,CAAUM,OAAA;AAAA,QACpE,aAAaA,EAAM;AAAA,QACnB,OAAOA,EAAM;AAAA,MAAA,EACb;AAAA,IACJ;AAAA,EAAA,KAKCL;AACT;"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as M, useRef as S, useCallback as i, useMemo as p } from "react";
|
|
3
|
+
import { LOTTIE as R } from "../../../assets/lottie/lottie.js";
|
|
4
|
+
import { CircularLoader as v } from "../../ui/loader/circular-loader/circular-loader.js";
|
|
5
|
+
import D from "../../ui/lottie-animation/lottie-animation.js";
|
|
6
|
+
import { useCircleSounds as g } from "../hooks/use-circle-sounds/use-circle-sounds.js";
|
|
7
|
+
import { CircleSoundKey as n } from "../hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
|
8
|
+
import { GAME_LAUNCHER_SIZE as x } from "./comps/card-container/constants.js";
|
|
9
|
+
import { Carousel as A } from "./comps/carousel/carousel.js";
|
|
10
|
+
import { CircularGameCard as f } from "./comps/circular-game-card/circular-game-card.js";
|
|
11
|
+
import { GAME_LAUNCHER_ASSET_PADDING as K } from "./comps/segmented-game-card/constants.js";
|
|
12
|
+
import { TablesCard as O } from "./comps/tables-card/tables-card.js";
|
|
13
|
+
import { GAME_LAUNCHER_ANALYTICS_EVENTS as d } from "./game-launcher-analytics-events.js";
|
|
14
|
+
import { ProjectType as c } from "../games/web-view/enums/project-type-enum.js";
|
|
15
|
+
const I = x + K, W = M(
|
|
16
|
+
({ onSegmentClick: o, data: e, isLoading: y, defaultIndex: T = 0, showTables: _ = !1 }) => {
|
|
17
|
+
const N = S(null), { playSwipeSound: u, play: r } = g(), C = i(
|
|
18
|
+
(a) => {
|
|
19
|
+
a.status !== "completed" && (r(n.GAME_CARD_CLICK), o(a, c.LESSON));
|
|
20
|
+
},
|
|
21
|
+
[o, r]
|
|
22
|
+
), E = i(
|
|
23
|
+
(a) => {
|
|
24
|
+
r(n.GAME_CARD_CLICK), o(a, c.TABLE);
|
|
25
|
+
},
|
|
26
|
+
[o, r]
|
|
27
|
+
), b = i(
|
|
28
|
+
(a) => {
|
|
29
|
+
r(n.GAME_CARD_CLICK), o(a, c.GAME);
|
|
30
|
+
},
|
|
31
|
+
[o, r]
|
|
32
|
+
), L = i(
|
|
33
|
+
(a) => {
|
|
34
|
+
r(n.GAME_CARD_CLICK), o(a, c.PUZZLE);
|
|
35
|
+
},
|
|
36
|
+
[o, r]
|
|
37
|
+
), h = p(() => {
|
|
38
|
+
const a = [];
|
|
39
|
+
if (!e) return a;
|
|
40
|
+
if (e.games) {
|
|
41
|
+
const l = e.games.label;
|
|
42
|
+
e.games.data.forEach((s, m) => {
|
|
43
|
+
a.push(
|
|
44
|
+
/* @__PURE__ */ t(
|
|
45
|
+
f,
|
|
46
|
+
{
|
|
47
|
+
data: {
|
|
48
|
+
card: s.cardLottie,
|
|
49
|
+
name: s.name,
|
|
50
|
+
isCompleted: !1,
|
|
51
|
+
displayNameImage: s.displayNameImage,
|
|
52
|
+
onPress: () => b(s)
|
|
53
|
+
},
|
|
54
|
+
label: l,
|
|
55
|
+
value: 0
|
|
56
|
+
},
|
|
57
|
+
`game-${m}`
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (e.lessons) {
|
|
63
|
+
const l = e.lessons.label;
|
|
64
|
+
e.lessons.data.forEach((s, m) => {
|
|
65
|
+
a.push(
|
|
66
|
+
/* @__PURE__ */ t(
|
|
67
|
+
f,
|
|
68
|
+
{
|
|
69
|
+
data: {
|
|
70
|
+
card: s.cardLottie,
|
|
71
|
+
name: s.name,
|
|
72
|
+
isCompleted: s.status === "completed",
|
|
73
|
+
displayNameImage: s.displayNameImage,
|
|
74
|
+
onPress: () => C(s)
|
|
75
|
+
},
|
|
76
|
+
label: l,
|
|
77
|
+
value: 0
|
|
78
|
+
},
|
|
79
|
+
`lesson-${m}`
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (e.puzzles) {
|
|
85
|
+
const l = e.puzzles.label;
|
|
86
|
+
e.puzzles.data.forEach((s, m) => {
|
|
87
|
+
a.push(
|
|
88
|
+
/* @__PURE__ */ t(
|
|
89
|
+
f,
|
|
90
|
+
{
|
|
91
|
+
data: {
|
|
92
|
+
card: s.cardLottie,
|
|
93
|
+
name: s.name,
|
|
94
|
+
isCompleted: s.solved,
|
|
95
|
+
displayNameImage: s.displayNameImage,
|
|
96
|
+
onPress: () => L(s)
|
|
97
|
+
},
|
|
98
|
+
label: l,
|
|
99
|
+
value: 0
|
|
100
|
+
},
|
|
101
|
+
`puzzle-${m}`
|
|
102
|
+
)
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return a;
|
|
107
|
+
}, [e, b, C, L]), P = p(() => !e || !e.tables ? [] : [
|
|
108
|
+
/* @__PURE__ */ t(
|
|
109
|
+
O,
|
|
110
|
+
{
|
|
111
|
+
label: e.tables.label,
|
|
112
|
+
data: e.tables.data,
|
|
113
|
+
onPress: E,
|
|
114
|
+
openModesOfTable: e.tables.openModesOfTable
|
|
115
|
+
},
|
|
116
|
+
"tables-card"
|
|
117
|
+
)
|
|
118
|
+
], [e, E]), G = p(
|
|
119
|
+
() => [
|
|
120
|
+
/* @__PURE__ */ t(
|
|
121
|
+
D,
|
|
122
|
+
{
|
|
123
|
+
src: R.SLEEPY_BOI,
|
|
124
|
+
width: I,
|
|
125
|
+
height: I
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
],
|
|
129
|
+
[]
|
|
130
|
+
);
|
|
131
|
+
return y ? /* @__PURE__ */ t(v, {}) : e ? /* @__PURE__ */ t(
|
|
132
|
+
A,
|
|
133
|
+
{
|
|
134
|
+
ref: N,
|
|
135
|
+
items: _ ? P : h,
|
|
136
|
+
defaultIndex: T,
|
|
137
|
+
onNext: u,
|
|
138
|
+
onPrev: u,
|
|
139
|
+
analyticsNext: {
|
|
140
|
+
analyticsLabel: d.NEXT_ACTIVITY
|
|
141
|
+
},
|
|
142
|
+
analyticsPrev: {
|
|
143
|
+
analyticsLabel: d.PREV_ACTIVITY
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
) : /* @__PURE__ */ t(
|
|
147
|
+
A,
|
|
148
|
+
{
|
|
149
|
+
items: G,
|
|
150
|
+
analyticsNext: { analyticsLabel: "" },
|
|
151
|
+
analyticsPrev: { analyticsLabel: "" }
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
export {
|
|
157
|
+
W as GameLauncherV2
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=game-launcher-v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-launcher-v2.js","sources":["../../../../src/features/circle-games/game-launcher/game-launcher-v2.tsx"],"sourcesContent":["import type { ICarouselRefs } from './comps/carousel/carousel-types';\nimport type { ITableDetails } from './comps/tables-card/tables-card-types';\nimport type {\n Game,\n Lesson,\n Puzzle,\n} from './dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IGameLauncherProps } from './game-launcher-types';\nimport type { FC, ReactNode } from 'react';\n\nimport { memo, useCallback, useMemo, useRef } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { ProjectType } from '../games/web-view/enums';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../hooks/use-circle-sounds/use-circle-sounds-enums';\nimport { GAME_LAUNCHER_SIZE } from './comps/card-container/constants';\nimport { Carousel } from './comps/carousel/carousel';\nimport { CircularGameCard } from './comps/circular-game-card/circular-game-card';\nimport { GAME_LAUNCHER_ASSET_PADDING } from './comps/segmented-game-card/constants';\nimport { TablesCard } from './comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from './game-launcher-analytics-events';\n\nconst sleepyBoiDimension = GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING;\n\nexport const GameLauncherV2: FC<IGameLauncherProps> = memo(\n ({ onSegmentClick, data, isLoading, defaultIndex = 0, showTables = false }) => {\n const carouselRefs = useRef<ICarouselRefs>(null) as React.RefObject<ICarouselRefs>;\n\n const { playSwipeSound, play } = useCircleSounds();\n\n const handleLessonSegmentClick = useCallback(\n (lesson: Lesson) => {\n if (lesson.status !== 'completed') {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(lesson, ProjectType.LESSON);\n }\n },\n [onSegmentClick, play],\n );\n\n const onTableSegmentClick = useCallback(\n (table: ITableDetails) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(table, ProjectType.TABLE);\n },\n [onSegmentClick, play],\n );\n\n const handleGameSegmentClick = useCallback(\n (game: Game) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(game, ProjectType.GAME);\n },\n [onSegmentClick, play],\n );\n\n const handlePuzzleSegmentClick = useCallback(\n (puzzle: Puzzle) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(puzzle, ProjectType.PUZZLE);\n },\n [onSegmentClick, play],\n );\n\n const nonTableItems = useMemo(() => {\n const items: ReactNode[] = [];\n\n if (!data) return items;\n\n if (data.games) {\n const label = data.games.label;\n\n data.games.data.forEach((game, index) => {\n items.push(\n <CircularGameCard\n key={`game-${index}`}\n data={{\n card: game.cardLottie,\n name: game.name,\n isCompleted: false,\n displayNameImage: game.displayNameImage,\n onPress: () => handleGameSegmentClick(game),\n }}\n label={label}\n value={0}\n />,\n );\n });\n }\n\n if (data.lessons) {\n const label = data.lessons.label;\n\n data.lessons.data.forEach((lesson, index) => {\n items.push(\n <CircularGameCard\n key={`lesson-${index}`}\n data={{\n card: lesson.cardLottie,\n name: lesson.name,\n isCompleted: lesson.status === 'completed',\n displayNameImage: lesson.displayNameImage,\n onPress: () => handleLessonSegmentClick(lesson),\n }}\n label={label}\n value={0}\n />,\n );\n });\n }\n\n if (data.puzzles) {\n const label = data.puzzles.label;\n\n data.puzzles.data.forEach((puzzle, index) => {\n items.push(\n <CircularGameCard\n key={`puzzle-${index}`}\n data={{\n card: puzzle.cardLottie,\n name: puzzle.name,\n isCompleted: puzzle.solved,\n displayNameImage: puzzle.displayNameImage,\n onPress: () => handlePuzzleSegmentClick(puzzle),\n }}\n label={label}\n value={0}\n />,\n );\n });\n }\n\n return items;\n }, [data, handleGameSegmentClick, handleLessonSegmentClick, handlePuzzleSegmentClick]);\n\n const tableItems = useMemo(() => {\n if (!data || !data.tables) return [];\n\n return [\n <TablesCard\n key=\"tables-card\"\n label={data.tables.label}\n data={data.tables.data}\n onPress={onTableSegmentClick}\n openModesOfTable={data.tables.openModesOfTable}\n />,\n ];\n }, [data, onTableSegmentClick]);\n\n const sleepyBoiItem = useMemo(\n () => [\n <LottieAnimation\n src={LOTTIE.SLEEPY_BOI}\n width={sleepyBoiDimension}\n height={sleepyBoiDimension}\n />,\n ],\n [],\n );\n\n if (isLoading) return <CircularLoader />;\n\n if (!data) {\n return (\n <Carousel\n items={sleepyBoiItem}\n analyticsNext={{ analyticsLabel: '' }}\n analyticsPrev={{ analyticsLabel: '' }}\n />\n );\n }\n\n const itemsToShow = showTables ? tableItems : nonTableItems;\n\n return (\n <Carousel\n ref={carouselRefs}\n items={itemsToShow}\n defaultIndex={defaultIndex}\n onNext={playSwipeSound}\n onPrev={playSwipeSound}\n analyticsNext={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.NEXT_ACTIVITY,\n }}\n analyticsPrev={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.PREV_ACTIVITY,\n }}\n />\n );\n },\n);\n"],"names":["sleepyBoiDimension","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_ASSET_PADDING","GameLauncherV2","memo","onSegmentClick","data","isLoading","defaultIndex","showTables","carouselRefs","useRef","playSwipeSound","play","useCircleSounds","handleLessonSegmentClick","useCallback","lesson","CircleSoundKey","ProjectType","onTableSegmentClick","table","handleGameSegmentClick","game","handlePuzzleSegmentClick","puzzle","nonTableItems","useMemo","items","label","index","jsx","CircularGameCard","tableItems","TablesCard","sleepyBoiItem","LottieAnimation","LOTTIE","CircularLoader","Carousel","GAME_LAUNCHER_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;;;;;AAyBA,MAAMA,IAAqBC,IAAqBC,GAEnCC,IAAyCC;AAAA,EACpD,CAAC,EAAE,gBAAAC,GAAgB,MAAAC,GAAM,WAAAC,GAAW,cAAAC,IAAe,GAAG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rB,KAAQ,CAACA,EAAK,SAAe,CAAA,IAE3B;AAAA,MACL,gBAAAyB;AAAA,QAACG;AAAA,QAAA;AAAA,UAEC,OAAO5B,EAAK,OAAO;AAAA,UACnB,MAAMA,EAAK,OAAO;AAAA,UAClB,SAASc;AAAA,UACT,kBAAkBd,EAAK,OAAO;AAAA,QAAA;AAAA,QAJ1B;AAAA,MAKN;AAAA,IAAA,GAED,CAACA,GAAMc,CAAmB,CAAC,GAExBe,IAAgBR;AAAA,MACpB,MAAM;AAAA,QACJ,gBAAAI;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,KAAKC,EAAO;AAAA,YACZ,OAAOrC;AAAA,YACP,QAAQA;AAAA,UAAA;AAAA,QACV;AAAA,MACF;AAAA,MACA,CAAC;AAAA,IAAA;AAGC,WAAAO,IAAkB,gBAAAwB,EAACO,GAAe,CAAA,CAAA,IAEjChC,IAaH,gBAAAyB;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,KAAK7B;AAAA,QACL,OALgBD,IAAawB,IAAaP;AAAA,QAM1C,cAAAlB;AAAA,QACA,QAAQI;AAAA,QACR,QAAQA;AAAA,QACR,eAAe;AAAA,UACb,gBAAgB4B,EAA+B;AAAA,QACjD;AAAA,QACA,eAAe;AAAA,UACb,gBAAgBA,EAA+B;AAAA,QACjD;AAAA,MAAA;AAAA,IAAA,IAtBA,gBAAAT;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,OAAOJ;AAAA,QACP,eAAe,EAAE,gBAAgB,GAAG;AAAA,QACpC,eAAe,EAAE,gBAAgB,GAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EAsB5C;AACF;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -151,6 +151,7 @@ declare interface BaseProject {
|
|
|
151
151
|
cardLottie: string;
|
|
152
152
|
tutorial: string;
|
|
153
153
|
variant: string;
|
|
154
|
+
displayNameImage: string;
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
export declare const BeltsElementsStickers: React_2.NamedExoticComponent<BeltsElementsStickersProps>;
|
|
@@ -663,7 +664,7 @@ export declare const GAME_LAUNCHER_SIZE: number;
|
|
|
663
664
|
|
|
664
665
|
export declare const GameIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
665
666
|
|
|
666
|
-
export declare const
|
|
667
|
+
export declare const GameLauncherV2: FC<IGameLauncherProps>;
|
|
667
668
|
|
|
668
669
|
declare enum GENDER {
|
|
669
670
|
MALE = "MALE",
|
|
@@ -959,6 +960,7 @@ declare interface IBaseProject {
|
|
|
959
960
|
card: string;
|
|
960
961
|
variant: string;
|
|
961
962
|
tutorial: string;
|
|
963
|
+
display_name_image?: string;
|
|
962
964
|
}
|
|
963
965
|
|
|
964
966
|
declare interface IBaseSelectInputProps<IDType extends string | number> extends Omit<IBaseInputProps, 'inputElement' | 'size'> {
|
|
@@ -1305,6 +1307,9 @@ export declare interface ICircleHomeDetails {
|
|
|
1305
1307
|
streakReduction: number;
|
|
1306
1308
|
streakDaysBeforeReduction: number;
|
|
1307
1309
|
tournamentRank: number;
|
|
1310
|
+
progress: number;
|
|
1311
|
+
dailyPoints: number;
|
|
1312
|
+
dailyTarget: number;
|
|
1308
1313
|
projects: IProjects;
|
|
1309
1314
|
timestamps: ITodaysContentTimeStamps;
|
|
1310
1315
|
}
|
|
@@ -1675,6 +1680,7 @@ declare interface IGame extends IBaseProject {
|
|
|
1675
1680
|
|
|
1676
1681
|
declare interface IGameLauncherProps {
|
|
1677
1682
|
onSegmentClick: (projectDetail: Game | Puzzle | Lesson | ITableDetails, projectType: ProjectType) => void;
|
|
1683
|
+
showTables?: boolean;
|
|
1678
1684
|
isLoading?: boolean;
|
|
1679
1685
|
data: IProjectData | null;
|
|
1680
1686
|
defaultIndex?: number;
|
|
@@ -1717,6 +1723,9 @@ declare interface IGetCircleHomeResponseModel {
|
|
|
1717
1723
|
streak_days_before_reduction: number;
|
|
1718
1724
|
streak_status: 'pending' | 'completed';
|
|
1719
1725
|
projects: IProjects_2;
|
|
1726
|
+
progress: number;
|
|
1727
|
+
daily_points: number;
|
|
1728
|
+
daily_target: number;
|
|
1720
1729
|
timestamps: ITimeStampsResponseModel;
|
|
1721
1730
|
coachmark_completion: ICoachMarkCompletion;
|
|
1722
1731
|
}
|
package/dist/index.js
CHANGED
|
@@ -229,7 +229,7 @@ import { PlayerType as Nl } from "./features/circle-games/games/web-view/enums/p
|
|
|
229
229
|
import { IStatsToAwardErrorCode as Dl } from "./features/circle-games/games/web-view/web-view-types.js";
|
|
230
230
|
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as gl } from "./features/circle-games/enum/circle-onboarding-steps.js";
|
|
231
231
|
import { CIRCLE_ACTION_IDS as yl } from "./features/circle-games/enum/circle-action-ids.js";
|
|
232
|
-
import {
|
|
232
|
+
import { GameLauncherV2 as Ul } from "./features/circle-games/game-launcher/game-launcher-v2.js";
|
|
233
233
|
import { useGetCircleHomeDetailsDal as Bl } from "./features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js";
|
|
234
234
|
import { Leaderboard as zl } from "./features/circle-games/leaderboard/leaderboard.js";
|
|
235
235
|
import { BackgroundImage as Fl, CircularSteps as Wl } from "./features/circle-games/sign-up/comp/circular-steps/circular-steps.js";
|
|
@@ -469,7 +469,7 @@ export {
|
|
|
469
469
|
sl as GAME_LAUNCHER_SIZE,
|
|
470
470
|
x as GIF,
|
|
471
471
|
yr as GameIcon,
|
|
472
|
-
Ul as
|
|
472
|
+
Ul as GameLauncherV2,
|
|
473
473
|
gp as GoalCreationConfirmationModal,
|
|
474
474
|
Bp as GoalDraftEdit,
|
|
475
475
|
Kp as GoalEdit,
|