@cuemath/leap 3.2.18 → 3.2.19-beta-0.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 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +5 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +2 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +6 -4
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +10 -8
- 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 +7 -4
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +85 -97
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -42
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
- 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 +54 -48
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +33 -27
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-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/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/api/puzzle-dashboard.js +10 -0
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js +10 -6
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +79 -30
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/constants/puzzle-container.js +8 -0
- package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
- package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
- package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +110 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
- 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 +28 -13
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +16 -12
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +149 -146
- 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 +242 -207
- 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 +307 -313
- 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 +44 -35
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +87 -4
- package/dist/index.js +326 -316
- package/dist/index.js.map +1 -1
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +1 -0
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
- package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +1 -0
- package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
- package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
- package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
- package/package.json +1 -1
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
2
|
+
import { memo as Q, useState as y, useRef as V, useMemo as S, useCallback as d, useEffect as B } from "react";
|
3
|
+
import F from "../../../assets/line-icons/icons/chevron-left.js";
|
4
|
+
import q from "../../../assets/line-icons/icons/chevron-right.js";
|
5
5
|
import u from "../../ui/layout/flex-view.js";
|
6
6
|
import g from "../../ui/text/text.js";
|
7
7
|
import E from "../homework-card.js";
|
8
|
-
import { ContentWrapper as
|
9
|
-
import { getWaitForReviewSheetsCount as
|
10
|
-
const
|
8
|
+
import { ContentWrapper as Y, ScrollButton as W, ScrollContainer as z, QueueWrapper as J, QueueText as P } from "./hw-card-list-styled.js";
|
9
|
+
import { getWaitForReviewSheetsCount as Z } from "./hw-card-list-utils.js";
|
10
|
+
const U = ({
|
11
11
|
userType: C,
|
12
12
|
studentId: _,
|
13
13
|
isHwProcessing: K,
|
@@ -18,23 +18,24 @@ const Z = ({
|
|
18
18
|
onNodeView: x,
|
19
19
|
onTestReview: H,
|
20
20
|
onNodeReview: L,
|
21
|
-
onNodeUnassign: A
|
21
|
+
onNodeUnassign: A,
|
22
|
+
puzzleHWCardRef: T
|
22
23
|
}) => {
|
23
|
-
const [
|
24
|
+
const [j, a] = y(!1), [D, I] = y(!1), t = V(null), { assigned_homeworks: h = [], queued_homeworks: f = [] } = s || {}, R = S(
|
24
25
|
() => h.length + f.length,
|
25
26
|
[h, f]
|
26
|
-
),
|
27
|
+
), G = S(() => Z(s), [s]), o = d(() => {
|
27
28
|
if (t.current) {
|
28
29
|
const { scrollLeft: e, scrollWidth: i, clientWidth: c } = t.current;
|
29
30
|
e > 1 && a(!0), e < i - c - 1 && I(!0);
|
30
31
|
}
|
31
|
-
}, []),
|
32
|
+
}, []), M = d(() => {
|
32
33
|
t.current && o();
|
33
|
-
}, [o]),
|
34
|
+
}, [o]), N = d(() => {
|
34
35
|
a(!1), I(!1);
|
35
|
-
}, []),
|
36
|
+
}, []), X = d(() => {
|
36
37
|
t.current && (t.current.scrollBy({ left: -200, behavior: "smooth" }), o());
|
37
|
-
}, [o]),
|
38
|
+
}, [o]), O = d(() => {
|
38
39
|
t.current && (t.current.scrollBy({ left: 200, behavior: "smooth" }), o());
|
39
40
|
}, [o]);
|
40
41
|
return B(() => {
|
@@ -51,10 +52,10 @@ const Z = ({
|
|
51
52
|
}, [o]), R === 0 ? /* @__PURE__ */ l(u, { $flexRowGapX: 1, children: [
|
52
53
|
/* @__PURE__ */ r(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: "Homework (0)" }),
|
53
54
|
/* @__PURE__ */ r(g, { $renderAs: "ab2", $color: "BLACK_T_60", children: "No Homework assigned yet" })
|
54
|
-
] }) : /* @__PURE__ */ l(
|
55
|
+
] }) : /* @__PURE__ */ l(Y, { $flexRowGapX: 1, $disablePointerEvents: K, children: [
|
55
56
|
/* @__PURE__ */ l(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
56
57
|
"Homework (",
|
57
|
-
|
58
|
+
G,
|
58
59
|
"/",
|
59
60
|
R,
|
60
61
|
")"
|
@@ -63,8 +64,8 @@ const Z = ({
|
|
63
64
|
u,
|
64
65
|
{
|
65
66
|
$position: "relative",
|
66
|
-
onMouseEnter:
|
67
|
-
onMouseLeave:
|
67
|
+
onMouseEnter: M,
|
68
|
+
onMouseLeave: N,
|
68
69
|
children: [
|
69
70
|
/* @__PURE__ */ r(
|
70
71
|
W,
|
@@ -74,14 +75,14 @@ const Z = ({
|
|
74
75
|
$justifyContent: "center",
|
75
76
|
$alignItems: "center",
|
76
77
|
$height: "100%",
|
77
|
-
onClick:
|
78
|
-
$visible:
|
78
|
+
onClick: X,
|
79
|
+
$visible: j,
|
79
80
|
left: "0px",
|
80
81
|
right: "auto",
|
81
|
-
children: /* @__PURE__ */ r(
|
82
|
+
children: /* @__PURE__ */ r(F, { width: 24, height: 24 })
|
82
83
|
}
|
83
84
|
),
|
84
|
-
/* @__PURE__ */ r(
|
85
|
+
/* @__PURE__ */ r(z, { ref: t, children: /* @__PURE__ */ l(u, { $flexDirection: "row", $flexGapX: 1, children: [
|
85
86
|
h.map((e, i) => {
|
86
87
|
const {
|
87
88
|
node_id: c,
|
@@ -108,7 +109,8 @@ const Z = ({
|
|
108
109
|
shouldOpenOnRight: !0,
|
109
110
|
onNodeView: n ? b : x,
|
110
111
|
onNodeReview: n ? H : L,
|
111
|
-
onNodeUnassign: A
|
112
|
+
onNodeUnassign: A,
|
113
|
+
puzzleHWCardRef: T
|
112
114
|
}
|
113
115
|
)
|
114
116
|
},
|
@@ -130,13 +132,13 @@ const Z = ({
|
|
130
132
|
$flexGapX: 1,
|
131
133
|
children: [
|
132
134
|
i === 0 && /* @__PURE__ */ r(
|
133
|
-
|
135
|
+
J,
|
134
136
|
{
|
135
137
|
$background: "BLACK_4",
|
136
138
|
$justifyContent: "center",
|
137
139
|
$gutter: 4,
|
138
140
|
$gap: 8,
|
139
|
-
children: /* @__PURE__ */ r(
|
141
|
+
children: /* @__PURE__ */ r(P, { $renderAs: "ac3", $color: "WHITE", children: "In Queue" })
|
140
142
|
}
|
141
143
|
),
|
142
144
|
/* @__PURE__ */ r(
|
@@ -171,19 +173,19 @@ const Z = ({
|
|
171
173
|
$background: "BLACK_T_60",
|
172
174
|
$justifyContent: "center",
|
173
175
|
$alignItems: "center",
|
174
|
-
onClick:
|
175
|
-
$visible:
|
176
|
+
onClick: O,
|
177
|
+
$visible: D,
|
176
178
|
left: "auto",
|
177
179
|
right: "0px",
|
178
|
-
children: /* @__PURE__ */ r(
|
180
|
+
children: /* @__PURE__ */ r(q, { width: 24, height: 24 })
|
179
181
|
}
|
180
182
|
)
|
181
183
|
]
|
182
184
|
}
|
183
185
|
)
|
184
186
|
] });
|
185
|
-
},
|
187
|
+
}, de = Q(U);
|
186
188
|
export {
|
187
|
-
|
189
|
+
de as default
|
188
190
|
};
|
189
191
|
//# sourceMappingURL=hw-card-list-view.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hw-card-list-view.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list-view.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { TUserTypes } from '../../ui/types';\nimport type { IHomeworkDetails } from './api/get-homeworks';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport ChevronLeftIcon from '../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport HomeworkCard from '../homework-card';\nimport * as Styled from './hw-card-list-styled';\nimport { getWaitForReviewSheetsCount } from './hw-card-list-utils';\n\ninterface IHwCardListView extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n isHwProcessing: boolean;\n hwDetails?: IHomeworkDetails;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n}\n\nconst HwCardListView: FC<IHwCardListView> = ({\n userType,\n studentId,\n isHwProcessing,\n hwDetails,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n}) => {\n const [isLeftHovered, setIsLeftHovered] = useState(false);\n const [isRightHovered, setIsRightHovered] = useState(false);\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const { assigned_homeworks: assignedHomeworks = [], queued_homeworks: queuedHomeworks = [] } =\n hwDetails || {};\n\n const totalHWSheetsCount = useMemo(\n () => assignedHomeworks.length + queuedHomeworks.length,\n [assignedHomeworks, queuedHomeworks],\n );\n const waitForReviewSheets = useMemo(() => getWaitForReviewSheetsCount(hwDetails), [hwDetails]);\n\n const updatedCanScroll = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n\n if (scrollLeft < scrollWidth - clientWidth - 1) {\n setIsRightHovered(true);\n }\n }\n }, []);\n const handleHoverEnter = useCallback(() => {\n if (!scrollRef.current) return;\n\n updatedCanScroll();\n }, [updatedCanScroll]);\n\n const handleHoverLeave = useCallback(() => {\n setIsLeftHovered(false);\n setIsRightHovered(false);\n }, []);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n useEffect(() => {\n if (hwDetails && scrollRef.current) {\n const { scrollLeft } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n }\n }, [hwDetails]);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n scrollElement.addEventListener('scroll', updatedCanScroll);\n\n return () => {\n scrollElement.removeEventListener('scroll', updatedCanScroll);\n };\n }\n }, [updatedCanScroll]);\n\n if (totalHWSheetsCount === 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework (0)\n </Text>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_60\">\n No Homework assigned yet\n </Text>\n </FlexView>\n );\n }\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1} $disablePointerEvents={isHwProcessing}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({waitForReviewSheets}/{totalHWSheetsCount})\n </Text>\n <FlexView\n $position=\"relative\"\n onMouseEnter={handleHoverEnter}\n onMouseLeave={handleHoverLeave}\n >\n <Styled.ScrollButton\n $position=\"absolute\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={isLeftHovered}\n left=\"0px\"\n right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n {assignedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n <HomeworkCard\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n\n {queuedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n {idx === 0 && (\n <Styled.QueueWrapper\n $background=\"BLACK_4\"\n $justifyContent=\"center\"\n $gutter={4}\n $gap={8}\n >\n <Styled.QueueText $renderAs=\"ac3\" $color=\"WHITE\">\n In Queue\n </Styled.QueueText>\n </Styled.QueueWrapper>\n )}\n <HomeworkCard\n isInQueue\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n <Styled.ScrollButton\n $position=\"absolute\"\n $width=\"60px\"\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={isRightHovered}\n left=\"auto\"\n right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(HwCardListView);\n"],"names":["HwCardListView","userType","studentId","isHwProcessing","hwDetails","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","isLeftHovered","setIsLeftHovered","useState","isRightHovered","setIsRightHovered","scrollRef","useRef","assignedHomeworks","queuedHomeworks","totalHWSheetsCount","useMemo","waitForReviewSheets","getWaitForReviewSheetsCount","updatedCanScroll","useCallback","scrollLeft","scrollWidth","clientWidth","handleHoverEnter","handleHoverLeave","handleScrollLeft","handleScrollRight","useEffect","scrollElement","jsxs","FlexView","jsx","Text","Styled.ContentWrapper","Styled.ScrollButton","ChevronLeftIcon","Styled.ScrollContainer","sheet","idx","nodeId","worksheetId","nodeType","title","subtext","isDynamicSheet","HomeworkCard","Styled.QueueWrapper","Styled.QueueText","ChevronRightIcon","HwCardListView$1","memo"],"mappings":";;;;;;;;;AA4BA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;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BACC,aAAY;AAAA,wBACZ,iBAAgB;AAAA,wBAChB,SAAS;AAAA,wBACT,MAAM;AAAA,wBAEN,UAAA,gBAAAf,EAACgB,GAAA,EAAiB,WAAU,OAAM,QAAO,SAAQ,UAEjD,YAAA;AAAA,sBAAA;AAAA,oBACF;AAAA,oBAEF,gBAAAhB;AAAA,sBAACc;AAAA,sBAAA;AAAA,wBACC,WAAS;AAAA,wBACT,UAAAnD;AAAA,wBACA,QAAQgD;AAAA,wBACR,WAAWC,KAAW;AAAA,wBACtB,UAAUN;AAAA,wBACV,UAAS;AAAA,wBACT,WAAA1C;AAAA,wBACA,eAAeiD,IAAiB9C,IAAcC;AAAA,wBAC9C,mBAAmB;AAAA,wBACnB,YAAY6C,IAAiB5C,IAAgBC;AAAA,wBAC7C,cAAc2C,IAAiB1C,IAAeC;AAAA,wBAC9C,gBAAAC;AAAA,sBAAA;AAAA,oBACF;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBA7BK,GAAGoC,CAAW,IAAID,CAAM,IAAID,CAAG;AAAA,cAAA;AAAA,YA8BtC,CAEH;AAAA,UAAA,EAAA,CACH,EACF,CAAA;AAAA,UACA,gBAAAP;AAAA,YAACG;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,aAAY;AAAA,cACZ,SAASR;AAAA,cACT,UAAUlB;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cAEN,UAAC,gBAAAuB,EAAAiB,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,YAAA;AAAA,UAC3C;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeC,KAAAC,EAAKzD,CAAc;"}
|
1
|
+
{"version":3,"file":"hw-card-list-view.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list-view.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { TUserTypes } from '../../ui/types';\nimport type { IHomeworkDetails } from './api/get-homeworks';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport ChevronLeftIcon from '../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport HomeworkCard from '../homework-card';\nimport * as Styled from './hw-card-list-styled';\nimport { getWaitForReviewSheetsCount } from './hw-card-list-utils';\n\ninterface IHwCardListView extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n isHwProcessing: boolean;\n hwDetails?: IHomeworkDetails;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n puzzleHWCardRef?: React.RefObject<HTMLDivElement>;\n}\n\nconst HwCardListView: FC<IHwCardListView> = ({\n userType,\n studentId,\n isHwProcessing,\n hwDetails,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n puzzleHWCardRef,\n}) => {\n const [isLeftHovered, setIsLeftHovered] = useState(false);\n const [isRightHovered, setIsRightHovered] = useState(false);\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const { assigned_homeworks: assignedHomeworks = [], queued_homeworks: queuedHomeworks = [] } =\n hwDetails || {};\n\n const totalHWSheetsCount = useMemo(\n () => assignedHomeworks.length + queuedHomeworks.length,\n [assignedHomeworks, queuedHomeworks],\n );\n const waitForReviewSheets = useMemo(() => getWaitForReviewSheetsCount(hwDetails), [hwDetails]);\n\n const updatedCanScroll = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n\n if (scrollLeft < scrollWidth - clientWidth - 1) {\n setIsRightHovered(true);\n }\n }\n }, []);\n const handleHoverEnter = useCallback(() => {\n if (!scrollRef.current) return;\n\n updatedCanScroll();\n }, [updatedCanScroll]);\n\n const handleHoverLeave = useCallback(() => {\n setIsLeftHovered(false);\n setIsRightHovered(false);\n }, []);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n useEffect(() => {\n if (hwDetails && scrollRef.current) {\n const { scrollLeft } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n }\n }, [hwDetails]);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n scrollElement.addEventListener('scroll', updatedCanScroll);\n\n return () => {\n scrollElement.removeEventListener('scroll', updatedCanScroll);\n };\n }\n }, [updatedCanScroll]);\n\n if (totalHWSheetsCount === 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework (0)\n </Text>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_60\">\n No Homework assigned yet\n </Text>\n </FlexView>\n );\n }\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1} $disablePointerEvents={isHwProcessing}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({waitForReviewSheets}/{totalHWSheetsCount})\n </Text>\n <FlexView\n $position=\"relative\"\n onMouseEnter={handleHoverEnter}\n onMouseLeave={handleHoverLeave}\n >\n <Styled.ScrollButton\n $position=\"absolute\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={isLeftHovered}\n left=\"0px\"\n right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n {assignedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n <HomeworkCard\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n puzzleHWCardRef={puzzleHWCardRef}\n />\n </FlexView>\n );\n })}\n\n {queuedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n {idx === 0 && (\n <Styled.QueueWrapper\n $background=\"BLACK_4\"\n $justifyContent=\"center\"\n $gutter={4}\n $gap={8}\n >\n <Styled.QueueText $renderAs=\"ac3\" $color=\"WHITE\">\n In Queue\n </Styled.QueueText>\n </Styled.QueueWrapper>\n )}\n <HomeworkCard\n isInQueue\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n <Styled.ScrollButton\n $position=\"absolute\"\n $width=\"60px\"\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={isRightHovered}\n left=\"auto\"\n right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(HwCardListView);\n"],"names":["HwCardListView","userType","studentId","isHwProcessing","hwDetails","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","puzzleHWCardRef","isLeftHovered","setIsLeftHovered","useState","isRightHovered","setIsRightHovered","scrollRef","useRef","assignedHomeworks","queuedHomeworks","totalHWSheetsCount","useMemo","waitForReviewSheets","getWaitForReviewSheetsCount","updatedCanScroll","useCallback","scrollLeft","scrollWidth","clientWidth","handleHoverEnter","handleHoverLeave","handleScrollLeft","handleScrollRight","useEffect","scrollElement","jsxs","FlexView","jsx","Text","Styled.ContentWrapper","Styled.ScrollButton","ChevronLeftIcon","Styled.ScrollContainer","sheet","idx","nodeId","worksheetId","nodeType","title","subtext","isDynamicSheet","HomeworkCard","Styled.QueueWrapper","Styled.QueueText","ChevronRightIcon","HwCardListView$1","memo"],"mappings":";;;;;;;;;AA6BA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,iBAAAC;AACF,MAAM;AACJ,QAAM,C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|
-
|
14
|
-
|
15
|
-
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
2
|
+
import { memo as A, useMemo as W, useEffect as e, useCallback as b } from "react";
|
3
|
+
import { usePuzzleAssignedJourney as j } from "../../journey/hooks/use-puzzles-journey/use-puzzle-assigned.js";
|
4
|
+
import { useJourney as E } from "../../journey/use-journey/use-journey.js";
|
5
|
+
import { getPuzzleCardData as F } from "../utils.js";
|
6
|
+
import { useGetHomeworks as G } from "./api/get-homeworks.js";
|
7
|
+
import J from "./hw-card-list-view.js";
|
8
|
+
const M = ({
|
9
|
+
userType: f,
|
10
|
+
studentId: o,
|
11
|
+
stream: i,
|
12
|
+
onTestStart: g,
|
13
|
+
onNodeAttempt: H,
|
14
|
+
onTestPreview: d,
|
15
|
+
onNodeView: h,
|
16
|
+
onTestReview: k,
|
17
|
+
onNodeReview: P,
|
16
18
|
onNodeUnassign: v,
|
17
|
-
homeworkRef:
|
18
|
-
startHomePageJourney:
|
19
|
-
canStartJourney:
|
19
|
+
homeworkRef: D,
|
20
|
+
startHomePageJourney: t,
|
21
|
+
canStartJourney: n,
|
22
|
+
canStartPuzzleAssignedJourney: p
|
20
23
|
}) => {
|
21
24
|
const {
|
22
|
-
get:
|
23
|
-
data:
|
24
|
-
isProcessingFailed:
|
25
|
-
isProcessing:
|
25
|
+
get: u,
|
26
|
+
data: m,
|
27
|
+
isProcessingFailed: L,
|
28
|
+
isProcessing: c,
|
26
29
|
isProcessed: w,
|
27
|
-
isStale:
|
28
|
-
} =
|
30
|
+
isStale: z
|
31
|
+
} = G(o), { isJourneyActive: r } = E(), { puzzleHWCardRef: x, startJourney: l } = j(), a = W(() => F(m), [m]);
|
29
32
|
e(() => {
|
30
|
-
w &&
|
33
|
+
w && t && !r && n && t({ studentId: o, stream: i, userType: f });
|
31
34
|
}, [
|
32
|
-
m,
|
33
35
|
n,
|
36
|
+
r,
|
34
37
|
w,
|
35
|
-
|
36
|
-
o,
|
38
|
+
t,
|
37
39
|
i,
|
38
|
-
|
40
|
+
o,
|
41
|
+
f
|
39
42
|
]);
|
40
|
-
const s =
|
41
|
-
|
42
|
-
}, [
|
43
|
+
const s = b(() => {
|
44
|
+
u(o, void 0, { stream: i });
|
45
|
+
}, [u, i, o]);
|
43
46
|
return e(() => {
|
44
|
-
!
|
45
|
-
}, [s,
|
47
|
+
!c && z && s();
|
48
|
+
}, [s, c, z]), e(() => {
|
46
49
|
s();
|
47
|
-
}, [s]),
|
48
|
-
|
50
|
+
}, [s]), e(() => {
|
51
|
+
p && !r && l && a && l(a);
|
52
|
+
}, [p, a, r, l]), L ? null : /* @__PURE__ */ C("div", { ref: D, children: /* @__PURE__ */ C(
|
53
|
+
J,
|
49
54
|
{
|
50
|
-
isHwProcessing:
|
51
|
-
hwDetails:
|
52
|
-
onTestStart:
|
53
|
-
onNodeAttempt:
|
54
|
-
onTestPreview:
|
55
|
-
onNodeView:
|
56
|
-
onTestReview:
|
57
|
-
onNodeReview:
|
55
|
+
isHwProcessing: c,
|
56
|
+
hwDetails: m,
|
57
|
+
onTestStart: g,
|
58
|
+
onNodeAttempt: H,
|
59
|
+
onTestPreview: d,
|
60
|
+
onNodeView: h,
|
61
|
+
onTestReview: k,
|
62
|
+
onNodeReview: P,
|
58
63
|
onNodeUnassign: v,
|
59
|
-
userType:
|
60
|
-
studentId:
|
64
|
+
userType: f,
|
65
|
+
studentId: o,
|
66
|
+
puzzleHWCardRef: x
|
61
67
|
}
|
62
68
|
) });
|
63
|
-
},
|
69
|
+
}, Q = A(M);
|
64
70
|
export {
|
65
|
-
|
71
|
+
Q as default
|
66
72
|
};
|
67
73
|
//# sourceMappingURL=hw-card-list.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect } from 'react';\n\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport HwCardListView from './hw-card-list-view';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({ studentId, stream, userType }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n startHomePageJourney,\n canStartJourney,\n}) => {\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isProcessed,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n useEffect(() => {\n if (isProcessed && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ studentId, stream, userType });\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isProcessed,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <div ref={homeworkRef}>\n <HwCardListView\n isHwProcessing={isProcessing}\n hwDetails={hwDetails}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onTestPreview={onTestPreview}\n onNodeView={onNodeView}\n onTestReview={onTestReview}\n onNodeReview={onNodeReview}\n onNodeUnassign={onNodeUnassign}\n userType={userType}\n studentId={studentId}\n />\n </div>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","startHomePageJourney","canStartJourney","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isProcessed","isStale","useGetHomeworks","isJourneyActive","useJourney","useEffect","fetchHomeworks","useCallback","jsx","HwCardListView","hwCardList","memo"],"mappings":"
|
1
|
+
{"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { usePuzzleAssignedJourney } from '../../journey/hooks/use-puzzles-journey/use-puzzle-assigned';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport { getPuzzleCardData } from '../utils';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport HwCardListView from './hw-card-list-view';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({ studentId, stream, userType }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n canStartPuzzleAssignedJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n startHomePageJourney,\n canStartJourney,\n canStartPuzzleAssignedJourney,\n}) => {\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isProcessed,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n const { puzzleHWCardRef, startJourney: startPuzzleAssignedJourney } = usePuzzleAssignedJourney();\n\n const puzzleCardData = useMemo(() => getPuzzleCardData(hwDetails), [hwDetails]);\n\n useEffect(() => {\n if (isProcessed && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ studentId, stream, userType });\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isProcessed,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n useEffect(() => {\n if (\n canStartPuzzleAssignedJourney &&\n !isJourneyActive &&\n startPuzzleAssignedJourney &&\n puzzleCardData\n ) {\n startPuzzleAssignedJourney(puzzleCardData);\n }\n }, [canStartPuzzleAssignedJourney, puzzleCardData, isJourneyActive, startPuzzleAssignedJourney]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <div ref={homeworkRef}>\n <HwCardListView\n isHwProcessing={isProcessing}\n hwDetails={hwDetails}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onTestPreview={onTestPreview}\n onNodeView={onNodeView}\n onTestReview={onTestReview}\n onNodeReview={onNodeReview}\n onNodeUnassign={onNodeUnassign}\n userType={userType}\n studentId={studentId}\n puzzleHWCardRef={puzzleHWCardRef}\n />\n </div>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","startHomePageJourney","canStartJourney","canStartPuzzleAssignedJourney","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isProcessed","isStale","useGetHomeworks","isJourneyActive","useJourney","puzzleHWCardRef","startPuzzleAssignedJourney","usePuzzleAssignedJourney","puzzleCardData","useMemo","getPuzzleCardData","useEffect","fetchHomeworks","useCallback","jsx","HwCardListView","hwCardList","memo"],"mappings":";;;;;;;AA4BA,MAAMA,IAAwC,CAAC;AAAA,EAC7C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,+BAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,oBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,IACEC,EAAgBnB,CAAS,GACvB,EAAE,iBAAAoB,MAAoBC,KAEtB,EAAE,iBAAAC,GAAiB,cAAcC,MAA+BC,EAAyB,GAEzFC,IAAiBC,EAAQ,MAAMC,EAAkBb,CAAS,GAAG,CAACA,CAAS,CAAC;AAE9E,EAAAc,EAAU,MAAM;AACd,IAAIX,KAAeP,KAAwB,CAACU,KAAmBT,KAC7DD,EAAqB,EAAE,WAAAV,GAAW,QAAAC,GAAQ,UAAAF,EAAU,CAAA;AAAA,EACtD,GACC;AAAA,IACDY;AAAA,IACAS;AAAA,IACAH;AAAA,IACAP;AAAA,IACAT;AAAA,IACAD;AAAA,IACAD;AAAA,EAAA,CACD;AAEK,QAAA8B,IAAiBC,EAAY,MAAM;AACvC,IAAAjB,EAAab,GAAW,QAAW,EAAE,QAAAC,EAAQ,CAAA;AAAA,EAC5C,GAAA,CAACY,GAAcZ,GAAQD,CAAS,CAAC;AAuBpC,SArBA4B,EAAU,MAAM;AACV,IAAA,CAACZ,KAAgBE,KACJW;EAEhB,GAAA,CAACA,GAAgBb,GAAcE,CAAO,CAAC,GAE1CU,EAAU,MAAM;AACC,IAAAC;EAAA,GACd,CAACA,CAAc,CAAC,GAEnBD,EAAU,MAAM;AACd,IACEhB,KACA,CAACQ,KACDG,KACAE,KAEAF,EAA2BE,CAAc;AAAA,KAE1C,CAACb,GAA+Ba,GAAgBL,GAAiBG,CAA0B,CAAC,GAE3FR,IACK,OAIP,gBAAAgB,EAAC,OAAI,EAAA,KAAKtB,GACR,UAAA,gBAAAsB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBhB;AAAA,MAChB,WAAAF;AAAA,MACA,aAAAZ;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAT;AAAA,MACA,WAAAC;AAAA,MACA,iBAAAsB;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEeW,IAAAC,EAAKpC,CAAU;"}
|
@@ -1,48 +1,54 @@
|
|
1
1
|
import { TESTS_CREATION_ANALYTICS_EVENTS as l } from "../milestone/milestone-tests/tests-creation/tests-creation-analytics-events.js";
|
2
|
-
import { NODE_TYPE as
|
2
|
+
import { NODE_TYPE as n } from "../sheets/constants/sheet.js";
|
3
3
|
import { HOMEWORK_ANALYTICS_EVENTS as c } from "./homework-analytics-events.js";
|
4
4
|
const y = ({
|
5
|
-
canResume:
|
6
|
-
canStart:
|
7
|
-
homeworkId:
|
8
|
-
isHomeWork:
|
9
|
-
isStudent:
|
10
|
-
milestoneId:
|
11
|
-
nodeType:
|
12
|
-
studentId:
|
13
|
-
userNodeId:
|
5
|
+
canResume: t,
|
6
|
+
canStart: e,
|
7
|
+
homeworkId: i,
|
8
|
+
isHomeWork: o,
|
9
|
+
isStudent: _,
|
10
|
+
milestoneId: s,
|
11
|
+
nodeType: r,
|
12
|
+
studentId: a,
|
13
|
+
userNodeId: d
|
14
14
|
}) => {
|
15
|
-
if (
|
16
|
-
if (
|
17
|
-
return
|
15
|
+
if (_) {
|
16
|
+
if (o)
|
17
|
+
return e || t ? {
|
18
18
|
analyticsLabel: c.HOMEWORK_ATTEMPTED,
|
19
|
-
analyticsProps: { student_id:
|
19
|
+
analyticsProps: { student_id: a, node_type: r, homework_id: i }
|
20
20
|
} : {
|
21
21
|
analyticsLabel: "homework-student-menu",
|
22
|
-
analyticsProps: { student_id:
|
22
|
+
analyticsProps: { student_id: a, node_type: r, homework_id: i }
|
23
23
|
};
|
24
|
-
if (
|
24
|
+
if (e || t)
|
25
25
|
return {
|
26
|
-
analyticsLabel:
|
26
|
+
analyticsLabel: r === n.DYNAMIC ? l.CUSTOM_TEST_ATTEMPTED : "node-attempted",
|
27
27
|
analyticsProps: {
|
28
|
-
student_id:
|
29
|
-
node_type:
|
30
|
-
user_node_id:
|
31
|
-
milestone_id:
|
32
|
-
can_start:
|
33
|
-
can_resume:
|
28
|
+
student_id: a,
|
29
|
+
node_type: r,
|
30
|
+
user_node_id: d,
|
31
|
+
milestone_id: s,
|
32
|
+
can_start: e,
|
33
|
+
can_resume: t
|
34
34
|
}
|
35
35
|
};
|
36
36
|
}
|
37
|
-
return
|
37
|
+
return o ? {
|
38
38
|
analyticsLabel: "homework-card-teacher",
|
39
|
-
analyticsProps: { student_id:
|
39
|
+
analyticsProps: { student_id: a, node_type: r }
|
40
40
|
} : {
|
41
41
|
analyticsLabel: "goals-card-teacher",
|
42
|
-
analyticsProps: { student_id:
|
42
|
+
analyticsProps: { student_id: a, node_type: r }
|
43
43
|
};
|
44
|
+
}, T = (t) => {
|
45
|
+
if (!t)
|
46
|
+
return;
|
47
|
+
const { assigned_homeworks: e } = t;
|
48
|
+
return e.find((i) => i.node_type === n.PUZZLE_CARD);
|
44
49
|
};
|
45
50
|
export {
|
46
|
-
y as getCardAnalyticProps
|
51
|
+
y as getCardAnalyticProps,
|
52
|
+
T as getPuzzleCardData
|
47
53
|
};
|
48
54
|
//# sourceMappingURL=utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\n\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../milestone/milestone-tests/tests-creation/tests-creation-analytics-events';\nimport { NODE_TYPE } from '../sheets/constants/sheet';\nimport { HOMEWORK_ANALYTICS_EVENTS } from './homework-analytics-events';\n\ninterface IGetCardAnalyticProps {\n canResume: boolean;\n canStart: boolean;\n homeworkId?: string;\n isHomeWork: boolean;\n isStudent: boolean;\n milestoneId?: string;\n nodeType: TNodeTypes;\n studentId: string;\n userNodeId: string | null;\n}\n\nconst getCardAnalyticProps = ({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n}: IGetCardAnalyticProps) => {\n if (isStudent) {\n if (isHomeWork) {\n if (canStart || canResume) {\n return {\n analyticsLabel: HOMEWORK_ANALYTICS_EVENTS.HOMEWORK_ATTEMPTED,\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n return {\n analyticsLabel: 'homework-student-menu',\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n if (canStart || canResume) {\n return {\n analyticsLabel:\n nodeType === NODE_TYPE.DYNAMIC\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : 'node-attempted',\n analyticsProps: {\n student_id: studentId,\n node_type: nodeType,\n user_node_id: userNodeId,\n milestone_id: milestoneId,\n can_start: canStart,\n can_resume: canResume,\n },\n };\n }\n }\n\n if (isHomeWork) {\n return {\n analyticsLabel: 'homework-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n }\n\n return {\n analyticsLabel: 'goals-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n};\n\nexport { getCardAnalyticProps };\n"],"names":["getCardAnalyticProps","canResume","canStart","homeworkId","isHomeWork","isStudent","milestoneId","nodeType","studentId","userNodeId","HOMEWORK_ANALYTICS_EVENTS","NODE_TYPE","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomeworkDetails } from './hw-card-list/api/get-homeworks';\n\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../milestone/milestone-tests/tests-creation/tests-creation-analytics-events';\nimport { NODE_TYPE } from '../sheets/constants/sheet';\nimport { HOMEWORK_ANALYTICS_EVENTS } from './homework-analytics-events';\n\ninterface IGetCardAnalyticProps {\n canResume: boolean;\n canStart: boolean;\n homeworkId?: string;\n isHomeWork: boolean;\n isStudent: boolean;\n milestoneId?: string;\n nodeType: TNodeTypes;\n studentId: string;\n userNodeId: string | null;\n}\n\nconst getCardAnalyticProps = ({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n}: IGetCardAnalyticProps) => {\n if (isStudent) {\n if (isHomeWork) {\n if (canStart || canResume) {\n return {\n analyticsLabel: HOMEWORK_ANALYTICS_EVENTS.HOMEWORK_ATTEMPTED,\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n return {\n analyticsLabel: 'homework-student-menu',\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n if (canStart || canResume) {\n return {\n analyticsLabel:\n nodeType === NODE_TYPE.DYNAMIC\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : 'node-attempted',\n analyticsProps: {\n student_id: studentId,\n node_type: nodeType,\n user_node_id: userNodeId,\n milestone_id: milestoneId,\n can_start: canStart,\n can_resume: canResume,\n },\n };\n }\n }\n\n if (isHomeWork) {\n return {\n analyticsLabel: 'homework-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n }\n\n return {\n analyticsLabel: 'goals-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n};\n\nconst getPuzzleCardData = (hwDetails?: IHomeworkDetails) => {\n if (!hwDetails) {\n return undefined;\n }\n\n const { assigned_homeworks: assignedHomework } = hwDetails;\n\n return assignedHomework.find(homework => homework.node_type === NODE_TYPE.PUZZLE_CARD);\n};\n\nexport { getCardAnalyticProps, getPuzzleCardData };\n"],"names":["getCardAnalyticProps","canResume","canStart","homeworkId","isHomeWork","isStudent","milestoneId","nodeType","studentId","userNodeId","HOMEWORK_ANALYTICS_EVENTS","NODE_TYPE","TESTS_CREATION_ANALYTICS_EVENTS","getPuzzleCardData","hwDetails","assignedHomework","homework"],"mappings":";;;AAmBA,MAAMA,IAAuB,CAAC;AAAA,EAC5B,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAA6B;AAC3B,MAAIJ,GAAW;AACb,QAAID;AACF,aAAIF,KAAYD,IACP;AAAA,QACL,gBAAgBS,EAA0B;AAAA,QAC1C,gBAAgB,EAAE,YAAYF,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA,IAInF;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB,EAAE,YAAYK,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA;AAI1F,QAAID,KAAYD;AACP,aAAA;AAAA,QACL,gBACEM,MAAaI,EAAU,UACnBC,EAAgC,wBAChC;AAAA,QACN,gBAAgB;AAAA,UACd,YAAYJ;AAAA,UACZ,WAAWD;AAAA,UACX,cAAcE;AAAA,UACd,cAAcH;AAAA,UACd,WAAWJ;AAAA,UACX,YAAYD;AAAA,QACd;AAAA,MAAA;AAAA,EAGN;AAEA,SAAIG,IACK;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYI,GAAW,WAAWD,EAAS;AAAA,EAAA,IAI1D;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYC,GAAW,WAAWD,EAAS;AAAA,EAAA;AAEjE,GAEMM,IAAoB,CAACC,MAAiC;AAC1D,MAAI,CAACA;AACI;AAGH,QAAA,EAAE,oBAAoBC,EAAqB,IAAAD;AAEjD,SAAOC,EAAiB,KAAK,CAAAC,MAAYA,EAAS,cAAcL,EAAU,WAAW;AACvF;"}
|
@@ -1,22 +1,28 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
const
|
7
|
-
|
1
|
+
import { jsxs as l, jsx as o, Fragment as s } from "react/jsx-runtime";
|
2
|
+
import { memo as n } from "react";
|
3
|
+
import d from "../../../ui/buttons/button/button.js";
|
4
|
+
import p from "../../../ui/layout/flex-view.js";
|
5
|
+
import a from "../../../ui/text/text.js";
|
6
|
+
const c = ({
|
7
|
+
text: e,
|
8
|
+
element: r,
|
9
|
+
buttonLabel: t,
|
10
|
+
onButtonClick: m,
|
11
|
+
ctaWidth: i
|
12
|
+
}) => /* @__PURE__ */ l(p, { $flexRowGapX: 0.75, children: [
|
13
|
+
r ? /* @__PURE__ */ o(s, { children: r }) : /* @__PURE__ */ o(a, { $renderAs: "ab2-bold", children: e }),
|
8
14
|
/* @__PURE__ */ o(
|
9
|
-
|
15
|
+
d,
|
10
16
|
{
|
11
17
|
label: t,
|
12
18
|
size: "xsmall",
|
13
|
-
|
19
|
+
width: i || 96,
|
14
20
|
renderAs: "secondary",
|
15
21
|
onClick: m
|
16
22
|
}
|
17
23
|
)
|
18
|
-
] }),
|
24
|
+
] }), T = n(c);
|
19
25
|
export {
|
20
|
-
|
26
|
+
T as default
|
21
27
|
};
|
22
28
|
//# sourceMappingURL=tooltip-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tooltip-item.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/tooltip-item.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface ITooltipItemProps {\n text?: string;\n element?: JSX.Element;\n buttonLabel: string;\n onButtonClick: () => void;\n}\n\nconst TooltipItem = ({
|
1
|
+
{"version":3,"file":"tooltip-item.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/tooltip-item.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface ITooltipItemProps {\n text?: string;\n element?: JSX.Element;\n buttonLabel: string;\n onButtonClick: () => void;\n ctaWidth?: string;\n}\n\nconst TooltipItem = ({\n text,\n element,\n buttonLabel,\n onButtonClick,\n ctaWidth,\n}: ITooltipItemProps) => (\n <FlexView $flexRowGapX={0.75}>\n {element ? <>{element}</> : <Text $renderAs=\"ab2-bold\">{text}</Text>}\n <Button\n label={buttonLabel}\n size=\"xsmall\"\n width={ctaWidth || 96}\n renderAs=\"secondary\"\n onClick={onButtonClick}\n />\n </FlexView>\n);\n\nexport default memo(TooltipItem);\n"],"names":["TooltipItem","text","element","buttonLabel","onButtonClick","ctaWidth","jsxs","FlexView","Text","jsx","Button","TooltipItem$1","memo"],"mappings":";;;;;AAgBA,MAAMA,IAAc,CAAC;AAAA,EACnB,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AACF,MACE,gBAAAC,EAACC,GAAS,EAAA,cAAc,MACrB,UAAA;AAAA,EAAAL,2BAAa,UAAQA,EAAA,CAAA,sBAAOM,GAAK,EAAA,WAAU,YAAY,UAAKP,EAAA,CAAA;AAAA,EAC7D,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOP;AAAA,MACP,MAAK;AAAA,MACL,OAAOE,KAAY;AAAA,MACnB,UAAS;AAAA,MACT,SAASD;AAAA,IAAA;AAAA,EACX;AAAA,EACF,CAAA,GAGaO,IAAAC,EAAKZ,CAAW;"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
2
|
+
import { useRef as r, useCallback as n, useMemo as h } from "react";
|
3
|
+
import C from "../../../homework/homework-card-view.js";
|
4
|
+
import T from "../../../ui/layout/flex-view.js";
|
5
|
+
import { JOURNEY_ID_STUDENT as w } from "../../journey-id/journey-id-student.js";
|
6
|
+
import { IndicatorType as E } from "../../use-journey/constants.js";
|
7
|
+
import { useJourney as b } from "../../use-journey/use-journey.js";
|
8
|
+
import g from "../use-home-page-journey/tooltip-item.js";
|
9
|
+
const z = () => {
|
10
|
+
const e = w.PUZZLE_ASSIGNED_JOURNEY, d = r(null), o = r(null), p = r([]), { setJourney: i, endJourney: s, nextCoachmark: l } = b(), a = n(() => {
|
11
|
+
l(e, !1, 0, !1);
|
12
|
+
}, [e, l]), u = n(() => {
|
13
|
+
document.body.style.overflow = "unset", s(e);
|
14
|
+
}, [s, e]), m = n(
|
15
|
+
(f) => {
|
16
|
+
if (!(o != null && o.current))
|
17
|
+
return;
|
18
|
+
const y = [
|
19
|
+
{
|
20
|
+
originalElementToHighlightRef: o,
|
21
|
+
elementToHighlight: /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(
|
22
|
+
C,
|
23
|
+
{
|
24
|
+
header: "",
|
25
|
+
subHeader: "",
|
26
|
+
userType: "STUDENT",
|
27
|
+
nodeData: f,
|
28
|
+
studentContainerRef: d
|
29
|
+
}
|
30
|
+
) }),
|
31
|
+
type: E.TOOLTIP,
|
32
|
+
indicator: {
|
33
|
+
renderAs: "primary",
|
34
|
+
tooltipXCoOrdinates: 66,
|
35
|
+
arrowSize: 12,
|
36
|
+
arrowXCoOrdinates: -100,
|
37
|
+
position: "bottom",
|
38
|
+
backgroundColor: "GREEN_4",
|
39
|
+
borderColor: "BLACK",
|
40
|
+
arrowColor: "BLACK",
|
41
|
+
tooltipItem: /* @__PURE__ */ t(
|
42
|
+
g,
|
43
|
+
{
|
44
|
+
text: "New Puzzle assigned! Click here to view.",
|
45
|
+
buttonLabel: "Got it",
|
46
|
+
onButtonClick: u
|
47
|
+
}
|
48
|
+
)
|
49
|
+
},
|
50
|
+
isActive: !1
|
51
|
+
}
|
52
|
+
];
|
53
|
+
i(e, y);
|
54
|
+
const c = setTimeout(() => {
|
55
|
+
clearTimeout(c), document.body.style.overflow = "hidden", a();
|
56
|
+
}, 500);
|
57
|
+
p.current.push(c);
|
58
|
+
},
|
59
|
+
[u, a, e, i]
|
60
|
+
);
|
61
|
+
return h(
|
62
|
+
() => ({
|
63
|
+
puzzleHWCardRef: o,
|
64
|
+
startJourney: m
|
65
|
+
}),
|
66
|
+
[m]
|
67
|
+
);
|
68
|
+
};
|
69
|
+
export {
|
70
|
+
z as usePuzzleAssignedJourney
|
71
|
+
};
|
72
|
+
//# sourceMappingURL=use-puzzle-assigned.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-puzzle-assigned.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport HomeworkCardView from '../../../homework/homework-card-view';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { JOURNEY_ID_STUDENT } from '../../journey-id/journey-id-student';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nconst usePuzzleAssignedJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.PUZZLE_ASSIGNED_JOURNEY;\n\n const studentContainerRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const puzzleHWCardRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, endJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachMark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, false);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n (nodeData: INodeDataProps) => {\n if (!puzzleHWCardRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleHWCardRef,\n elementToHighlight: (\n <FlexView>\n <HomeworkCardView\n header=\"\"\n subHeader=\"\"\n userType=\"STUDENT\"\n nodeData={nodeData}\n studentContainerRef={studentContainerRef}\n />\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: 66,\n arrowSize: 12,\n arrowXCoOrdinates: -100,\n position: 'bottom',\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text=\"New Puzzle assigned! Click here to view.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, puzzleAttemptSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachMark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [handleEndJourney, handleNextCoachMark, journeyId, setJourney],\n );\n\n const data = useMemo(\n () => ({\n puzzleHWCardRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { usePuzzleAssignedJourney };\n"],"names":["usePuzzleAssignedJourney","journeyId","JOURNEY_ID_STUDENT","studentContainerRef","useRef","puzzleHWCardRef","timerRefs","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","startJourney","nodeData","puzzleAttemptSteps","FlexView","jsx","HomeworkCardView","IndicatorType","TooltipItem","delayBeforeStart","useMemo"],"mappings":";;;;;;;;AAaA,MAAMA,IAA2B,MAAM;AACrC,QAAMC,IAAYC,EAAmB,yBAE/BC,IAAsBC,EAAuB,IAAI,GACjDC,IAAkBD,EAAuB,IAAI,GAC7CE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAG,GAAY,YAAAC,GAAY,eAAAC,MAAkBC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAH,EAAAR,GAAW,IAAO,GAAG,EAAK;AAAA,EAAA,GACvC,CAACA,GAAWQ,CAAa,CAAC,GAEvBI,IAAmBD,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAC/BJ,EAAWP,CAAS;AAAA,EAAA,GACnB,CAACO,GAAYP,CAAS,CAAC,GAEpBa,IAAeF;AAAA,IACnB,CAACG,MAA6B;AACxB,UAAA,EAACV,KAAA,QAAAA,EAAiB;AACpB;AAGF,YAAMW,IAAwC;AAAA,QAC5C;AAAA,UACE,+BAA+BX;AAAA,UAC/B,sCACGY,GACC,EAAA,UAAA,gBAAAC;AAAA,YAACC;AA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