@cuemath/leap 2.8.41-hg1 → 2.8.41-rj-0
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/assets/line-icons/icons/carat-left.js +26 -0
- package/dist/assets/line-icons/icons/carat-left.js.map +1 -0
- package/dist/assets/line-icons/icons/carat-right.js +26 -0
- package/dist/assets/line-icons/icons/carat-right.js.map +1 -0
- package/dist/features/circle-games/enum/circle-onboarding-steps.js +1 -1
- package/dist/features/circle-games/enum/circle-onboarding-steps.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +20 -11
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +53 -47
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +160 -131
- 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/use-get-circle-home-details-dal.js +14 -13
- 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 +95 -68
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +9 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +217 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +13 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +13 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +205 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats.js +12 -11
- package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/package.json +1 -1
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js +0 -7
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js +0 -213
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
@@ -0,0 +1,205 @@
|
|
1
|
+
import { jsx as r, Fragment as L } from "react/jsx-runtime";
|
2
|
+
import { useRef as I, useCallback as p } from "react";
|
3
|
+
import F from "../../../../../assets/line-icons/icons/carat-right.js";
|
4
|
+
import { PLATFORM_EVENTS_STUDENT as B } from "../../../../analytics-events/platform-events-student.js";
|
5
|
+
import { JOURNEY_ID_STUDENT as V } from "../../../../journey/journey-id/journey-id-student.js";
|
6
|
+
import { IndicatorType as d } from "../../../../journey/use-journey/constants.js";
|
7
|
+
import { useJourney as J } from "../../../../journey/use-journey/use-journey.js";
|
8
|
+
import X from "../../../../ui/buttons/icon-button/icon-button.js";
|
9
|
+
import { useUIContext as K } from "../../../../ui/context/context.js";
|
10
|
+
import b from "../../../../ui/layout/flex-view.js";
|
11
|
+
import m from "../../../../ui/text/text.js";
|
12
|
+
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as U } from "../../../enum/circle-onboarding-steps.js";
|
13
|
+
import { useCircleSounds as j } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
|
14
|
+
import { TablesCard as G } from "../../comps/tables-card/tables-card.js";
|
15
|
+
import { GAME_LAUNCHER_ANALYTICS_EVENTS as Z } from "../../game-launcher-analytics-events.js";
|
16
|
+
import { SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS as q, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS as z, START_ANIMATING_CLONED_ELEM as v, TABLE_CARD_INDEX as M, GO_TO_TABLE_LAUNCHER_DURATION_MS as Q, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as ee, PUZZLE_CARD_INDEX as te, SHOW_INITIAL_COACHMARK_AFTER_MS as $, SHOW_INITIAL_TOOLTIP_AFTER_MS as re } from "./constants.js";
|
17
|
+
import { Indicator as ne } from "./use-table-launcher-journey-styled.js";
|
18
|
+
const Ce = ({
|
19
|
+
carouselRefs: s,
|
20
|
+
onTableSegmentClick: O,
|
21
|
+
onJourneyComplete: R
|
22
|
+
}) => {
|
23
|
+
const e = V.CIRCLE_TABLES_INTRO_JOURNEY, t = I(null), f = I(null), N = I(!1), { playButtonSound: P } = j(), { nextCoachmark: n, setJourney: S, addCoachmark: a } = J(), { onEvent: _ } = K(), A = p(
|
24
|
+
(l) => {
|
25
|
+
var c, i;
|
26
|
+
l && O(l), _(B.ONBOARDING_STEP_COMPLETED, {
|
27
|
+
step: U.TABLES
|
28
|
+
}), (c = t == null ? void 0 : t.current) == null || c.setLabelVisiblity(!0), (i = t == null ? void 0 : t.current) == null || i.stopLabelAnimation(), R(e), n(e, !1);
|
29
|
+
},
|
30
|
+
[e, n, R, O, _]
|
31
|
+
), H = p(
|
32
|
+
(l, c) => {
|
33
|
+
var g, T, E;
|
34
|
+
if (!((g = t.current) != null && g.segmentedCardWrapperRef.current) || !((T = t.current) != null && T.labelRef.current))
|
35
|
+
return;
|
36
|
+
const i = t.current.labelRef.current.getBoundingClientRect(), o = (E = t.current) == null ? void 0 : E.segmentedCardWrapperRef.current.getBoundingClientRect();
|
37
|
+
a(e, {
|
38
|
+
originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
|
39
|
+
isActive: !1,
|
40
|
+
type: d.TOOLTIP,
|
41
|
+
elementToHighlight: /* @__PURE__ */ r(
|
42
|
+
G,
|
43
|
+
{
|
44
|
+
ref: f,
|
45
|
+
defaultTable: c,
|
46
|
+
label: l.label,
|
47
|
+
data: l.data,
|
48
|
+
onPress: A,
|
49
|
+
onGoBackFromTableLevel: A
|
50
|
+
}
|
51
|
+
),
|
52
|
+
indicator: {
|
53
|
+
position: "left",
|
54
|
+
backgroundColor: "YELLOW_4",
|
55
|
+
width: 236,
|
56
|
+
tooltipItem: /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "Each table has 3 levels—clear them and earn 3 stars!" }) }),
|
57
|
+
tooltipXCoOrdinates: 0,
|
58
|
+
tooltipYCoOrdinates: i.height * 0.35
|
59
|
+
}
|
60
|
+
}), a(e, {
|
61
|
+
originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
|
62
|
+
isActive: !1,
|
63
|
+
type: d.NUDGE,
|
64
|
+
indicator: {
|
65
|
+
nudge: "click",
|
66
|
+
content: /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Pick a level" }),
|
67
|
+
nudgePointerX: o.width / 2 + 50,
|
68
|
+
nudgePointerY: o.height * 0.4
|
69
|
+
},
|
70
|
+
elementToHighlight: /* @__PURE__ */ r(L, {})
|
71
|
+
}), n(e, !1, q), n(e, !0, z);
|
72
|
+
const u = setTimeout(() => {
|
73
|
+
var h;
|
74
|
+
clearTimeout(u), (h = f.current) == null || h.startLabelAnimation("YELLOW_4");
|
75
|
+
}, v);
|
76
|
+
},
|
77
|
+
[a, A, e, n]
|
78
|
+
), C = p(() => {
|
79
|
+
var i;
|
80
|
+
P(), (i = s.current) == null || i.goToIndex(M), n(e, !1, Q), _(B.ONBOARDING_STEP_VIEWED, {
|
81
|
+
step: U.TABLES
|
82
|
+
});
|
83
|
+
const l = setTimeout(() => {
|
84
|
+
var o;
|
85
|
+
clearTimeout(l), (o = t.current) == null || o.setLabelVisiblity(!1), n(e, !0);
|
86
|
+
}, ee), c = setTimeout(() => {
|
87
|
+
var o;
|
88
|
+
clearTimeout(c), (o = f.current) == null || o.startLabelAnimation("YELLOW_4");
|
89
|
+
}, v);
|
90
|
+
}, [s, e, n, P, _]), x = p(
|
91
|
+
(l, c = !1) => {
|
92
|
+
var E, h, y, W, D, Y, k;
|
93
|
+
if (N.current)
|
94
|
+
return;
|
95
|
+
const i = (E = s.current) == null ? void 0 : E.indicatorRefs, o = (h = s.current) == null ? void 0 : h.nextBtnRef, u = i == null ? void 0 : i[M];
|
96
|
+
if (!((y = t.current) != null && y.segmentedCardWrapperRef.current) || !((W = t.current) != null && W.labelRef.current) || !i || !(o != null && o.current) || !u || !u.current)
|
97
|
+
return;
|
98
|
+
N.current = !0;
|
99
|
+
const g = t.current.labelRef.current.getBoundingClientRect(), T = (D = t.current) == null ? void 0 : D.segmentedCardWrapperRef.current.getBoundingClientRect();
|
100
|
+
S(e, []), c ? (a(e, {
|
101
|
+
originalElementToHighlightRef: u,
|
102
|
+
isActive: !1,
|
103
|
+
type: d.TOOLTIP,
|
104
|
+
elementToHighlight: /* @__PURE__ */ r(ne, { $isActive: !1 }),
|
105
|
+
indicator: {
|
106
|
+
position: "bottom",
|
107
|
+
backgroundColor: "YELLOW_4",
|
108
|
+
width: 52,
|
109
|
+
tooltipItem: /* @__PURE__ */ r(
|
110
|
+
b,
|
111
|
+
{
|
112
|
+
$position: "absolute",
|
113
|
+
$flexDirection: "row",
|
114
|
+
style: { top: 6, left: 8, cursor: "pointer" },
|
115
|
+
onClick: C,
|
116
|
+
children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "NEW" })
|
117
|
+
}
|
118
|
+
),
|
119
|
+
tooltipYCoOrdinates: 14
|
120
|
+
// Need some offset in Y direction from top
|
121
|
+
}
|
122
|
+
}), a(e, {
|
123
|
+
originalElementToHighlightRef: u,
|
124
|
+
isActive: !1,
|
125
|
+
type: d.NUDGE,
|
126
|
+
indicator: {
|
127
|
+
nudge: "click",
|
128
|
+
content: "",
|
129
|
+
nudgePointerY: 20
|
130
|
+
},
|
131
|
+
elementToHighlight: /* @__PURE__ */ r(L, {})
|
132
|
+
}), n(e, !1, $), n(e, !0, re)) : (a(e, {
|
133
|
+
originalElementToHighlightRef: (Y = s.current) == null ? void 0 : Y.nextBtnRef,
|
134
|
+
isActive: !1,
|
135
|
+
type: d.NUDGE,
|
136
|
+
indicator: {
|
137
|
+
nudge: "click",
|
138
|
+
content: /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
|
139
|
+
nudgePointerX: 0,
|
140
|
+
nudgePointerY: 0
|
141
|
+
},
|
142
|
+
elementToHighlight: /* @__PURE__ */ r(
|
143
|
+
X,
|
144
|
+
{
|
145
|
+
renderAs: "secondary",
|
146
|
+
Icon: F,
|
147
|
+
onClick: C,
|
148
|
+
analyticsLabel: Z.JOURNEY_NEXT_ACTIVITY
|
149
|
+
}
|
150
|
+
)
|
151
|
+
}), (k = s.current) == null || k.goToIndex(te), n(e, !1, $)), a(e, {
|
152
|
+
originalElementToHighlightRef: t.current.labelRef,
|
153
|
+
isActive: !1,
|
154
|
+
type: d.TOOLTIP,
|
155
|
+
elementToHighlight: /* @__PURE__ */ r(L, {}),
|
156
|
+
indicator: {
|
157
|
+
position: "right",
|
158
|
+
backgroundColor: "YELLOW_4",
|
159
|
+
width: 264,
|
160
|
+
tooltipItem: /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "Get faster at multiplication! Practice everyday and become a Tables champ." }) }),
|
161
|
+
tooltipXCoOrdinates: g.width + 50,
|
162
|
+
tooltipYCoOrdinates: g.height / 2
|
163
|
+
}
|
164
|
+
}), a(e, {
|
165
|
+
originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
|
166
|
+
isActive: !1,
|
167
|
+
type: d.NUDGE,
|
168
|
+
indicator: {
|
169
|
+
nudge: "click",
|
170
|
+
content: /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Pick a table to start" }),
|
171
|
+
nudgePointerX: T.width / 2 + 50,
|
172
|
+
nudgePointerY: T.height / 2
|
173
|
+
},
|
174
|
+
elementToHighlight: /* @__PURE__ */ r(
|
175
|
+
G,
|
176
|
+
{
|
177
|
+
ref: f,
|
178
|
+
label: l.label,
|
179
|
+
data: l.data,
|
180
|
+
onPress: () => {
|
181
|
+
},
|
182
|
+
onPressTableSegment: (w) => H(l, w)
|
183
|
+
}
|
184
|
+
)
|
185
|
+
});
|
186
|
+
},
|
187
|
+
[
|
188
|
+
a,
|
189
|
+
s,
|
190
|
+
C,
|
191
|
+
H,
|
192
|
+
e,
|
193
|
+
n,
|
194
|
+
S
|
195
|
+
]
|
196
|
+
);
|
197
|
+
return {
|
198
|
+
tableRef: t,
|
199
|
+
startJourney: x
|
200
|
+
};
|
201
|
+
};
|
202
|
+
export {
|
203
|
+
Ce as useTableLauncherJourney
|
204
|
+
};
|
205
|
+
//# sourceMappingURL=use-table-launcher-journey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT } from '../../../../analytics-events/platform-events-student';\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 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 Action } from '../../../enum/circle-onboarding-steps';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n PUZZLE_CARD_INDEX,\n SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS,\n SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS,\n TABLE_CARD_INDEX,\n} 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 START_ANIMATING_CLONED_ELEM,\n} from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n const isJourneyInProgress = useRef(false);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const endJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED, {\n step: Action.TABLES,\n });\n\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n nextCoachmark(journeyId, false);\n },\n [journeyId, nextCoachmark, onJourneyComplete, onTableSegmentClick, trackAnalytics],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={endJourney}\n onGoBackFromTableLevel={endJourney}\n />\n ),\n indicator: {\n position: 'left',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">Each table has 3 levels—clear them and earn 3 stars!</Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: segmentedCardDims.height * 0.35,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n },\n [addCoachmark, endJourney, journeyId, nextCoachmark],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, GO_TO_TABLE_LAUNCHER_DURATION_MS);\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step: Action.TABLES,\n });\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackAnalytics]);\n\n const startJourney = useCallback(\n (tablesData: ITables, isTutorialOnboardingDone: boolean = false) => {\n if (isJourneyInProgress.current) {\n return;\n }\n\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 isJourneyInProgress.current = true;\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n setJourney(journeyId, []);\n\n // TAKE THE USER TO THE TABLE CARD\n if (!isTutorialOnboardingDone) {\n addCoachmark(journeyId, {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\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 elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n });\n carouselRefs.current?.goToIndex(PUZZLE_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show nudge => Click to proceed\n } else {\n addCoachmark(journeyId, {\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={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs=\"ab2-bold\">NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n });\n addCoachmark(journeyId, {\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 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 A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'YELLOW_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster at multiplication! Practice everyday and become a Tables champ.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width + 50,\n tooltipYCoOrdinates: labelDims.height / 2,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n journeyId,\n nextCoachmark,\n setJourney,\n ],\n );\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","originalTableRef","useRef","highlightedTableRef","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","useJourney","trackAnalytics","useUIContext","endJourney","useCallback","tableDetails","PLATFORM_EVENTS_STUDENT","Action","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS","SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS","startAnimationOnLabelAgain","START_ANIMATING_CLONED_ELEM","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","showNudge","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","animateLabel","startJourney","tablesData","isTutorialOnboardingDone","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","S.Indicator","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","_f","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","_g","PUZZLE_CARD_INDEX","tableInfo"],"mappings":";;;;;;;;;;;;;;;;;AAwCO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAYC,EAAmB,6BAC/BC,IAAmBC,EAAsB,IAAI,GAC7CC,IAAsBD,EAAsB,IAAI,GAChDE,IAAsBF,EAAO,EAAK,GAElC,EAAE,iBAAAG,MAAoBC,KACtB,EAAE,eAAAC,GAAe,YAAAC,GAAY,cAAAC,MAAiBC,EAAW,GACzD,EAAE,SAASC,EAAe,IAAIC,EAAa,GAE3CC,IAAaC;AAAA,IACjB,CAACC,MAAiC;;AAEhC,MAAIA,KACFlB,EAAoBkB,CAAY,GAElCJ,EAAeK,EAAwB,2BAA2B;AAAA,QAChE,MAAMC,EAAO;AAAA,MAAA,CACd,IAGiBC,IAAAjB,KAAA,gBAAAA,EAAA,YAAA,QAAAiB,EAAS,kBAAkB,MAC7CC,IAAAlB,KAAA,gBAAAA,EAAkB,YAAlB,QAAAkB,EAA2B,sBAC3BrB,EAAkBC,CAAS,GAC3BQ,EAAcR,GAAW,EAAK;AAAA,IAChC;AAAA,IACA,CAACA,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AAKzB;AAAA,YACL,OAAOwC,EAAW;AAAA,YAClB,MAAMA,EAAW;AAAA,YACjB,SAAS,MAAM;AAAA,YAAC;AAAA,YAChB,qBAAqB,CAAAiB,MAAaxC,EAAwBuB,GAAYiB,CAAS;AAAA,UAAA;AAAA,QACjF;AAAA,MAAA,CAEH;AAAA,IACH;AAAA,IACA;AAAA,MACEnD;AAAA,MACAb;AAAA,MACAwC;AAAA,MACAhB;AAAA,MACArB;AAAA,MACAQ;AAAA,MACAC;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AAAA,IACL,UAAUP;AAAA,IACV,cAAAyC;AAAA,EAAA;AAEJ;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R))(E || {});
|
1
|
+
var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R))(E || {});
|
2
2
|
export {
|
3
3
|
E as JOURNEY_ID_STUDENT
|
4
4
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,
|
1
|
+
{"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BANpBA,IAAAA,KAAA,CAAA,CAAA;"}
|
@@ -1,28 +1,28 @@
|
|
1
1
|
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
2
|
-
import { memo as y, forwardRef as d, useState as v, useMemo as
|
2
|
+
import { memo as y, forwardRef as d, useState as v, useMemo as u, useCallback as s, useImperativeHandle as C } from "react";
|
3
3
|
import { Accuracy as g } from "./accuracy/accuracy.js";
|
4
|
-
import { Clock as
|
5
|
-
import { DigitalMeter as
|
4
|
+
import { Clock as A } from "./clock/clock.js";
|
5
|
+
import { DigitalMeter as S } from "./digital-meter/digital-meter.js";
|
6
6
|
import { EPostGameStat as p } from "./enums/post-game-stats-enum.js";
|
7
7
|
import { Points as I } from "./points/points.js";
|
8
8
|
import { StatsWrapper as P, BlackBg as R } from "./post-game-stats-styled.js";
|
9
9
|
import { Streak as k } from "./streak/streak.js";
|
10
10
|
const K = y(
|
11
|
-
d(({ stats: o, show:
|
12
|
-
const [t,
|
11
|
+
d(({ stats: o, show: T, onComplete: m }, h) => {
|
12
|
+
const [t, x] = v(0), e = u(() => o[t], [t, o]), a = s(() => {
|
13
13
|
var r;
|
14
14
|
if ((r = e == null ? void 0 : e.onComplete) == null || r.call(e), t === o.length - 1) {
|
15
15
|
m == null || m();
|
16
16
|
return;
|
17
17
|
}
|
18
|
-
|
18
|
+
x((i) => i + 1);
|
19
19
|
}, [t, m, o.length, e]), l = s(() => {
|
20
20
|
e != null && e.stopAtEnd || a();
|
21
21
|
}, [e, a]);
|
22
|
-
C(
|
22
|
+
C(h, () => ({
|
23
23
|
moveToNextAndPlay: a
|
24
24
|
}));
|
25
|
-
const c =
|
25
|
+
const c = u(() => {
|
26
26
|
if (!e)
|
27
27
|
return null;
|
28
28
|
const r = `${e.type}-${t}`;
|
@@ -38,7 +38,7 @@ const K = y(
|
|
38
38
|
r
|
39
39
|
),
|
40
40
|
[p.DIGITAL_METER]: /* @__PURE__ */ n(
|
41
|
-
|
41
|
+
S,
|
42
42
|
{
|
43
43
|
value: e.value,
|
44
44
|
maxValue: e.maxValue ?? 1,
|
@@ -47,6 +47,7 @@ const K = y(
|
|
47
47
|
progressType: e.progressType ?? "linear",
|
48
48
|
helperTextPrimary: e.helperTextPrimary ?? "",
|
49
49
|
helperTextSecondary: e.helperTextSecondary ?? "",
|
50
|
+
actAsTimer: e.actAsTimer,
|
50
51
|
show: !0,
|
51
52
|
onComplete: l
|
52
53
|
},
|
@@ -74,7 +75,7 @@ const K = y(
|
|
74
75
|
r
|
75
76
|
),
|
76
77
|
[p.CLOCK]: /* @__PURE__ */ n(
|
77
|
-
|
78
|
+
A,
|
78
79
|
{
|
79
80
|
timeInMs: e.value,
|
80
81
|
show: !0,
|
@@ -85,7 +86,7 @@ const K = y(
|
|
85
86
|
)
|
86
87
|
}[e.type] ?? null;
|
87
88
|
}, [e, l, t]);
|
88
|
-
return !
|
89
|
+
return !T || o.length === 0 || t >= o.length ? null : /* @__PURE__ */ f(P, { children: [
|
89
90
|
/* @__PURE__ */ n(R, {}),
|
90
91
|
c
|
91
92
|
] });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"post-game-stats.js","sources":["../../../src/features/post-game-stats/post-game-stats.tsx"],"sourcesContent":["import type { IPostGameStatsProps, IPostGameStatsRef } from './post-game-stats-types';\n\nimport { useState, memo, useCallback, forwardRef, useImperativeHandle, useMemo } from 'react';\n\nimport { Accuracy } from './accuracy/accuracy';\nimport { Clock } from './clock/clock';\nimport { DigitalMeter } from './digital-meter/digital-meter';\nimport { EPostGameStat } from './enums/post-game-stats-enum';\nimport { Points } from './points/points';\nimport * as Styled from './post-game-stats-styled';\nimport { Streak } from './streak/streak';\n\nexport const PostGameStats = memo(\n forwardRef<IPostGameStatsRef, IPostGameStatsProps>(({ stats, show, onComplete }, ref) => {\n const [currStatIndex, setCurrentStatIndex] = useState(0);\n const currStatData = useMemo(() => stats[currStatIndex], [currStatIndex, stats]);\n\n const moveToNextAndPlay = useCallback(() => {\n currStatData?.onComplete?.();\n\n if (currStatIndex === stats.length - 1) {\n onComplete?.();\n\n return;\n }\n setCurrentStatIndex(prev => prev + 1);\n }, [currStatIndex, onComplete, stats.length, currStatData]);\n\n const onStatAnimationComplete = useCallback(() => {\n if (currStatData?.stopAtEnd) {\n return;\n }\n moveToNextAndPlay(); // Autoplay since stopAtEnd is false\n }, [currStatData, moveToNextAndPlay]);\n\n useImperativeHandle(ref, () => ({\n moveToNextAndPlay,\n }));\n\n const renderCurrentStat = useMemo(() => {\n if (!currStatData) {\n return null;\n }\n\n const key = `${currStatData.type}-${currStatIndex}`;\n\n const renderStat = {\n [EPostGameStat.POINT]: (\n <Points\n key={key}\n point={currStatData.value}\n show={currStatData.type === EPostGameStat.POINT}\n onComplete={onStatAnimationComplete}\n onReveal={currStatData.onReveal}\n />\n ),\n [EPostGameStat.DIGITAL_METER]: (\n <DigitalMeter\n key={key}\n value={currStatData.value}\n maxValue={currStatData.maxValue ?? 1}\n targetValue={currStatData.targetValue}\n displayText={currStatData.displayText ?? ''}\n progressType={currStatData.progressType ?? 'linear'}\n helperTextPrimary={currStatData.helperTextPrimary ?? ''}\n helperTextSecondary={currStatData.helperTextSecondary ?? ''}\n show={true}\n onComplete={onStatAnimationComplete}\n />\n ),\n [EPostGameStat.STREAK]: (\n <Streak\n key={key}\n currStreak={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n onReveal={currStatData.onReveal}\n />\n ),\n [EPostGameStat.ACCURACY]: (\n <Accuracy\n key={key}\n accuracy={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n [EPostGameStat.CLOCK]: (\n <Clock\n key={key}\n timeInMs={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n };\n\n return renderStat[currStatData.type] ?? null;\n }, [currStatData, onStatAnimationComplete, currStatIndex]);\n\n if (!show || stats.length === 0 || currStatIndex >= stats.length) {\n return null;\n }\n\n return (\n <Styled.StatsWrapper>\n <Styled.BlackBg />\n\n {renderCurrentStat}\n </Styled.StatsWrapper>\n );\n }),\n);\n"],"names":["PostGameStats","memo","forwardRef","stats","show","onComplete","ref","currStatIndex","setCurrentStatIndex","useState","currStatData","useMemo","moveToNextAndPlay","useCallback","_a","prev","onStatAnimationComplete","useImperativeHandle","renderCurrentStat","key","EPostGameStat","jsx","Points","DigitalMeter","Streak","Accuracy","Clock","jsxs","Styled.StatsWrapper","Styled.BlackBg"],"mappings":";;;;;;;;;AAYO,MAAMA,IAAgBC;AAAA,EAC3BC,EAAmD,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,YAAAC,EAAA,GAAcC,MAAQ;AACvF,UAAM,CAACC,GAAeC,CAAmB,IAAIC,EAAS,CAAC,GACjDC,IAAeC,EAAQ,MAAMR,EAAMI,CAAa,GAAG,CAACA,GAAeJ,CAAK,CAAC,GAEzES,IAAoBC,EAAY,MAAM;;AAGtC,WAFJC,IAAAJ,KAAA,gBAAAA,EAAc,eAAd,QAAAI,EAAA,KAAAJ,IAEIH,MAAkBJ,EAAM,SAAS,GAAG;AACzB,QAAAE,KAAA,QAAAA;AAEb;AAAA,MACF;AACoB,MAAAG,EAAA,CAAAO,MAAQA,IAAO,CAAC;AAAA,IAAA,GACnC,CAACR,GAAeF,GAAYF,EAAM,QAAQO,CAAY,CAAC,GAEpDM,IAA0BH,EAAY,MAAM;AAChD,MAAIH,KAAA,QAAAA,EAAc,aAGAE;IAAA,GACjB,CAACF,GAAcE,CAAiB,CAAC;AAEpC,IAAAK,EAAoBX,GAAK,OAAO;AAAA,MAC9B,mBAAAM;AAAA,IACA,EAAA;AAEI,UAAAM,IAAoBP,EAAQ,MAAM;AACtC,UAAI,CAACD;AACI,eAAA;AAGT,YAAMS,IAAM,GAAGT,EAAa,IAAI,IAAIH,CAAa;
|
1
|
+
{"version":3,"file":"post-game-stats.js","sources":["../../../src/features/post-game-stats/post-game-stats.tsx"],"sourcesContent":["import type { IPostGameStatsProps, IPostGameStatsRef } from './post-game-stats-types';\n\nimport { useState, memo, useCallback, forwardRef, useImperativeHandle, useMemo } from 'react';\n\nimport { Accuracy } from './accuracy/accuracy';\nimport { Clock } from './clock/clock';\nimport { DigitalMeter } from './digital-meter/digital-meter';\nimport { EPostGameStat } from './enums/post-game-stats-enum';\nimport { Points } from './points/points';\nimport * as Styled from './post-game-stats-styled';\nimport { Streak } from './streak/streak';\n\nexport const PostGameStats = memo(\n forwardRef<IPostGameStatsRef, IPostGameStatsProps>(({ stats, show, onComplete }, ref) => {\n const [currStatIndex, setCurrentStatIndex] = useState(0);\n const currStatData = useMemo(() => stats[currStatIndex], [currStatIndex, stats]);\n\n const moveToNextAndPlay = useCallback(() => {\n currStatData?.onComplete?.();\n\n if (currStatIndex === stats.length - 1) {\n onComplete?.();\n\n return;\n }\n setCurrentStatIndex(prev => prev + 1);\n }, [currStatIndex, onComplete, stats.length, currStatData]);\n\n const onStatAnimationComplete = useCallback(() => {\n if (currStatData?.stopAtEnd) {\n return;\n }\n moveToNextAndPlay(); // Autoplay since stopAtEnd is false\n }, [currStatData, moveToNextAndPlay]);\n\n useImperativeHandle(ref, () => ({\n moveToNextAndPlay,\n }));\n\n const renderCurrentStat = useMemo(() => {\n if (!currStatData) {\n return null;\n }\n\n const key = `${currStatData.type}-${currStatIndex}`;\n\n const renderStat = {\n [EPostGameStat.POINT]: (\n <Points\n key={key}\n point={currStatData.value}\n show={currStatData.type === EPostGameStat.POINT}\n onComplete={onStatAnimationComplete}\n onReveal={currStatData.onReveal}\n />\n ),\n [EPostGameStat.DIGITAL_METER]: (\n <DigitalMeter\n key={key}\n value={currStatData.value}\n maxValue={currStatData.maxValue ?? 1}\n targetValue={currStatData.targetValue}\n displayText={currStatData.displayText ?? ''}\n progressType={currStatData.progressType ?? 'linear'}\n helperTextPrimary={currStatData.helperTextPrimary ?? ''}\n helperTextSecondary={currStatData.helperTextSecondary ?? ''}\n actAsTimer={currStatData.actAsTimer}\n show={true}\n onComplete={onStatAnimationComplete}\n />\n ),\n [EPostGameStat.STREAK]: (\n <Streak\n key={key}\n currStreak={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n onReveal={currStatData.onReveal}\n />\n ),\n [EPostGameStat.ACCURACY]: (\n <Accuracy\n key={key}\n accuracy={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n [EPostGameStat.CLOCK]: (\n <Clock\n key={key}\n timeInMs={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n };\n\n return renderStat[currStatData.type] ?? null;\n }, [currStatData, onStatAnimationComplete, currStatIndex]);\n\n if (!show || stats.length === 0 || currStatIndex >= stats.length) {\n return null;\n }\n\n return (\n <Styled.StatsWrapper>\n <Styled.BlackBg />\n\n {renderCurrentStat}\n </Styled.StatsWrapper>\n );\n }),\n);\n"],"names":["PostGameStats","memo","forwardRef","stats","show","onComplete","ref","currStatIndex","setCurrentStatIndex","useState","currStatData","useMemo","moveToNextAndPlay","useCallback","_a","prev","onStatAnimationComplete","useImperativeHandle","renderCurrentStat","key","EPostGameStat","jsx","Points","DigitalMeter","Streak","Accuracy","Clock","jsxs","Styled.StatsWrapper","Styled.BlackBg"],"mappings":";;;;;;;;;AAYO,MAAMA,IAAgBC;AAAA,EAC3BC,EAAmD,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,YAAAC,EAAA,GAAcC,MAAQ;AACvF,UAAM,CAACC,GAAeC,CAAmB,IAAIC,EAAS,CAAC,GACjDC,IAAeC,EAAQ,MAAMR,EAAMI,CAAa,GAAG,CAACA,GAAeJ,CAAK,CAAC,GAEzES,IAAoBC,EAAY,MAAM;;AAG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AAA,UAAA;AAAA,YAEC,YAAYd,EAAa;AAAA,YACzB,MAAM;AAAA,YACN,YAAYM;AAAA,YACZ,YAAYN,EAAa;AAAA,YACzB,UAAUA,EAAa;AAAA,UAAA;AAAA,UALlBS;AAAA,QAMP;AAAA,QAEF,CAACC,EAAc,QAAQ,GACrB,gBAAAC;AAAA,UAACI;AAAA,UAAA;AAAA,YAEC,UAAUf,EAAa;AAAA,YACvB,MAAM;AAAA,YACN,YAAYM;AAAA,YACZ,YAAYN,EAAa;AAAA,UAAA;AAAA,UAJpBS;AAAA,QAKP;AAAA,QAEF,CAACC,EAAc,KAAK,GAClB,gBAAAC;AAAA,UAACK;AAAA,UAAA;AAAA,YAEC,UAAUhB,EAAa;AAAA,YACvB,MAAM;AAAA,YACN,YAAYM;AAAA,YACZ,YAAYN,EAAa;AAAA,UAAA;AAAA,UAJpBS;AAAA,QAKP;AAAA,MAAA,EAIcT,EAAa,IAAI,KAAK;AAAA,IACvC,GAAA,CAACA,GAAcM,GAAyBT,CAAa,CAAC;AAEzD,WAAI,CAACH,KAAQD,EAAM,WAAW,KAAKI,KAAiBJ,EAAM,SACjD,OAIP,gBAAAwB,EAACC,GAAA,EACC,UAAA;AAAA,MAAC,gBAAAP,EAAAQ,GAAA,EAAe;AAAA,MAEfX;AAAA,IACH,EAAA,CAAA;AAAA,EAAA,CAEH;AACH;"}
|
package/dist/index.d.ts
CHANGED
@@ -173,7 +173,8 @@ export declare enum CIRCLE_ONBOARDING_ANALYTICS_STEPS {
|
|
173
173
|
TUTORIAL = "tutorial",
|
174
174
|
POINTS = "points",
|
175
175
|
STREAK = "streak",
|
176
|
-
LEADERBOARD = "leaderboard"
|
176
|
+
LEADERBOARD = "leaderboard",
|
177
|
+
TABLES = "tables"
|
177
178
|
}
|
178
179
|
|
179
180
|
export declare enum CircleSoundKey {
|
@@ -888,6 +889,7 @@ declare interface ICoachMarkCompletion {
|
|
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
|
export declare interface ICoachmarkProgress {
|
@@ -896,6 +898,7 @@ export declare interface ICoachmarkProgress {
|
|
896
898
|
CIRCLE_POINTS_REWARD_JOURNEY: boolean;
|
897
899
|
CIRCLE_STREAK_UPDATE_JOURNEY: boolean;
|
898
900
|
CIRCLE_TUTORIAL_JOURNEY: boolean;
|
901
|
+
CIRCLE_TABLES_INTRO_JOURNEY: boolean;
|
899
902
|
}
|
900
903
|
|
901
904
|
/**
|
@@ -1103,6 +1106,7 @@ declare interface IGameLauncherProps {
|
|
1103
1106
|
data: IProjectData | null;
|
1104
1107
|
defaultIndex?: number;
|
1105
1108
|
journeyId?: TJourneyId;
|
1109
|
+
isTutorialOnboardingDone?: boolean;
|
1106
1110
|
onJourneyComplete: (journeyId: TJourneyId) => void;
|
1107
1111
|
}
|
1108
1112
|
|
@@ -2123,6 +2127,7 @@ export declare interface IPostGameStat {
|
|
2123
2127
|
helperTextSecondary?: string;
|
2124
2128
|
progressType?: 'linear' | 'stepper';
|
2125
2129
|
displayText?: string;
|
2130
|
+
actAsTimer?: boolean;
|
2126
2131
|
}
|
2127
2132
|
|
2128
2133
|
export declare interface IPostGameStatsProps {
|
@@ -3349,7 +3354,8 @@ export declare enum JOURNEY_ID_STUDENT {
|
|
3349
3354
|
CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY",
|
3350
3355
|
CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY",
|
3351
3356
|
CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY",
|
3352
|
-
CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY"
|
3357
|
+
CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY",
|
3358
|
+
CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY"
|
3353
3359
|
}
|
3354
3360
|
|
3355
3361
|
export declare const JourneyProvider: FC<{
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
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,213 +0,0 @@
|
|
1
|
-
import { jsx as e, Fragment as R } from "react/jsx-runtime";
|
2
|
-
import { useRef as u, useCallback as T, useMemo as ne } from "react";
|
3
|
-
import Q from "../../../../assets/line-icons/icons/next.js";
|
4
|
-
import { PLATFORM_EVENTS_STUDENT as j } from "../../../analytics-events/platform-events-student.js";
|
5
|
-
import { IndicatorType as s } from "../../../journey/use-journey/constants.js";
|
6
|
-
import { useJourney as ie } from "../../../journey/use-journey/use-journey.js";
|
7
|
-
import z from "../../../ui/buttons/icon-button/icon-button.js";
|
8
|
-
import { useUIContext as oe } from "../../../ui/context/context.js";
|
9
|
-
import I from "../../../ui/layout/flex-view.js";
|
10
|
-
import d from "../../../ui/text/text.js";
|
11
|
-
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as E } from "../../enum/circle-onboarding-steps.js";
|
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
|
-
import { GAME_LAUNCHER_ANALYTICS_EVENTS as ee } from "../game-launcher-analytics-events.js";
|
15
|
-
import { GO_TO_NEXT_SLIDE_AFTER_MS as ae, SHOW_LABEL_HIGHLIGHT_AFTER_MS as se, SHOW_NUDGE_AFTER_MS as de } from "./constants.js";
|
16
|
-
import { ProjectType as he } from "../../games/web-view/enums/project-type-enum.js";
|
17
|
-
const Se = ({
|
18
|
-
onSegmentClick: L,
|
19
|
-
setCarouselIndex: O,
|
20
|
-
onJourneyComplete: b
|
21
|
-
}) => {
|
22
|
-
const c = u(null), i = u(null), r = u(null), a = u(null), C = u(!1), { playButtonSound: P } = le(), { nextCoachmark: o, setJourney: N } = ie(), { onEvent: f } = oe(), S = T(
|
23
|
-
(t) => {
|
24
|
-
f(j.ONBOARDING_STEP_VIEWED, {
|
25
|
-
step: t
|
26
|
-
});
|
27
|
-
},
|
28
|
-
[f]
|
29
|
-
), y = T(
|
30
|
-
(t) => {
|
31
|
-
f(j.ONBOARDING_STEP_COMPLETED, {
|
32
|
-
step: t
|
33
|
-
});
|
34
|
-
},
|
35
|
-
[f]
|
36
|
-
), h = T(
|
37
|
-
(t, l, n, g, p = !1) => {
|
38
|
-
p || (P(), O((_) => _ + 1), o(g, !1, ae)), S(t);
|
39
|
-
const A = setTimeout(() => {
|
40
|
-
clearTimeout(A), l.startLabelAnimation(n);
|
41
|
-
}, se);
|
42
|
-
o(g, !0, de);
|
43
|
-
},
|
44
|
-
[o, P, O, S]
|
45
|
-
), H = T(
|
46
|
-
(t, l) => {
|
47
|
-
L(t, he.PUZZLE), y(E.PUZZLE_ACTIVITY), o(l), b(l);
|
48
|
-
},
|
49
|
-
[o, b, L, y]
|
50
|
-
), G = T(
|
51
|
-
(t, l, n) => {
|
52
|
-
var w, Y, v, U, V, B, D, x, M, W, X, $, J, F, Z, K, q;
|
53
|
-
if (C.current || !((w = c == null ? void 0 : c.current) != null && w.nextBtnRef.current) || !((Y = r == null ? void 0 : r.current) != null && Y.segmentedCardWrapperRef.current) || !((v = i == null ? void 0 : i.current) != null && v.labelRef.current) || !((U = r == null ? void 0 : r.current) != null && U.labelRef.current) || !t)
|
54
|
-
return;
|
55
|
-
C.current = !0;
|
56
|
-
const g = ((D = (B = (V = a.current) == null ? void 0 : V.labelRef) == null ? void 0 : B.current) == null ? void 0 : D.getBoundingClientRect()) || {
|
57
|
-
height: 0,
|
58
|
-
width: 0
|
59
|
-
}, p = ((W = (M = (x = i.current) == null ? void 0 : x.labelRef) == null ? void 0 : M.current) == null ? void 0 : W.getBoundingClientRect()) || {
|
60
|
-
height: 0,
|
61
|
-
width: 0
|
62
|
-
}, A = ((J = ($ = (X = r.current) == null ? void 0 : X.labelRef) == null ? void 0 : $.current) == null ? void 0 : J.getBoundingClientRect()) || {
|
63
|
-
height: 0,
|
64
|
-
width: 0
|
65
|
-
}, _ = ((K = (Z = (F = r.current) == null ? void 0 : F.segmentedCardWrapperRef) == null ? void 0 : Z.current) == null ? void 0 : K.getBoundingClientRect()) || {
|
66
|
-
height: 0,
|
67
|
-
width: 0
|
68
|
-
};
|
69
|
-
let k = [];
|
70
|
-
l && a.current && (k = [
|
71
|
-
{
|
72
|
-
originalElementToHighlightRef: a.current.labelRef,
|
73
|
-
isActive: !1,
|
74
|
-
type: s.TOOLTIP,
|
75
|
-
elementToHighlight: /* @__PURE__ */ e(R, {}),
|
76
|
-
indicator: {
|
77
|
-
position: "right",
|
78
|
-
backgroundColor: "BLUE_4",
|
79
|
-
width: 264,
|
80
|
-
tooltipItem: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(d, { $renderAs: "ab2-bold", children: "Get faster & stay ahead in school. Practice 3 new skills everyday." }) }),
|
81
|
-
tooltipXCoOrdinates: g.width + 50,
|
82
|
-
tooltipYCoOrdinates: g.height / 2
|
83
|
-
}
|
84
|
-
},
|
85
|
-
{
|
86
|
-
originalElementToHighlightRef: (q = c.current) == null ? void 0 : q.nextBtnRef,
|
87
|
-
isActive: !1,
|
88
|
-
type: s.NUDGE,
|
89
|
-
elementToHighlight: /* @__PURE__ */ e(
|
90
|
-
z,
|
91
|
-
{
|
92
|
-
renderAs: "secondary",
|
93
|
-
Icon: Q,
|
94
|
-
onClick: () => h(
|
95
|
-
E.GAMES_ACTIVITY,
|
96
|
-
i.current,
|
97
|
-
"ORANGE_4",
|
98
|
-
n
|
99
|
-
),
|
100
|
-
analyticsLabel: ee.JOURNEY_NEXT_ACTIVITY
|
101
|
-
}
|
102
|
-
),
|
103
|
-
indicator: {
|
104
|
-
nudge: "click",
|
105
|
-
content: /* @__PURE__ */ e(d, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
|
106
|
-
nudgePointerX: 0,
|
107
|
-
nudgePointerY: 0
|
108
|
-
}
|
109
|
-
}
|
110
|
-
]);
|
111
|
-
const te = [
|
112
|
-
{
|
113
|
-
originalElementToHighlightRef: i.current.labelRef,
|
114
|
-
isActive: !1,
|
115
|
-
type: s.TOOLTIP,
|
116
|
-
elementToHighlight: /* @__PURE__ */ e(R, {}),
|
117
|
-
indicator: {
|
118
|
-
position: "right",
|
119
|
-
backgroundColor: "ORANGE_4",
|
120
|
-
width: 264,
|
121
|
-
tooltipItem: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(d, { $renderAs: "ab2-bold", children: "Train to think deeper & plan ahead. Play 3 new games everyday." }) }),
|
122
|
-
tooltipXCoOrdinates: p.width + 50,
|
123
|
-
tooltipYCoOrdinates: p.height / 2
|
124
|
-
}
|
125
|
-
},
|
126
|
-
{
|
127
|
-
originalElementToHighlightRef: c.current.nextBtnRef,
|
128
|
-
isActive: !1,
|
129
|
-
type: s.NUDGE,
|
130
|
-
elementToHighlight: /* @__PURE__ */ e(
|
131
|
-
z,
|
132
|
-
{
|
133
|
-
renderAs: "secondary",
|
134
|
-
Icon: Q,
|
135
|
-
onClick: () => h(
|
136
|
-
E.PUZZLE_ACTIVITY,
|
137
|
-
r.current,
|
138
|
-
"PURPLE_4",
|
139
|
-
n
|
140
|
-
),
|
141
|
-
analyticsLabel: ee.JOURNEY_NEXT_ACTIVITY
|
142
|
-
}
|
143
|
-
),
|
144
|
-
indicator: {
|
145
|
-
nudge: "click",
|
146
|
-
content: /* @__PURE__ */ e(d, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
|
147
|
-
nudgePointerX: 0,
|
148
|
-
nudgePointerY: 0
|
149
|
-
}
|
150
|
-
}
|
151
|
-
], re = [
|
152
|
-
{
|
153
|
-
originalElementToHighlightRef: r.current.labelRef,
|
154
|
-
isActive: !1,
|
155
|
-
type: s.TOOLTIP,
|
156
|
-
elementToHighlight: /* @__PURE__ */ e(R, {}),
|
157
|
-
indicator: {
|
158
|
-
position: "right",
|
159
|
-
backgroundColor: "PURPLE_4",
|
160
|
-
width: 264,
|
161
|
-
tooltipItem: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(d, { $renderAs: "ab2-bold", children: "Think in new ways & stay sharp. Solve 3 new puzzles everyday." }) }),
|
162
|
-
tooltipXCoOrdinates: A.width + 50,
|
163
|
-
tooltipYCoOrdinates: A.height / 2
|
164
|
-
}
|
165
|
-
},
|
166
|
-
{
|
167
|
-
originalElementToHighlightRef: r.current.segmentedCardWrapperRef,
|
168
|
-
isActive: !1,
|
169
|
-
type: s.NUDGE,
|
170
|
-
elementToHighlight: /* @__PURE__ */ e(
|
171
|
-
ce,
|
172
|
-
{
|
173
|
-
label: "",
|
174
|
-
value: t.data.filter((m) => m.solved).length,
|
175
|
-
maxValue: t.data.length,
|
176
|
-
initialValue: t.initialProgressValue,
|
177
|
-
data: t.data.map((m) => ({
|
178
|
-
card: m.cardLottie,
|
179
|
-
name: "",
|
180
|
-
// We dont want to show the name of the puzzle in onboarding
|
181
|
-
isCompleted: m.solved,
|
182
|
-
onPress: () => H(m, n)
|
183
|
-
}))
|
184
|
-
}
|
185
|
-
),
|
186
|
-
indicator: {
|
187
|
-
nudge: "click",
|
188
|
-
content: /* @__PURE__ */ e(d, { $renderAs: "ab1", $color: "WHITE", children: "Click to solve a puzzle" }),
|
189
|
-
nudgePointerX: _.width * 0.6,
|
190
|
-
nudgePointerY: _.height * 0.4
|
191
|
-
}
|
192
|
-
}
|
193
|
-
];
|
194
|
-
N(n, [...k, ...te, ...re]), o(n), l && a.current ? h(E.SKILL_ACTIVITY, a.current, "BLUE_4", n, !0) : h(E.GAMES_ACTIVITY, i.current, "ORANGE_4", n, !0);
|
195
|
-
},
|
196
|
-
[H, h, o, N]
|
197
|
-
);
|
198
|
-
return ne(
|
199
|
-
() => ({
|
200
|
-
gameRefs: i,
|
201
|
-
puzzleRefs: r,
|
202
|
-
lessonRefs: a,
|
203
|
-
carouselNextBtnRef: c,
|
204
|
-
isJourneyInProgress: C,
|
205
|
-
startJourney: G
|
206
|
-
}),
|
207
|
-
[G]
|
208
|
-
);
|
209
|
-
};
|
210
|
-
export {
|
211
|
-
Se as useGameLauncherJourney
|
212
|
-
};
|
213
|
-
//# sourceMappingURL=use-game-launcher-journey.js.map
|