@cuemath/leap 3.1.0 → 3.1.1-beta-0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { createGetAPI as r } from "@cuemath/rest-api";
2
- import { BASE_URL_V3 as t } from "../../../../constants/api.js";
2
+ import { BASE_URL_V3_1 as t } from "../../../../constants/api.js";
3
3
  const { useGet: i, invalidate: u } = r({
4
4
  getURL: (e, s, { stream: o }) => `${t}/users/${e}/course-streams/${o}/homework`
5
5
  });
@@ -1 +1 @@
1
- {"version":3,"file":"get-homeworks.js","sources":["../../../../../src/features/homework/hw-card-list/api/get-homeworks.ts"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\n\nconst { useGet: useGetHomeworks, invalidate: invalidateHomeworks } = createGetAPI<\n INodeDataProps[],\n void,\n { stream: string }\n>({\n getURL: (studentId: string, _, { stream }) =>\n `${BASE_URL_V3}/users/${studentId}/course-streams/${stream}/homework`,\n});\n\nexport { useGetHomeworks, invalidateHomeworks };\n"],"names":["useGetHomeworks","invalidateHomeworks","createGetAPI","studentId","_","stream","BASE_URL_V3"],"mappings":";;AAMA,MAAM,EAAE,QAAQA,GAAiB,YAAYC,EAAA,IAAwBC,EAInE;AAAA,EACA,QAAQ,CAACC,GAAmBC,GAAG,EAAE,QAAAC,EAAA,MAC/B,GAAGC,CAAW,UAAUH,CAAS,mBAAmBE,CAAM;AAC9D,CAAC;"}
1
+ {"version":3,"file":"get-homeworks.js","sources":["../../../../../src/features/homework/hw-card-list/api/get-homeworks.ts"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../constants/api';\n\nexport interface IHomeworkDetails {\n assigned_homeworks: INodeDataProps[];\n queued_homeworks: INodeDataProps[];\n}\n\nconst { useGet: useGetHomeworks, invalidate: invalidateHomeworks } = createGetAPI<\n IHomeworkDetails,\n void,\n { stream: string }\n>({\n getURL: (studentId: string, _, { stream }) =>\n `${BASE_URL_V3_1}/users/${studentId}/course-streams/${stream}/homework`,\n});\n\nexport { useGetHomeworks, invalidateHomeworks };\n"],"names":["useGetHomeworks","invalidateHomeworks","createGetAPI","studentId","_","stream","BASE_URL_V3_1"],"mappings":";;AAWA,MAAM,EAAE,QAAQA,GAAiB,YAAYC,EAAA,IAAwBC,EAInE;AAAA,EACA,QAAQ,CAACC,GAAmBC,GAAG,EAAE,QAAAC,EAAA,MAC/B,GAAGC,CAAa,UAAUH,CAAS,mBAAmBE,CAAM;AAChE,CAAC;"}
@@ -0,0 +1,8 @@
1
+ const r = (t) => {
2
+ const { assigned_homeworks: o = [], queued_homeworks: s = [] } = t || {};
3
+ return o.filter((e) => e.state === "WAIT_FOR_REVIEW").length + s.filter((e) => e.state === "WAIT_FOR_REVIEW").length;
4
+ };
5
+ export {
6
+ r as getWaitForReviewSheetsCount
7
+ };
8
+ //# sourceMappingURL=hw-card-list-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hw-card-list-utils.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list-utils.ts"],"sourcesContent":["import type { IHomeworkDetails } from './api/get-homeworks';\n\nconst getWaitForReviewSheetsCount = (hwDetails: IHomeworkDetails | undefined): number => {\n const { assigned_homeworks: assignedHomeworks = [], queued_homeworks: queuedHomeworks = [] } =\n hwDetails || {};\n\n return (\n assignedHomeworks.filter(hw => hw.state === 'WAIT_FOR_REVIEW').length +\n queuedHomeworks.filter(hw => hw.state === 'WAIT_FOR_REVIEW').length\n );\n};\n\nexport { getWaitForReviewSheetsCount };\n"],"names":["getWaitForReviewSheetsCount","hwDetails","assignedHomeworks","queuedHomeworks","hw"],"mappings":"AAEM,MAAAA,IAA8B,CAACC,MAAoD;AACjF,QAAA,EAAE,oBAAoBC,IAAoB,IAAI,kBAAkBC,IAAkB,CAAC,EAAA,IACvFF,KAAa;AAEf,SACEC,EAAkB,OAAO,CAAME,MAAAA,EAAG,UAAU,iBAAiB,EAAE,SAC/DD,EAAgB,OAAO,CAAAC,MAAMA,EAAG,UAAU,iBAAiB,EAAE;AAEjE;"}
@@ -1,137 +1,169 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
- import { memo as V, useState as p, useRef as G, useMemo as M, useCallback as l, useEffect as a } from "react";
3
- import Q from "../../../assets/line-icons/icons/chevron-left.js";
4
- import X from "../../../assets/line-icons/icons/chevron-right.js";
5
- import d from "../../ui/layout/flex-view.js";
6
- import $ from "../../ui/text/text.js";
7
- import F from "../homework-card.js";
8
- import { ContentWrapper as O, ScrollButton as g, ScrollContainer as P, QueueWrapper as Y, QueueText as q } from "./hw-card-list-styled.js";
9
- const z = ({
10
- userType: h,
11
- studentId: v,
12
- isHwProcessing: C,
13
- hwDetails: e,
14
- onTestStart: L,
15
- onNodeAttempt: _,
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import { memo as O, useState as y, useRef as Q, useMemo as S, useCallback as d, useEffect as B } from "react";
3
+ import V from "../../../assets/line-icons/icons/chevron-left.js";
4
+ import F from "../../../assets/line-icons/icons/chevron-right.js";
5
+ import u from "../../ui/layout/flex-view.js";
6
+ import g from "../../ui/text/text.js";
7
+ import E from "../homework-card.js";
8
+ import { ContentWrapper as q, ScrollButton as W, ScrollContainer as Y, QueueWrapper as z, QueueText as J } from "./hw-card-list-styled.js";
9
+ import { getWaitForReviewSheetsCount as P } from "./hw-card-list-utils.js";
10
+ const Z = ({
11
+ userType: C,
12
+ studentId: _,
13
+ isHwProcessing: K,
14
+ hwDetails: s,
15
+ onTestStart: k,
16
+ onNodeAttempt: v,
16
17
  onTestPreview: b,
17
- onNodeView: k,
18
- onTestReview: x,
19
- onNodeReview: A,
20
- onNodeUnassign: H
18
+ onNodeView: x,
19
+ onTestReview: H,
20
+ onNodeReview: L,
21
+ onNodeUnassign: A
21
22
  }) => {
22
- const [I, u] = p(!1), [R, m] = p(!1), o = G(null), E = M(
23
- () => ((e == null ? void 0 : e.filter((r) => r.state === "WAIT_FOR_REVIEW")) || []).length,
24
- [e]
25
- ), t = l(() => {
26
- if (o.current) {
27
- const { scrollLeft: r, scrollWidth: i, clientWidth: s } = o.current;
28
- r > 1 && u(!0), r < i - s - 1 && m(!0);
23
+ const [T, a] = y(!1), [j, I] = y(!1), t = Q(null), { assigned_homeworks: h = [], queued_homeworks: f = [] } = s || {}, R = S(
24
+ () => h.length + f.length,
25
+ [h, f]
26
+ ), D = S(() => P(s), [s]), o = d(() => {
27
+ if (t.current) {
28
+ const { scrollLeft: e, scrollWidth: i, clientWidth: c } = t.current;
29
+ e > 1 && a(!0), e < i - c - 1 && I(!0);
29
30
  }
30
- }, []), T = l(() => {
31
- o.current && t();
32
- }, [t]), y = l(() => {
33
- u(!1), m(!1);
34
- }, []), B = l(() => {
35
- o.current && (o.current.scrollBy({ left: -200, behavior: "smooth" }), t());
36
- }, [t]), S = l(() => {
37
- o.current && (o.current.scrollBy({ left: 200, behavior: "smooth" }), t());
38
- }, [t]);
39
- return a(() => {
40
- if (e && (e == null ? void 0 : e.length) > 3 && o.current) {
41
- const { scrollLeft: r } = o.current;
42
- r > 1 && u(!0);
31
+ }, []), G = d(() => {
32
+ t.current && o();
33
+ }, [o]), M = d(() => {
34
+ a(!1), I(!1);
35
+ }, []), N = d(() => {
36
+ t.current && (t.current.scrollBy({ left: -200, behavior: "smooth" }), o());
37
+ }, [o]), X = d(() => {
38
+ t.current && (t.current.scrollBy({ left: 200, behavior: "smooth" }), o());
39
+ }, [o]);
40
+ return B(() => {
41
+ if (s && t.current) {
42
+ const { scrollLeft: e } = t.current;
43
+ e > 1 && a(!0);
43
44
  }
44
- }, [e]), a(() => {
45
- const r = o.current;
46
- if (r)
47
- return r.addEventListener("scroll", t), () => {
48
- r.removeEventListener("scroll", t);
45
+ }, [s]), B(() => {
46
+ const e = t.current;
47
+ if (e)
48
+ return e.addEventListener("scroll", o), () => {
49
+ e.removeEventListener("scroll", o);
49
50
  };
50
- }, [t]), e && e.length === 0 ? /* @__PURE__ */ c(d, { $flexRowGapX: 1, children: [
51
- /* @__PURE__ */ c($, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
51
+ }, [o]), R === 0 ? /* @__PURE__ */ l(u, { $flexRowGapX: 1, children: [
52
+ /* @__PURE__ */ r(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: "Homework (0)" }),
53
+ /* @__PURE__ */ r(g, { $renderAs: "ab2", $color: "BLACK_T_60", children: "No Homework assigned yet" })
54
+ ] }) : /* @__PURE__ */ l(q, { $flexRowGapX: 1, $disablePointerEvents: K, children: [
55
+ /* @__PURE__ */ l(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
52
56
  "Homework (",
53
- e == null ? void 0 : e.length,
54
- ")"
55
- ] }),
56
- /* @__PURE__ */ n($, { $renderAs: "ab2", $color: "BLACK_T_60", children: "No Homework assigned yet" })
57
- ] }) : /* @__PURE__ */ c(O, { $flexRowGapX: 1, $disablePointerEvents: C, children: [
58
- /* @__PURE__ */ c($, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
59
- "Homework (",
60
- E,
57
+ D,
61
58
  "/",
62
- e == null ? void 0 : e.length,
59
+ R,
63
60
  ")"
64
61
  ] }),
65
- /* @__PURE__ */ c(
66
- d,
62
+ /* @__PURE__ */ l(
63
+ u,
67
64
  {
68
65
  $position: "relative",
69
- onMouseEnter: T,
70
- onMouseLeave: y,
66
+ onMouseEnter: G,
67
+ onMouseLeave: M,
71
68
  children: [
72
- /* @__PURE__ */ n(
73
- g,
69
+ /* @__PURE__ */ r(
70
+ W,
74
71
  {
75
72
  $position: "absolute",
76
73
  $background: "BLACK_T_60",
77
74
  $justifyContent: "center",
78
75
  $alignItems: "center",
79
76
  $height: "100%",
80
- onClick: B,
81
- $visible: I,
77
+ onClick: N,
78
+ $visible: T,
82
79
  left: "0px",
83
80
  right: "auto",
84
- children: /* @__PURE__ */ n(Q, { width: 24, height: 24 })
81
+ children: /* @__PURE__ */ r(V, { width: 24, height: 24 })
85
82
  }
86
83
  ),
87
- /* @__PURE__ */ n(P, { ref: o, children: /* @__PURE__ */ n(d, { $flexDirection: "row", $flexGapX: 1, children: e == null ? void 0 : e.map((r, i) => {
88
- const {
89
- node_id: s,
90
- worksheet_id: W,
91
- node_type: K,
92
- title: j,
93
- subtext: N
94
- } = r, f = K === "DYNAMIC";
95
- return /* @__PURE__ */ c(
96
- d,
97
- {
98
- $flexDirection: "row",
99
- $flexGapX: 1,
100
- children: [
101
- e.length > 10 && i === 10 && /* @__PURE__ */ n(
102
- Y,
103
- {
104
- $background: "BLACK_4",
105
- $justifyContent: "center",
106
- $gutter: 4,
107
- $gap: 8,
108
- children: /* @__PURE__ */ n(q, { $renderAs: "ac3", $color: "WHITE", children: "In Queue" })
109
- }
110
- ),
111
- /* @__PURE__ */ n(
112
- F,
84
+ /* @__PURE__ */ r(Y, { ref: t, children: /* @__PURE__ */ l(u, { $flexDirection: "row", $flexGapX: 1, children: [
85
+ h.map((e, i) => {
86
+ const {
87
+ node_id: c,
88
+ worksheet_id: m,
89
+ node_type: $,
90
+ title: p,
91
+ subtext: w
92
+ } = e, n = $ === "DYNAMIC";
93
+ return /* @__PURE__ */ r(
94
+ u,
95
+ {
96
+ $flexDirection: "row",
97
+ $flexGapX: 1,
98
+ children: /* @__PURE__ */ r(
99
+ E,
113
100
  {
114
- isInQueue: e.length > 10 && i > 9,
115
- userType: h,
116
- header: j,
117
- subHeader: N || "",
118
- nodeData: r,
101
+ userType: C,
102
+ header: p,
103
+ subHeader: w || "",
104
+ nodeData: e,
119
105
  renderAs: "homework",
120
- studentId: v,
121
- onNodeAttempt: f ? L : _,
106
+ studentId: _,
107
+ onNodeAttempt: n ? k : v,
122
108
  shouldOpenOnRight: !0,
123
- onNodeView: f ? b : k,
124
- onNodeReview: f ? x : A,
125
- onNodeUnassign: H
109
+ onNodeView: n ? b : x,
110
+ onNodeReview: n ? H : L,
111
+ onNodeUnassign: A
126
112
  }
127
113
  )
128
- ]
129
- },
130
- `${W}_${s}_${i}`
131
- );
132
- }) }) }),
133
- /* @__PURE__ */ n(
134
- g,
114
+ },
115
+ `${m}_${c}_${i}`
116
+ );
117
+ }),
118
+ f.map((e, i) => {
119
+ const {
120
+ node_id: c,
121
+ worksheet_id: m,
122
+ node_type: $,
123
+ title: p,
124
+ subtext: w
125
+ } = e, n = $ === "DYNAMIC";
126
+ return /* @__PURE__ */ l(
127
+ u,
128
+ {
129
+ $flexDirection: "row",
130
+ $flexGapX: 1,
131
+ children: [
132
+ i === 0 && /* @__PURE__ */ r(
133
+ z,
134
+ {
135
+ $background: "BLACK_4",
136
+ $justifyContent: "center",
137
+ $gutter: 4,
138
+ $gap: 8,
139
+ children: /* @__PURE__ */ r(J, { $renderAs: "ac3", $color: "WHITE", children: "In Queue" })
140
+ }
141
+ ),
142
+ /* @__PURE__ */ r(
143
+ E,
144
+ {
145
+ isInQueue: !0,
146
+ userType: C,
147
+ header: p,
148
+ subHeader: w || "",
149
+ nodeData: e,
150
+ renderAs: "homework",
151
+ studentId: _,
152
+ onNodeAttempt: n ? k : v,
153
+ shouldOpenOnRight: !0,
154
+ onNodeView: n ? b : x,
155
+ onNodeReview: n ? H : L,
156
+ onNodeUnassign: A
157
+ }
158
+ )
159
+ ]
160
+ },
161
+ `${m}_${c}_${i}`
162
+ );
163
+ })
164
+ ] }) }),
165
+ /* @__PURE__ */ r(
166
+ W,
135
167
  {
136
168
  $position: "absolute",
137
169
  $width: "60px",
@@ -139,19 +171,19 @@ const z = ({
139
171
  $background: "BLACK_T_60",
140
172
  $justifyContent: "center",
141
173
  $alignItems: "center",
142
- onClick: S,
143
- $visible: R,
174
+ onClick: X,
175
+ $visible: j,
144
176
  left: "auto",
145
177
  right: "0px",
146
- children: /* @__PURE__ */ n(X, { width: 24, height: 24 })
178
+ children: /* @__PURE__ */ r(F, { width: 24, height: 24 })
147
179
  }
148
180
  )
149
181
  ]
150
182
  }
151
183
  )
152
184
  ] });
153
- }, ne = V(z);
185
+ }, ce = O(Z);
154
186
  export {
155
- ne as default
187
+ ce as default
156
188
  };
157
189
  //# 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 { 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';\n\ninterface IHwCardListView extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n isHwProcessing: boolean;\n hwDetails?: INodeDataProps[];\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 waitForReviewSheets = useMemo(\n () => (hwDetails?.filter(sheet => sheet.state === 'WAIT_FOR_REVIEW') || []).length,\n [hwDetails],\n );\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 && hwDetails?.length > 3 && 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 (hwDetails && hwDetails.length === 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({hwDetails?.length})\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}/{hwDetails?.length})\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 {hwDetails?.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 {hwDetails.length > 10 && idx === 10 && (\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={hwDetails.length > 10 && idx > 9}\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","waitForReviewSheets","useMemo","sheet","updatedCanScroll","useCallback","scrollLeft","scrollWidth","clientWidth","handleHoverEnter","handleHoverLeave","handleScrollLeft","handleScrollRight","useEffect","scrollElement","jsxs","FlexView","Text","Styled.ContentWrapper","jsx","Styled.ScrollButton","ChevronLeftIcon","Styled.ScrollContainer","idx","nodeId","worksheetId","nodeType","title","subtext","isDynamicSheet","Styled.QueueWrapper","Styled.QueueText","HomeworkCard","ChevronRightIcon","HwCardListView$1","memo"],"mappings":";;;;;;;;AA0BA,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;AACF,MAAM;AACJ,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GACpDG,IAAYC,EAAuB,IAAI,GAEvCC,IAAsBC;AAAA,IAC1B,QAAOhB,KAAA,gBAAAA,EAAW,OAAO,CAAAiB,MAASA,EAAM,UAAU,uBAAsB,CAAA,GAAI;AAAA,IAC5E,CAACjB,CAAS;AAAA,EAAA,GAGNkB,IAAmBC,EAAY,MAAM;AACzC,QAAIN,EAAU,SAAS;AACrB,YAAM,EAAE,YAAAO,GAAY,aAAAC,GAAa,aAAAC,EAAA,IAAgBT,EAAU;AAE3D,MAAIO,IAAa,KACfX,EAAiB,EAAI,GAGnBW,IAAaC,IAAcC,IAAc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AAgB;AAAA,sBAChB,SAAS;AAAA,sBACT,MAAM;AAAA,sBAEN,UAAA,gBAAAX,EAACY,GAAA,EAAiB,WAAU,OAAM,QAAO,SAAQ,UAEjD,YAAA;AAAA,oBAAA;AAAA,kBACF;AAAA,kBAEF,gBAAAZ;AAAA,oBAACa;AAAA,oBAAA;AAAA,sBACC,WAAW9C,EAAU,SAAS,MAAMqC,IAAM;AAAA,sBAC1C,UAAAxC;AAAA,sBACA,QAAQ4C;AAAA,sBACR,WAAWC,KAAW;AAAA,sBACtB,UAAUzB;AAAA,sBACV,UAAS;AAAA,sBACT,WAAAnB;AAAA,sBACA,eAAe6C,IAAiB1C,IAAcC;AAAA,sBAC9C,mBAAmB;AAAA,sBACnB,YAAYyC,IAAiBxC,IAAgBC;AAAA,sBAC7C,cAAcuC,IAAiBtC,IAAeC;AAAA,sBAC9C,gBAAAC;AAAA,oBAAA;AAAA,kBACF;AAAA,gBAAA;AAAA,cAAA;AAAA,cA7BK,GAAGgC,CAAW,IAAID,CAAM,IAAID,CAAG;AAAA,YAAA;AAAA,UA8BtC,IAGN,EACF,CAAA;AAAA,UACA,gBAAAJ;AAAA,YAACC;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,UAAUf;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cAEN,UAAC,gBAAAsB,EAAAc,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,YAAA;AAAA,UAC3C;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeC,KAAAC,EAAKrD,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}\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;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GACpDG,IAAYC,EAAuB,IAAI,GAEvC,EAAE,oBAAoBC,IAA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AAA,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,268 +1,205 @@
1
- const e = Math.floor(Date.now() / 1e3), a = e + 5 * 24 * 60 * 60, _ = [
2
- {
3
- accuracy: null,
4
- attempt_location: "ANY",
5
- attempt_state: null,
6
- block_id: "23a4e676-7094-11ed-87bc-6ec30f5d70bb",
7
- break_interval: 0,
8
- card_header: "PUZZLE",
9
- ceremony_completed_on_ts: null,
10
- chapter_id: "8b0d5af7-3d47-4888-acef-920069c6ae13",
11
- completed_on_ts: null,
12
- course_type: "PROGRAM",
13
- desmos_calculator_enabled: !1,
14
- due_date_ts: 1748241531,
15
- generic_node_type: null,
16
- homework_created_on_ts: 1747636732547152e-6,
17
- homework_id: "ede761ea-347b-11f0-b9d2-5e3c498fca42",
18
- image_hue: "BLUE",
19
- image_url: "https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Default.jpg",
20
- is_core_lesson_node: null,
21
- is_irrelevant: !1,
22
- is_lesson_primary_node: null,
23
- is_lesson_v3_enabled: !1,
24
- is_optional: !0,
25
- is_timed: !1,
26
- is_worksheet_v3: null,
27
- learnosity_activity_ref: "CR_G4L1 Sum of Three Cubes",
28
- lesson_id: null,
29
- marked_as_completed: !1,
30
- mini_goal_code: null,
31
- node_group: null,
32
- node_id: "1de6ac4a-8e41-4446-9a07-a93d5713a2ff",
33
- node_sub_group: null,
34
- node_type: "PUZZLE_EASY",
35
- permissions: {
36
- can_assign_as_homework: !1,
37
- can_attempt: !1,
38
- can_change_attempt_location: !1,
39
- can_mark_familiar: !1,
40
- can_reattempt: !1,
41
- can_reset: !1,
42
- can_resume: !1,
43
- can_review: !1,
44
- can_start: !0,
45
- can_teacher_review: !1,
46
- can_teacher_score: !1,
47
- can_unassign: !1,
48
- can_unlock: !1,
49
- can_view_solution: !1,
50
- is_review_disabled: !1
1
+ const e = Math.floor(Date.now() / 1e3), a = e + 5 * 24 * 60 * 60, s = {
2
+ assigned_homeworks: [
3
+ {
4
+ accuracy: null,
5
+ attempt_location: "ANY",
6
+ block_id: "23a4e676-7094-11ed-87bc-6ec30f5d70bb",
7
+ card_header: "PUZZLE",
8
+ chapter_id: "8b0d5af7-3d47-4888-acef-920069c6ae13",
9
+ course_type: "PROGRAM",
10
+ desmos_calculator_enabled: !1,
11
+ due_date_ts: 1748241531,
12
+ homework_id: "ede761ea-347b-11f0-b9d2-5e3c498fca42",
13
+ image_hue: "BLUE",
14
+ image_url: "https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Default.jpg",
15
+ is_lesson_v3_enabled: !1,
16
+ is_optional: !0,
17
+ is_timed: !1,
18
+ is_worksheet_v3: null,
19
+ learnosity_activity_ref: "CR_G4L1 Sum of Three Cubes",
20
+ marked_as_completed: !1,
21
+ node_id: "1de6ac4a-8e41-4446-9a07-a93d5713a2ff",
22
+ node_type: "PUZZLE_EASY",
23
+ permissions: {
24
+ can_assign_as_homework: !1,
25
+ can_change_attempt_location: !1,
26
+ can_mark_familiar: !1,
27
+ can_reattempt: !1,
28
+ can_reset: !1,
29
+ can_resume: !1,
30
+ can_review: !1,
31
+ can_start: !0,
32
+ can_teacher_review: !1,
33
+ can_unassign: !1,
34
+ can_unlock: !1,
35
+ can_un_skip: !1,
36
+ can_skip: !1
37
+ },
38
+ sheet_statement: "Yet to start",
39
+ sheet_time: 2400,
40
+ state: "NOT_STARTED",
41
+ subtext: "Puzzle Cards",
42
+ title: "Sum of Three Cubes",
43
+ total_questions: 0,
44
+ unlocked_on_ts: 1747636731,
45
+ user_attempt_id: null,
46
+ user_node_id: "147520a0-2f62-11f0-876b-da0546594b04",
47
+ worksheet_id: "c4e1035a-d3e5-11eb-8971-6296551a51ec",
48
+ complete_status: !1,
49
+ id: "",
50
+ user_chapter_id: null
51
51
  },
52
- position: 7,
53
- program_id: "1f7eee07-9e8f-423f-8c3a-690c42cdb6b6",
54
- rewards: [],
55
- scheduled_end_ts: null,
56
- scheduled_start_ts: null,
57
- sheet_statement: "Yet to start",
58
- sheet_time: 2400,
59
- started_on_ts: null,
60
- state: "NOT_STARTED",
61
- subtext: "Puzzle Cards",
62
- target_accuracy: 100,
63
- timer_type: null,
64
- title: "Sum of Three Cubes",
65
- total_questions: 0,
66
- unlocked_on_ts: 1747636731,
67
- user_attempt_id: null,
68
- user_block_id: "a021e0e2-b6f6-4bf0-84d2-dd7b603b89d4",
69
- user_milestone_id: null,
70
- user_node_id: "147520a0-2f62-11f0-876b-da0546594b04",
71
- worksheet_id: "c4e1035a-d3e5-11eb-8971-6296551a51ec"
72
- },
73
- {
74
- accuracy: null,
75
- attempt_location: "ANY",
76
- attempt_state: null,
77
- block_id: "",
78
- break_interval: 0,
79
- card_header: "SMART PRACTICE",
80
- ceremony_completed_on_ts: null,
81
- chapter_id: null,
82
- completed_on_ts: null,
83
- course_type: "PROGRAM",
84
- desmos_calculator_enabled: !1,
85
- due_date_ts: a,
86
- generic_node_type: null,
87
- homework_created_on_ts: 1747751314184602e-6,
88
- homework_id: "b5e1bf00-3586-11f0-a22a-9207bc065284",
89
- image_hue: "PURPLE",
90
- image_url: null,
91
- is_core_lesson_node: null,
92
- is_irrelevant: !1,
93
- is_lesson_primary_node: null,
94
- is_lesson_v3_enabled: !1,
95
- is_optional: !1,
96
- is_timed: !1,
97
- is_worksheet_v3: null,
98
- learnosity_activity_ref: "mastery-6f8b199b-9c54-40dc-833e-69db342fec26",
99
- lesson_id: null,
100
- marked_as_completed: !1,
101
- mini_goal_code: null,
102
- node_group: null,
103
- node_id: "307b7775-98fd-4831-bd2f-e87403db7da7",
104
- node_sub_group: null,
105
- node_type: "MASTERY",
106
- permissions: {
107
- can_assign_as_homework: !1,
108
- can_attempt: !1,
109
- can_change_attempt_location: !1,
110
- can_mark_familiar: !1,
111
- can_reattempt: !1,
112
- can_reset: !1,
113
- can_resume: !1,
114
- can_review: !1,
115
- can_start: !0,
116
- can_teacher_review: !1,
117
- can_teacher_score: !1,
118
- can_unassign: !1,
119
- can_unlock: !1,
120
- can_view_solution: !1,
121
- is_review_disabled: !1
52
+ {
53
+ accuracy: null,
54
+ attempt_location: "ANY",
55
+ block_id: "",
56
+ card_header: "SMART PRACTICE",
57
+ chapter_id: null,
58
+ course_type: "PROGRAM",
59
+ desmos_calculator_enabled: !1,
60
+ due_date_ts: a,
61
+ homework_id: "b5e1bf00-3586-11f0-a22a-9207bc065284",
62
+ image_hue: "PURPLE",
63
+ image_url: null,
64
+ is_lesson_v3_enabled: !1,
65
+ is_optional: !1,
66
+ is_timed: !1,
67
+ is_worksheet_v3: null,
68
+ learnosity_activity_ref: "mastery-6f8b199b-9c54-40dc-833e-69db342fec26",
69
+ marked_as_completed: !1,
70
+ node_id: "307b7775-98fd-4831-bd2f-e87403db7da7",
71
+ node_type: "MASTERY",
72
+ permissions: {
73
+ can_assign_as_homework: !1,
74
+ can_change_attempt_location: !1,
75
+ can_mark_familiar: !1,
76
+ can_reattempt: !1,
77
+ can_reset: !1,
78
+ can_resume: !1,
79
+ can_review: !1,
80
+ can_start: !0,
81
+ can_teacher_review: !1,
82
+ can_unassign: !1,
83
+ can_unlock: !1,
84
+ can_un_skip: !1,
85
+ can_skip: !1
86
+ },
87
+ sheet_statement: "Yet to start",
88
+ sheet_time: 0,
89
+ state: "IN_PROGRESS",
90
+ subtext: "10 Questions",
91
+ title: "Identify Types of Polygons • Understand Decimal Numbers • Convert Improper Fractions to Decimals",
92
+ total_questions: 10,
93
+ unlocked_on_ts: 1747751086,
94
+ user_node_id: "2e715efe-3586-11f0-be8b-526b31ab17cd",
95
+ worksheet_id: "b70c4195-2727-415e-b3a0-f9c0672103dc",
96
+ complete_status: !1,
97
+ id: "",
98
+ user_attempt_id: null,
99
+ user_chapter_id: null
122
100
  },
123
- position: 1,
124
- program_id: null,
125
- rewards: [],
126
- scheduled_end_ts: null,
127
- scheduled_start_ts: null,
128
- sheet_statement: "Yet to start",
129
- sheet_time: 0,
130
- started_on_ts: null,
131
- state: "IN_PROGRESS",
132
- subtext: "10 Questions",
133
- target_accuracy: null,
134
- timer_type: null,
135
- title: "Identify Types of Polygons • Understand Decimal Numbers • Convert Improper Fractions to Decimals",
136
- total_questions: 10,
137
- unlocked_on_ts: 1747751086,
138
- user_attempt_id: null,
139
- user_block_id: null,
140
- user_milestone_id: null,
141
- user_node_id: "2e715efe-3586-11f0-be8b-526b31ab17cd",
142
- worksheet_id: "b70c4195-2727-415e-b3a0-f9c0672103dc"
143
- },
144
- {
145
- accuracy: null,
146
- attempt_location: "ANY",
147
- attempt_state: null,
148
- block_id: "6c30d4f0-4bb0-4fc2-9dac-f7016f1bd589",
149
- break_interval: 0,
150
- card_header: "LEARN",
151
- ceremony_completed_on_ts: null,
152
- chapter_id: "8ac6c4a0-931c-4bd3-80f4-30b1c13cb8f4",
153
- completed_on_ts: null,
154
- course_type: "PROGRAM",
155
- desmos_calculator_enabled: !1,
156
- due_date_ts: 1747765021,
157
- generic_node_type: null,
158
- homework_created_on_ts: 1747763568498342e-6,
159
- homework_id: "3e05a164-35a3-11f0-b52f-9207bc065284",
160
- image_hue: "BLUE",
161
- image_url: "https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Measurement_G4.jpg",
162
- is_core_lesson_node: null,
163
- is_irrelevant: !1,
164
- is_lesson_primary_node: null,
165
- is_lesson_v3_enabled: !1,
166
- is_optional: !1,
167
- is_timed: !1,
168
- is_worksheet_v3: null,
169
- learnosity_activity_ref: "G4-Length-Weight-Capacity-W01.vxp",
170
- lesson_id: null,
171
- marked_as_completed: !1,
172
- mini_goal_code: "MEA059-A",
173
- node_group: null,
174
- node_id: "ee7b2e69-fd74-4311-a378-8bb4e45449a6",
175
- node_sub_group: null,
176
- node_type: "LEARNING",
177
- permissions: {
178
- can_assign_as_homework: !1,
179
- can_attempt: !1,
180
- can_change_attempt_location: !1,
181
- can_mark_familiar: !0,
182
- can_reattempt: !1,
183
- can_reset: !1,
184
- can_resume: !1,
185
- can_review: !1,
186
- can_start: !0,
187
- can_teacher_review: !1,
188
- can_teacher_score: !1,
189
- can_unassign: !1,
190
- can_unlock: !1,
191
- can_view_solution: !1,
192
- is_review_disabled: !1
101
+ {
102
+ accuracy: null,
103
+ attempt_location: "ANY",
104
+ block_id: "6c30d4f0-4bb0-4fc2-9dac-f7016f1bd589",
105
+ card_header: "LEARN",
106
+ chapter_id: "8ac6c4a0-931c-4bd3-80f4-30b1c13cb8f4",
107
+ course_type: "PROGRAM",
108
+ desmos_calculator_enabled: !1,
109
+ due_date_ts: 1747765021,
110
+ homework_id: "3e05a164-35a3-11f0-b52f-9207bc065284",
111
+ image_hue: "BLUE",
112
+ image_url: "https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Measurement_G4.jpg",
113
+ is_lesson_v3_enabled: !1,
114
+ is_optional: !1,
115
+ is_timed: !1,
116
+ is_worksheet_v3: null,
117
+ learnosity_activity_ref: "G4-Length-Weight-Capacity-W01.vxp",
118
+ marked_as_completed: !1,
119
+ node_id: "ee7b2e69-fd74-4311-a378-8bb4e45449a6",
120
+ node_type: "LEARNING",
121
+ permissions: {
122
+ can_assign_as_homework: !1,
123
+ can_change_attempt_location: !1,
124
+ can_mark_familiar: !0,
125
+ can_reattempt: !1,
126
+ can_reset: !1,
127
+ can_resume: !1,
128
+ can_review: !1,
129
+ can_start: !0,
130
+ can_teacher_review: !1,
131
+ can_unassign: !1,
132
+ can_unlock: !1,
133
+ can_un_skip: !1,
134
+ can_skip: !1
135
+ },
136
+ sheet_statement: "Yet to start",
137
+ sheet_time: 0,
138
+ state: "NOT_STARTED",
139
+ subtext: "Measurement",
140
+ title: "Solve Problems on Conversion of Units of Length",
141
+ total_questions: 34,
142
+ unlocked_on_ts: 1747160221,
143
+ user_attempt_id: null,
144
+ user_node_id: "76f860b0-3026-11f0-8945-925795afcf7c",
145
+ worksheet_id: "8b9bc1d6-0d7b-11ed-bf5b-4eea17b71ce5",
146
+ complete_status: !1,
147
+ id: "",
148
+ user_chapter_id: null
193
149
  },
194
- position: 1,
195
- program_id: "1f7eee07-9e8f-423f-8c3a-690c42cdb6b6",
196
- rewards: [],
197
- scheduled_end_ts: null,
198
- scheduled_start_ts: null,
199
- sheet_statement: "Yet to start",
200
- sheet_time: 0,
201
- started_on_ts: null,
202
- state: "NOT_STARTED",
203
- subtext: "Measurement",
204
- target_accuracy: 0,
205
- timer_type: null,
206
- title: "Solve Problems on Conversion of Units of Length",
207
- total_questions: 34,
208
- unlocked_on_ts: 1747160221,
209
- user_attempt_id: null,
210
- user_block_id: "83d76c9d-5d2f-49a9-9a3e-fed0293a08ab",
211
- user_milestone_id: null,
212
- user_node_id: "76f860b0-3026-11f0-8945-925795afcf7c",
213
- worksheet_id: "8b9bc1d6-0d7b-11ed-bf5b-4eea17b71ce5"
214
- },
215
- {
216
- accuracy: null,
217
- attempt_location: "ANY",
218
- block_id: "",
219
- card_header: "TEST",
220
- chapter_id: null,
221
- course_type: "EXAM",
222
- desmos_calculator_enabled: !1,
223
- due_date_ts: 1748368416713071e-6,
224
- homework_id: "5ac50966-35a3-11f0-b52f-9207bc065284",
225
- image_hue: "YELLOW",
226
- image_url: null,
227
- is_lesson_v3_enabled: !1,
228
- is_optional: !1,
229
- is_timed: !0,
230
- is_worksheet_v3: null,
231
- learnosity_activity_ref: null,
232
- marked_as_completed: !1,
233
- node_id: "bbcb2c1a-3289-11ed-b746-6237f2d293d9",
234
- node_type: "DYNAMIC",
235
- permissions: {
236
- can_assign_as_homework: !1,
237
- can_attempt: !1,
238
- can_change_attempt_location: !1,
239
- can_mark_familiar: !1,
240
- can_reattempt: !1,
241
- can_reset: !1,
242
- can_resume: !1,
243
- can_review: !1,
244
- can_start: !0,
245
- can_teacher_review: !1,
246
- can_teacher_score: !1,
247
- can_unassign: !1,
248
- can_unlock: !1,
249
- can_view_solution: !1,
250
- is_review_disabled: !1
251
- },
252
- sheet_statement: "Yet to start",
253
- sheet_time: 2700,
254
- state: "NOT_STARTED",
255
- subtext: "17 Questions, 45 Mins",
256
- title: "Factors, Multiples, and Primes • Time • An Introduction to Decimal Numbers • Fractions",
257
- total_questions: 17,
258
- unlocked_on_ts: 1747763616713071e-6,
259
- user_attempt_id: null,
260
- user_milestone_id: "f091d182-30fa-44b6-b7c5-6ecdc2c1592a",
261
- user_node_id: "5ac2b404-35a3-11f0-b52f-9207bc065284",
262
- worksheet_id: "bbbfd900-3289-11ed-b746-6237f2d293d9"
263
- }
264
- ];
150
+ {
151
+ accuracy: null,
152
+ attempt_location: "ANY",
153
+ block_id: "",
154
+ card_header: "TEST",
155
+ chapter_id: null,
156
+ course_type: "EXAM",
157
+ desmos_calculator_enabled: !1,
158
+ due_date_ts: 1748368416713071e-6,
159
+ homework_id: "5ac50966-35a3-11f0-b52f-9207bc065284",
160
+ image_hue: "YELLOW",
161
+ image_url: null,
162
+ is_lesson_v3_enabled: !1,
163
+ is_optional: !1,
164
+ is_timed: !0,
165
+ is_worksheet_v3: null,
166
+ marked_as_completed: !1,
167
+ node_id: "bbcb2c1a-3289-11ed-b746-6237f2d293d9",
168
+ node_type: "DYNAMIC",
169
+ permissions: {
170
+ can_assign_as_homework: !1,
171
+ can_change_attempt_location: !1,
172
+ can_mark_familiar: !1,
173
+ can_reattempt: !1,
174
+ can_reset: !1,
175
+ can_resume: !1,
176
+ can_review: !1,
177
+ can_start: !0,
178
+ can_teacher_review: !1,
179
+ can_unassign: !1,
180
+ can_unlock: !1,
181
+ can_un_skip: !1,
182
+ can_skip: !1
183
+ },
184
+ sheet_statement: "Yet to start",
185
+ sheet_time: 2700,
186
+ state: "NOT_STARTED",
187
+ subtext: "17 Questions, 45 Mins",
188
+ title: "Factors, Multiples, and Primes • Time • An Introduction to Decimal Numbers • Fractions",
189
+ total_questions: 17,
190
+ unlocked_on_ts: 1747763616713071e-6,
191
+ user_attempt_id: null,
192
+ user_node_id: "5ac2b404-35a3-11f0-b52f-9207bc065284",
193
+ worksheet_id: "bbbfd900-3289-11ed-b746-6237f2d293d9",
194
+ complete_status: !1,
195
+ id: "",
196
+ learnosity_activity_ref: "",
197
+ user_chapter_id: null
198
+ }
199
+ ],
200
+ queued_homeworks: []
201
+ };
265
202
  export {
266
- _ as HOMEWORK_DETAILS
203
+ s as HOMEWORK_DETAILS
267
204
  };
268
205
  //# sourceMappingURL=home-page-homeworks-mock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"home-page-homeworks-mock.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.ts"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\n\nconst now = Math.floor(Date.now() / 1000); // current epoch in seconds\nconst fiveDaysLater = now + 5 * 24 * 60 * 60;\n\nconst HOMEWORK_DETAILS = [\n {\n accuracy: null,\n attempt_location: 'ANY',\n attempt_state: null,\n block_id: '23a4e676-7094-11ed-87bc-6ec30f5d70bb',\n break_interval: 0,\n card_header: 'PUZZLE',\n ceremony_completed_on_ts: null,\n chapter_id: '8b0d5af7-3d47-4888-acef-920069c6ae13',\n completed_on_ts: null,\n course_type: 'PROGRAM',\n desmos_calculator_enabled: false,\n due_date_ts: 1748241531,\n generic_node_type: null,\n homework_created_on_ts: 1747636732.547152,\n homework_id: 'ede761ea-347b-11f0-b9d2-5e3c498fca42',\n image_hue: 'BLUE',\n image_url: 'https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Default.jpg',\n is_core_lesson_node: null,\n is_irrelevant: false,\n is_lesson_primary_node: null,\n is_lesson_v3_enabled: false,\n is_optional: true,\n is_timed: false,\n is_worksheet_v3: null,\n learnosity_activity_ref: 'CR_G4L1 Sum of Three Cubes',\n lesson_id: null,\n marked_as_completed: false,\n mini_goal_code: null,\n node_group: null,\n node_id: '1de6ac4a-8e41-4446-9a07-a93d5713a2ff',\n node_sub_group: null,\n node_type: 'PUZZLE_EASY',\n permissions: {\n can_assign_as_homework: false,\n can_attempt: false,\n can_change_attempt_location: false,\n can_mark_familiar: false,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n can_teacher_score: false,\n can_unassign: false,\n can_unlock: false,\n can_view_solution: false,\n is_review_disabled: false,\n },\n position: 7,\n program_id: '1f7eee07-9e8f-423f-8c3a-690c42cdb6b6',\n rewards: [],\n scheduled_end_ts: null,\n scheduled_start_ts: null,\n sheet_statement: 'Yet to start',\n sheet_time: 2400,\n started_on_ts: null,\n state: 'NOT_STARTED',\n subtext: 'Puzzle Cards',\n target_accuracy: 100,\n timer_type: null,\n title: 'Sum of Three Cubes',\n total_questions: 0,\n unlocked_on_ts: 1747636731,\n user_attempt_id: null,\n user_block_id: 'a021e0e2-b6f6-4bf0-84d2-dd7b603b89d4',\n user_milestone_id: null,\n user_node_id: '147520a0-2f62-11f0-876b-da0546594b04',\n worksheet_id: 'c4e1035a-d3e5-11eb-8971-6296551a51ec',\n },\n {\n accuracy: null,\n attempt_location: 'ANY',\n attempt_state: null,\n block_id: '',\n break_interval: 0,\n card_header: 'SMART PRACTICE',\n ceremony_completed_on_ts: null,\n chapter_id: null,\n completed_on_ts: null,\n course_type: 'PROGRAM',\n desmos_calculator_enabled: false,\n due_date_ts: fiveDaysLater,\n generic_node_type: null,\n homework_created_on_ts: 1747751314.184602,\n homework_id: 'b5e1bf00-3586-11f0-a22a-9207bc065284',\n image_hue: 'PURPLE',\n image_url: null,\n is_core_lesson_node: null,\n is_irrelevant: false,\n is_lesson_primary_node: null,\n is_lesson_v3_enabled: false,\n is_optional: false,\n is_timed: false,\n is_worksheet_v3: null,\n learnosity_activity_ref: 'mastery-6f8b199b-9c54-40dc-833e-69db342fec26',\n lesson_id: null,\n marked_as_completed: false,\n mini_goal_code: null,\n node_group: null,\n node_id: '307b7775-98fd-4831-bd2f-e87403db7da7',\n node_sub_group: null,\n node_type: 'MASTERY',\n permissions: {\n can_assign_as_homework: false,\n can_attempt: false,\n can_change_attempt_location: false,\n can_mark_familiar: false,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n can_teacher_score: false,\n can_unassign: false,\n can_unlock: false,\n can_view_solution: false,\n is_review_disabled: false,\n },\n position: 1,\n program_id: null,\n rewards: [],\n scheduled_end_ts: null,\n scheduled_start_ts: null,\n sheet_statement: 'Yet to start',\n sheet_time: 0,\n started_on_ts: null,\n state: 'IN_PROGRESS',\n subtext: '10 Questions',\n target_accuracy: null,\n timer_type: null,\n title:\n 'Identify Types of Polygons \\u2022 Understand Decimal Numbers \\u2022 Convert Improper Fractions to Decimals',\n total_questions: 10,\n unlocked_on_ts: 1747751086,\n user_attempt_id: null,\n user_block_id: null,\n user_milestone_id: null,\n user_node_id: '2e715efe-3586-11f0-be8b-526b31ab17cd',\n worksheet_id: 'b70c4195-2727-415e-b3a0-f9c0672103dc',\n },\n {\n accuracy: null,\n attempt_location: 'ANY',\n attempt_state: null,\n block_id: '6c30d4f0-4bb0-4fc2-9dac-f7016f1bd589',\n break_interval: 0,\n card_header: 'LEARN',\n ceremony_completed_on_ts: null,\n chapter_id: '8ac6c4a0-931c-4bd3-80f4-30b1c13cb8f4',\n completed_on_ts: null,\n course_type: 'PROGRAM',\n desmos_calculator_enabled: false,\n due_date_ts: 1747765021,\n generic_node_type: null,\n homework_created_on_ts: 1747763568.498342,\n homework_id: '3e05a164-35a3-11f0-b52f-9207bc065284',\n image_hue: 'BLUE',\n image_url: 'https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Measurement_G4.jpg',\n is_core_lesson_node: null,\n is_irrelevant: false,\n is_lesson_primary_node: null,\n is_lesson_v3_enabled: false,\n is_optional: false,\n is_timed: false,\n is_worksheet_v3: null,\n learnosity_activity_ref: 'G4-Length-Weight-Capacity-W01.vxp',\n lesson_id: null,\n marked_as_completed: false,\n mini_goal_code: 'MEA059-A',\n node_group: null,\n node_id: 'ee7b2e69-fd74-4311-a378-8bb4e45449a6',\n node_sub_group: null,\n node_type: 'LEARNING',\n permissions: {\n can_assign_as_homework: false,\n can_attempt: false,\n can_change_attempt_location: false,\n can_mark_familiar: true,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n can_teacher_score: false,\n can_unassign: false,\n can_unlock: false,\n can_view_solution: false,\n is_review_disabled: false,\n },\n position: 1,\n program_id: '1f7eee07-9e8f-423f-8c3a-690c42cdb6b6',\n rewards: [],\n scheduled_end_ts: null,\n scheduled_start_ts: null,\n sheet_statement: 'Yet to start',\n sheet_time: 0,\n started_on_ts: null,\n state: 'NOT_STARTED',\n subtext: 'Measurement',\n target_accuracy: 0,\n timer_type: null,\n title: 'Solve Problems on Conversion of Units of Length',\n total_questions: 34,\n unlocked_on_ts: 1747160221,\n user_attempt_id: null,\n user_block_id: '83d76c9d-5d2f-49a9-9a3e-fed0293a08ab',\n user_milestone_id: null,\n user_node_id: '76f860b0-3026-11f0-8945-925795afcf7c',\n worksheet_id: '8b9bc1d6-0d7b-11ed-bf5b-4eea17b71ce5',\n },\n {\n accuracy: null,\n attempt_location: 'ANY',\n block_id: '',\n card_header: 'TEST',\n chapter_id: null,\n course_type: 'EXAM',\n desmos_calculator_enabled: false,\n due_date_ts: 1748368416.713071,\n homework_id: '5ac50966-35a3-11f0-b52f-9207bc065284',\n image_hue: 'YELLOW',\n image_url: null,\n is_lesson_v3_enabled: false,\n is_optional: false,\n is_timed: true,\n is_worksheet_v3: null,\n learnosity_activity_ref: null,\n marked_as_completed: false,\n node_id: 'bbcb2c1a-3289-11ed-b746-6237f2d293d9',\n node_type: 'DYNAMIC',\n permissions: {\n can_assign_as_homework: false,\n can_attempt: false,\n can_change_attempt_location: false,\n can_mark_familiar: false,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n can_teacher_score: false,\n can_unassign: false,\n can_unlock: false,\n can_view_solution: false,\n is_review_disabled: false,\n },\n sheet_statement: 'Yet to start',\n sheet_time: 2700,\n state: 'NOT_STARTED',\n subtext: '17 Questions, 45 Mins',\n title:\n 'Factors, Multiples, and Primes \\u2022 Time \\u2022 An Introduction to Decimal Numbers \\u2022 Fractions',\n total_questions: 17,\n unlocked_on_ts: 1747763616.713071,\n user_attempt_id: null,\n user_milestone_id: 'f091d182-30fa-44b6-b7c5-6ecdc2c1592a',\n user_node_id: '5ac2b404-35a3-11f0-b52f-9207bc065284',\n worksheet_id: 'bbbfd900-3289-11ed-b746-6237f2d293d9',\n },\n] as unknown as INodeDataProps[];\n\nexport { HOMEWORK_DETAILS };\n"],"names":["now","fiveDaysLater","HOMEWORK_DETAILS"],"mappings":"AAEA,MAAMA,IAAM,KAAK,MAAM,KAAK,IAAA,IAAQ,GAAI,GAClCC,IAAgBD,IA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ACjB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,OAAO;AAAA,IACP,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,cAAc;AAAA,IACd,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,2BAA2B;AAAA,IAC3B,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,WAAW;AAAA,IACX,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,qBAAqB;AAAA,IACrB,SAAS;AAAA,IACT,WAAW;AAAA,IACX,aAAa;AAAA,MACX,wBAAwB;AAAA,MACxB,aAAa;AAAA,MACb,6BAA6B;AAAA,MAC7B,mBAAmB;AAAA,MACnB,eAAe;AAAA,MACf,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,IACtB;AAAA,IACA,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OACE;AAAA,IACF,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,cAAc;AAAA,IACd,cAAc;AAAA,EAChB;AACF;"}
1
+ {"version":3,"file":"home-page-homeworks-mock.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.ts"],"sourcesContent":["import type { IHomeworkDetails } from '../../../homework/hw-card-list/api/get-homeworks';\n\nconst now = Math.floor(Date.now() / 1000); // current epoch in seconds\nconst fiveDaysLater = now + 5 * 24 * 60 * 60;\n\nconst HOMEWORK_DETAILS: IHomeworkDetails = {\n assigned_homeworks: [\n {\n accuracy: null,\n attempt_location: 'ANY',\n\n block_id: '23a4e676-7094-11ed-87bc-6ec30f5d70bb',\n\n card_header: 'PUZZLE',\n\n chapter_id: '8b0d5af7-3d47-4888-acef-920069c6ae13',\n\n course_type: 'PROGRAM',\n desmos_calculator_enabled: false,\n due_date_ts: 1748241531,\n\n homework_id: 'ede761ea-347b-11f0-b9d2-5e3c498fca42',\n image_hue: 'BLUE',\n image_url: 'https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Default.jpg',\n\n is_lesson_v3_enabled: false,\n is_optional: true,\n is_timed: false,\n is_worksheet_v3: null,\n learnosity_activity_ref: 'CR_G4L1 Sum of Three Cubes',\n\n marked_as_completed: false,\n\n node_id: '1de6ac4a-8e41-4446-9a07-a93d5713a2ff',\n\n node_type: 'PUZZLE_EASY',\n permissions: {\n can_assign_as_homework: false,\n\n can_change_attempt_location: false,\n can_mark_familiar: false,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n\n can_unassign: false,\n can_unlock: false,\n\n can_un_skip: false,\n can_skip: false,\n },\n\n sheet_statement: 'Yet to start',\n sheet_time: 2400,\n\n state: 'NOT_STARTED',\n subtext: 'Puzzle Cards',\n\n title: 'Sum of Three Cubes',\n total_questions: 0,\n unlocked_on_ts: 1747636731,\n user_attempt_id: null,\n\n user_node_id: '147520a0-2f62-11f0-876b-da0546594b04',\n worksheet_id: 'c4e1035a-d3e5-11eb-8971-6296551a51ec',\n complete_status: false,\n id: '',\n user_chapter_id: null,\n },\n {\n accuracy: null,\n attempt_location: 'ANY',\n\n block_id: '',\n\n card_header: 'SMART PRACTICE',\n\n chapter_id: null,\n\n course_type: 'PROGRAM',\n desmos_calculator_enabled: false,\n due_date_ts: fiveDaysLater,\n\n homework_id: 'b5e1bf00-3586-11f0-a22a-9207bc065284',\n image_hue: 'PURPLE',\n image_url: null,\n\n is_lesson_v3_enabled: false,\n is_optional: false,\n is_timed: false,\n is_worksheet_v3: null,\n learnosity_activity_ref: 'mastery-6f8b199b-9c54-40dc-833e-69db342fec26',\n\n marked_as_completed: false,\n\n node_id: '307b7775-98fd-4831-bd2f-e87403db7da7',\n\n node_type: 'MASTERY',\n permissions: {\n can_assign_as_homework: false,\n\n can_change_attempt_location: false,\n can_mark_familiar: false,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n\n can_unassign: false,\n can_unlock: false,\n\n can_un_skip: false,\n can_skip: false,\n },\n\n sheet_statement: 'Yet to start',\n sheet_time: 0,\n\n state: 'IN_PROGRESS',\n subtext: '10 Questions',\n\n title:\n 'Identify Types of Polygons \\u2022 Understand Decimal Numbers \\u2022 Convert Improper Fractions to Decimals',\n total_questions: 10,\n unlocked_on_ts: 1747751086,\n\n user_node_id: '2e715efe-3586-11f0-be8b-526b31ab17cd',\n worksheet_id: 'b70c4195-2727-415e-b3a0-f9c0672103dc',\n complete_status: false,\n id: '',\n user_attempt_id: null,\n user_chapter_id: null,\n },\n {\n accuracy: null,\n attempt_location: 'ANY',\n\n block_id: '6c30d4f0-4bb0-4fc2-9dac-f7016f1bd589',\n\n card_header: 'LEARN',\n\n chapter_id: '8ac6c4a0-931c-4bd3-80f4-30b1c13cb8f4',\n\n course_type: 'PROGRAM',\n desmos_calculator_enabled: false,\n due_date_ts: 1747765021,\n\n homework_id: '3e05a164-35a3-11f0-b52f-9207bc065284',\n image_hue: 'BLUE',\n image_url: 'https://dw7j1ezsvbafb.cloudfront.net/media/chapter-images/Measurement_G4.jpg',\n\n is_lesson_v3_enabled: false,\n is_optional: false,\n is_timed: false,\n is_worksheet_v3: null,\n learnosity_activity_ref: 'G4-Length-Weight-Capacity-W01.vxp',\n\n marked_as_completed: false,\n\n node_id: 'ee7b2e69-fd74-4311-a378-8bb4e45449a6',\n\n node_type: 'LEARNING',\n permissions: {\n can_assign_as_homework: false,\n\n can_change_attempt_location: false,\n can_mark_familiar: true,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n\n can_unassign: false,\n can_unlock: false,\n\n can_un_skip: false,\n can_skip: false,\n },\n\n sheet_statement: 'Yet to start',\n sheet_time: 0,\n\n state: 'NOT_STARTED',\n subtext: 'Measurement',\n\n title: 'Solve Problems on Conversion of Units of Length',\n total_questions: 34,\n unlocked_on_ts: 1747160221,\n user_attempt_id: null,\n\n user_node_id: '76f860b0-3026-11f0-8945-925795afcf7c',\n worksheet_id: '8b9bc1d6-0d7b-11ed-bf5b-4eea17b71ce5',\n complete_status: false,\n id: '',\n user_chapter_id: null,\n },\n {\n accuracy: null,\n attempt_location: 'ANY',\n block_id: '',\n card_header: 'TEST',\n chapter_id: null,\n course_type: 'EXAM',\n desmos_calculator_enabled: false,\n due_date_ts: 1748368416.713071,\n homework_id: '5ac50966-35a3-11f0-b52f-9207bc065284',\n image_hue: 'YELLOW',\n image_url: null,\n is_lesson_v3_enabled: false,\n is_optional: false,\n is_timed: true,\n is_worksheet_v3: null,\n marked_as_completed: false,\n node_id: 'bbcb2c1a-3289-11ed-b746-6237f2d293d9',\n node_type: 'DYNAMIC',\n permissions: {\n can_assign_as_homework: false,\n\n can_change_attempt_location: false,\n can_mark_familiar: false,\n can_reattempt: false,\n can_reset: false,\n can_resume: false,\n can_review: false,\n can_start: true,\n can_teacher_review: false,\n\n can_unassign: false,\n can_unlock: false,\n\n can_un_skip: false,\n can_skip: false,\n },\n sheet_statement: 'Yet to start',\n sheet_time: 2700,\n state: 'NOT_STARTED',\n subtext: '17 Questions, 45 Mins',\n title:\n 'Factors, Multiples, and Primes \\u2022 Time \\u2022 An Introduction to Decimal Numbers \\u2022 Fractions',\n total_questions: 17,\n unlocked_on_ts: 1747763616.713071,\n user_attempt_id: null,\n\n user_node_id: '5ac2b404-35a3-11f0-b52f-9207bc065284',\n worksheet_id: 'bbbfd900-3289-11ed-b746-6237f2d293d9',\n complete_status: false,\n id: '',\n learnosity_activity_ref: '',\n user_chapter_id: null,\n },\n ],\n queued_homeworks: [],\n};\n\nexport { HOMEWORK_DETAILS };\n"],"names":["now","fiveDaysLater","HOMEWORK_DETAILS"],"mappings":"AAEA,MAAMA,IAAM,KAAK,MAAM,KAAK,IAAA,IAAQ,GAAI,GAClCC,IAAgBD,IAAM,IAAI,KAAK,KAAK,IAEpCE,IAAqC;AAAA,EACzC,oBAAoB;AAAA,IAClB;AAAA,MACE,UAAU;AAAA,MACV,kBAAkB;AAAA,MAElB,UAAU;AAAA,MAEV,aAAa;AAAA,MAEb,YAAY;AAAA,MAEZ,aAAa;AAAA,MACb,2BAA2B;AAAA,MAC3B,aAAa;AAAA,MAEb,aAAa;AAAA,MACb,WAAW;AAAA,MACX,WAAW;AAAA,MAEX,sBAAsB;AAAA,MACtB,aAAa;AAAA,MACb,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,yBAAyB;AAAA,MAEzB,qBAAqB;AAAA,MAErB,SAAS;AAAA,MAET,WAAW;AAAA,MACX,aAAa;AAAA,QACX,wBAAwB;AAAA,QAExB,6BAA6B;AAAA,QAC7B,mBAAmB;AAAA,QACnB,eAAe;AAAA,QACf,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,WAAW;AAAA,QACX,oBAAoB;AAAA,QAEpB,cAAc;AAAA,QACd,YAAY;AAAA,QAEZ,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,MAEA,iBAAiB;AAAA,MACjB,YAAY;AAAA,MAEZ,OAAO;AAAA,MACP,SAAS;AAAA,MAET,OAAO;AAAA,MACP,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,iBAAiB;AAAA,MAEjB,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AAA,MACZ;AAAA,MACA,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,SAAS;AAAA,MACT,OACE;AAAA,MACF,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,iBAAiB;AAAA,MAEjB,cAAc;AAAA,MACd,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,IAAI;AAAA,MACJ,yBAAyB;AAAA,MACzB,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EACA,kBAAkB,CAAC;AACrB;"}
@@ -4,14 +4,14 @@ import H from "../../../chapters/chapters-list/chapter-item/chapter-item.js";
4
4
  import U from "../../../homework/homework-card.js";
5
5
  import I from "../../../homework/hw-card-list/hw-card-list-view.js";
6
6
  import J from "../../../milestone/milestone-list-container/milestone-list-container.js";
7
- import T from "../../../ui/layout/flex-view.js";
7
+ import f from "../../../ui/layout/flex-view.js";
8
8
  import P from "../../../ui/text/text.js";
9
9
  import { JOURNEY_ID_STUDENT as M } from "../../journey-id/journey-id-student.js";
10
10
  import { IndicatorType as p } from "../../use-journey/constants.js";
11
11
  import { useJourney as W } from "../../use-journey/use-journey.js";
12
12
  import { HOMEWORK_DETAILS as C } from "./home-page-homeworks-mock.js";
13
13
  import { RECENT_CHAPTERS as h } from "./recent-chapters-mock.js";
14
- import { ChaptersWrapper as v, ELementWrapper as g } from "./styles.js";
14
+ import { ChaptersWrapper as v, ELementWrapper as T } from "./styles.js";
15
15
  import u from "./tooltip-item.js";
16
16
  const ae = () => {
17
17
  const r = M.HOMEPAGE_JOURNEY, n = d(null), i = d(null), y = d(null), w = d([]), { nextCoachmark: E, setJourney: O, endJourney: b } = W(), e = m(() => null, []), A = m(() => {
@@ -21,7 +21,7 @@ const ae = () => {
21
21
  }, [E, r]), L = m(
22
22
  ({ studentId: a, stream: S, userType: l }) => {
23
23
  var k, x;
24
- const { title: X, subtext: _ } = C[0], N = l === "STUDENT";
24
+ const { title: _ = "", subtext: X = "" } = C.assigned_homeworks[0] || {}, N = l === "STUDENT";
25
25
  if (!(n != null && n.current) || !(i != null && i.current))
26
26
  return;
27
27
  const $ = [
@@ -30,7 +30,7 @@ const ae = () => {
30
30
  isActive: !1,
31
31
  type: p.TOOLTIP,
32
32
  elementToHighlight: /* @__PURE__ */ c(
33
- T,
33
+ f,
34
34
  {
35
35
  $flexGapX: 2.5,
36
36
  $marginBottomX: 8,
@@ -54,18 +54,18 @@ const ae = () => {
54
54
  onNodeUnassign: e
55
55
  }
56
56
  ),
57
- /* @__PURE__ */ c(T, { $flexRowGapX: 1, ref: y, children: [
57
+ /* @__PURE__ */ c(f, { $flexRowGapX: 1, ref: y, children: [
58
58
  /* @__PURE__ */ c(P, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
59
59
  "Recent Chapters (",
60
60
  (k = h) == null ? void 0 : k.length,
61
61
  ")"
62
62
  ] }),
63
- /* @__PURE__ */ o(v, { children: h.map((t, f) => /* @__PURE__ */ o(
63
+ /* @__PURE__ */ o(v, { children: h.map((t, g) => /* @__PURE__ */ o(
64
64
  H,
65
65
  {
66
66
  chapter: t,
67
67
  onChapterClick: e,
68
- itemIndex: f
68
+ itemIndex: g
69
69
  },
70
70
  t.id
71
71
  )) })
@@ -128,7 +128,7 @@ const ae = () => {
128
128
  },
129
129
  {
130
130
  originalElementToHighlightRef: i,
131
- elementToHighlight: /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(
131
+ elementToHighlight: /* @__PURE__ */ o(T, { children: /* @__PURE__ */ o(
132
132
  I,
133
133
  {
134
134
  userType: l,
@@ -168,14 +168,14 @@ const ae = () => {
168
168
  },
169
169
  {
170
170
  originalElementToHighlightRef: i,
171
- elementToHighlight: /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(
171
+ elementToHighlight: /* @__PURE__ */ o(T, { children: /* @__PURE__ */ o(
172
172
  U,
173
173
  {
174
174
  isInQueue: !1,
175
175
  userType: l,
176
- header: X,
177
- subHeader: _ || "",
178
- nodeData: C[0],
176
+ header: _,
177
+ subHeader: X || "",
178
+ nodeData: C.assigned_homeworks[0],
179
179
  renderAs: "homework",
180
180
  studentId: a,
181
181
  shouldOpenOnRight: !1
@@ -205,18 +205,18 @@ const ae = () => {
205
205
  },
206
206
  {
207
207
  originalElementToHighlightRef: n,
208
- elementToHighlight: /* @__PURE__ */ o(g, { children: /* @__PURE__ */ c(T, { $flexRowGapX: 1, children: [
208
+ elementToHighlight: /* @__PURE__ */ o(T, { children: /* @__PURE__ */ c(f, { $flexRowGapX: 1, children: [
209
209
  /* @__PURE__ */ c(P, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
210
210
  "Recent Chapters (",
211
211
  (x = h) == null ? void 0 : x.length,
212
212
  ")"
213
213
  ] }),
214
- /* @__PURE__ */ o(v, { children: h.map((t, f) => /* @__PURE__ */ o(
214
+ /* @__PURE__ */ o(v, { children: h.map((t, g) => /* @__PURE__ */ o(
215
215
  H,
216
216
  {
217
217
  chapter: t,
218
218
  onChapterClick: e,
219
- itemIndex: f
219
+ itemIndex: g
220
220
  },
221
221
  t.id
222
222
  )) })
@@ -1 +1 @@
1
- {"version":3,"file":"use-home-page-journey.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/use-home-page-journey.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { IChapterDataProps } from '../../../chapters/chapter/chapter-types';\nimport type { TCourseStream } from '../../../milestone/create/milestone-create-types';\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\nimport type { IHomepageStartJourneyProps } from './homepage-journey-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport ChapterItem from '../../../chapters/chapters-list/chapter-item/chapter-item';\nimport HomeworkCard from '../../../homework/homework-card';\nimport HwCardListView from '../../../homework/hw-card-list/hw-card-list-view';\nimport MilestoneListContainer from '../../../milestone/milestone-list-container/milestone-list-container';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { JOURNEY_ID_STUDENT } from '../../journey-id/journey-id-student';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport { HOMEWORK_DETAILS } from './home-page-homeworks-mock';\nimport { RECENT_CHAPTERS } from './recent-chapters-mock';\nimport { ChaptersWrapper, ELementWrapper } from './styles';\nimport TooltipItem from './tooltip-item';\n\nexport const useHomePageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY;\n\n const homepageRef = useRef<HTMLDivElement>(null);\n const homeworkRef = useRef<HTMLDivElement>(null);\n const recentChaptersRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const emptyFunction = useCallback(() => null, []);\n\n const handleEndJourney = useCallback(() => {\n endJourney(journeyId);\n document.body.style.overflow = 'unset';\n }, [endJourney, journeyId]);\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, true);\n }, [nextCoachmark, journeyId]);\n\n const startJourney = useCallback(\n ({ studentId, stream, userType }: IHomepageStartJourneyProps) => {\n const { title, subtext } = HOMEWORK_DETAILS[0] as INodeDataProps;\n const isStudent = userType === 'STUDENT';\n\n if (!homepageRef?.current || !homeworkRef?.current) {\n return;\n }\n\n const homepageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: homepageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <FlexView\n $flexGapX={2.5}\n $marginBottomX={8}\n $background=\"WHITE\"\n $widthX={47}\n $gutterX={1}\n >\n <HwCardListView\n userType={userType}\n studentId={studentId}\n isHwProcessing={false}\n hwDetails={HOMEWORK_DETAILS as INodeDataProps[]}\n onTestStart={emptyFunction}\n onNodeAttempt={emptyFunction}\n onTestPreview={emptyFunction}\n onNodeView={emptyFunction}\n onTestReview={emptyFunction}\n onNodeReview={emptyFunction}\n onNodeUnassign={emptyFunction}\n />\n <FlexView $flexRowGapX={1} ref={recentChaptersRef}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({RECENT_CHAPTERS?.length})\n </Text>\n <ChaptersWrapper>\n {RECENT_CHAPTERS.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter as unknown as IChapterDataProps}\n onChapterClick={emptyFunction}\n itemIndex={idx}\n />\n ))}\n </ChaptersWrapper>\n </FlexView>\n <MilestoneListContainer\n milestoneType=\"ACTIVE\"\n activeMilestoneId={''}\n activeTabId={''}\n canCreatePlan={false}\n courseStream={stream as TCourseStream}\n isClassOngoing={false}\n isStudentPresent={false}\n parentName={''}\n studentId={studentId}\n studentName={''}\n teacherName={''}\n userType={userType}\n //* Callbacks\n onAddChapter={emptyFunction}\n onAddOutcome={emptyFunction}\n onChapterClick={emptyFunction}\n onCreatePlan={emptyFunction}\n onDelete={emptyFunction}\n onDraftPublish={emptyFunction}\n onEdit={emptyFunction}\n onExpandPastMilestones={emptyFunction}\n onNodeView={emptyFunction}\n onNodeReview={emptyFunction}\n onWidgetTabSelection={emptyFunction}\n //* Resource callbacks\n onAssignResources={emptyFunction}\n onNodeReset={emptyFunction}\n onNodeUnassign={emptyFunction}\n //* Tests callbacks\n onCreateMilestoneTest={emptyFunction}\n onTestPreview={emptyFunction}\n onTestReview={emptyFunction}\n />\n </FlexView>\n ),\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: 0,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text={`Welcome to the all new ${isStudent ? 'learning' : 'tutoring'} homepage.`}\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HwCardListView\n userType={userType}\n studentId={studentId}\n isHwProcessing={false}\n hwDetails={HOMEWORK_DETAILS as INodeDataProps[]}\n onTestStart={emptyFunction}\n onNodeAttempt={emptyFunction}\n onTestPreview={emptyFunction}\n onNodeView={emptyFunction}\n onTestReview={emptyFunction}\n onNodeReview={emptyFunction}\n onNodeUnassign={emptyFunction}\n />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -197,\n tooltipYCoOrdinates: -12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <TooltipItem\n text={`Homework is now easy to access and easy to ${\n isStudent ? 'complete' : 'review'\n }!`}\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HomeworkCard\n isInQueue={false}\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={HOMEWORK_DETAILS[0] as INodeDataProps}\n renderAs=\"homework\"\n studentId={studentId}\n shouldOpenOnRight={false}\n />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -35,\n tooltipYCoOrdinates: -7,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Track homework status and their due dates.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: homepageRef,\n elementToHighlight: (\n <ELementWrapper>\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({RECENT_CHAPTERS?.length})\n </Text>\n <ChaptersWrapper>\n {RECENT_CHAPTERS.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter as unknown as IChapterDataProps}\n onChapterClick={emptyFunction}\n itemIndex={idx}\n />\n ))}\n </ChaptersWrapper>\n </FlexView>\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -200,\n tooltipYCoOrdinates: -10,\n backgroundColor: 'YELLOW_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Access all your recent chapters in one place.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, homepageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n if (userType === 'STUDENT') {\n window.scrollTo(0, 0);\n } else {\n document.getElementById('tab-content-container')?.scrollTo(0, 0);\n }\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 200);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n },\n [handleEndJourney, emptyFunction, handleNextCoachmark, journeyId, setJourney],\n );\n\n const data = useMemo(\n () => ({\n homepageRef,\n homeworkRef,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useHomePageJourney","journeyId","JOURNEY_ID_STUDENT","homepageRef","useRef","homeworkRef","recentChaptersRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","emptyFunction","useCallback","handleEndJourney","handleNextCoachmark","startJourney","studentId","stream","userType","title","subtext","HOMEWORK_DETAILS","isStudent","homepageSteps","IndicatorType","jsxs","FlexView","jsx","HwCardListView","Text","_a","RECENT_CHAPTERS","ChaptersWrapper","chapter","idx","ChapterItem","MilestoneListContainer","TooltipItem","ELementWrapper","HomeworkCard","_b","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;AAuBO,MAAMA,KAAqB,MAAM;AACtC,QAAMC,IAAYC,EAAmB,kBAE/BC,IAAcC,EAAuB,IAAI,GACzCC,IAAcD,EAAuB,IAAI,GACzCE,IAAoBF,EAAuB,IAAI,GAC/CG,IAAYH,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAI,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GAEvDC,IAAgBC,EAAY,MAAM,MAAM,CAAE,CAAA,GAE1CC,IAAmBD,EAAY,MAAM;AACzC,IAAAH,EAAWT,CAAS,GACX,SAAA,KAAK,MAAM,WAAW;AAAA,EAAA,GAC9B,CAACS,GAAYT,CAAS,CAAC,GAEpBc,IAAsBF,EAAY,MAAM;AAC9B,IAAAL,EAAAP,GAAW,IAAO,GAAG,EAAI;AAAA,EAAA,GACtC,CAACO,GAAeP,CAAS,CAAC,GAEvBe,IAAeH;AAAA,IACnB,CAAC,EAAE,WAAAI,GAAW,QAAAC,GAAQ,UAAAC,QAA2C;;AAC/D,YAAM,EAAE,OAAAC,GAAO,SAAAC,EAAQ,IAAIC,EAAiB,CAAC,GACvCC,IAAYJ,MAAa;AAE/B,UAAI,EAAChB,KAAA,QAAAA,EAAa,YAAW,EAACE,KAAA,QAAAA,EAAa;AACzC;AAGF,YAAMmB,IAAmC;AAAA,QACvC;AAAA,UACE,+BAA+BrB;AAAA,UAC/B,UAAU;AAAA,UACV,MAAMsB,EAAc;AAAA,UACpB,oBACE,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,cACX,gBAAgB;AAAA,cAChB,aAAY;AAAA,cACZ,SAAS;AAAA,cACT,UAAU;AAAA,cAEV,UAAA;AAAA,gBAAA,gBAA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AHND,EAAQ;AAAA,YAKhB,CAAA,GACH;AAAA,UAAA,EAAA,CACF,EACF,CAAA;AAAA,UAEF,MAAMT,EAAc;AAAA,UACpB,WAAW;AAAA,YACT,UAAU;AAAA,YACV,qBAAqB;AAAA,YACrB,qBAAqB;AAAA,YACrB,iBAAiB;AAAA,YACjB,aAAa;AAAA,YACb,YAAY;AAAA,YACZ,mBAAmB;AAAA,YACnB,WAAW;AAAA,YACX,OAAO;AAAA,YACP,aACE,gBAAAG;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,aAAY;AAAA,gBACZ,eAAexB;AAAA,cAAA;AAAA,YACjB;AAAA,UAEJ;AAAA,UACA,UAAU;AAAA,QACZ;AAAA,MAAA;AAGF,MAAAL,EAAWR,GAAWuB,CAAa;AAE7B,YAAAkB,IAAmB,WAAW,MAAM;;AACxC,qBAAaA,CAAgB,GACzBvB,MAAa,YACR,OAAA,SAAS,GAAG,CAAC,KAEpBY,IAAA,SAAS,eAAe,uBAAuB,MAA/C,QAAAA,EAAkD,SAAS,GAAG,IAEvD,SAAA,KAAK,MAAM,WAAW,UACXhB;SACnB,GAAG;AAEI,MAAAR,EAAA,QAAQ,KAAKmC,CAAgB;AAAA,IACzC;AAAA,IACA,CAAC5B,GAAkBF,GAAeG,GAAqBd,GAAWQ,CAAU;AAAA,EAAA,GAGxEkC,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,aAAAzC;AAAA,MACA,aAAAE;AAAA,MACA,cAAAW;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIf,SAAA6B,EAAU,MACD,MAAM;AACX,IAAAtC,EAAU,QAAQ,QAAQ,CAASuC,MAAA,aAAaA,CAAK,CAAC,GACtDvC,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEEoC;AACT;"}
1
+ {"version":3,"file":"use-home-page-journey.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/use-home-page-journey.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { IChapterDataProps } from '../../../chapters/chapter/chapter-types';\nimport type { TCourseStream } from '../../../milestone/create/milestone-create-types';\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\nimport type { IHomepageStartJourneyProps } from './homepage-journey-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport ChapterItem from '../../../chapters/chapters-list/chapter-item/chapter-item';\nimport HomeworkCard from '../../../homework/homework-card';\nimport HwCardListView from '../../../homework/hw-card-list/hw-card-list-view';\nimport MilestoneListContainer from '../../../milestone/milestone-list-container/milestone-list-container';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { JOURNEY_ID_STUDENT } from '../../journey-id/journey-id-student';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport { HOMEWORK_DETAILS } from './home-page-homeworks-mock';\nimport { RECENT_CHAPTERS } from './recent-chapters-mock';\nimport { ChaptersWrapper, ELementWrapper } from './styles';\nimport TooltipItem from './tooltip-item';\n\nexport const useHomePageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY;\n\n const homepageRef = useRef<HTMLDivElement>(null);\n const homeworkRef = useRef<HTMLDivElement>(null);\n const recentChaptersRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const emptyFunction = useCallback(() => null, []);\n\n const handleEndJourney = useCallback(() => {\n endJourney(journeyId);\n document.body.style.overflow = 'unset';\n }, [endJourney, journeyId]);\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, true);\n }, [nextCoachmark, journeyId]);\n\n const startJourney = useCallback(\n ({ studentId, stream, userType }: IHomepageStartJourneyProps) => {\n const { title = '', subtext = '' } = HOMEWORK_DETAILS.assigned_homeworks[0] || {};\n const isStudent = userType === 'STUDENT';\n\n if (!homepageRef?.current || !homeworkRef?.current) {\n return;\n }\n\n const homepageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: homepageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <FlexView\n $flexGapX={2.5}\n $marginBottomX={8}\n $background=\"WHITE\"\n $widthX={47}\n $gutterX={1}\n >\n <HwCardListView\n userType={userType}\n studentId={studentId}\n isHwProcessing={false}\n hwDetails={HOMEWORK_DETAILS}\n onTestStart={emptyFunction}\n onNodeAttempt={emptyFunction}\n onTestPreview={emptyFunction}\n onNodeView={emptyFunction}\n onTestReview={emptyFunction}\n onNodeReview={emptyFunction}\n onNodeUnassign={emptyFunction}\n />\n <FlexView $flexRowGapX={1} ref={recentChaptersRef}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({RECENT_CHAPTERS?.length})\n </Text>\n <ChaptersWrapper>\n {RECENT_CHAPTERS.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter as unknown as IChapterDataProps}\n onChapterClick={emptyFunction}\n itemIndex={idx}\n />\n ))}\n </ChaptersWrapper>\n </FlexView>\n <MilestoneListContainer\n milestoneType=\"ACTIVE\"\n activeMilestoneId={''}\n activeTabId={''}\n canCreatePlan={false}\n courseStream={stream as TCourseStream}\n isClassOngoing={false}\n isStudentPresent={false}\n parentName={''}\n studentId={studentId}\n studentName={''}\n teacherName={''}\n userType={userType}\n //* Callbacks\n onAddChapter={emptyFunction}\n onAddOutcome={emptyFunction}\n onChapterClick={emptyFunction}\n onCreatePlan={emptyFunction}\n onDelete={emptyFunction}\n onDraftPublish={emptyFunction}\n onEdit={emptyFunction}\n onExpandPastMilestones={emptyFunction}\n onNodeView={emptyFunction}\n onNodeReview={emptyFunction}\n onWidgetTabSelection={emptyFunction}\n //* Resource callbacks\n onAssignResources={emptyFunction}\n onNodeReset={emptyFunction}\n onNodeUnassign={emptyFunction}\n //* Tests callbacks\n onCreateMilestoneTest={emptyFunction}\n onTestPreview={emptyFunction}\n onTestReview={emptyFunction}\n />\n </FlexView>\n ),\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: 0,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text={`Welcome to the all new ${isStudent ? 'learning' : 'tutoring'} homepage.`}\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HwCardListView\n userType={userType}\n studentId={studentId}\n isHwProcessing={false}\n hwDetails={HOMEWORK_DETAILS}\n onTestStart={emptyFunction}\n onNodeAttempt={emptyFunction}\n onTestPreview={emptyFunction}\n onNodeView={emptyFunction}\n onTestReview={emptyFunction}\n onNodeReview={emptyFunction}\n onNodeUnassign={emptyFunction}\n />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -197,\n tooltipYCoOrdinates: -12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <TooltipItem\n text={`Homework is now easy to access and easy to ${\n isStudent ? 'complete' : 'review'\n }!`}\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HomeworkCard\n isInQueue={false}\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={HOMEWORK_DETAILS.assigned_homeworks[0] as INodeDataProps}\n renderAs=\"homework\"\n studentId={studentId}\n shouldOpenOnRight={false}\n />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -35,\n tooltipYCoOrdinates: -7,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Track homework status and their due dates.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: homepageRef,\n elementToHighlight: (\n <ELementWrapper>\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({RECENT_CHAPTERS?.length})\n </Text>\n <ChaptersWrapper>\n {RECENT_CHAPTERS.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter as unknown as IChapterDataProps}\n onChapterClick={emptyFunction}\n itemIndex={idx}\n />\n ))}\n </ChaptersWrapper>\n </FlexView>\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -200,\n tooltipYCoOrdinates: -10,\n backgroundColor: 'YELLOW_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Access all your recent chapters in one place.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, homepageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n if (userType === 'STUDENT') {\n window.scrollTo(0, 0);\n } else {\n document.getElementById('tab-content-container')?.scrollTo(0, 0);\n }\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 200);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n },\n [handleEndJourney, emptyFunction, handleNextCoachmark, journeyId, setJourney],\n );\n\n const data = useMemo(\n () => ({\n homepageRef,\n homeworkRef,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useHomePageJourney","journeyId","JOURNEY_ID_STUDENT","homepageRef","useRef","homeworkRef","recentChaptersRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","emptyFunction","useCallback","handleEndJourney","handleNextCoachmark","startJourney","studentId","stream","userType","title","subtext","HOMEWORK_DETAILS","isStudent","homepageSteps","IndicatorType","jsxs","FlexView","jsx","HwCardListView","Text","_a","RECENT_CHAPTERS","ChaptersWrapper","chapter","idx","ChapterItem","MilestoneListContainer","TooltipItem","ELementWrapper","HomeworkCard","_b","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;AAuBO,MAAMA,KAAqB,MAAM;AACtC,QAAMC,IAAYC,EAAmB,kBAE/BC,IAAcC,EAAuB,IAAI,GACzCC,IAAcD,EAAuB,IAAI,GACzCE,IAAoBF,EAAuB,IAAI,GAC/CG,IAAYH,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAI,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GAEvDC,IAAgBC,EAAY,MAAM,MAAM,CAAE,CAAA,GAE1CC,IAAmBD,EAAY,MAAM;AACzC,IAAAH,EAAWT,CAAS,GACX,SAAA,KAAK,MAAM,WAAW;AAAA,EAAA,GAC9B,CAACS,GAAYT,CAAS,CAAC,GAEpBc,IAAsBF,EAAY,MAAM;AAC9B,IAAAL,EAAAP,GAAW,IAAO,GAAG,EAAI;AAAA,EAAA,GACtC,CAACO,GAAeP,CAAS,CAAC,GAEvBe,IAAeH;AAAA,IACnB,CAAC,EAAE,WAAAI,GAAW,QAAAC,GAAQ,UAA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C,CAAgB;AAAA,IACzC;AAAA,IACA,CAAC5B,GAAkBF,GAAeG,GAAqBd,GAAWQ,CAAU;AAAA,EAAA,GAGxEkC,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,aAAAzC;AAAA,MACA,aAAAE;AAAA,MACA,cAAAW;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIf,SAAA6B,EAAU,MACD,MAAM;AACX,IAAAtC,EAAU,QAAQ,QAAQ,CAASuC,MAAA,aAAaA,CAAK,CAAC,GACtDvC,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEEoC;AACT;"}
package/dist/index.d.ts CHANGED
@@ -2409,38 +2409,38 @@ export declare interface INodeDataProps {
2409
2409
  attempt_location: TSheetAttemptLocation_2;
2410
2410
  block_id: string;
2411
2411
  card_header: string;
2412
- chapter_id: string;
2412
+ chapter_id: string | null;
2413
+ chapter_name?: string;
2413
2414
  complete_status: boolean;
2414
2415
  course_type: TCourseType;
2415
2416
  desmos_calculator_enabled: boolean;
2416
2417
  due_date_ts: number | null;
2418
+ homework_id?: string;
2419
+ id: string;
2420
+ image_hue: THueNames;
2421
+ image_url: string | null;
2417
2422
  is_lesson_v3_enabled: boolean;
2418
2423
  is_optional: boolean;
2419
2424
  is_timed: boolean;
2420
2425
  is_worksheet_v3: boolean | null;
2426
+ items?: TNodeDataTestItemsDataProps[];
2421
2427
  learnosity_activity_ref: string;
2422
2428
  marked_as_completed: boolean;
2423
2429
  node_id: string;
2424
- id: string;
2425
2430
  node_type: TNodeTypes_2;
2426
- sheet_statement: string;
2427
2431
  permissions: INodePermissions;
2432
+ sheet_statement: string;
2428
2433
  sheet_time: number | null;
2429
2434
  state: TSheetStates;
2435
+ subtext: string | null;
2430
2436
  title: string;
2431
- user_chapter_id: string | null;
2432
- user_node_id: string | null;
2433
- worksheet_id: string;
2434
- image_url: string;
2435
- image_hue: THueNames;
2436
2437
  total_questions: number | null;
2437
2438
  unlocked_on_ts: number | null;
2438
- items?: TNodeDataTestItemsDataProps[];
2439
- user_milestone_id?: string;
2440
2439
  user_attempt_id: string | null;
2441
- subtext: string | null;
2442
- homework_id?: string;
2443
- chapter_name?: string;
2440
+ user_chapter_id: string | null;
2441
+ user_milestone_id?: string;
2442
+ user_node_id: string | null;
2443
+ worksheet_id: string;
2444
2444
  }
2445
2445
 
2446
2446
  declare interface INodePermissions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.1.0",
3
+ "version": "3.1.1-beta-0.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"