@cuemath/leap 3.2.19-beta-0.1 → 3.2.19-link.1
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/illustrations/illustrations.js +6 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.js.map +1 -0
- package/dist/assets/lottie/lottie.js +0 -5
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +4 -6
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +8 -10
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +4 -7
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +97 -85
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +42 -44
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +27 -33
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- 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/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +30 -79
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +42 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +2 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +313 -307
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +71 -89
- package/dist/index.js +626 -626
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
- package/dist/static/stripe-blurple.6abf422f.svg +1 -0
- package/package.json +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
- package/dist/features/puzzles/constants/puzzle-container.js +0 -8
- package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
- package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
- package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
- package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
- package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
- package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
- package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,110 +0,0 @@
|
|
1
|
-
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
2
|
-
import { useCallback as w, useEffect as P } from "react";
|
3
|
-
import _ from "../../../assets/line-icons/icons/back2.js";
|
4
|
-
import x from "../../ui/buttons/button/button.js";
|
5
|
-
import y from "../../ui/buttons/icon-button/icon-button.js";
|
6
|
-
import t from "../../ui/layout/flex-view.js";
|
7
|
-
import A from "../../ui/loader/app-loader/app-loader.js";
|
8
|
-
import i from "../../ui/text/text.js";
|
9
|
-
import { useGetPuzzles as I } from "../api/puzzle-dashboard.js";
|
10
|
-
import X from "../comps/puzzle-card.js";
|
11
|
-
import { PuzzleDashboardWrapper as j, BannerWrapper as B, BackIconContainer as k, BackIconWrapper as T, StyledPuzzleIcon as v, ContentWrapper as S } from "./puzzle-dashboard-styled.js";
|
12
|
-
const W = ({ studentId: o, onBackCLick: s, onCardClick: d }) => {
|
13
|
-
const {
|
14
|
-
get: c,
|
15
|
-
data: r,
|
16
|
-
isProcessing: h,
|
17
|
-
isProcessingFailed: m
|
18
|
-
} = I(), l = (r == null ? void 0 : r.length) || 0, a = w(() => {
|
19
|
-
c(o, void 0, {
|
20
|
-
courseStream: "MATH"
|
21
|
-
});
|
22
|
-
}, [c, o]);
|
23
|
-
return P(() => {
|
24
|
-
a();
|
25
|
-
}, [a]), h ? /* @__PURE__ */ e(A, { height: "100vh" }) : m ? /* @__PURE__ */ n(t, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
|
26
|
-
/* @__PURE__ */ e(i, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
27
|
-
/* @__PURE__ */ e(
|
28
|
-
x,
|
29
|
-
{
|
30
|
-
widthX: 14,
|
31
|
-
size: "small",
|
32
|
-
shape: "square",
|
33
|
-
renderAs: "primary",
|
34
|
-
label: "Try again",
|
35
|
-
onClick: a
|
36
|
-
}
|
37
|
-
)
|
38
|
-
] }) : /* @__PURE__ */ n(
|
39
|
-
j,
|
40
|
-
{
|
41
|
-
$alignItems: "center",
|
42
|
-
$flexGapX: l === 0 ? 10 : 2.5,
|
43
|
-
$position: "relative",
|
44
|
-
children: [
|
45
|
-
/* @__PURE__ */ n(B, { $widthX: 50, $heightX: 10.5, $justifyContent: "center", children: [
|
46
|
-
/* @__PURE__ */ n(i, { $renderAs: "ah3-bold", $alignSelf: "center", children: [
|
47
|
-
l,
|
48
|
-
" Puzzles Solved"
|
49
|
-
] }),
|
50
|
-
s && /* @__PURE__ */ e(k, { $height: "100%", children: /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(
|
51
|
-
y,
|
52
|
-
{
|
53
|
-
Icon: _,
|
54
|
-
size: "xsmall",
|
55
|
-
renderAs: "secondary",
|
56
|
-
analyticsLabel: "puzzle_back",
|
57
|
-
onClick: s
|
58
|
-
}
|
59
|
-
) }) })
|
60
|
-
] }),
|
61
|
-
l === 0 ? /* @__PURE__ */ n(t, { $flexGapX: 1, $justifyContent: "center", children: [
|
62
|
-
/* @__PURE__ */ e(
|
63
|
-
t,
|
64
|
-
{
|
65
|
-
$flexDirection: "row",
|
66
|
-
$alignItems: "center",
|
67
|
-
$justifyContent: "center",
|
68
|
-
$width: "100%",
|
69
|
-
children: /* @__PURE__ */ e(t, { $widthX: 3.5, $heightX: 3.5, $background: "WHITE_4", children: /* @__PURE__ */ e(v, { width: 56, height: 56 }) })
|
70
|
-
}
|
71
|
-
),
|
72
|
-
/* @__PURE__ */ n(t, { $justifyContent: "center", children: [
|
73
|
-
/* @__PURE__ */ e(i, { $renderAs: "ab2-bold", $color: "BLACK_T_60", $align: "center", children: "No puzzle assigned yet!" }),
|
74
|
-
/* @__PURE__ */ e(i, { $renderAs: "ab2-bold", $color: "BLACK_T_60", children: "Hang tight — your tutor will share one soon! 🎉🧩" })
|
75
|
-
] })
|
76
|
-
] }) : /* @__PURE__ */ e(S, { children: r == null ? void 0 : r.map((u) => {
|
77
|
-
const {
|
78
|
-
id: p,
|
79
|
-
image_hue: $,
|
80
|
-
image_url: g,
|
81
|
-
title: f,
|
82
|
-
user_node_id: z,
|
83
|
-
rewards: b,
|
84
|
-
node_id: C
|
85
|
-
} = u;
|
86
|
-
return /* @__PURE__ */ e(
|
87
|
-
X,
|
88
|
-
{
|
89
|
-
imageHue: $,
|
90
|
-
imageUrl: g,
|
91
|
-
title: f,
|
92
|
-
width: 126,
|
93
|
-
height: 152,
|
94
|
-
onCardClick: d,
|
95
|
-
userNodeId: z,
|
96
|
-
rewards: b,
|
97
|
-
nodeId: C,
|
98
|
-
studentId: o
|
99
|
-
},
|
100
|
-
p
|
101
|
-
);
|
102
|
-
}) })
|
103
|
-
]
|
104
|
-
}
|
105
|
-
);
|
106
|
-
}, U = W;
|
107
|
-
export {
|
108
|
-
U as default
|
109
|
-
};
|
110
|
-
//# sourceMappingURL=puzzle-dashboard.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-dashboard.js","sources":["../../../../src/features/puzzles/puzzle-dashboard/puzzle-dashboard.tsx"],"sourcesContent":["import type { IPuzzleDashboardProps } from './puzzle-dashboard-types';\n\nimport { useCallback, useEffect, type FC } from 'react';\n\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetPuzzles } from '../api/puzzle-dashboard';\nimport PuzzleCard from '../comps/puzzle-card';\nimport * as Styled from './puzzle-dashboard-styled';\n\nconst PuzzleDashboard: FC<IPuzzleDashboardProps> = ({ studentId, onBackCLick, onCardClick }) => {\n const {\n get: getPuzzles,\n data: puzzleHistoryData,\n isProcessing,\n isProcessingFailed,\n } = useGetPuzzles();\n\n const puzzleCount = puzzleHistoryData?.length || 0;\n\n const fetchPuzzles = useCallback(() => {\n getPuzzles(studentId, undefined, {\n courseStream: 'MATH',\n });\n }, [getPuzzles, studentId]);\n\n useEffect(() => {\n fetchPuzzles();\n }, [fetchPuzzles]);\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchPuzzles}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.PuzzleDashboardWrapper\n $alignItems=\"center\"\n $flexGapX={puzzleCount === 0 ? 10 : 2.5}\n $position=\"relative\"\n >\n <Styled.BannerWrapper $widthX={50} $heightX={10.5} $justifyContent=\"center\">\n <Text $renderAs=\"ah3-bold\" $alignSelf=\"center\">\n {puzzleCount} Puzzles Solved\n </Text>\n\n {onBackCLick && (\n <Styled.BackIconContainer $height=\"100%\">\n <Styled.BackIconWrapper>\n <IconButton\n Icon={Back2Icon}\n size=\"xsmall\"\n renderAs=\"secondary\"\n analyticsLabel=\"puzzle_back\"\n onClick={onBackCLick}\n />\n </Styled.BackIconWrapper>\n </Styled.BackIconContainer>\n )}\n </Styled.BannerWrapper>\n\n {puzzleCount === 0 ? (\n <FlexView $flexGapX={1} $justifyContent=\"center\">\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n >\n <FlexView $widthX={3.5} $heightX={3.5} $background=\"WHITE_4\">\n <Styled.StyledPuzzleIcon width={56} height={56} />\n </FlexView>\n </FlexView>\n\n <FlexView $justifyContent=\"center\">\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_60\" $align=\"center\">\n No puzzle assigned yet!\n </Text>\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_60\">\n Hang tight — your tutor will share one soon! 🎉🧩\n </Text>\n </FlexView>\n </FlexView>\n ) : (\n <Styled.ContentWrapper>\n {puzzleHistoryData?.map(item => {\n const {\n id,\n image_hue: imageHue,\n image_url: imageUrl,\n title,\n user_node_id: userNodeId,\n rewards,\n node_id: nodeId,\n } = item;\n\n return (\n <PuzzleCard\n key={id}\n imageHue={imageHue}\n imageUrl={imageUrl}\n title={title}\n width={126}\n height={152}\n onCardClick={onCardClick}\n userNodeId={userNodeId}\n rewards={rewards}\n nodeId={nodeId}\n studentId={studentId}\n />\n );\n })}\n </Styled.ContentWrapper>\n )}\n </Styled.PuzzleDashboardWrapper>\n );\n};\n\nexport default PuzzleDashboard;\n"],"names":["PuzzleDashboard","studentId","onBackCLick","onCardClick","getPuzzles","puzzleHistoryData","isProcessing","isProcessingFailed","useGetPuzzles","puzzleCount","fetchPuzzles","useCallback","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","Styled.PuzzleDashboardWrapper","Styled.BannerWrapper","Styled.BackIconContainer","Styled.BackIconWrapper","IconButton","Back2Icon","Styled.StyledPuzzleIcon","Styled.ContentWrapper","item","id","imageHue","imageUrl","title","userNodeId","rewards","nodeId","PuzzleCard","PuzzleDashboard$1"],"mappings":"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"}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import { useMemo as p, useEffect as m } from "react";
|
2
|
-
import { usePuzzleAttemptJourney as c } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js";
|
3
|
-
import { usePuzzleReviewJourney as f } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js";
|
4
|
-
import { usePuzzleUnassignJourney as l } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js";
|
5
|
-
import { useJourney as P } from "../../../journey/use-journey/use-journey.js";
|
6
|
-
const C = ({ behavior: a }) => {
|
7
|
-
const { maximumAttempts: e, canStartJourney: t } = a, { isJourneyActive: r, clearJourney: o } = P(), { puzzleAttemptCtaRef: i, startJourney: u } = c(), { puzzleReviewCtaRef: y, startJourney: n } = f(), { puzzleUnassignRef: J, startJourney: s } = l(), z = p(() => e === -2, [e]);
|
8
|
-
return m(() => {
|
9
|
-
z && t && !r && (u(), n(), s());
|
10
|
-
}, [
|
11
|
-
t,
|
12
|
-
r,
|
13
|
-
z,
|
14
|
-
u,
|
15
|
-
n,
|
16
|
-
s
|
17
|
-
]), m(() => () => {
|
18
|
-
o();
|
19
|
-
}, [o]), {
|
20
|
-
puzzleAttemptCtaRef: i,
|
21
|
-
puzzleReviewCtaRef: y,
|
22
|
-
puzzleUnassignRef: J
|
23
|
-
};
|
24
|
-
};
|
25
|
-
export {
|
26
|
-
C as useWorksheetJourney
|
27
|
-
};
|
28
|
-
//# sourceMappingURL=use-worksheet-journey.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"use-worksheet-journey.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-worksheet-journey.ts"],"sourcesContent":["import type { IWorksheetBehavior } from '../worksheet-types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { usePuzzleAttemptJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey';\nimport { usePuzzleReviewJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey';\nimport { usePuzzleUnassignJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey';\nimport { useJourney } from '../../../journey/use-journey/use-journey';\n\ninterface IUseWorksheetJourney {\n behavior: IWorksheetBehavior;\n}\n\nconst useWorksheetJourney = ({ behavior }: IUseWorksheetJourney) => {\n const { maximumAttempts, canStartJourney } = behavior;\n\n const { isJourneyActive, clearJourney } = useJourney();\n\n const { puzzleAttemptCtaRef, startJourney: startPuzzleAttemptJourney } =\n usePuzzleAttemptJourney();\n\n const { puzzleReviewCtaRef, startJourney: startPuzzleReviewJourney } = usePuzzleReviewJourney();\n const { puzzleUnassignRef, startJourney: startPuzzleUnassignJourney } =\n usePuzzleUnassignJourney();\n\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n useEffect(() => {\n if (isPuzzleCard && canStartJourney && !isJourneyActive) {\n //* This will be triggered by STUDENT during resume sheet.\n startPuzzleAttemptJourney();\n //* This will be triggered by TEACHER during review sheet\n startPuzzleReviewJourney();\n //* This will be trigger by TEACHER during preview sheet.\n startPuzzleUnassignJourney();\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isPuzzleCard,\n startPuzzleAttemptJourney,\n startPuzzleReviewJourney,\n startPuzzleUnassignJourney,\n ]);\n\n useEffect(() => {\n return () => {\n clearJourney();\n };\n }, [clearJourney]);\n\n return {\n puzzleAttemptCtaRef,\n puzzleReviewCtaRef,\n puzzleUnassignRef,\n };\n};\n\nexport { useWorksheetJourney };\n"],"names":["useWorksheetJourney","behavior","maximumAttempts","canStartJourney","isJourneyActive","clearJourney","useJourney","puzzleAttemptCtaRef","startPuzzleAttemptJourney","usePuzzleAttemptJourney","puzzleReviewCtaRef","startPuzzleReviewJourney","usePuzzleReviewJourney","puzzleUnassignRef","startPuzzleUnassignJourney","usePuzzleUnassignJourney","isPuzzleCard","useMemo","useEffect"],"mappings":";;;;;AAaA,MAAMA,IAAsB,CAAC,EAAE,UAAAC,QAAqC;AAC5D,QAAA,EAAE,iBAAAC,GAAiB,iBAAAC,EAAoB,IAAAF,GAEvC,EAAE,iBAAAG,GAAiB,cAAAC,EAAa,IAAIC,EAAW,GAE/C,EAAE,qBAAAC,GAAqB,cAAcC,MACzCC,EAAwB,GAEpB,EAAE,oBAAAC,GAAoB,cAAcC,MAA6BC,EAAuB,GACxF,EAAE,mBAAAC,GAAmB,cAAcC,MACvCC,EAAyB,GAErBC,IAAeC,EAAQ,MAAMf,MAAoB,IAAI,CAACA,CAAe,CAAC;AAE5E,SAAAgB,EAAU,MAAM;AACV,IAAAF,KAAgBb,KAAmB,CAACC,MAEZI,KAEDG,KAEEG;EAC7B,GACC;AAAA,IACDX;AAAA,IACAC;AAAA,IACAY;AAAA,IACAR;AAAA,IACAG;AAAA,IACAG;AAAA,EAAA,CACD,GAEDI,EAAU,MACD,MAAM;AACE,IAAAb;EAAA,GAEd,CAACA,CAAY,CAAC,GAEV;AAAA,IACL,qBAAAE;AAAA,IACA,oBAAAG;AAAA,IACA,mBAAAG;AAAA,EAAA;AAEJ;"}
|