@cuemath/leap 2.8.37-rj-0 → 2.8.37-rj-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/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +12 -11
- 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/hooks/use-game-launcher-journey/constants.js +5 -4
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +36 -36
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
@@ -1,15 +1,15 @@
|
|
1
|
-
import { useState as
|
2
|
-
import { useGetCircleHomeAPI as
|
1
|
+
import { useState as R, useCallback as p, useEffect as d } from "react";
|
2
|
+
import { useGetCircleHomeAPI as C } from "../../api/get-content-for-today/get-circle-home-api.js";
|
3
3
|
import { ProjectType as s } from "../../../games/web-view/enums/project-type-enum.js";
|
4
|
-
const O = (r, o,
|
5
|
-
const [
|
6
|
-
|
4
|
+
const O = (r, o, c) => {
|
5
|
+
const [_, m] = R(null), { data: a, get: n, isProcessed: i, ...l } = C(), E = p(() => {
|
6
|
+
n("", {
|
7
7
|
user_id: r,
|
8
8
|
country_code: o,
|
9
|
-
grade:
|
9
|
+
grade: c
|
10
10
|
});
|
11
|
-
}, [
|
12
|
-
return
|
11
|
+
}, [n, r, o, c]);
|
12
|
+
return d(() => {
|
13
13
|
let e = null;
|
14
14
|
i && a && (e = {
|
15
15
|
points: a.points,
|
@@ -56,7 +56,8 @@ const O = (r, o, n) => {
|
|
56
56
|
CIRCLE_LEADERBOARD_INTRO_JOURNEY: a.coachmark_completion.CIRCLE_LEADERBOARD_INTRO_JOURNEY,
|
57
57
|
CIRCLE_POINTS_REWARD_JOURNEY: a.coachmark_completion.CIRCLE_POINTS_REWARD_JOURNEY,
|
58
58
|
CIRCLE_STREAK_UPDATE_JOURNEY: a.coachmark_completion.CIRCLE_STREAK_UPDATE_JOURNEY,
|
59
|
-
CIRCLE_TUTORIAL_JOURNEY: a.coachmark_completion.CIRCLE_TUTORIAL_JOURNEY
|
59
|
+
CIRCLE_TUTORIAL_JOURNEY: a.coachmark_completion.CIRCLE_TUTORIAL_JOURNEY,
|
60
|
+
CIRCLE_TABLES_INTRO_JOURNEY: a.coachmark_completion.CIRCLE_TABLES_INTRO_JOURNEY
|
60
61
|
}
|
61
62
|
}, a.projects.lessons && (e.projects.lessons = {
|
62
63
|
label: a.projects.lessons.label,
|
@@ -83,8 +84,8 @@ const O = (r, o, n) => {
|
|
83
84
|
stars: t.stars
|
84
85
|
}))
|
85
86
|
}
|
86
|
-
})),
|
87
|
-
}, [a, i]), { data:
|
87
|
+
})), m(e);
|
88
|
+
}, [a, i]), { data: _, isProcessed: i, getCircleHomeDetails: E, ...l };
|
88
89
|
};
|
89
90
|
export {
|
90
91
|
O as useGetCircleHomeDetailsDal
|
@@ -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 {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { useGetCircleHomeAPI } from '../../api/get-content-for-today/get-circle-home-api';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n countryCode: string,\n grade: string,\n): Omit<ReturnType<typeof useGetCircleHomeAPI>, 'data' | 'get'> & {\n data: ICircleHomeDetails | null;\n getCircleHomeDetails: () => void;\n} => {\n const [contentForToday, setContentForToday] = useState<ICircleHomeDetails | null>(null);\n const { data, get: getHomeDetails, isProcessed, ...rest } = useGetCircleHomeAPI();\n\n const getCircleHomeDetails = useCallback(() => {\n getHomeDetails('', {\n user_id: userId,\n country_code: countryCode,\n grade: grade,\n });\n }, [getHomeDetails, userId, countryCode, grade]);\n\n useEffect(() => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (isProcessed && data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {\n 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 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 timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n coachmarkProgress: {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY:\n data.coachmark_completion.CIRCLE_ACTIVITIES_INTRO_JOURNEY,\n CIRCLE_LEADERBOARD_INTRO_JOURNEY:\n data.coachmark_completion.CIRCLE_LEADERBOARD_INTRO_JOURNEY,\n CIRCLE_POINTS_REWARD_JOURNEY: data.coachmark_completion.CIRCLE_POINTS_REWARD_JOURNEY,\n CIRCLE_STREAK_UPDATE_JOURNEY: data.coachmark_completion.CIRCLE_STREAK_UPDATE_JOURNEY,\n CIRCLE_TUTORIAL_JOURNEY: data.coachmark_completion.CIRCLE_TUTORIAL_JOURNEY,\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.LESSON,\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 setContentForToday(circleHomeDetails);\n }, [data, isProcessed]);\n\n return { data: contentForToday, isProcessed, getCircleHomeDetails, ...rest };\n};\n"],"names":["useGetCircleHomeDetailsDal","userId","countryCode","grade","contentForToday","setContentForToday","useState","data","getHomeDetails","isProcessed","rest","useGetCircleHomeAPI","getCircleHomeDetails","useCallback","useEffect","circleHomeDetails","ProjectType","game","puzzle","lesson","table"],"mappings":";;;AAWO,MAAMA,IAA6B,CACxCC,GACAC,GACAC,MAIG;AACH,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAoC,IAAI,GAChF,EAAE,MAAAC,GAAM,KAAKC,GAAgB,aAAAC,GAAa,GAAGC,EAAA,IAASC,KAEtDC,IAAuBC,EAAY,MAAM;AAC7C,IAAAL,EAAe,IAAI;AAAA,MACjB,SAASP;AAAA,MACT,cAAcC;AAAA,MACd,OAAAC;AAAA,IAAA,CACD;AAAA,KACA,CAACK,GAAgBP,GAAQC,GAAaC,CAAK,CAAC;AAE/C,SAAAW,EAAU,MAAM;AACd,QAAIC,IAA+C;AAEnD,IAAIN,KAAeF,MACGQ,IAAA;AAAA,MAClB,QAAQR,EAAK;AAAA,MACb,YAAYA,EAAK;AAAA,MACjB,cAAcA,EAAK;AAAA,MACnB,gBAAgBA,EAAK;AAAA,MACrB,UAAU;AAAA,QACR,OAAO;AAAA,UACL,OAAOA,EAAK,SAAS,MAAM;AAAA,UAC3B,MAAMS,EAAY;AAAA,UAClB,sBAAsB;AAAA,UACtB,MAAMT,EAAK,SAAS,MAAM,KAAK,IAAI,CAASU,OAAA;AAAA,YAC1C,IAAIA,EAAK;AAAA,YACT,MAAMA,EAAK;AAAA,YACX,YAAYA,EAAK;AAAA,YACjB,UAAUA,EAAK;AAAA,YACf,SAASA,EAAK;AAAA,YACd,UAAUA,EAAK;AAAA,UAAA,EACf;AAAA,QACJ;AAAA,QACA,SAAS;AAAA,UACP,OAAOV,EAAK,SAAS,QAAQ;AAAA,UAC7B,MAAMS,EAAY;AAAA,UAClB,sBAAsB;AAAA,UACtB,MAAMT,EAAK,SAAS,QAAQ,KAAK,IAAI,CAAWW,OAAA;AAAA,YAC9C,IAAIA,EAAO;AAAA,YACX,MAAMA,EAAO;AAAA,YACb,YAAYA,EAAO;AAAA,YACnB,UAAUA,EAAO;AAAA,YACjB,SAASA,EAAO;AAAA,YAChB,UAAUA,EAAO;AAAA,YACjB,YAAYA,EAAO;AAAA,YACnB,QAAQA,EAAO;AAAA,UAAA,EACf;AAAA,QACJ;AAAA,MACF;AAAA,MACA,YAAY;AAAA,QACV,gBAAgBX,EAAK,WAAW;AAAA,QAChC,cAAcA,EAAK,WAAW;AAAA,QAC9B,SAASA,EAAK,WAAW;AAAA,MAC3B;AAAA,MACA,mBAAmB;AAAA,QACjB,iCACEA,EAAK,qBAAqB;AAAA,QAC5B,kCACEA,EAAK,qBAAqB;AAAA,QAC5B,8BAA8BA,EAAK,qBAAqB;AAAA,QACxD,8BAA8BA,EAAK,qBAAqB;AAAA,QACxD,yBAAyBA,EAAK,qBAAqB;AAAA,
|
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 {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { useGetCircleHomeAPI } from '../../api/get-content-for-today/get-circle-home-api';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n countryCode: string,\n grade: string,\n): Omit<ReturnType<typeof useGetCircleHomeAPI>, 'data' | 'get'> & {\n data: ICircleHomeDetails | null;\n getCircleHomeDetails: () => void;\n} => {\n const [contentForToday, setContentForToday] = useState<ICircleHomeDetails | null>(null);\n const { data, get: getHomeDetails, isProcessed, ...rest } = useGetCircleHomeAPI();\n\n const getCircleHomeDetails = useCallback(() => {\n getHomeDetails('', {\n user_id: userId,\n country_code: countryCode,\n grade: grade,\n });\n }, [getHomeDetails, userId, countryCode, grade]);\n\n useEffect(() => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (isProcessed && data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {\n 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 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 timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n coachmarkProgress: {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY:\n data.coachmark_completion.CIRCLE_ACTIVITIES_INTRO_JOURNEY,\n CIRCLE_LEADERBOARD_INTRO_JOURNEY:\n data.coachmark_completion.CIRCLE_LEADERBOARD_INTRO_JOURNEY,\n CIRCLE_POINTS_REWARD_JOURNEY: data.coachmark_completion.CIRCLE_POINTS_REWARD_JOURNEY,\n CIRCLE_STREAK_UPDATE_JOURNEY: data.coachmark_completion.CIRCLE_STREAK_UPDATE_JOURNEY,\n CIRCLE_TUTORIAL_JOURNEY: data.coachmark_completion.CIRCLE_TUTORIAL_JOURNEY,\n CIRCLE_TABLES_INTRO_JOURNEY: data.coachmark_completion.CIRCLE_TABLES_INTRO_JOURNEY,\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.LESSON,\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 setContentForToday(circleHomeDetails);\n }, [data, isProcessed]);\n\n return { data: contentForToday, isProcessed, getCircleHomeDetails, ...rest };\n};\n"],"names":["useGetCircleHomeDetailsDal","userId","countryCode","grade","contentForToday","setContentForToday","useState","data","getHomeDetails","isProcessed","rest","useGetCircleHomeAPI","getCircleHomeDetails","useCallback","useEffect","circleHomeDetails","ProjectType","game","puzzle","lesson","table"],"mappings":";;;AAWO,MAAM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AAmBU,CAAiB;AAAA,EAAA,GACnC,CAACR,GAAME,CAAW,CAAC,GAEf,EAAE,MAAML,GAAiB,aAAAK,GAAa,sBAAAG,GAAsB,GAAGF;AACxE;"}
|
package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
const _ = 500, E = 500,
|
1
|
+
const _ = 500, S = 1e3, E = 500, T = 1500, L = 3e3;
|
2
2
|
export {
|
3
3
|
E as GO_TO_NEXT_SLIDE_AFTER_MS,
|
4
|
-
|
5
|
-
|
6
|
-
_ as
|
4
|
+
T as SHOW_LABEL_HIGHLIGHT_AFTER_MS,
|
5
|
+
L as SHOW_NUDGE_AFTER_MS,
|
6
|
+
_ as SLIDE_TO_LESSON_MS,
|
7
|
+
S as START_JOURNEY_DELAY_MS
|
7
8
|
};
|
8
9
|
//# sourceMappingURL=constants.js.map
|
package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.ts"],"sourcesContent":["export const
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.ts"],"sourcesContent":["export const SLIDE_TO_LESSON_MS = 500;\nexport const START_JOURNEY_DELAY_MS = 1000;\n\nexport const GO_TO_NEXT_SLIDE_AFTER_MS = 500;\nexport const SHOW_LABEL_HIGHLIGHT_AFTER_MS = 1500;\nexport const SHOW_NUDGE_AFTER_MS = 3000;\nexport const FIRST_COACHMARK_AFTER_MS = 200;\n"],"names":["SLIDE_TO_LESSON_MS","START_JOURNEY_DELAY_MS","GO_TO_NEXT_SLIDE_AFTER_MS","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS"],"mappings":"AAAO,MAAMA,IAAqB,KACrBC,IAAyB,KAEzBC,IAA4B,KAC5BC,IAAgC,MAChCC,IAAsB;"}
|
@@ -1,63 +1,63 @@
|
|
1
1
|
import { jsx as e, Fragment as I } from "react/jsx-runtime";
|
2
|
-
import { useRef as C, useCallback as E, useMemo as
|
2
|
+
import { useRef as C, useCallback as E, useMemo as ne } from "react";
|
3
3
|
import q from "../../../../../assets/line-icons/icons/carat-right.js";
|
4
4
|
import { PLATFORM_EVENTS_STUDENT as Q } from "../../../../analytics-events/platform-events-student.js";
|
5
5
|
import { IndicatorType as s } from "../../../../journey/use-journey/constants.js";
|
6
|
-
import { useJourney as
|
6
|
+
import { useJourney as ie } from "../../../../journey/use-journey/use-journey.js";
|
7
7
|
import j from "../../../../ui/buttons/icon-button/icon-button.js";
|
8
|
-
import { useUIContext as
|
8
|
+
import { useUIContext as oe } from "../../../../ui/context/context.js";
|
9
9
|
import L from "../../../../ui/layout/flex-view.js";
|
10
10
|
import g from "../../../../ui/text/text.js";
|
11
11
|
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as p } from "../../../enum/circle-onboarding-steps.js";
|
12
|
-
import { useCircleSounds as
|
13
|
-
import { SegmentedGameCard as
|
12
|
+
import { useCircleSounds as le } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
|
13
|
+
import { SegmentedGameCard as ce } from "../../comps/segmented-game-card/segmented-game-card.js";
|
14
14
|
import { GAME_LAUNCHER_ANALYTICS_EVENTS as z } from "../../game-launcher-analytics-events.js";
|
15
|
-
import { GO_TO_NEXT_SLIDE_AFTER_MS as
|
16
|
-
import { ProjectType as
|
17
|
-
const
|
15
|
+
import { GO_TO_NEXT_SLIDE_AFTER_MS as ae, SHOW_LABEL_HIGHLIGHT_AFTER_MS as de, SHOW_NUDGE_AFTER_MS as se, START_JOURNEY_DELAY_MS as ge, SLIDE_TO_LESSON_MS as he } from "./constants.js";
|
16
|
+
import { ProjectType as me } from "../../../games/web-view/enums/project-type-enum.js";
|
17
|
+
const He = ({
|
18
18
|
carouselRefs: n,
|
19
19
|
onSegmentClick: O,
|
20
|
-
onJourneyComplete:
|
20
|
+
onJourneyComplete: S
|
21
21
|
}) => {
|
22
|
-
const o = C(null), r = C(null), d = C(null),
|
22
|
+
const o = C(null), r = C(null), d = C(null), R = C(!1), { playButtonSound: b } = le(), { nextCoachmark: c, setJourney: N } = ie(), { onEvent: _ } = oe(), P = E(
|
23
23
|
(t) => {
|
24
|
-
|
24
|
+
_(Q.ONBOARDING_STEP_VIEWED, {
|
25
25
|
step: t
|
26
26
|
});
|
27
27
|
},
|
28
|
-
[
|
28
|
+
[_]
|
29
29
|
), y = E(
|
30
30
|
(t) => {
|
31
|
-
|
31
|
+
_(Q.ONBOARDING_STEP_COMPLETED, {
|
32
32
|
step: t
|
33
33
|
});
|
34
34
|
},
|
35
|
-
[
|
35
|
+
[_]
|
36
36
|
), h = E(
|
37
|
-
(t, a, i, m,
|
37
|
+
(t, a, i, m, A = !1) => {
|
38
38
|
var T, u;
|
39
|
-
|
39
|
+
A || (b(), (u = n.current) == null || u.goToIndex(((T = n.current) == null ? void 0 : T.currentIndex) + 1), c(m, !1, ae)), P(t);
|
40
40
|
const f = setTimeout(() => {
|
41
41
|
clearTimeout(f), a.startLabelAnimation(i);
|
42
|
-
},
|
43
|
-
c(m, !0,
|
42
|
+
}, de);
|
43
|
+
c(m, !0, se);
|
44
44
|
},
|
45
|
-
[n, c,
|
45
|
+
[n, c, b, P]
|
46
46
|
), H = E(
|
47
47
|
(t, a) => {
|
48
|
-
O(t,
|
48
|
+
O(t, me.PUZZLE), y(p.PUZZLE_ACTIVITY), c(a), S(a);
|
49
49
|
},
|
50
|
-
[c,
|
50
|
+
[c, S, O, y]
|
51
51
|
), G = E(
|
52
52
|
(t, a, i) => {
|
53
53
|
var Y, k, w, U, v, B, V, x, D, M, W, X, $, J, F, Z, K;
|
54
|
-
if (
|
54
|
+
if (R.current || !((Y = n == null ? void 0 : n.current) != null && Y.nextBtnRef.current) || !((k = r == null ? void 0 : r.current) != null && k.segmentedCardWrapperRef.current) || !((w = o == null ? void 0 : o.current) != null && w.labelRef.current) || !((U = r == null ? void 0 : r.current) != null && U.labelRef.current) || !t)
|
55
55
|
return;
|
56
|
-
|
56
|
+
R.current = !0;
|
57
57
|
const m = ((V = (B = (v = d.current) == null ? void 0 : v.labelRef) == null ? void 0 : B.current) == null ? void 0 : V.getBoundingClientRect()) || {
|
58
58
|
height: 0,
|
59
59
|
width: 0
|
60
|
-
},
|
60
|
+
}, A = ((M = (D = (x = o.current) == null ? void 0 : x.labelRef) == null ? void 0 : D.current) == null ? void 0 : M.getBoundingClientRect()) || {
|
61
61
|
height: 0,
|
62
62
|
width: 0
|
63
63
|
}, f = (($ = (X = (W = r.current) == null ? void 0 : W.labelRef) == null ? void 0 : X.current) == null ? void 0 : $.getBoundingClientRect()) || {
|
@@ -109,7 +109,7 @@ const ye = ({
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
]);
|
112
|
-
const
|
112
|
+
const ee = [
|
113
113
|
{
|
114
114
|
originalElementToHighlightRef: o.current.labelRef,
|
115
115
|
isActive: !1,
|
@@ -120,8 +120,8 @@ const ye = ({
|
|
120
120
|
backgroundColor: "ORANGE_4",
|
121
121
|
width: 264,
|
122
122
|
tooltipItem: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(g, { $renderAs: "ab2-bold", children: "Train to think deeper & plan ahead. Play 3 new games everyday." }) }),
|
123
|
-
tooltipXCoOrdinates:
|
124
|
-
tooltipYCoOrdinates:
|
123
|
+
tooltipXCoOrdinates: A.width + 50,
|
124
|
+
tooltipYCoOrdinates: A.height / 2
|
125
125
|
}
|
126
126
|
},
|
127
127
|
{
|
@@ -149,7 +149,7 @@ const ye = ({
|
|
149
149
|
nudgePointerY: 0
|
150
150
|
}
|
151
151
|
}
|
152
|
-
],
|
152
|
+
], te = [
|
153
153
|
{
|
154
154
|
originalElementToHighlightRef: r.current.labelRef,
|
155
155
|
isActive: !1,
|
@@ -169,7 +169,7 @@ const ye = ({
|
|
169
169
|
isActive: !1,
|
170
170
|
type: s.NUDGE,
|
171
171
|
elementToHighlight: /* @__PURE__ */ e(
|
172
|
-
|
172
|
+
ce,
|
173
173
|
{
|
174
174
|
label: "",
|
175
175
|
value: t.data.filter((l) => l.solved).length,
|
@@ -192,16 +192,16 @@ const ye = ({
|
|
192
192
|
}
|
193
193
|
}
|
194
194
|
];
|
195
|
-
|
196
|
-
const
|
195
|
+
N(i, [...u, ...ee, ...te]);
|
196
|
+
const re = setTimeout(() => {
|
197
197
|
var l;
|
198
|
-
clearTimeout(
|
199
|
-
},
|
198
|
+
clearTimeout(re), (l = n.current) == null || l.goToIndex(0), c(i, !1, ge);
|
199
|
+
}, he);
|
200
200
|
a && d.current ? h(p.SKILL_ACTIVITY, d.current, "BLUE_4", i, !0) : h(p.GAMES_ACTIVITY, o.current, "ORANGE_4", i, !0);
|
201
201
|
},
|
202
|
-
[n, H, h, c,
|
202
|
+
[n, H, h, c, N]
|
203
203
|
);
|
204
|
-
return
|
204
|
+
return ne(
|
205
205
|
() => ({
|
206
206
|
gameRefs: o,
|
207
207
|
puzzleRefs: r,
|
@@ -212,6 +212,6 @@ const ye = ({
|
|
212
212
|
);
|
213
213
|
};
|
214
214
|
export {
|
215
|
-
|
215
|
+
He as useGameLauncherJourney
|
216
216
|
};
|
217
217
|
//# sourceMappingURL=use-game-launcher-journey.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-game-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.tsx"],"sourcesContent":["import type { TJourneyId } from '../../../../journey/journey-id/journey-id-types';\nimport type { ICoachmarkProps } from '../../../../journey/use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { TColorNames } from '../../../../ui/types';\nimport type { ISegmentedGameCardRefs } from '../../comps/segmented-game-card/segmented-game-card-types';\nimport type {\n IProject,\n Puzzle,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseGameLauncherJourneyProps } from './use-game-launcher-journey-types';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT as AnalyticsLabel } from '../../../../analytics-events/platform-events-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ActionEvent } from '../../../enum/circle-onboarding-steps';\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { SegmentedGameCard } from '../../comps/segmented-game-card/segmented-game-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n GO_TO_NEXT_SLIDE_AFTER_MS,\n SHOW_LABEL_HIGHLIGHT_AFTER_MS,\n SHOW_NUDGE_AFTER_MS,\n START_JOURNEY_DELAY_MS,\n} from './constants';\n\nexport const useGameLauncherJourney = ({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const gameRefs = useRef<ISegmentedGameCardRefs>(null);\n const puzzleRefs = useRef<ISegmentedGameCardRefs>(null);\n const lessonRefs = useRef<ISegmentedGameCardRefs>(null);\n\n const isJourneyInProgress = useRef(false);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const trackEventViewed = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_VIEWED, {\n step,\n });\n },\n [trackAnalytics],\n );\n const trackEventCompleted = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n step,\n });\n },\n [trackAnalytics],\n );\n\n const goToNextCard = useCallback(\n (\n analyticsLabelViewed: ActionEvent,\n refOfNextSlide: ISegmentedGameCardRefs,\n color: TColorNames,\n journeyId: TJourneyId,\n isFirstSlide: boolean = false,\n ) => {\n if (!isFirstSlide) {\n playButtonSound();\n carouselRefs.current?.goToIndex(carouselRefs.current?.currentIndex + 1);\n nextCoachmark(journeyId, false, GO_TO_NEXT_SLIDE_AFTER_MS);\n }\n\n trackEventViewed(analyticsLabelViewed);\n\n const animateLabelTimer = setTimeout(() => {\n clearTimeout(animateLabelTimer);\n refOfNextSlide.startLabelAnimation(color);\n }, SHOW_LABEL_HIGHLIGHT_AFTER_MS);\n\n nextCoachmark(journeyId, true, SHOW_NUDGE_AFTER_MS);\n },\n [carouselRefs, nextCoachmark, playButtonSound, trackEventViewed],\n );\n\n const endJourney = useCallback(\n (puzzlesData: Puzzle, journeyId: TJourneyId) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(ActionEvent.PUZZLE_ACTIVITY);\n nextCoachmark(journeyId);\n onJourneyComplete(journeyId);\n },\n [nextCoachmark, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const startJourney = useCallback(\n (puzzlesData: IProject<Puzzle>, isLessonAvailable: boolean, journeyId: TJourneyId) => {\n if (isJourneyInProgress.current) {\n return;\n }\n\n // If element refs are not available return, this is just for type safety\n if (\n !carouselRefs?.current?.nextBtnRef.current ||\n !puzzleRefs?.current?.segmentedCardWrapperRef.current ||\n !gameRefs?.current?.labelRef.current ||\n !puzzleRefs?.current?.labelRef.current ||\n !puzzlesData\n ) {\n return;\n }\n\n isJourneyInProgress.current = true;\n const lessonLabelDims = lessonRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const gameLabelDims = gameRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const puzzleLabelDims = puzzleRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n const launcherDims =\n puzzleRefs.current?.segmentedCardWrapperRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n let lessonSteps: ICoachmarkProps[] = [];\n\n if (isLessonAvailable && lessonRefs.current) {\n lessonSteps = [\n {\n originalElementToHighlightRef: lessonRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'BLUE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster & stay ahead in school. Practice 3 new skills everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: lessonLabelDims.width + 50,\n tooltipYCoOrdinates: lessonLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.GAMES_ACTIVITY,\n gameRefs.current as ISegmentedGameCardRefs,\n 'ORANGE_4',\n journeyId,\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n }\n\n const gameSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: gameRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'ORANGE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Train to think deeper & plan ahead. Play 3 new games everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: gameLabelDims.width + 50,\n tooltipYCoOrdinates: gameLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.PUZZLE_ACTIVITY,\n puzzleRefs.current as ISegmentedGameCardRefs,\n 'PURPLE_4',\n journeyId,\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n\n const puzzleSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'PURPLE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Think in new ways & stay sharp. Solve 3 new puzzles everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: puzzleLabelDims.width + 50,\n tooltipYCoOrdinates: puzzleLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: puzzleRefs.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <SegmentedGameCard\n label={''} // This is intentionally left blank to avoid showing the label\n value={puzzlesData.data.filter(puzzle => puzzle.solved).length}\n maxValue={puzzlesData.data.length}\n initialValue={puzzlesData.initialProgressValue}\n data={puzzlesData.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: '', // We dont want to show the name of the puzzle in onboarding\n isCompleted: puzzle.solved,\n onPress: () => endJourney(puzzle, journeyId),\n }))}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to solve a puzzle\n </Text>\n ),\n nudgePointerX: launcherDims.width * 0.6,\n nudgePointerY: launcherDims.height * 0.4,\n } as INudgeProps,\n },\n ];\n\n setJourney(journeyId, [...lessonSteps, ...gameSteps, ...puzzleSteps]);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId, false, START_JOURNEY_DELAY_MS);\n carouselRefs.current?.goToIndex(0); // Always start from 0th Index no matter what the current index is\n }, START_JOURNEY_DELAY_MS);\n\n if (isLessonAvailable && lessonRefs.current) {\n goToNextCard(ActionEvent.SKILL_ACTIVITY, lessonRefs.current, 'BLUE_4', journeyId, true);\n } else {\n goToNextCard(ActionEvent.GAMES_ACTIVITY, gameRefs.current, 'ORANGE_4', journeyId, true);\n }\n },\n [carouselRefs, endJourney, goToNextCard, nextCoachmark, setJourney],\n );\n\n const data = useMemo(\n () => ({\n gameRefs,\n puzzleRefs,\n lessonRefs,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n"],"names":["useGameLauncherJourney","carouselRefs","onSegmentClick","onJourneyComplete","gameRefs","useRef","puzzleRefs","lessonRefs","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","useJourney","trackAnalytics","useUIContext","trackEventViewed","useCallback","step","AnalyticsLabel","trackEventCompleted","goToNextCard","analyticsLabelViewed","refOfNextSlide","color","journeyId","isFirstSlide","_b","_a","GO_TO_NEXT_SLIDE_AFTER_MS","animateLabelTimer","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS","endJourney","puzzlesData","ProjectType","ActionEvent","startJourney","isLessonAvailable","_c","_d","lessonLabelDims","_g","_f","_e","gameLabelDims","_j","_i","_h","puzzleLabelDims","_m","_l","_k","launcherDims","_p","_o","_n","lessonSteps","IndicatorType","jsx","Fragment","FlexView","Text","_q","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","gameSteps","puzzleSteps","SegmentedGameCard","puzzle","delayBeforeStart","START_JOURNEY_DELAY_MS","useMemo"],"mappings":";;;;;;;;;;;;;;;;AAkCO,MAAMA,KAAyB,CAAC;AAAA,EACrC,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAC5B,QAAAC,IAAWC,EAA+B,IAAI,GAC9CC,IAAaD,EAA+B,IAAI,GAChDE,IAAaF,EAA+B,IAAI,GAEhDG,IAAsBH,EAAO,EAAK,GAElC,EAAE,iBAAAI,MAAoBC,MACtB,EAAE,eAAAC,GAAe,YAAAC,EAAW,IAAIC,GAAW,GAC3C,EAAE,SAASC,EAAe,IAAIC,GAAa,GAE3CC,IAAmBC;AAAA,IACvB,CAACC,MAAsB;AACrB,MAAAJ,EAAeK,EAAe,wBAAwB;AAAA,QACpD,MAAAD;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,CAACJ,CAAc;AAAA,EAAA,GAEXM,IAAsBH;AAAA,IAC1B,CAACC,MAAsB;AACrB,MAAAJ,EAAeK,EAAe,2BAA2B;AAAA,QACvD,MAAAD;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,CAACJ,CAAc;AAAA,EAAA,GAGXO,IAAeJ;AAAA,IACnB,CACEK,GACAC,GACAC,GACAC,GACAC,IAAwB,OACrB;;AACH,MAAKA,MACajB,MAChBkB,IAAA1B,EAAa,YAAb,QAAA0B,EAAsB,YAAUC,IAAA3B,EAAa,YAAb,gBAAA2B,EAAsB,gBAAe,IACvDjB,EAAAc,GAAW,IAAOI,EAAyB,IAG3Db,EAAiBM,CAAoB;AAE/B,YAAAQ,IAAoB,WAAW,MAAM;AACzC,qBAAaA,CAAiB,GAC9BP,EAAe,oB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AAS,SAAS,YAAYqB,GAAW,EAAI;AAAA,IAE1F;AAAA,IACA,CAACxB,GAAcgC,GAAYZ,GAAcV,GAAeC,CAAU;AAAA,EAAA;AAa7D,SAVM6D;AAAA,IACX,OAAO;AAAA,MACL,UAAArE;AAAA,MACA,YAAAE;AAAA,MACA,YAAAC;AAAA,MACA,cAAA8B;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
|
1
|
+
{"version":3,"file":"use-game-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.tsx"],"sourcesContent":["import type { TJourneyId } from '../../../../journey/journey-id/journey-id-types';\nimport type { ICoachmarkProps } from '../../../../journey/use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { TColorNames } from '../../../../ui/types';\nimport type { ISegmentedGameCardRefs } from '../../comps/segmented-game-card/segmented-game-card-types';\nimport type {\n IProject,\n Puzzle,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseGameLauncherJourneyProps } from './use-game-launcher-journey-types';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT as AnalyticsLabel } from '../../../../analytics-events/platform-events-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ActionEvent } from '../../../enum/circle-onboarding-steps';\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { SegmentedGameCard } from '../../comps/segmented-game-card/segmented-game-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n GO_TO_NEXT_SLIDE_AFTER_MS,\n SHOW_LABEL_HIGHLIGHT_AFTER_MS,\n SHOW_NUDGE_AFTER_MS,\n SLIDE_TO_LESSON_MS,\n START_JOURNEY_DELAY_MS,\n} from './constants';\n\nexport const useGameLauncherJourney = ({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const gameRefs = useRef<ISegmentedGameCardRefs>(null);\n const puzzleRefs = useRef<ISegmentedGameCardRefs>(null);\n const lessonRefs = useRef<ISegmentedGameCardRefs>(null);\n\n const isJourneyInProgress = useRef(false);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const trackEventViewed = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_VIEWED, {\n step,\n });\n },\n [trackAnalytics],\n );\n const trackEventCompleted = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n step,\n });\n },\n [trackAnalytics],\n );\n\n const goToNextCard = useCallback(\n (\n analyticsLabelViewed: ActionEvent,\n refOfNextSlide: ISegmentedGameCardRefs,\n color: TColorNames,\n journeyId: TJourneyId,\n isFirstSlide: boolean = false,\n ) => {\n if (!isFirstSlide) {\n playButtonSound();\n carouselRefs.current?.goToIndex(carouselRefs.current?.currentIndex + 1);\n nextCoachmark(journeyId, false, GO_TO_NEXT_SLIDE_AFTER_MS);\n }\n\n trackEventViewed(analyticsLabelViewed);\n\n const animateLabelTimer = setTimeout(() => {\n clearTimeout(animateLabelTimer);\n refOfNextSlide.startLabelAnimation(color);\n }, SHOW_LABEL_HIGHLIGHT_AFTER_MS);\n\n nextCoachmark(journeyId, true, SHOW_NUDGE_AFTER_MS);\n },\n [carouselRefs, nextCoachmark, playButtonSound, trackEventViewed],\n );\n\n const endJourney = useCallback(\n (puzzlesData: Puzzle, journeyId: TJourneyId) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(ActionEvent.PUZZLE_ACTIVITY);\n nextCoachmark(journeyId);\n onJourneyComplete(journeyId);\n },\n [nextCoachmark, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const startJourney = useCallback(\n (puzzlesData: IProject<Puzzle>, isLessonAvailable: boolean, journeyId: TJourneyId) => {\n if (isJourneyInProgress.current) {\n return;\n }\n\n // If element refs are not available return, this is just for type safety\n if (\n !carouselRefs?.current?.nextBtnRef.current ||\n !puzzleRefs?.current?.segmentedCardWrapperRef.current ||\n !gameRefs?.current?.labelRef.current ||\n !puzzleRefs?.current?.labelRef.current ||\n !puzzlesData\n ) {\n return;\n }\n\n isJourneyInProgress.current = true;\n const lessonLabelDims = lessonRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const gameLabelDims = gameRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const puzzleLabelDims = puzzleRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n const launcherDims =\n puzzleRefs.current?.segmentedCardWrapperRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n let lessonSteps: ICoachmarkProps[] = [];\n\n if (isLessonAvailable && lessonRefs.current) {\n lessonSteps = [\n {\n originalElementToHighlightRef: lessonRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'BLUE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster & stay ahead in school. Practice 3 new skills everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: lessonLabelDims.width + 50,\n tooltipYCoOrdinates: lessonLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.GAMES_ACTIVITY,\n gameRefs.current as ISegmentedGameCardRefs,\n 'ORANGE_4',\n journeyId,\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n }\n\n const gameSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: gameRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'ORANGE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Train to think deeper & plan ahead. Play 3 new games everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: gameLabelDims.width + 50,\n tooltipYCoOrdinates: gameLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.PUZZLE_ACTIVITY,\n puzzleRefs.current as ISegmentedGameCardRefs,\n 'PURPLE_4',\n journeyId,\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n\n const puzzleSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'PURPLE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Think in new ways & stay sharp. Solve 3 new puzzles everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: puzzleLabelDims.width + 50,\n tooltipYCoOrdinates: puzzleLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: puzzleRefs.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <SegmentedGameCard\n label={''} // This is intentionally left blank to avoid showing the label\n value={puzzlesData.data.filter(puzzle => puzzle.solved).length}\n maxValue={puzzlesData.data.length}\n initialValue={puzzlesData.initialProgressValue}\n data={puzzlesData.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: '', // We dont want to show the name of the puzzle in onboarding\n isCompleted: puzzle.solved,\n onPress: () => endJourney(puzzle, journeyId),\n }))}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to solve a puzzle\n </Text>\n ),\n nudgePointerX: launcherDims.width * 0.6,\n nudgePointerY: launcherDims.height * 0.4,\n } as INudgeProps,\n },\n ];\n\n setJourney(journeyId, [...lessonSteps, ...gameSteps, ...puzzleSteps]);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n carouselRefs.current?.goToIndex(0); // Always start from 0th Index no matter what the current index is\n nextCoachmark(journeyId, false, START_JOURNEY_DELAY_MS);\n }, SLIDE_TO_LESSON_MS);\n\n if (isLessonAvailable && lessonRefs.current) {\n goToNextCard(ActionEvent.SKILL_ACTIVITY, lessonRefs.current, 'BLUE_4', journeyId, true);\n } else {\n goToNextCard(ActionEvent.GAMES_ACTIVITY, gameRefs.current, 'ORANGE_4', journeyId, true);\n }\n },\n [carouselRefs, endJourney, goToNextCard, nextCoachmark, setJourney],\n );\n\n const data = useMemo(\n () => ({\n gameRefs,\n puzzleRefs,\n lessonRefs,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n"],"names":["useGameLauncherJourney","carouselRefs","onSegmentClick","onJourneyComplete","gameRefs","useRef","puzzleRefs","lessonRefs","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","useJourney","trackAnalytics","useUIContext","trackEventViewed","useCallback","step","AnalyticsLabel","trackEventCompleted","goToNextCard","analyticsLabelViewed","refOfNextSlide","color","journeyId","isFirstSlide","_b","_a","GO_TO_NEXT_SLIDE_AFTER_MS","animateLabelTimer","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS","endJourney","puzzlesData","ProjectType","ActionEvent","startJourney","isLessonAvailable","_c","_d","lessonLabelDims","_g","_f","_e","gameLabelDims","_j","_i","_h","puzzleLabelDims","_m","_l","_k","launcherDims","_p","_o","_n","lessonSteps","IndicatorType","jsx","Fragment","FlexView","Text","_q","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","gameSteps","puzzleSteps","SegmentedGameCard","puzzle","delayBeforeStart","START_JOURNEY_DELAY_MS","SLIDE_TO_LESSON_MS","useMemo"],"mappings":";;;;;;;;;;;;;;;;AAmCO,MAAMA,KAAyB,CAAC;AAAA,EACrC,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAC5B,QAAAC,IAAWC,EAA+B,IAAI,GAC9CC,IAAaD,EAA+B,IAAI,GAChDE,IAAaF,EAA+B,IAAI,GAEhDG,IAAsBH,EAAO,EAAK,GAElC,EAAE,iBAAAI,MAAoBC,MACtB,EAAE,eAAAC,GAAe,YAAAC,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ACN,aAAaA,EAAO;AAAA,gBACpB,SAAS,MAAMrC,EAAWqC,GAAQ7C,CAAS;AAAA,cAAA,EAC3C;AAAA,YAAA;AAAA,UACJ;AAAA,UAEF,WAAW;AAAA,YACT,OAAO;AAAA,YACP,SACG,gBAAAkC,EAAAG,GAAA,EAAK,WAAU,OAAM,QAAO,SAAQ,UAErC,2BAAA;AAAA,YAEF,eAAeT,EAAa,QAAQ;AAAA,YACpC,eAAeA,EAAa,SAAS;AAAA,UACvC;AAAA,QACF;AAAA,MAAA;AAGS,MAAAzC,EAAAa,GAAW,CAAC,GAAGgC,GAAa,GAAGU,IAAW,GAAGC,EAAW,CAAC;AAE9D,YAAAG,KAAmB,WAAW,MAAM;;AACxC,qBAAaA,EAAgB,IAChB3C,IAAA3B,EAAA,YAAA,QAAA2B,EAAS,UAAU,IAClBjB,EAAAc,GAAW,IAAO+C,EAAsB;AAAA,SACrDC,EAAkB;AAEjB,MAAAnC,KAAqB/B,EAAW,UAClCc,EAAae,EAAY,gBAAgB7B,EAAW,SAAS,UAAUkB,GAAW,EAAI,IAEtFJ,EAAae,EAAY,gBAAgBhC,EAAS,SAAS,YAAYqB,GAAW,EAAI;AAAA,IAE1F;AAAA,IACA,CAACxB,GAAcgC,GAAYZ,GAAcV,GAAeC,CAAU;AAAA,EAAA;AAa7D,SAVM8D;AAAA,IACX,OAAO;AAAA,MACL,UAAAtE;AAAA,MACA,YAAAE;AAAA,MACA,YAAAC;AAAA,MACA,cAAA8B;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
|
package/dist/index.d.ts
CHANGED
@@ -880,6 +880,7 @@ declare interface ICoachMarkCompletion {
|
|
880
880
|
CIRCLE_POINTS_REWARD_JOURNEY: boolean;
|
881
881
|
CIRCLE_STREAK_UPDATE_JOURNEY: boolean;
|
882
882
|
CIRCLE_TUTORIAL_JOURNEY: boolean;
|
883
|
+
CIRCLE_TABLES_INTRO_JOURNEY: boolean;
|
883
884
|
}
|
884
885
|
|
885
886
|
export declare interface ICoachmarkProgress {
|
@@ -888,6 +889,7 @@ export declare interface ICoachmarkProgress {
|
|
888
889
|
CIRCLE_POINTS_REWARD_JOURNEY: boolean;
|
889
890
|
CIRCLE_STREAK_UPDATE_JOURNEY: boolean;
|
890
891
|
CIRCLE_TUTORIAL_JOURNEY: boolean;
|
892
|
+
CIRCLE_TABLES_INTRO_JOURNEY: boolean;
|
891
893
|
}
|
892
894
|
|
893
895
|
/**
|