@cuemath/leap 2.8.21-rj-10 → 2.8.21-rj-12
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/analytics-events/platform-events-student.js +11 -9
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/circle-games/enum/CircleOnboardingSteps.js +5 -0
- package/dist/features/circle-games/enum/CircleOnboardingSteps.js.map +1 -0
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js +1 -2
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js +131 -94
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
@@ -1,15 +1,17 @@
|
|
1
|
-
import { PLUGINS as
|
2
|
-
var _ = /* @__PURE__ */ ((
|
3
|
-
const
|
4
|
-
page_viewed: [
|
1
|
+
import { PLUGINS as t } from "../../node_modules/@cuemath/analytics-v2/dist/constants.js";
|
2
|
+
var _ = /* @__PURE__ */ ((e) => (e.PAGE_VIEWED = "page_viewed", e.CUSTOM_TEST_SUBMITTED = "custom_test_submitted", e.ACTIVITY_STARTED = "activity_started", e.ACTIVITY_TUTORIAL_SEEN = "activity_tutorial_seen", e.STREAK_ICON_CLICKED = "streak_icon_clicked", e.LEADERBOARD_BUTTON_CLICKED = "leaderboard_button_clicked", e.ONBOARDING_STEP_VIEWED = "onboarding_step_viewed", e.ONBOARDING_STEP_COMPLETED = "onboarding_step_completed", e))(_ || {});
|
3
|
+
const o = {
|
4
|
+
page_viewed: [t.MIXPANEL],
|
5
5
|
// circle on leap mixpanel events
|
6
|
-
activity_started: [
|
7
|
-
activity_tutorial_seen: [
|
8
|
-
streak_icon_clicked: [
|
9
|
-
leaderboard_button_clicked: [
|
6
|
+
activity_started: [t.MIXPANEL],
|
7
|
+
activity_tutorial_seen: [t.MIXPANEL],
|
8
|
+
streak_icon_clicked: [t.MIXPANEL],
|
9
|
+
leaderboard_button_clicked: [t.MIXPANEL],
|
10
|
+
onboarding_step_viewed: [t.MIXPANEL],
|
11
|
+
onboarding_step_completed: [t.MIXPANEL]
|
10
12
|
};
|
11
13
|
export {
|
12
14
|
_ as PLATFORM_EVENTS_STUDENT,
|
13
|
-
|
15
|
+
o as PLATFORM_WHITELIST_EVENTS_STUDENT
|
14
16
|
};
|
15
17
|
//# sourceMappingURL=platform-events-student.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platform-events-student.js","sources":["../../../src/features/analytics-events/platform-events-student.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\n/**\n ** Global/Platform specific events that needs to be tracked goes here\n ** Naming convention needs to be snake_case\n */\nexport enum PLATFORM_EVENTS_STUDENT {\n PAGE_VIEWED = 'page_viewed',\n CUSTOM_TEST_SUBMITTED = 'custom_test_submitted',\n\n // circle on leap mixpanel events\n ACTIVITY_STARTED = 'activity_started',\n ACTIVITY_TUTORIAL_SEEN = 'activity_tutorial_seen',\n STREAK_ICON_CLICKED = 'streak_icon_clicked',\n LEADERBOARD_BUTTON_CLICKED = 'leaderboard_button_clicked',\n}\n\n/**\n ** Events that need to be tracked at particular plugins\n ** Value will be array of strings.\n */\nexport const PLATFORM_WHITELIST_EVENTS_STUDENT = {\n [PLATFORM_EVENTS_STUDENT.PAGE_VIEWED]: [PLUGINS.MIXPANEL],\n\n // circle on leap mixpanel events\n [PLATFORM_EVENTS_STUDENT.ACTIVITY_STARTED]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.ACTIVITY_TUTORIAL_SEEN]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.STREAK_ICON_CLICKED]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.LEADERBOARD_BUTTON_CLICKED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PLATFORM_EVENTS_STUDENT","PLATFORM_WHITELIST_EVENTS_STUDENT","PLUGINS"],"mappings":";AAMY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,wBAAwB,yBAGxBA,EAAA,mBAAmB,oBACnBA,EAAA,yBAAyB,0BACzBA,EAAA,sBAAsB,uBACtBA,EAAA,6BAA6B,
|
1
|
+
{"version":3,"file":"platform-events-student.js","sources":["../../../src/features/analytics-events/platform-events-student.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\n/**\n ** Global/Platform specific events that needs to be tracked goes here\n ** Naming convention needs to be snake_case\n */\nexport enum PLATFORM_EVENTS_STUDENT {\n PAGE_VIEWED = 'page_viewed',\n CUSTOM_TEST_SUBMITTED = 'custom_test_submitted',\n\n // circle on leap mixpanel events\n ACTIVITY_STARTED = 'activity_started',\n ACTIVITY_TUTORIAL_SEEN = 'activity_tutorial_seen',\n STREAK_ICON_CLICKED = 'streak_icon_clicked',\n LEADERBOARD_BUTTON_CLICKED = 'leaderboard_button_clicked',\n ONBOARDING_STEP_VIEWED = 'onboarding_step_viewed',\n ONBOARDING_STEP_COMPLETED = 'onboarding_step_completed',\n}\n\n/**\n ** Events that need to be tracked at particular plugins\n ** Value will be array of strings.\n */\nexport const PLATFORM_WHITELIST_EVENTS_STUDENT = {\n [PLATFORM_EVENTS_STUDENT.PAGE_VIEWED]: [PLUGINS.MIXPANEL],\n\n // circle on leap mixpanel events\n [PLATFORM_EVENTS_STUDENT.ACTIVITY_STARTED]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.ACTIVITY_TUTORIAL_SEEN]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.STREAK_ICON_CLICKED]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.LEADERBOARD_BUTTON_CLICKED]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED]: [PLUGINS.MIXPANEL],\n [PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PLATFORM_EVENTS_STUDENT","PLATFORM_WHITELIST_EVENTS_STUDENT","PLUGINS"],"mappings":";AAMY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,wBAAwB,yBAGxBA,EAAA,mBAAmB,oBACnBA,EAAA,yBAAyB,0BACzBA,EAAA,sBAAsB,uBACtBA,EAAA,6BAA6B,8BAC7BA,EAAA,yBAAyB,0BACzBA,EAAA,4BAA4B,6BAVlBA,IAAAA,KAAA,CAAA,CAAA;AAiBL,MAAMC,IAAoC;AAAA,EAC9C,aAAsC,CAACC,EAAQ,QAAQ;AAAA;AAAA,EAGvD,kBAA2C,CAACA,EAAQ,QAAQ;AAAA,EAC5D,wBAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,qBAA8C,CAACA,EAAQ,QAAQ;AAAA,EAC/D,4BAAqD,CAACA,EAAQ,QAAQ;AAAA,EACtE,wBAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,2BAAoD,CAACA,EAAQ,QAAQ;AACxE;"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
var a = /* @__PURE__ */ ((t) => (t.LESSON_ACTIVITY = "skill_activity", t.GAMES_ACTIVITY = "games_activity", t.PUZZLE_ACTIVITY = "puzzle_activity", t.TUTORIAL = "tutorial", t.POINTS = "points", t.STREAK = "streak", t.LEADERBOARD = "leaderboard", t))(a || {});
|
2
|
+
export {
|
3
|
+
a as CIRCLE_ONBOARDING_ANALYTICS_STEPS
|
4
|
+
};
|
5
|
+
//# sourceMappingURL=CircleOnboardingSteps.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CircleOnboardingSteps.js","sources":["../../../../src/features/circle-games/enum/CircleOnboardingSteps.ts"],"sourcesContent":["export enum CIRCLE_ONBOARDING_ANALYTICS_STEPS {\n LESSON_ACTIVITY = 'skill_activity',\n GAMES_ACTIVITY = 'games_activity',\n PUZZLE_ACTIVITY = 'puzzle_activity',\n TUTORIAL = 'tutorial',\n POINTS = 'points',\n STREAK = 'streak',\n LEADERBOARD = 'leaderboard',\n}\n"],"names":["CIRCLE_ONBOARDING_ANALYTICS_STEPS"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kBAAkB,kBAClBA,EAAA,iBAAiB,kBACjBA,EAAA,kBAAkB,mBAClBA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,cAAc,eAPJA,IAAAA,KAAA,CAAA,CAAA;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/game-launcher/use-game-launcher-journey/constants.ts"],"sourcesContent":["export 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":["GO_TO_NEXT_SLIDE_AFTER_MS","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS"
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/game-launcher/use-game-launcher-journey/constants.ts"],"sourcesContent":["export 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":["GO_TO_NEXT_SLIDE_AFTER_MS","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS"],"mappings":"AAAO,MAAMA,IAA4B,KAC5BC,IAAgC,MAChCC,IAAsB;"}
|
@@ -1,185 +1,222 @@
|
|
1
|
-
import { jsx as e, Fragment as
|
2
|
-
import { useRef as
|
3
|
-
import
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
import { jsx as e, Fragment as O } from "react/jsx-runtime";
|
2
|
+
import { useRef as T, useCallback as E, useMemo as re } from "react";
|
3
|
+
import j from "../../../../assets/line-icons/icons/next.js";
|
4
|
+
import { PLATFORM_EVENTS_STUDENT as C } from "../../../analytics-events/platform-events-student.js";
|
5
|
+
import { IndicatorType as h } from "../../../journey/use-journey/constants.js";
|
6
|
+
import { useJourney as ne } from "../../../journey/use-journey/use-journey.js";
|
7
|
+
import z from "../../../ui/buttons/icon-button/icon-button.js";
|
8
|
+
import { useUIContext as ie } from "../../../ui/context/context.js";
|
9
|
+
import P from "../../../ui/layout/flex-view.js";
|
10
|
+
import g from "../../../ui/text/text.js";
|
11
|
+
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as c } from "../../enum/CircleOnboardingSteps.js";
|
12
|
+
import { useCircleSounds as oe } from "../../hooks/use-circle-sounds/use-circle-sounds.js";
|
13
|
+
import { SegmentedGameCard as le } from "../comps/segmented-game-card/segmented-game-card.js";
|
14
|
+
import { GO_TO_NEXT_SLIDE_AFTER_MS as ce, SHOW_LABEL_HIGHLIGHT_AFTER_MS as ae, SHOW_NUDGE_AFTER_MS as se } from "./constants.js";
|
15
|
+
import { ProjectType as de } from "../../games/web-view/enums/project-type-enum.js";
|
16
|
+
const Ie = ({
|
17
|
+
onSegmentClick: L,
|
18
|
+
setCarouselIndex: b,
|
19
|
+
onJourneyComplete: I
|
17
20
|
}) => {
|
18
|
-
const
|
19
|
-
(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
-
o(r, !0, ne);
|
21
|
+
const a = T(null), o = T(null), r = T(null), s = T(null), R = T(!1), { playButtonSound: S } = oe(), { nextCoachmark: l, setJourney: N } = ne(), { onEvent: p } = ie(), y = E(
|
22
|
+
(t, n) => {
|
23
|
+
p(C.ONBOARDING_STEP_VIEWED, {
|
24
|
+
journey_id: t,
|
25
|
+
step: n
|
26
|
+
});
|
25
27
|
},
|
26
|
-
[
|
27
|
-
),
|
28
|
-
(
|
29
|
-
C
|
28
|
+
[p]
|
29
|
+
), G = E(
|
30
|
+
(t, n) => {
|
31
|
+
p(C.ONBOARDING_STEP_COMPLETED, {
|
32
|
+
journey_id: t,
|
33
|
+
step: n
|
34
|
+
});
|
30
35
|
},
|
31
|
-
[
|
32
|
-
),
|
33
|
-
(n,
|
34
|
-
|
35
|
-
|
36
|
+
[p]
|
37
|
+
), m = E(
|
38
|
+
(t, n, i, d, f = !1) => {
|
39
|
+
f || (S(), b((A) => A + 1), l(d, !1, ce)), y(d, t);
|
40
|
+
const _ = setTimeout(() => {
|
41
|
+
clearTimeout(_), n.startLabelAnimation(i);
|
42
|
+
}, ae);
|
43
|
+
l(d, !0, se);
|
44
|
+
},
|
45
|
+
[l, S, b, y]
|
46
|
+
), H = E(
|
47
|
+
(t, n) => {
|
48
|
+
L(t, de.PUZZLE), G(n, c.PUZZLE_ACTIVITY), l(n), I(n);
|
49
|
+
},
|
50
|
+
[l, I, L, G]
|
51
|
+
), k = E(
|
52
|
+
(t, n, i) => {
|
53
|
+
var v, B, D, V, Y, U, M, x, W, $, X, F, Z, J, q, K, Q;
|
54
|
+
if (R.current || !((v = a == null ? void 0 : a.current) != null && v.nextBtnRef.current) || !((B = r == null ? void 0 : r.current) != null && B.segmentedCardWrapperRef.current) || !((D = o == null ? void 0 : o.current) != null && D.labelRef.current) || !((V = r == null ? void 0 : r.current) != null && V.labelRef.current) || !t)
|
36
55
|
return;
|
37
|
-
|
38
|
-
const
|
56
|
+
R.current = !0;
|
57
|
+
const d = ((M = (U = (Y = s.current) == null ? void 0 : Y.labelRef) == null ? void 0 : U.current) == null ? void 0 : M.getBoundingClientRect()) || {
|
39
58
|
height: 0,
|
40
59
|
width: 0
|
41
|
-
}, f = (($ = (
|
60
|
+
}, f = (($ = (W = (x = o.current) == null ? void 0 : x.labelRef) == null ? void 0 : W.current) == null ? void 0 : $.getBoundingClientRect()) || {
|
42
61
|
height: 0,
|
43
62
|
width: 0
|
44
|
-
},
|
63
|
+
}, _ = ((Z = (F = (X = r.current) == null ? void 0 : X.labelRef) == null ? void 0 : F.current) == null ? void 0 : Z.getBoundingClientRect()) || {
|
45
64
|
height: 0,
|
46
65
|
width: 0
|
47
|
-
},
|
66
|
+
}, A = ((K = (q = (J = r.current) == null ? void 0 : J.segmentedCardWrapperRef) == null ? void 0 : q.current) == null ? void 0 : K.getBoundingClientRect()) || {
|
48
67
|
height: 0,
|
49
68
|
width: 0
|
50
69
|
};
|
51
70
|
let w = [];
|
52
|
-
|
71
|
+
n && s.current && (w = [
|
53
72
|
{
|
54
|
-
originalElementToHighlightRef:
|
73
|
+
originalElementToHighlightRef: s.current.labelRef,
|
55
74
|
isActive: !1,
|
56
|
-
type:
|
57
|
-
elementToHighlight: /* @__PURE__ */ e(
|
75
|
+
type: h.TOOLTIP,
|
76
|
+
elementToHighlight: /* @__PURE__ */ e(O, {}),
|
58
77
|
indicator: {
|
59
78
|
position: "right",
|
60
79
|
backgroundColor: "BLUE_4",
|
61
80
|
width: 264,
|
62
|
-
tooltipItem: /* @__PURE__ */ e(
|
63
|
-
tooltipXCoOrdinates:
|
64
|
-
tooltipYCoOrdinates:
|
81
|
+
tooltipItem: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(g, { $renderAs: "ab2-bold", children: "Get faster & stay ahead in school. Practice 3 new skills everyday." }) }),
|
82
|
+
tooltipXCoOrdinates: d.width,
|
83
|
+
tooltipYCoOrdinates: d.height / 2
|
65
84
|
}
|
66
85
|
},
|
67
86
|
{
|
68
|
-
originalElementToHighlightRef: (
|
87
|
+
originalElementToHighlightRef: (Q = a.current) == null ? void 0 : Q.nextBtnRef,
|
69
88
|
isActive: !1,
|
70
|
-
type:
|
89
|
+
type: h.NUDGE,
|
71
90
|
elementToHighlight: /* @__PURE__ */ e(
|
72
|
-
|
91
|
+
z,
|
73
92
|
{
|
74
93
|
renderAs: "secondary",
|
75
|
-
Icon:
|
76
|
-
onClick: () =>
|
77
|
-
|
94
|
+
Icon: j,
|
95
|
+
onClick: () => m(
|
96
|
+
c.GAMES_ACTIVITY,
|
97
|
+
o.current,
|
98
|
+
"ORANGE_4",
|
99
|
+
i
|
100
|
+
),
|
101
|
+
analyticsLabel: C.ONBOARDING_STEP_COMPLETED,
|
102
|
+
analyticsProps: {
|
103
|
+
journey_id: i,
|
104
|
+
step: c.LESSON_ACTIVITY
|
105
|
+
}
|
78
106
|
}
|
79
107
|
),
|
80
108
|
indicator: {
|
81
109
|
nudge: "click",
|
82
|
-
content: /* @__PURE__ */ e(
|
110
|
+
content: /* @__PURE__ */ e(g, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
|
83
111
|
nudgePointerX: 0,
|
84
112
|
nudgePointerY: 0
|
85
113
|
}
|
86
114
|
}
|
87
115
|
]);
|
88
|
-
const
|
116
|
+
const ee = [
|
89
117
|
{
|
90
|
-
originalElementToHighlightRef:
|
118
|
+
originalElementToHighlightRef: o.current.labelRef,
|
91
119
|
isActive: !1,
|
92
|
-
type:
|
93
|
-
elementToHighlight: /* @__PURE__ */ e(
|
120
|
+
type: h.TOOLTIP,
|
121
|
+
elementToHighlight: /* @__PURE__ */ e(O, {}),
|
94
122
|
indicator: {
|
95
123
|
position: "right",
|
96
124
|
backgroundColor: "ORANGE_4",
|
97
125
|
width: 264,
|
98
|
-
tooltipItem: /* @__PURE__ */ e(
|
126
|
+
tooltipItem: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(g, { $renderAs: "ab2-bold", children: "Train to think deeper & plan ahead. Play 3 new games everyday." }) }),
|
99
127
|
tooltipXCoOrdinates: f.width,
|
100
128
|
tooltipYCoOrdinates: f.height / 2
|
101
129
|
}
|
102
130
|
},
|
103
131
|
{
|
104
|
-
originalElementToHighlightRef:
|
132
|
+
originalElementToHighlightRef: a.current.nextBtnRef,
|
105
133
|
isActive: !1,
|
106
|
-
type:
|
134
|
+
type: h.NUDGE,
|
107
135
|
elementToHighlight: /* @__PURE__ */ e(
|
108
|
-
|
136
|
+
z,
|
109
137
|
{
|
110
138
|
renderAs: "secondary",
|
111
|
-
Icon:
|
112
|
-
onClick: () =>
|
113
|
-
|
139
|
+
Icon: j,
|
140
|
+
onClick: () => m(
|
141
|
+
c.PUZZLE_ACTIVITY,
|
142
|
+
r.current,
|
143
|
+
"PURPLE_4",
|
144
|
+
i
|
145
|
+
),
|
146
|
+
analyticsLabel: C.ONBOARDING_STEP_COMPLETED,
|
147
|
+
analyticsProps: {
|
148
|
+
journey_id: i,
|
149
|
+
step: c.GAMES_ACTIVITY
|
150
|
+
}
|
114
151
|
}
|
115
152
|
),
|
116
153
|
indicator: {
|
117
154
|
nudge: "click",
|
118
|
-
content: /* @__PURE__ */ e(
|
155
|
+
content: /* @__PURE__ */ e(g, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
|
119
156
|
nudgePointerX: 0,
|
120
157
|
nudgePointerY: 0
|
121
158
|
}
|
122
159
|
}
|
123
|
-
],
|
160
|
+
], te = [
|
124
161
|
{
|
125
|
-
originalElementToHighlightRef:
|
162
|
+
originalElementToHighlightRef: r.current.labelRef,
|
126
163
|
isActive: !1,
|
127
|
-
type:
|
128
|
-
elementToHighlight: /* @__PURE__ */ e(
|
164
|
+
type: h.TOOLTIP,
|
165
|
+
elementToHighlight: /* @__PURE__ */ e(O, {}),
|
129
166
|
indicator: {
|
130
167
|
position: "right",
|
131
168
|
backgroundColor: "PURPLE_4",
|
132
169
|
width: 264,
|
133
|
-
tooltipItem: /* @__PURE__ */ e(
|
134
|
-
tooltipXCoOrdinates:
|
135
|
-
tooltipYCoOrdinates:
|
170
|
+
tooltipItem: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(g, { $renderAs: "ab2-bold", children: "Think in new ways & stay sharp. Solve 3 new puzzles everyday." }) }),
|
171
|
+
tooltipXCoOrdinates: _.width,
|
172
|
+
tooltipYCoOrdinates: _.height / 2
|
136
173
|
}
|
137
174
|
},
|
138
175
|
{
|
139
|
-
originalElementToHighlightRef:
|
176
|
+
originalElementToHighlightRef: r.current.segmentedCardWrapperRef,
|
140
177
|
isActive: !1,
|
141
|
-
type:
|
178
|
+
type: h.NUDGE,
|
142
179
|
elementToHighlight: /* @__PURE__ */ e(
|
143
|
-
|
180
|
+
le,
|
144
181
|
{
|
145
182
|
label: "",
|
146
|
-
value:
|
147
|
-
maxValue:
|
148
|
-
initialValue:
|
149
|
-
data:
|
150
|
-
card:
|
183
|
+
value: t.data.filter((u) => u.solved).length,
|
184
|
+
maxValue: t.data.length,
|
185
|
+
initialValue: t.initialProgressValue,
|
186
|
+
data: t.data.map((u) => ({
|
187
|
+
card: u.cardLottie,
|
151
188
|
name: "",
|
152
189
|
// We dont want to show the name of the puzzle in onboarding
|
153
|
-
isCompleted:
|
154
|
-
onPress: () =>
|
190
|
+
isCompleted: u.solved,
|
191
|
+
onPress: () => H(u, i)
|
155
192
|
}))
|
156
193
|
}
|
157
194
|
),
|
158
195
|
indicator: {
|
159
196
|
nudge: "click",
|
160
|
-
content: /* @__PURE__ */ e(
|
161
|
-
nudgePointerX:
|
162
|
-
nudgePointerY:
|
197
|
+
content: /* @__PURE__ */ e(g, { $renderAs: "ab1", $color: "WHITE", children: "Click to solve a puzzle" }),
|
198
|
+
nudgePointerX: A.width * 0.6,
|
199
|
+
nudgePointerY: A.height * 0.4
|
163
200
|
}
|
164
201
|
}
|
165
202
|
];
|
166
|
-
|
203
|
+
N(i, [...w, ...ee, ...te]), l(i), n && s.current ? m(c.LESSON_ACTIVITY, s.current, "BLUE_4", i, !0) : m(c.GAMES_ACTIVITY, o.current, "ORANGE_4", i, !0);
|
167
204
|
},
|
168
|
-
[
|
205
|
+
[H, m, l, N]
|
169
206
|
);
|
170
|
-
return
|
207
|
+
return re(
|
171
208
|
() => ({
|
172
|
-
gameRefs:
|
173
|
-
puzzleRefs:
|
174
|
-
lessonRefs:
|
175
|
-
carouselNextBtnRef:
|
176
|
-
isJourneyInProgress:
|
177
|
-
startJourney:
|
209
|
+
gameRefs: o,
|
210
|
+
puzzleRefs: r,
|
211
|
+
lessonRefs: s,
|
212
|
+
carouselNextBtnRef: a,
|
213
|
+
isJourneyInProgress: R,
|
214
|
+
startJourney: k
|
178
215
|
}),
|
179
|
-
[
|
216
|
+
[k]
|
180
217
|
);
|
181
218
|
};
|
182
219
|
export {
|
183
|
-
|
220
|
+
Ie as useGameLauncherJourney
|
184
221
|
};
|
185
222
|
//# 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/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 { ICarouselRefs } from '../comps/carousel/carousel-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 NextIcon from '../../../../assets/line-icons/icons/next';\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 FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\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 {\n FIRST_COACHMARK_AFTER_MS,\n GO_TO_NEXT_SLIDE_AFTER_MS,\n SHOW_LABEL_HIGHLIGHT_AFTER_MS,\n SHOW_NUDGE_AFTER_MS,\n} from './constants';\n\nexport const useGameLauncherJourney = ({\n onSegmentClick,\n setCarouselIndex,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const carouselNextBtnRef = useRef<ICarouselRefs>(null);\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\n const goToNextCard = useCallback(\n (\n refOfNextSlide: ISegmentedGameCardRefs,\n color: TColorNames,\n journeyId: TJourneyId,\n isFirstSlide: boolean = false,\n ) => {\n if (!isFirstSlide) {\n playButtonSound();\n setCarouselIndex((prev: number) => prev + 1);\n nextCoachmark(journeyId, false, GO_TO_NEXT_SLIDE_AFTER_MS);\n }\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 [nextCoachmark, playButtonSound, setCarouselIndex],\n );\n\n const endJourney = useCallback(\n (puzzlesData: Puzzle, journeyId: TJourneyId) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n nextCoachmark(journeyId);\n onJourneyComplete(journeyId);\n },\n [nextCoachmark, onJourneyComplete, onSegmentClick],\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 !carouselNextBtnRef?.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,\n tooltipYCoOrdinates: lessonLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselNextBtnRef.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={NextIcon}\n onClick={() =>\n goToNextCard(gameRefs.current as ISegmentedGameCardRefs, 'ORANGE_4', journeyId)\n }\n analyticsLabel=\"HELLO \"\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,\n tooltipYCoOrdinates: gameLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselNextBtnRef.current.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={NextIcon}\n onClick={() =>\n goToNextCard(puzzleRefs.current as ISegmentedGameCardRefs, 'PURPLE_4', journeyId)\n }\n analyticsLabel=\"HELLO \"\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,\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 nextCoachmark(journeyId, false, FIRST_COACHMARK_AFTER_MS);\n if (isLessonAvailable && lessonRefs.current) {\n goToNextCard(lessonRefs.current, 'BLUE_4', journeyId, true);\n } else {\n goToNextCard(gameRefs.current, 'ORANGE_4', journeyId, true);\n }\n },\n [endJourney, goToNextCard, nextCoachmark, setJourney],\n );\n\n const data = useMemo(\n () => ({\n gameRefs,\n puzzleRefs,\n lessonRefs,\n carouselNextBtnRef,\n isJourneyInProgress,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n"],"names":["useGameLauncherJourney","onSegmentClick","setCarouselIndex","onJourneyComplete","carouselNextBtnRef","useRef","gameRefs","puzzleRefs","lessonRefs","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","useJourney","goToNextCard","useCallback","refOfNextSlide","color","journeyId","isFirstSlide","prev","GO_TO_NEXT_SLIDE_AFTER_MS","animateLabelTimer","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS","endJourney","puzzlesData","ProjectType","startJourney","isLessonAvailable","_a","_b","_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","NextIcon","gameSteps","puzzleSteps","SegmentedGameCard","puzzle","FIRST_COACHMARK_AFTER_MS","useMemo"],"mappings":";;;;;;;;;;;;AA+BO,MAAMA,KAAyB,CAAC;AAAA,EACrC,gBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAC5B,QAAAC,IAAqBC,EAAsB,IAAI,GAC/CC,IAAWD,EAA+B,IAAI,GAC9CE,IAAaF,EAA+B,IAAI,GAChDG,IAAaH,EAA+B,IAAI,GAEhDI,IAAsBJ,EAAO,EAAK,GAElC,EAAE,iBAAAK,MAAoBC,KACtB,EAAE,eAAAC,GAAe,YAAAC,EAAW,IAAIC,EAAW,GAE3CC,IAAeC;AAAA,IACnB,CACEC,GACAC,GACAC,GACAC,IAAwB,OACrB;AACH,MAAKA,MACaV,KACCR,EAAA,CAACmB,MAAiBA,IAAO,CAAC,GAC7BT,EAAAO,GAAW,IAAOG,EAAyB;AAGrD,YAAAC,IAAoB,WAAW,MAAM;AACzC,qBAAaA,CAAiB,GAC9BN,EAAe,oBAAoBC,CAAK;AAAA,SACvCM,EAA6B;AAElB,MAAAZ,EAAAO,GAAW,IAAMM,EAAmB;AAAA,IACpD;AAAA,IACA,CAACb,GAAeF,GAAiBR,CAAgB;AAAA,EAAA,GAG7CwB,IAAaV;AAAA,IACjB,CAACW,GAAqBR,MAA0B;AAC/B,MAAAlB,EAAA0B,GAAaC,GAAY,MAAM,GAC9ChB,EAAcO,CAAS,GACvBhB,EAAkBgB,CAAS;AAAA,IAC7B;AAAA,IACA,CAACP,GAAeT,GAAmBF,CAAc;AAAA,EAAA,GAG7C4B,IAAeb;AAAA,IACnB,CAACW,GAA+BG,GAA4BX,MAA0B;;AAOlF,UANEV,EAAoB,WAMtB,GAACsB,IAAA3B,KAAA,gBAAAA,EAAoB,YAApB,QAAA2B,EAA6B,WAAW,YACzC,GAACC,IAAAzB,KAAA,gBAAAA,EAAY,YAAZ,QAAA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,OAAM,QAAO,SAAQ,UAErC,2BAAA;AAAA,YAEF,eAAeT,EAAa,QAAQ;AAAA,YACpC,eAAeA,EAAa,SAAS;AAAA,UACvC;AAAA,QACF;AAAA,MAAA;AAGS,MAAAlC,EAAAM,GAAW,CAAC,GAAGgC,GAAa,GAAGS,GAAW,GAAGC,CAAW,CAAC,GAEtDjD,EAAAO,GAAW,IAAO6C,EAAwB,GACpDlC,KAAqBtB,EAAW,UAClCO,EAAaP,EAAW,SAAS,UAAUW,GAAW,EAAI,IAE1DJ,EAAaT,EAAS,SAAS,YAAYa,GAAW,EAAI;AAAA,IAE9D;AAAA,IACA,CAACO,GAAYX,GAAcH,GAAeC,CAAU;AAAA,EAAA;AAe/C,SAZMoD;AAAA,IACX,OAAO;AAAA,MACL,UAAA3D;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAJ;AAAA,MACA,qBAAAK;AAAA,MACA,cAAAoB;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/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 { ICarouselRefs } from '../comps/carousel/carousel-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 NextIcon from '../../../../assets/line-icons/icons/next';\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/CircleOnboardingSteps';\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 {\n GO_TO_NEXT_SLIDE_AFTER_MS,\n SHOW_LABEL_HIGHLIGHT_AFTER_MS,\n SHOW_NUDGE_AFTER_MS,\n} from './constants';\n\nexport const useGameLauncherJourney = ({\n onSegmentClick,\n setCarouselIndex,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const carouselNextBtnRef = useRef<ICarouselRefs>(null);\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 (journeyId: TJourneyId, step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_VIEWED, {\n journey_id: journeyId,\n step,\n });\n },\n [trackAnalytics],\n );\n const trackEventCompleted = useCallback(\n (journeyId: TJourneyId, step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n journey_id: journeyId,\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 setCarouselIndex((prev: number) => prev + 1);\n nextCoachmark(journeyId, false, GO_TO_NEXT_SLIDE_AFTER_MS);\n }\n\n trackEventViewed(journeyId, 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 [nextCoachmark, playButtonSound, setCarouselIndex, trackEventViewed],\n );\n\n const endJourney = useCallback(\n (puzzlesData: Puzzle, journeyId: TJourneyId) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(journeyId, 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 !carouselNextBtnRef?.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,\n tooltipYCoOrdinates: lessonLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselNextBtnRef.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={NextIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.GAMES_ACTIVITY,\n gameRefs.current as ISegmentedGameCardRefs,\n 'ORANGE_4',\n journeyId,\n )\n }\n analyticsLabel={AnalyticsLabel.ONBOARDING_STEP_COMPLETED}\n analyticsProps={{\n journey_id: journeyId,\n step: ActionEvent.LESSON_ACTIVITY,\n }}\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,\n tooltipYCoOrdinates: gameLabelDims.height / 2,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselNextBtnRef.current.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={NextIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.PUZZLE_ACTIVITY,\n puzzleRefs.current as ISegmentedGameCardRefs,\n 'PURPLE_4',\n journeyId,\n )\n }\n analyticsLabel={AnalyticsLabel.ONBOARDING_STEP_COMPLETED}\n analyticsProps={{\n journey_id: journeyId,\n step: ActionEvent.GAMES_ACTIVITY,\n }}\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,\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 nextCoachmark(journeyId);\n if (isLessonAvailable && lessonRefs.current) {\n goToNextCard(ActionEvent.LESSON_ACTIVITY, lessonRefs.current, 'BLUE_4', journeyId, true);\n } else {\n goToNextCard(ActionEvent.GAMES_ACTIVITY, gameRefs.current, 'ORANGE_4', journeyId, true);\n }\n },\n [endJourney, goToNextCard, nextCoachmark, setJourney],\n );\n\n const data = useMemo(\n () => ({\n gameRefs,\n puzzleRefs,\n lessonRefs,\n carouselNextBtnRef,\n isJourneyInProgress,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n"],"names":["useGameLauncherJourney","onSegmentClick","setCarouselIndex","onJourneyComplete","carouselNextBtnRef","useRef","gameRefs","puzzleRefs","lessonRefs","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","useJourney","trackAnalytics","useUIContext","trackEventViewed","useCallback","journeyId","step","AnalyticsLabel","trackEventCompleted","goToNextCard","analyticsLabelViewed","refOfNextSlide","color","isFirstSlide","prev","GO_TO_NEXT_SLIDE_AFTER_MS","animateLabelTimer","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS","endJourney","puzzlesData","ProjectType","ActionEvent","startJourney","isLessonAvailable","_a","_b","_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","NextIcon","gameSteps","puzzleSteps","SegmentedGameCard","puzzle","useMemo"],"mappings":";;;;;;;;;;;;;;;AAiCO,MAAMA,KAAyB,CAAC;AAA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AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
|
package/dist/index.d.ts
CHANGED
@@ -3587,7 +3587,9 @@ export declare enum PLATFORM_EVENTS_STUDENT {
|
|
3587
3587
|
ACTIVITY_STARTED = "activity_started",
|
3588
3588
|
ACTIVITY_TUTORIAL_SEEN = "activity_tutorial_seen",
|
3589
3589
|
STREAK_ICON_CLICKED = "streak_icon_clicked",
|
3590
|
-
LEADERBOARD_BUTTON_CLICKED = "leaderboard_button_clicked"
|
3590
|
+
LEADERBOARD_BUTTON_CLICKED = "leaderboard_button_clicked",
|
3591
|
+
ONBOARDING_STEP_VIEWED = "onboarding_step_viewed",
|
3592
|
+
ONBOARDING_STEP_COMPLETED = "onboarding_step_completed"
|
3591
3593
|
}
|
3592
3594
|
|
3593
3595
|
export declare enum PLATFORM_EVENTS_TEACHER {
|