@cuemath/leap 3.1.30 → 3.1.32
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/tables-card/infinite-button/infinite-mode-launcher-button.js +43 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/infinite-button/infinite-mode-launcher-button.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +52 -53
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js +76 -0
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map +1 -0
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +28 -94
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +48 -52
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +24 -24
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +42 -42
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/post-game-stats/score/constants.js +3 -2
- package/dist/features/post-game-stats/score/constants.js.map +1 -1
- package/dist/features/post-game-stats/score/score.js +41 -39
- package/dist/features/post-game-stats/score/score.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/package.json +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/infinite-button/infinite-button-card.js +0 -42
- package/dist/features/circle-games/game-launcher/comps/tables-card/infinite-button/infinite-button-card.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-get-circle-home-details-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"use-get-circle-home-details-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.ts"],"sourcesContent":["import type { ICircleHomeDetails } from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n invalidateCircleHomeAPI,\n useGetCircleHomeAPI,\n} from '../../api/get-content-for-today/get-circle-home-api';\nimport { transformCircleHomeData } from './helper';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n grade: string,\n countryCode: string,\n): Omit<ReturnType<typeof useGetCircleHomeAPI>, 'data' | 'get'> & {\n data: ICircleHomeDetails | null;\n getCircleHomeDetails: () => void;\n invalidateCircleHomeDetails: () => void;\n} => {\n const initialQuery = useMemo(\n () => ({\n user_id: userId,\n grade,\n country_code: countryCode,\n }),\n [userId, grade, countryCode],\n );\n\n const {\n data = null,\n get: getHomeDetails,\n isProcessed,\n ...rest\n } = useGetCircleHomeAPI(userId, initialQuery);\n const [contentForToday, setContentForToday] = useState<ICircleHomeDetails | null>(\n transformCircleHomeData(data),\n );\n\n const getCircleHomeDetails = useCallback(() => {\n getHomeDetails(userId, initialQuery);\n }, [getHomeDetails, initialQuery, userId]);\n\n const invalidateCircleHomeDetails = useCallback(() => {\n invalidateCircleHomeAPI(userId, initialQuery);\n }, [initialQuery, userId]);\n\n useEffect(() => {\n if (isProcessed && data) {\n setContentForToday(transformCircleHomeData(data));\n }\n }, [data, isProcessed]);\n\n return {\n data: contentForToday,\n isProcessed,\n getCircleHomeDetails,\n invalidateCircleHomeDetails,\n ...rest,\n };\n};\n"],"names":["useGetCircleHomeDetailsDal","userId","grade","countryCode","initialQuery","useMemo","data","getHomeDetails","isProcessed","rest","useGetCircleHomeAPI","contentForToday","setContentForToday","useState","transformCircleHomeData","getCircleHomeDetails","useCallback","invalidateCircleHomeDetails","invalidateCircleHomeAPI","useEffect"],"mappings":";;;AAUO,MAAMA,IAA6B,CACxCC,GACAC,GACAC,MAKG;AACH,QAAMC,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,SAASJ;AAAA,MACT,OAAAC;AAAA,MACA,cAAcC;AAAA,IAAA;AAAA,IAEhB,CAACF,GAAQC,GAAOC,CAAW;AAAA,EAAA,GAGvB;AAAA,IACJ,MAAAG,IAAO;AAAA,IACP,KAAKC;AAAA,IACL,aAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDC,EAAoBT,GAAQG,CAAY,GACtC,CAACO,GAAiBC,CAAkB,IAAIC;AAAA,IAC5CC,EAAwBR,CAAI;AAAA,EAAA,GAGxBS,IAAuBC,EAAY,MAAM;AAC7C,IAAAT,EAAeN,GAAQG,CAAY;AAAA,EAClC,GAAA,CAACG,GAAgBH,GAAcH,CAAM,CAAC,GAEnCgB,IAA8BD,EAAY,MAAM;AACpD,IAAAE,EAAwBjB,GAAQG,CAAY;AAAA,EAAA,GAC3C,CAACA,GAAcH,CAAM,CAAC;AAEzB,SAAAkB,EAAU,MAAM;AACd,IAAIX,KAAeF,KACEM,EAAAE,EAAwBR,CAAI,CAAC;AAAA,EAClD,GACC,CAACA,GAAME,CAAW,CAAC,GAEf;AAAA,IACL,MAAMG;AAAA,IACN,aAAAH;AAAA,IACA,sBAAAO;AAAA,IACA,6BAAAE;AAAA,IACA,GAAGR;AAAA,EAAA;AAEP;"}
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as g, useRef as J, useCallback as n, useMemo as V, useEffect as
|
|
3
|
-
import { LOTTIE as
|
|
4
|
-
import { JOURNEY_ID_STUDENT as
|
|
5
|
-
import { useJourney as
|
|
6
|
-
import { CircularLoader as
|
|
7
|
-
import
|
|
8
|
-
import { useCircleSounds as
|
|
2
|
+
import { memo as g, useRef as J, useCallback as n, useMemo as V, useEffect as Y } from "react";
|
|
3
|
+
import { LOTTIE as B } from "../../../assets/lottie/lottie.js";
|
|
4
|
+
import { JOURNEY_ID_STUDENT as _ } from "../../journey/journey-id/journey-id-student.js";
|
|
5
|
+
import { useJourney as K } from "../../journey/use-journey/use-journey.js";
|
|
6
|
+
import { CircularLoader as H } from "../../ui/loader/circular-loader/circular-loader.js";
|
|
7
|
+
import Z from "../../ui/lottie-animation/lottie-animation.js";
|
|
8
|
+
import { useCircleSounds as w } from "../hooks/use-circle-sounds/use-circle-sounds.js";
|
|
9
9
|
import { CircleSoundKey as t } from "../hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
|
10
|
-
import { GAME_LAUNCHER_SIZE as
|
|
10
|
+
import { GAME_LAUNCHER_SIZE as F } from "./comps/card-container/constants.js";
|
|
11
11
|
import { Carousel as M } from "./comps/carousel/carousel.js";
|
|
12
|
-
import { GAME_LAUNCHER_ASSET_PADDING as
|
|
13
|
-
import { SegmentedGameCard as
|
|
14
|
-
import { TablesCard as
|
|
12
|
+
import { GAME_LAUNCHER_ASSET_PADDING as X } from "./comps/segmented-game-card/constants.js";
|
|
13
|
+
import { SegmentedGameCard as a } from "./comps/segmented-game-card/segmented-game-card.js";
|
|
14
|
+
import { TablesCard as q } from "./comps/tables-card/tables-card.js";
|
|
15
15
|
import { GAME_LAUNCHER_ANALYTICS_EVENTS as S } from "./game-launcher-analytics-events.js";
|
|
16
|
-
import { useGameLauncherJourney as
|
|
17
|
-
import { useTableInfiniteLauncherJourney as
|
|
18
|
-
import { useTableLauncherJourney as
|
|
16
|
+
import { useGameLauncherJourney as Q } from "./hooks/use-game-launcher-journey/use-game-launcher-journey.js";
|
|
17
|
+
import { useTableInfiniteLauncherJourney as W } from "./hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js";
|
|
18
|
+
import { useTableLauncherJourney as $ } from "./hooks/use-table-launcher-journey/use-table-launcher-journey.js";
|
|
19
19
|
import { ProjectType as m } from "../games/web-view/enums/project-type-enum.js";
|
|
20
|
-
const O =
|
|
20
|
+
const O = F + X, _e = g(
|
|
21
21
|
({
|
|
22
22
|
onSegmentClick: l,
|
|
23
23
|
journeyId: u,
|
|
24
24
|
data: e,
|
|
25
25
|
isLoading: c,
|
|
26
|
-
isTutorialOnboardingDone:
|
|
27
|
-
|
|
28
|
-
defaultIndex: x = 0,
|
|
26
|
+
isTutorialOnboardingDone: b,
|
|
27
|
+
defaultIndex: v = 0,
|
|
29
28
|
onJourneyComplete: p
|
|
30
29
|
}) => {
|
|
31
|
-
const f = J(null), E = J(null), { isJourneyActive:
|
|
30
|
+
const f = J(null), E = J(null), { isJourneyActive: C } = K(), { playSwipeSound: A, play: o } = w(), L = n(
|
|
32
31
|
(r) => {
|
|
33
32
|
o(t.GAME_CARD_CLICK), l(r, m.TABLE);
|
|
34
33
|
},
|
|
35
34
|
[l, o]
|
|
36
|
-
),
|
|
35
|
+
), x = n(() => {
|
|
37
36
|
o(t.GAME_CARD_CLICK), l({ mode: "infinite" }, m.TABLE);
|
|
38
37
|
}, [l, o]), I = n(
|
|
39
38
|
(r) => {
|
|
@@ -55,29 +54,27 @@ const O = X + q, _e = g(
|
|
|
55
54
|
lessonRefs: P,
|
|
56
55
|
puzzleRefs: h,
|
|
57
56
|
startJourney: G
|
|
58
|
-
} =
|
|
57
|
+
} = Q({
|
|
59
58
|
carouselRefs: f,
|
|
60
59
|
onSegmentClick: l,
|
|
61
60
|
onJourneyComplete: p
|
|
62
|
-
}), { startJourney:
|
|
61
|
+
}), { startJourney: T } = W({
|
|
63
62
|
carouselRefs: f,
|
|
64
|
-
onTableInfiniteModeClick:
|
|
63
|
+
onTableInfiniteModeClick: x,
|
|
65
64
|
onJourneyComplete: p,
|
|
66
65
|
originalTableRef: E
|
|
67
|
-
}), { startJourney: z } =
|
|
66
|
+
}), { startJourney: z } = $({
|
|
68
67
|
carouselRefs: f,
|
|
69
68
|
originalTableRef: E,
|
|
70
69
|
onTableSegmentClick: L,
|
|
71
70
|
onJourneyComplete: p,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}), U = V(() => {
|
|
71
|
+
onNextJourney: T
|
|
72
|
+
}), D = V(() => {
|
|
76
73
|
let r = [];
|
|
77
74
|
return e && (e.lessons && (r = [
|
|
78
75
|
...r,
|
|
79
76
|
/* @__PURE__ */ i(
|
|
80
|
-
|
|
77
|
+
a,
|
|
81
78
|
{
|
|
82
79
|
ref: P,
|
|
83
80
|
label: e.lessons.label,
|
|
@@ -95,7 +92,7 @@ const O = X + q, _e = g(
|
|
|
95
92
|
]), r = [
|
|
96
93
|
...r,
|
|
97
94
|
/* @__PURE__ */ i(
|
|
98
|
-
|
|
95
|
+
a,
|
|
99
96
|
{
|
|
100
97
|
ref: N,
|
|
101
98
|
label: e.games.label,
|
|
@@ -111,7 +108,7 @@ const O = X + q, _e = g(
|
|
|
111
108
|
}
|
|
112
109
|
),
|
|
113
110
|
/* @__PURE__ */ i(
|
|
114
|
-
|
|
111
|
+
a,
|
|
115
112
|
{
|
|
116
113
|
ref: h,
|
|
117
114
|
label: e.puzzles.label,
|
|
@@ -129,7 +126,7 @@ const O = X + q, _e = g(
|
|
|
129
126
|
], e.tables && (r = [
|
|
130
127
|
...r,
|
|
131
128
|
/* @__PURE__ */ i(
|
|
132
|
-
|
|
129
|
+
q,
|
|
133
130
|
{
|
|
134
131
|
ref: E,
|
|
135
132
|
label: e.tables.label,
|
|
@@ -148,12 +145,12 @@ const O = X + q, _e = g(
|
|
|
148
145
|
R,
|
|
149
146
|
y,
|
|
150
147
|
L
|
|
151
|
-
]),
|
|
148
|
+
]), U = V(
|
|
152
149
|
() => [
|
|
153
150
|
/* @__PURE__ */ i(
|
|
154
|
-
|
|
151
|
+
Z,
|
|
155
152
|
{
|
|
156
|
-
src:
|
|
153
|
+
src: B.SLEEPY_BOI,
|
|
157
154
|
width: O,
|
|
158
155
|
height: O
|
|
159
156
|
}
|
|
@@ -161,39 +158,38 @@ const O = X + q, _e = g(
|
|
|
161
158
|
],
|
|
162
159
|
[]
|
|
163
160
|
);
|
|
164
|
-
return
|
|
165
|
-
if (!(c || !e ||
|
|
166
|
-
if (e != null && e.puzzles && u ===
|
|
161
|
+
return Y(() => {
|
|
162
|
+
if (!(c || !e || C)) {
|
|
163
|
+
if (e != null && e.puzzles && u === _.CIRCLE_ACTIVITIES_INTRO_JOURNEY) {
|
|
167
164
|
G(e == null ? void 0 : e.puzzles, !!(e != null && e.lessons));
|
|
168
165
|
return;
|
|
169
166
|
}
|
|
170
|
-
if (e != null && e.tables && u ===
|
|
171
|
-
z(e == null ? void 0 : e.tables,
|
|
167
|
+
if (e != null && e.tables && u === _.CIRCLE_TABLES_INTRO_JOURNEY) {
|
|
168
|
+
z(e == null ? void 0 : e.tables, b);
|
|
172
169
|
return;
|
|
173
170
|
}
|
|
174
|
-
if (e != null && e.tables && u ===
|
|
175
|
-
|
|
171
|
+
if (e != null && e.tables && u === _.CIRCLE_TABLES_INFINTE_JOURNEY) {
|
|
172
|
+
T();
|
|
176
173
|
return;
|
|
177
174
|
}
|
|
178
175
|
}
|
|
179
176
|
}, [
|
|
180
177
|
e,
|
|
181
|
-
|
|
178
|
+
C,
|
|
182
179
|
c,
|
|
183
|
-
|
|
184
|
-
A,
|
|
180
|
+
b,
|
|
185
181
|
u,
|
|
186
|
-
|
|
182
|
+
T,
|
|
187
183
|
G,
|
|
188
184
|
z
|
|
189
|
-
]), c ? /* @__PURE__ */ i(
|
|
185
|
+
]), c ? /* @__PURE__ */ i(H, {}) : e ? /* @__PURE__ */ i(
|
|
190
186
|
M,
|
|
191
187
|
{
|
|
192
188
|
ref: f,
|
|
193
|
-
items:
|
|
194
|
-
defaultIndex:
|
|
195
|
-
onNext:
|
|
196
|
-
onPrev:
|
|
189
|
+
items: D,
|
|
190
|
+
defaultIndex: v,
|
|
191
|
+
onNext: A,
|
|
192
|
+
onPrev: A,
|
|
197
193
|
analyticsNext: {
|
|
198
194
|
analyticsLabel: S.NEXT_ACTIVITY
|
|
199
195
|
},
|
|
@@ -204,7 +200,7 @@ const O = X + q, _e = g(
|
|
|
204
200
|
) : /* @__PURE__ */ i(
|
|
205
201
|
M,
|
|
206
202
|
{
|
|
207
|
-
items:
|
|
203
|
+
items: U,
|
|
208
204
|
analyticsNext: {
|
|
209
205
|
analyticsLabel: ""
|
|
210
206
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-launcher.js","sources":["../../../../src/features/circle-games/game-launcher/game-launcher.tsx"],"sourcesContent":["import type { ICarouselRefs } from './comps/carousel/carousel-types';\nimport type { ITableCardRef, 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, useEffect, useMemo, useRef } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { JOURNEY_ID_STUDENT } from '../../journey/journey-id/journey-id-student';\nimport { useJourney } from '../../journey/use-journey/use-journey';\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 { GAME_LAUNCHER_ASSET_PADDING } from './comps/segmented-game-card/constants';\nimport { SegmentedGameCard } from './comps/segmented-game-card/segmented-game-card';\nimport { TablesCard } from './comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from './game-launcher-analytics-events';\nimport { useGameLauncherJourney } from './hooks/use-game-launcher-journey/use-game-launcher-journey';\nimport { useTableInfiniteLauncherJourney } from './hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey';\nimport { useTableLauncherJourney } from './hooks/use-table-launcher-journey/use-table-launcher-journey';\n\nconst sleepyBoiDimension = GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING;\n\nexport const GameLauncher: FC<IGameLauncherProps> = memo(\n ({\n onSegmentClick,\n journeyId,\n data,\n isLoading,\n isTutorialOnboardingDone,\n isTablesOnboardingDone,\n defaultIndex = 0,\n onJourneyComplete,\n }) => {\n const carouselRefs = useRef<ICarouselRefs>(null);\n\n const originalTableRef = useRef<ITableCardRef>(null);\n\n const { isJourneyActive } = useJourney();\n\n const { playSwipeSound, play } = useCircleSounds();\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 onTableInfiniteModeClick = useCallback(() => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick({ mode: 'infinite' } as ITableDetails, ProjectType.TABLE);\n }, [onSegmentClick, play]);\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 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 {\n gameRefs,\n lessonRefs,\n puzzleRefs,\n startJourney: startLessonPuzzleGamesJourney,\n } = useGameLauncherJourney({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n });\n\n const { startJourney: startInfiniteTablesJourney } = useTableInfiniteLauncherJourney({\n carouselRefs,\n onTableInfiniteModeClick,\n onJourneyComplete,\n originalTableRef,\n });\n\n const { startJourney: startTablesJourney } = useTableLauncherJourney({\n carouselRefs,\n originalTableRef,\n onTableSegmentClick,\n onJourneyComplete,\n onContinueNextJourney: () => {\n startInfiniteTablesJourney();\n },\n });\n\n const items = useMemo(() => {\n let itemTypes: ReactNode[] = [];\n\n if (data) {\n if (data.lessons) {\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={lessonRefs}\n label={data.lessons.label}\n value={data.lessons.data.filter(lesson => lesson.status === 'completed').length}\n maxValue={data.lessons.data.length}\n initialValue={data.lessons.initialProgressValue}\n data={data?.lessons.data.map(lesson => ({\n card: lesson.cardLottie,\n name: lesson.name,\n isCompleted: lesson.status === 'completed',\n onPress: () => handleLessonSegmentClick(lesson),\n }))}\n />,\n ];\n }\n\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={gameRefs}\n label={data.games.label}\n value={data.games.data.filter(game => game.isPlayed).length}\n maxValue={data.games.data.length}\n initialValue={data.games.initialProgressValue}\n data={data.games.data.map(game => ({\n card: game.cardLottie,\n name: game.name,\n isCompleted: false,\n onPress: () => handleGameSegmentClick(game),\n }))}\n />,\n <SegmentedGameCard\n ref={puzzleRefs}\n label={data.puzzles.label}\n value={data.puzzles.data.filter(puzzle => puzzle.solved).length}\n maxValue={data.puzzles.data.length}\n initialValue={data.puzzles.initialProgressValue}\n data={data.puzzles.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: puzzle.name,\n isCompleted: puzzle.solved,\n onPress: () => handlePuzzleSegmentClick(puzzle),\n }))}\n />,\n ];\n\n if (data.tables) {\n itemTypes = [\n ...itemTypes,\n <TablesCard\n ref={originalTableRef}\n label={data.tables.label}\n data={data.tables.data}\n onPress={onTableSegmentClick}\n openModesOfTable={data.tables.openModesOfTable}\n />,\n ];\n }\n }\n\n return itemTypes;\n }, [\n data,\n gameRefs,\n puzzleRefs,\n lessonRefs,\n handleLessonSegmentClick,\n handleGameSegmentClick,\n handlePuzzleSegmentClick,\n onTableSegmentClick,\n ]);\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 // Start game launcher journey only when isLoading has become false and data is available\n useEffect(() => {\n if (isLoading || !data || isJourneyActive) {\n return;\n }\n\n if (data?.puzzles && journeyId === JOURNEY_ID_STUDENT.CIRCLE_ACTIVITIES_INTRO_JOURNEY) {\n startLessonPuzzleGamesJourney(data?.puzzles, !!data?.lessons);\n\n return; // CIRCLE_ACTIVITIES_INTRO_JOURNEY has higher priority\n }\n\n if (data?.tables && journeyId === JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY) {\n startTablesJourney(data?.tables, isTutorialOnboardingDone);\n\n return;\n }\n\n if (data?.tables && journeyId === JOURNEY_ID_STUDENT.CIRCLE_TABLES_INFINTE_JOURNEY) {\n startInfiniteTablesJourney();\n\n return;\n }\n }, [\n data,\n isJourneyActive,\n isLoading,\n isTablesOnboardingDone,\n isTutorialOnboardingDone,\n journeyId,\n startInfiniteTablesJourney,\n startLessonPuzzleGamesJourney,\n startTablesJourney,\n ]);\n\n if (isLoading) {\n return <CircularLoader />;\n }\n\n if (!data) {\n return (\n <Carousel\n items={sleepyBoiItem}\n analyticsNext={{\n analyticsLabel: '',\n }}\n analyticsPrev={{\n analyticsLabel: '',\n }}\n />\n );\n }\n\n return (\n <Carousel\n ref={carouselRefs}\n items={items}\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","GameLauncher","memo","onSegmentClick","journeyId","data","isLoading","isTutorialOnboardingDone","isTablesOnboardingDone","defaultIndex","onJourneyComplete","carouselRefs","useRef","originalTableRef","isJourneyActive","useJourney","playSwipeSound","play","useCircleSounds","onTableSegmentClick","useCallback","table","CircleSoundKey","ProjectType","onTableInfiniteModeClick","handleLessonSegmentClick","lesson","handleGameSegmentClick","game","handlePuzzleSegmentClick","puzzle","gameRefs","lessonRefs","puzzleRefs","startLessonPuzzleGamesJourney","useGameLauncherJourney","startInfiniteTablesJourney","useTableInfiniteLauncherJourney","startTablesJourney","useTableLauncherJourney","items","useMemo","itemTypes","jsx","SegmentedGameCard","TablesCard","sleepyBoiItem","LottieAnimation","LOTTIE","useEffect","JOURNEY_ID_STUDENT","CircularLoader","Carousel","GAME_LAUNCHER_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,IAAqBC,IAAqBC,GAEnCC,KAAuCC;AAAA,EAClD,CAAC;AAAA,IACC,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,mBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAsB,IAAI,GAEzCC,IAAmBD,EAAsB,IAAI,GAE7C,EAAE,iBAAAE,MAAoBC,KAEtB,EAAE,gBAAAC,GAAgB,MAAAC,EAAK,IAAIC,EAAgB,GAE3CC,IAAsBC;AAAA,MAC1B,CAACC,MAAyB;AACxB,QAAAJ,EAAKK,EAAe,eAAe,GACpBnB,EAAAkB,GAAOE,EAAY,KAAK;AAAA,MACzC;AAAA,MACA,CAACpB,GAAgBc,CAAI;AAAA,IAAA,GAGjBO,IAA2BJ,EAAY,MAAM;AAC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,QACF;AAEA,YAAIF,KAAA,QAAAA,EAAM,UAAUD,MAAc8C,EAAmB,+BAA+B;AACvD,UAAAd;AAE3B;AAAA,QACF;AAAA;AAAA,IAAA,GACC;AAAA,MACD/B;AAAA,MACAS;AAAA,MACAR;AAAA,MACAE;AAAA,MACAD;AAAA,MACAH;AAAA,MACAgC;AAAA,MACAF;AAAA,MACAI;AAAA,IAAA,CACD,GAEGhC,sBACM6C,GAAe,CAAA,CAAA,IAGpB9C,IAeH,gBAAAsC;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,KAAKzC;AAAA,QACL,OAAA6B;AAAA,QACA,cAAA/B;AAAA,QACA,QAAQO;AAAA,QACR,QAAQA;AAAA,QACR,eAAe;AAAA,UACb,gBAAgBqC,EAA+B;AAAA,QACjD;AAAA,QACA,eAAe;AAAA,UACb,gBAAgBA,EAA+B;AAAA,QACjD;AAAA,MAAA;AAAA,IAAA,IAxBA,gBAAAV;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,OAAON;AAAA,QACP,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,QACA,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,MAAA;AAAA,IAAA;AAAA,EAoBR;AACF;"}
|
|
1
|
+
{"version":3,"file":"game-launcher.js","sources":["../../../../src/features/circle-games/game-launcher/game-launcher.tsx"],"sourcesContent":["import type { ICarouselRefs } from './comps/carousel/carousel-types';\nimport type { ITableCardRef, 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, useEffect, useMemo, useRef } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { JOURNEY_ID_STUDENT } from '../../journey/journey-id/journey-id-student';\nimport { useJourney } from '../../journey/use-journey/use-journey';\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 { GAME_LAUNCHER_ASSET_PADDING } from './comps/segmented-game-card/constants';\nimport { SegmentedGameCard } from './comps/segmented-game-card/segmented-game-card';\nimport { TablesCard } from './comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from './game-launcher-analytics-events';\nimport { useGameLauncherJourney } from './hooks/use-game-launcher-journey/use-game-launcher-journey';\nimport { useTableInfiniteLauncherJourney } from './hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey';\nimport { useTableLauncherJourney } from './hooks/use-table-launcher-journey/use-table-launcher-journey';\n\nconst sleepyBoiDimension = GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING;\n\nexport const GameLauncher: FC<IGameLauncherProps> = memo(\n ({\n onSegmentClick,\n journeyId,\n data,\n isLoading,\n isTutorialOnboardingDone,\n defaultIndex = 0,\n onJourneyComplete,\n }) => {\n const carouselRefs = useRef<ICarouselRefs>(null);\n\n const tableRef = useRef<ITableCardRef>(null);\n\n const { isJourneyActive } = useJourney();\n\n const { playSwipeSound, play } = useCircleSounds();\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 onTableInfiniteModeClick = useCallback(() => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick({ mode: 'infinite' } as ITableDetails, ProjectType.TABLE);\n }, [onSegmentClick, play]);\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 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 {\n gameRefs,\n lessonRefs,\n puzzleRefs,\n startJourney: startLessonPuzzleGamesJourney,\n } = useGameLauncherJourney({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n });\n\n const { startJourney: startInfiniteTablesJourney } = useTableInfiniteLauncherJourney({\n carouselRefs,\n onTableInfiniteModeClick,\n onJourneyComplete,\n originalTableRef: tableRef,\n });\n\n const { startJourney: startTablesJourney } = useTableLauncherJourney({\n carouselRefs,\n originalTableRef: tableRef,\n onTableSegmentClick,\n onJourneyComplete,\n onNextJourney: startInfiniteTablesJourney,\n });\n\n const items = useMemo(() => {\n let itemTypes: ReactNode[] = [];\n\n if (data) {\n if (data.lessons) {\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={lessonRefs}\n label={data.lessons.label}\n value={data.lessons.data.filter(lesson => lesson.status === 'completed').length}\n maxValue={data.lessons.data.length}\n initialValue={data.lessons.initialProgressValue}\n data={data?.lessons.data.map(lesson => ({\n card: lesson.cardLottie,\n name: lesson.name,\n isCompleted: lesson.status === 'completed',\n onPress: () => handleLessonSegmentClick(lesson),\n }))}\n />,\n ];\n }\n\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={gameRefs}\n label={data.games.label}\n value={data.games.data.filter(game => game.isPlayed).length}\n maxValue={data.games.data.length}\n initialValue={data.games.initialProgressValue}\n data={data.games.data.map(game => ({\n card: game.cardLottie,\n name: game.name,\n isCompleted: false,\n onPress: () => handleGameSegmentClick(game),\n }))}\n />,\n <SegmentedGameCard\n ref={puzzleRefs}\n label={data.puzzles.label}\n value={data.puzzles.data.filter(puzzle => puzzle.solved).length}\n maxValue={data.puzzles.data.length}\n initialValue={data.puzzles.initialProgressValue}\n data={data.puzzles.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: puzzle.name,\n isCompleted: puzzle.solved,\n onPress: () => handlePuzzleSegmentClick(puzzle),\n }))}\n />,\n ];\n\n if (data.tables) {\n itemTypes = [\n ...itemTypes,\n <TablesCard\n ref={tableRef}\n label={data.tables.label}\n data={data.tables.data}\n onPress={onTableSegmentClick}\n openModesOfTable={data.tables.openModesOfTable}\n />,\n ];\n }\n }\n\n return itemTypes;\n }, [\n data,\n gameRefs,\n puzzleRefs,\n lessonRefs,\n handleLessonSegmentClick,\n handleGameSegmentClick,\n handlePuzzleSegmentClick,\n onTableSegmentClick,\n ]);\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 // Start game launcher journey only when isLoading has become false and data is available\n useEffect(() => {\n if (isLoading || !data || isJourneyActive) {\n return;\n }\n\n if (data?.puzzles && journeyId === JOURNEY_ID_STUDENT.CIRCLE_ACTIVITIES_INTRO_JOURNEY) {\n startLessonPuzzleGamesJourney(data?.puzzles, !!data?.lessons);\n\n return; // CIRCLE_ACTIVITIES_INTRO_JOURNEY has higher priority\n }\n\n if (data?.tables && journeyId === JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY) {\n startTablesJourney(data?.tables, isTutorialOnboardingDone);\n\n return;\n }\n\n if (data?.tables && journeyId === JOURNEY_ID_STUDENT.CIRCLE_TABLES_INFINTE_JOURNEY) {\n startInfiniteTablesJourney();\n\n return;\n }\n }, [\n data,\n isJourneyActive,\n isLoading,\n isTutorialOnboardingDone,\n journeyId,\n startInfiniteTablesJourney,\n startLessonPuzzleGamesJourney,\n startTablesJourney,\n ]);\n\n if (isLoading) {\n return <CircularLoader />;\n }\n\n if (!data) {\n return (\n <Carousel\n items={sleepyBoiItem}\n analyticsNext={{\n analyticsLabel: '',\n }}\n analyticsPrev={{\n analyticsLabel: '',\n }}\n />\n );\n }\n\n return (\n <Carousel\n ref={carouselRefs}\n items={items}\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","GameLauncher","memo","onSegmentClick","journeyId","data","isLoading","isTutorialOnboardingDone","defaultIndex","onJourneyComplete","carouselRefs","useRef","tableRef","isJourneyActive","useJourney","playSwipeSound","play","useCircleSounds","onTableSegmentClick","useCallback","table","CircleSoundKey","ProjectType","onTableInfiniteModeClick","handleLessonSegmentClick","lesson","handleGameSegmentClick","game","handlePuzzleSegmentClick","puzzle","gameRefs","lessonRefs","puzzleRefs","startLessonPuzzleGamesJourney","useGameLauncherJourney","startInfiniteTablesJourney","useTableInfiniteLauncherJourney","startTablesJourney","useTableLauncherJourney","items","useMemo","itemTypes","jsx","SegmentedGameCard","TablesCard","sleepyBoiItem","LottieAnimation","LOTTIE","useEffect","JOURNEY_ID_STUDENT","CircularLoader","Carousel","GAME_LAUNCHER_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,IAAqBC,IAAqBC,GAEnCC,KAAuCC;AAAA,EAClD,CAAC;AAAA,IACC,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,cAAAC,IAAe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,EAAU,MAAM;AACV,UAAA,EAAA1C,KAAa,CAACD,KAAQQ,IAI1B;AAAA,YAAIR,KAAA,QAAAA,EAAM,WAAWD,MAAc6C,EAAmB,iCAAiC;AACrF,UAAAhB,EAA8B5B,KAAA,gBAAAA,EAAM,SAAS,CAAC,EAACA,KAAA,QAAAA,EAAM,QAAO;AAE5D;AAAA,QACF;AAEA,YAAIA,KAAA,QAAAA,EAAM,UAAUD,MAAc6C,EAAmB,6BAA6B;AAC7D,UAAAZ,EAAAhC,KAAA,gBAAAA,EAAM,QAAQE,CAAwB;AAEzD;AAAA,QACF;AAEA,YAAIF,KAAA,QAAAA,EAAM,UAAUD,MAAc6C,EAAmB,+BAA+B;AACvD,UAAAd;AAE3B;AAAA,QACF;AAAA;AAAA,IAAA,GACC;AAAA,MACD9B;AAAA,MACAQ;AAAA,MACAP;AAAA,MACAC;AAAA,MACAH;AAAA,MACA+B;AAAA,MACAF;AAAA,MACAI;AAAA,IAAA,CACD,GAEG/B,sBACM4C,GAAe,CAAA,CAAA,IAGpB7C,IAeH,gBAAAqC;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,KAAKzC;AAAA,QACL,OAAA6B;AAAA,QACA,cAAA/B;AAAA,QACA,QAAQO;AAAA,QACR,QAAQA;AAAA,QACR,eAAe;AAAA,UACb,gBAAgBqC,EAA+B;AAAA,QACjD;AAAA,QACA,eAAe;AAAA,UACb,gBAAgBA,EAA+B;AAAA,QACjD;AAAA,MAAA;AAAA,IAAA,IAxBA,gBAAAV;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,OAAON;AAAA,QACP,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,QACA,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,MAAA;AAAA,IAAA;AAAA,EAoBR;AACF;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as n, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as U, useCallback as m, useEffect as
|
|
3
|
-
import { JOURNEY_ID_STUDENT as
|
|
2
|
+
import { useRef as U, useCallback as m, useEffect as w } from "react";
|
|
3
|
+
import { JOURNEY_ID_STUDENT as F } from "../../../../journey/journey-id/journey-id-student.js";
|
|
4
4
|
import { IndicatorType as l } from "../../../../journey/use-journey/constants.js";
|
|
5
|
-
import { useJourney as
|
|
5
|
+
import { useJourney as J } from "../../../../journey/use-journey/use-journey.js";
|
|
6
6
|
import W from "../../../../ui/layout/flex-view.js";
|
|
7
7
|
import k from "../../../../ui/text/text.js";
|
|
8
|
-
import { getTheme as
|
|
9
|
-
import { useCircleSounds as
|
|
8
|
+
import { getTheme as P } from "../../../../ui/theme/get-theme.js";
|
|
9
|
+
import { useCircleSounds as b } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
|
|
10
10
|
import { INFINITE_MODE_TEXT as v } from "../../comps/tables-card/constants.js";
|
|
11
|
-
import R from "../../comps/tables-card/infinite-button/infinite-button
|
|
12
|
-
import { TABLE_CARD_INDEX as I, GO_TO_TABLE_LAUNCHER_DURATION_MS as X, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as
|
|
11
|
+
import R from "../../comps/tables-card/infinite-button/infinite-mode-launcher-button.js";
|
|
12
|
+
import { TABLE_CARD_INDEX as I, GO_TO_TABLE_LAUNCHER_DURATION_MS as X, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as B, LESSON_CARD_INDEX as $, SHOW_INITIAL_COACHMARK_AFTER_MS as G, SHOW_INITIAL_TOOLTIP_AFTER_MS as j } from "./constants.js";
|
|
13
13
|
import { Indicator as K } from "./use-table-infinite-launcher-journey-styled.js";
|
|
14
14
|
const V = {
|
|
15
15
|
top: 6,
|
|
@@ -18,13 +18,13 @@ const V = {
|
|
|
18
18
|
}, mt = ({
|
|
19
19
|
carouselRefs: o,
|
|
20
20
|
originalTableRef: t,
|
|
21
|
-
onTableInfiniteModeClick:
|
|
22
|
-
onJourneyComplete:
|
|
21
|
+
onTableInfiniteModeClick: T,
|
|
22
|
+
onJourneyComplete: a
|
|
23
23
|
}) => {
|
|
24
|
-
const e =
|
|
24
|
+
const e = F.CIRCLE_TABLES_INFINTE_JOURNEY, { device: Y } = P(), p = Y === "mobile" ? "ab3-bold" : "ab2-bold", h = U([]), { playButtonSound: A } = b(), { nextCoachmark: c, setJourney: E, addCoachmark: _, endJourney: f } = J(), g = m(() => {
|
|
25
25
|
var r;
|
|
26
|
-
|
|
27
|
-
}, [
|
|
26
|
+
f(e), T(), (r = t == null ? void 0 : t.current) == null || r.stopLabelAnimation(), a(e);
|
|
27
|
+
}, [f, e, a, T, t]), s = m(
|
|
28
28
|
(r, u) => {
|
|
29
29
|
c(e, !1, r);
|
|
30
30
|
const i = setTimeout(() => {
|
|
@@ -34,16 +34,16 @@ const V = {
|
|
|
34
34
|
h.current.push(i);
|
|
35
35
|
},
|
|
36
36
|
[e, c, t]
|
|
37
|
-
),
|
|
37
|
+
), C = m(() => {
|
|
38
38
|
var r;
|
|
39
|
-
|
|
40
|
-
}, [o,
|
|
39
|
+
A(), (r = o.current) == null || r.goToIndex(I), s(X, B);
|
|
40
|
+
}, [o, A, s]), M = m(() => {
|
|
41
41
|
var O, L, N, y, S, D, H;
|
|
42
42
|
const r = (O = o.current) == null ? void 0 : O.indicatorRefs, u = (L = o.current) == null ? void 0 : L.nextBtnRef, i = r == null ? void 0 : r[I];
|
|
43
43
|
if (!((N = t.current) != null && N.segmentedCardWrapperRef.current) || !((y = t.current) != null && y.labelRef.current) || !r || !(u != null && u.current) || !i || !i.current)
|
|
44
44
|
return;
|
|
45
45
|
const d = (S = t.current) == null ? void 0 : S.segmentedCardWrapperRef.current.getBoundingClientRect();
|
|
46
|
-
((D = o.current) == null ? void 0 : D.currentIndex) === I ? (E(e, []), s(0,
|
|
46
|
+
((D = o.current) == null ? void 0 : D.currentIndex) === I ? (E(e, []), s(0, B)) : (E(e, [
|
|
47
47
|
{
|
|
48
48
|
originalElementToHighlightRef: i,
|
|
49
49
|
isActive: !1,
|
|
@@ -59,7 +59,7 @@ const V = {
|
|
|
59
59
|
$position: "absolute",
|
|
60
60
|
$flexDirection: "row",
|
|
61
61
|
style: V,
|
|
62
|
-
onClick:
|
|
62
|
+
onClick: C,
|
|
63
63
|
children: /* @__PURE__ */ n(k, { $renderAs: p, children: "NEW" })
|
|
64
64
|
}
|
|
65
65
|
),
|
|
@@ -86,26 +86,26 @@ const V = {
|
|
|
86
86
|
indicator: {
|
|
87
87
|
position: "top",
|
|
88
88
|
backgroundColor: "YELLOW_4",
|
|
89
|
-
width:
|
|
89
|
+
width: 260,
|
|
90
90
|
tooltipItem: /* @__PURE__ */ n(W, { children: /* @__PURE__ */ n(k, { $renderAs: p, children: "Challenge yourself in Infinity Mode! Break records and climb the leaderboard." }) }),
|
|
91
91
|
tooltipXCoOrdinates: d.width / 2,
|
|
92
|
-
tooltipYCoOrdinates: -1 * d.height / 3
|
|
92
|
+
tooltipYCoOrdinates: -(1 * d.height) / 3
|
|
93
93
|
}
|
|
94
94
|
}), _(e, {
|
|
95
|
-
originalElementToHighlightRef: t.current.
|
|
95
|
+
originalElementToHighlightRef: t.current.infiniteButtonRef,
|
|
96
96
|
isActive: !1,
|
|
97
97
|
type: l.NUDGE,
|
|
98
98
|
indicator: {
|
|
99
99
|
nudge: "click",
|
|
100
100
|
nudgePointerX: 0,
|
|
101
|
-
nudgePointerY:
|
|
101
|
+
nudgePointerY: 10
|
|
102
102
|
},
|
|
103
|
-
elementToHighlight: /* @__PURE__ */ n(R, { onClick: g
|
|
103
|
+
elementToHighlight: /* @__PURE__ */ n(R, { onClick: g })
|
|
104
104
|
});
|
|
105
105
|
}, [
|
|
106
106
|
_,
|
|
107
107
|
o,
|
|
108
|
-
|
|
108
|
+
C,
|
|
109
109
|
g,
|
|
110
110
|
e,
|
|
111
111
|
c,
|
|
@@ -114,7 +114,7 @@ const V = {
|
|
|
114
114
|
s,
|
|
115
115
|
p
|
|
116
116
|
]);
|
|
117
|
-
return
|
|
117
|
+
return w(() => () => {
|
|
118
118
|
h.current.forEach((r) => clearTimeout(r)), h.current = [];
|
|
119
119
|
}, [e]), {
|
|
120
120
|
startJourney: M
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table-infinite-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { IUseInfiniteTableJourneyProps } from './use-table-infinite-launcher-journey-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { INFINITE_MODE_TEXT } from '../../comps/tables-card/constants';\nimport InfiniteButtonCard from '../../comps/tables-card/infinite-button/infinite-button-card';\nimport { LESSON_CARD_INDEX, TABLE_CARD_INDEX } from './constants';\nimport {\n GO_TO_TABLE_LAUNCHER_DURATION_MS,\n SHOW_CLICK_TABLE_NUDGE_AFTER_MS,\n SHOW_INITIAL_COACHMARK_AFTER_MS,\n SHOW_INITIAL_TOOLTIP_AFTER_MS,\n} from './constants';\nimport * as S from './use-table-infinite-launcher-journey-styled';\n\nconst tooltipItemStyle: React.CSSProperties = {\n top: 6,\n left: 8,\n cursor: 'pointer',\n};\n\nexport const useTableInfiniteLauncherJourney = ({\n carouselRefs,\n originalTableRef,\n onTableInfiniteModeClick,\n onJourneyComplete,\n}: IUseInfiniteTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INFINTE_JOURNEY;\n\n const { device } = getTheme();\n const isMobile = device === 'mobile';\n const tooltipTextRenderAs = isMobile ? 'ab3-bold' : 'ab2-bold';\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark, endJourney } = useJourney();\n\n const handleEndJourney = useCallback(() => {\n endJourney(journeyId);\n // Only when User clicked on play\n onTableInfiniteModeClick();\n // Reset original table card ref label\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n }, [endJourney, journeyId, onJourneyComplete, onTableInfiniteModeClick, originalTableRef]);\n\n const showToolTipAndNudge = useCallback(\n (dealyToShowToolTip: number, delayToShowNudge: number) => {\n nextCoachmark(journeyId, false, dealyToShowToolTip);\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n\n originalTableRef.current?.startLabelAnimation('YELLOW_4');\n if (originalTableRef.current && originalTableRef.current.labelRef.current) {\n originalTableRef.current.labelRef.current.innerText = INFINITE_MODE_TEXT;\n }\n nextCoachmark(journeyId, true);\n }, delayToShowNudge);\n\n timerRefs.current.push(showNudge);\n },\n [journeyId, nextCoachmark, originalTableRef],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n showToolTipAndNudge(GO_TO_TABLE_LAUNCHER_DURATION_MS, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n }, [carouselRefs, playButtonSound, showToolTipAndNudge]);\n\n const startJourney = useCallback(() => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n // USER ON TABLE CARD\n if (carouselRefs.current?.currentIndex === TABLE_CARD_INDEX) {\n setJourney(journeyId, []);\n showToolTipAndNudge(0, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n } else {\n // USER ON LESSON CARD\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={tooltipItemStyle}\n onClick={goToTableLauncher}\n >\n <Text $renderAs={tooltipTextRenderAs}>NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n },\n ]);\n carouselRefs.current?.goToIndex(LESSON_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, SHOW_INITIAL_TOOLTIP_AFTER_MS); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT INFINITE MODE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 240,\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Challenge yourself in Infinity Mode! Break records and climb the leaderboard.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: tableCardDims.width / 2,\n tooltipYCoOrdinates: (-1 * tableCardDims.height) / 3,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.centerCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n nudgePointerX: 0,\n nudgePointerY: 15,\n } as INudgeProps,\n elementToHighlight: <InfiniteButtonCard onClick={handleEndJourney} enableClick={true} />,\n });\n }, [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleEndJourney,\n journeyId,\n nextCoachmark,\n originalTableRef,\n setJourney,\n showToolTipAndNudge,\n tooltipTextRenderAs,\n ]);\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [journeyId]);\n\n return {\n startJourney,\n };\n};\n"],"names":["tooltipItemStyle","useTableInfiniteLauncherJourney","carouselRefs","originalTableRef","onTableInfiniteModeClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","device","getTheme","tooltipTextRenderAs","timerRefs","useRef","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","endJourney","useJourney","handleEndJourney","useCallback","_a","showToolTipAndNudge","dealyToShowToolTip","delayToShowNudge","showNudge","INFINITE_MODE_TEXT","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","startJourney","paginationList","carouselNextBtnRef","_b","tablePaginationRef","_c","_d","tableCardDims","_e","_f","IndicatorType","jsx","S.Indicator","FlexView","Text","Fragment","_g","LESSON_CARD_INDEX","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","InfiniteButtonCard","useEffect","timer"],"mappings":";;;;;;;;;;;;;AAwBA,MAAMA,IAAwC;AAAA,EAC5C,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AACV,GAEaC,KA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inite-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { IUseInfiniteTableJourneyProps } from './use-table-infinite-launcher-journey-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { INFINITE_MODE_TEXT } from '../../comps/tables-card/constants';\nimport InfiniteButtonCard from '../../comps/tables-card/infinite-button/infinite-mode-launcher-button';\nimport { LESSON_CARD_INDEX, TABLE_CARD_INDEX } from './constants';\nimport {\n GO_TO_TABLE_LAUNCHER_DURATION_MS,\n SHOW_CLICK_TABLE_NUDGE_AFTER_MS,\n SHOW_INITIAL_COACHMARK_AFTER_MS,\n SHOW_INITIAL_TOOLTIP_AFTER_MS,\n} from './constants';\nimport * as S from './use-table-infinite-launcher-journey-styled';\n\nconst tooltipItemStyle: React.CSSProperties = {\n top: 6,\n left: 8,\n cursor: 'pointer',\n};\n\nexport const useTableInfiniteLauncherJourney = ({\n carouselRefs,\n originalTableRef,\n onTableInfiniteModeClick,\n onJourneyComplete,\n}: IUseInfiniteTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INFINTE_JOURNEY;\n\n const { device } = getTheme();\n const isMobile = device === 'mobile';\n const tooltipTextRenderAs = isMobile ? 'ab3-bold' : 'ab2-bold';\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark, endJourney } = useJourney();\n\n const handleEndJourney = useCallback(() => {\n endJourney(journeyId);\n // Only when User clicked on play\n onTableInfiniteModeClick();\n // Reset original table card ref label\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n }, [endJourney, journeyId, onJourneyComplete, onTableInfiniteModeClick, originalTableRef]);\n\n const showToolTipAndNudge = useCallback(\n (dealyToShowToolTip: number, delayToShowNudge: number) => {\n nextCoachmark(journeyId, false, dealyToShowToolTip);\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n\n originalTableRef.current?.startLabelAnimation('YELLOW_4');\n if (originalTableRef.current && originalTableRef.current.labelRef.current) {\n originalTableRef.current.labelRef.current.innerText = INFINITE_MODE_TEXT;\n }\n nextCoachmark(journeyId, true);\n }, delayToShowNudge);\n\n timerRefs.current.push(showNudge);\n },\n [journeyId, nextCoachmark, originalTableRef],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n showToolTipAndNudge(GO_TO_TABLE_LAUNCHER_DURATION_MS, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n }, [carouselRefs, playButtonSound, showToolTipAndNudge]);\n\n const startJourney = useCallback(() => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n // USER ON TABLE CARD\n if (carouselRefs.current?.currentIndex === TABLE_CARD_INDEX) {\n setJourney(journeyId, []);\n showToolTipAndNudge(0, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n } else {\n // USER ON LESSON CARD\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={tooltipItemStyle}\n onClick={goToTableLauncher}\n >\n <Text $renderAs={tooltipTextRenderAs}>NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n },\n ]);\n carouselRefs.current?.goToIndex(LESSON_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, SHOW_INITIAL_TOOLTIP_AFTER_MS); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT INFINITE MODE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 260,\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Challenge yourself in Infinity Mode! Break records and climb the leaderboard.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: tableCardDims.width / 2,\n tooltipYCoOrdinates: -(1 * tableCardDims.height) / 3,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.infiniteButtonRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n nudgePointerX: 0,\n nudgePointerY: 10,\n } as INudgeProps,\n elementToHighlight: <InfiniteButtonCard onClick={handleEndJourney} />,\n });\n }, [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleEndJourney,\n journeyId,\n nextCoachmark,\n originalTableRef,\n setJourney,\n showToolTipAndNudge,\n tooltipTextRenderAs,\n ]);\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [journeyId]);\n\n return {\n startJourney,\n };\n};\n"],"names":["tooltipItemStyle","useTableInfiniteLauncherJourney","carouselRefs","originalTableRef","onTableInfiniteModeClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","device","getTheme","tooltipTextRenderAs","timerRefs","useRef","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","endJourney","useJourney","handleEndJourney","useCallback","_a","showToolTipAndNudge","dealyToShowToolTip","delayToShowNudge","showNudge","INFINITE_MODE_TEXT","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","startJourney","paginationList","carouselNextBtnRef","_b","tablePaginationRef","_c","_d","tableCardDims","_e","_f","IndicatorType","jsx","S.Indicator","FlexView","Text","Fragment","_g","LESSON_CARD_INDEX","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","InfiniteButtonCard","useEffect","timer"],"mappings":";;;;;;;;;;;;;AAwBA,MAAMA,IAAwC;AAAA,EAC5C,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AACV,GAEaC,KAAkC,CAAC;AAAA,EAC9C,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,mBAAAC;AACF,MAAqC;AACnC,QAAMC,IAAYC,EAAmB,+BAE/B,EAAE,Q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