@cuemath/leap 2.9.9-as3 → 2.9.9-as6

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.
Files changed (53) hide show
  1. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +28 -28
  2. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
  3. package/dist/features/chapters-v2/chapter-details/chapter-details.js +92 -93
  4. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  5. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +1 -2
  6. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +1 -1
  7. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +5 -5
  8. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -1
  9. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +2 -2
  10. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
  11. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +2 -2
  12. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
  13. package/dist/features/circle-games/games/tutorial/constants.js +2 -2
  14. package/dist/features/circle-games/games/tutorial/constants.js.map +1 -1
  15. package/dist/features/circle-games/games/tutorial/tutorial-styled.js +6 -6
  16. package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
  17. package/dist/features/circle-games/games/web-view/web-view.js +52 -45
  18. package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
  19. package/dist/features/circle-games/leaderboard/comps/banner/banner.js +6 -6
  20. package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
  21. package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js +1 -1
  22. package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js.map +1 -1
  23. package/dist/features/circle-games/leaderboard/leaderboard-styled.js +1 -1
  24. package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
  25. package/dist/features/circle-games/leaderboard/leaderboard.js +9 -9
  26. package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
  27. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +8 -8
  28. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
  29. package/dist/features/circle-games/sign-up/constants.js +9 -9
  30. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  31. package/dist/features/homework/hw-card-list/hw-card-list-view.js +157 -0
  32. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -0
  33. package/dist/features/homework/hw-card-list/hw-card-list.js +58 -182
  34. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  35. package/dist/features/journey/comps/coachmark/coachmark-styled.js +22 -11
  36. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  37. package/dist/features/journey/hooks/use-chapter-journey.js +93 -93
  38. package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
  39. package/dist/features/journey/hooks/use-home-page-journey.js +197 -107
  40. package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -1
  41. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +587 -0
  42. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -0
  43. package/dist/features/journey/mocks/home-page-homwworks-mock.js +268 -0
  44. package/dist/features/journey/mocks/home-page-homwworks-mock.js.map +1 -0
  45. package/dist/features/journey/mocks/recent-chapters-mock.js +531 -0
  46. package/dist/features/journey/mocks/recent-chapters-mock.js.map +1 -0
  47. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  48. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
  49. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  50. package/dist/features/ui/arc-button/constants.js +4 -4
  51. package/dist/features/ui/arc-button/constants.js.map +1 -1
  52. package/dist/index.d.ts +7 -9
  53. package/package.json +1 -1
@@ -1,98 +1,145 @@
1
- import { jsx as e, jsxs as p, Fragment as B } from "react/jsx-runtime";
2
- import { useRef as s, useCallback as L, useMemo as I, useEffect as N } from "react";
3
- import G from "../../homework/homework-card.js";
4
- import P from "../../homework/hw-card-list/hw-card-list.js";
5
- import $ from "../../recent-chapters/recent-chapters.js";
6
- import h from "../../ui/buttons/button/button.js";
7
- import c from "../../ui/layout/flex-view.js";
8
- import u from "../../ui/text/text.js";
9
- import { ELementWrapper as H } from "../comps/coachmark/coachmark-styled.js";
10
- import { JOURNEY_ID_STUDENT as T } from "../journey-id/journey-id-student.js";
11
- import { IndicatorType as C } from "../use-journey/constants.js";
1
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
+ import { useRef as h, useCallback as p, useMemo as K, useEffect as G } from "react";
3
+ import P from "../../chapters/chapters-list/chapter-item/chapter-item.js";
4
+ import U from "../../homework/homework-card.js";
5
+ import H from "../../homework/hw-card-list/hw-card-list-view.js";
6
+ import D from "../../milestone/milestone-list-container/milestone-list-container.js";
7
+ import C from "../../ui/buttons/button/button.js";
8
+ import r from "../../ui/layout/flex-view.js";
9
+ import s from "../../ui/text/text.js";
10
+ import { ChaptersWrapper as X, ELementWrapper as A } from "../comps/coachmark/coachmark-styled.js";
11
+ import { JOURNEY_ID_STUDENT as z } from "../journey-id/journey-id-student.js";
12
+ import { HOMEWORK_DETAILS as w } from "../mocks/home-page-homwworks-mock.js";
13
+ import { RECENT_CHAPTERS as f } from "../mocks/recent-chapters-mock.js";
14
+ import { IndicatorType as u } from "../use-journey/constants.js";
12
15
  import { useJourney as J } from "../use-journey/use-journey.js";
13
- const V = () => {
14
- const o = T.HOMEPAGE_JOURNEY, i = s(null), n = s(null), l = s(null), d = s(null), f = s([]), { nextCoachmark: r, setJourney: A, endJourney: w, addCoachmark: E } = J(), b = L(
15
- (t, a, m) => {
16
- d.current ? (E(T.HOMEPAGE_JOURNEY, {
17
- originalElementToHighlightRef: d,
18
- elementToHighlight: /* @__PURE__ */ e(c, { $widthX: 45, children: /* @__PURE__ */ e(
19
- $,
20
- {
21
- studentId: t,
22
- courseStream: m,
23
- userType: a ? "STUDENT" : "TEACHER",
24
- onChapterClick: () => null
25
- }
26
- ) }),
27
- isActive: !1,
28
- type: C.TOOLTIP,
29
- indicator: {
30
- tooltipItem: /* @__PURE__ */ p(c, { $flexRowGapX: 0.75, $justifyContent: "flex-start", children: [
31
- /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: "Access all your recent chapters in one place." }),
32
- /* @__PURE__ */ e(
33
- h,
34
- {
35
- label: "Got it",
36
- size: "xsmall",
37
- widthX: 6,
38
- renderAs: "secondary",
39
- onClick: () => w(T.HOMEPAGE_JOURNEY)
40
- }
41
- )
42
- ] }),
43
- position: "top",
44
- renderAs: "primary",
45
- tooltipXCoOrdinates: -227,
46
- tooltipYCoOrdinates: 12,
47
- arrowXCoOrdinates: -110,
48
- backgroundColor: "YELLOW_4",
49
- borderColor: "BLACK",
50
- arrowColor: "BLACK",
51
- arrowSize: 12,
52
- width: 264
53
- }
54
- }), r(o, !1, 0, !0)) : w(o);
55
- },
56
- [r, o, E, w]
57
- ), y = L(
58
- ({ hwDetails: t, studentId: a, stream: m, userType: g }) => {
59
- const { title: k, subtext: X } = t[0], O = g === "STUDENT";
60
- if (!(i != null && i.current) || !(n != null && n.current) || !(l != null && l.current))
16
+ const ae = () => {
17
+ const n = z.HOMEPAGE_JOURNEY, i = h(null), a = h(null), $ = h(null), g = h([]), { nextCoachmark: R, setJourney: b, endJourney: E } = J(), e = p(() => null, []), O = p(() => {
18
+ E(n);
19
+ }, [E, n]), d = p(() => {
20
+ R(n, !1, 0, !0);
21
+ }, [R, n]), x = p(
22
+ ({ studentId: l, stream: v, userType: c }) => {
23
+ var y, L;
24
+ const { title: S, subtext: B } = w[0], N = c === "STUDENT";
25
+ if (!(i != null && i.current) || !(a != null && a.current))
61
26
  return;
62
- const S = [
27
+ const _ = [
63
28
  {
64
29
  originalElementToHighlightRef: i,
65
30
  isActive: !1,
66
- type: C.TOOLTIP,
67
- elementToHighlight: /* @__PURE__ */ e(B, {}),
31
+ type: u.TOOLTIP,
32
+ elementToHighlight: /* @__PURE__ */ t(r, { $flexGapX: 2.5, $marginBottomX: 8, $background: "WHITE", $widthX: 45, children: [
33
+ /* @__PURE__ */ o(
34
+ H,
35
+ {
36
+ userType: c,
37
+ studentId: l,
38
+ isHwProcessing: !1,
39
+ hwDetails: w,
40
+ onTestStart: e,
41
+ onNodeAttempt: e,
42
+ onTestPreview: e,
43
+ onNodeView: e,
44
+ onTestReview: e,
45
+ onNodeReview: e,
46
+ onNodeUnassign: e
47
+ }
48
+ ),
49
+ /* @__PURE__ */ t(r, { $flexRowGapX: 1, ref: $, children: [
50
+ /* @__PURE__ */ t(s, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
51
+ "Recent Chapters (",
52
+ (y = f) == null ? void 0 : y.length,
53
+ ")"
54
+ ] }),
55
+ /* @__PURE__ */ o(X, { children: f.map((m, T) => /* @__PURE__ */ o(
56
+ P,
57
+ {
58
+ chapter: m,
59
+ onChapterClick: e,
60
+ itemIndex: T
61
+ },
62
+ m.id
63
+ )) })
64
+ ] }),
65
+ /* @__PURE__ */ o(
66
+ D,
67
+ {
68
+ milestoneType: "ACTIVE",
69
+ activeMilestoneId: "",
70
+ activeTabId: "",
71
+ canCreatePlan: !1,
72
+ courseStream: v,
73
+ isClassOngoing: !1,
74
+ isStudentPresent: !1,
75
+ parentName: "",
76
+ studentId: l,
77
+ studentName: "",
78
+ teacherName: "",
79
+ userType: c,
80
+ onAddChapter: e,
81
+ onAddOutcome: e,
82
+ onChapterClick: e,
83
+ onCreatePlan: e,
84
+ onDelete: e,
85
+ onDraftPublish: e,
86
+ onEdit: e,
87
+ onExpandPastMilestones: e,
88
+ onNodeView: e,
89
+ onNodeReview: e,
90
+ onWidgetTabSelection: e,
91
+ onAssignResources: e,
92
+ onNodeReset: e,
93
+ onNodeUnassign: e,
94
+ onCreateMilestoneTest: e,
95
+ onTestPreview: e,
96
+ onTestReview: e
97
+ }
98
+ )
99
+ ] }),
68
100
  indicator: {
69
101
  position: "top",
70
- tooltipXCoOrdinates: 360,
71
- tooltipYCoOrdinates: 30,
102
+ tooltipXCoOrdinates: 0,
103
+ tooltipYCoOrdinates: 0,
72
104
  backgroundColor: "BLUE_4",
73
105
  borderColor: "BLACK",
74
106
  arrowColor: "BLACK",
75
107
  arrowSize: 12,
76
108
  width: 264,
77
- tooltipItem: /* @__PURE__ */ p(c, { $flexRowGapX: 0.75, children: [
78
- /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: O ? "Welcome to the all new learning homepage." : "Welcome to the all new tutoring homepage." }),
79
- /* @__PURE__ */ e(
80
- h,
109
+ tooltipItem: /* @__PURE__ */ t(r, { $flexRowGapX: 0.75, children: [
110
+ /* @__PURE__ */ o(s, { $renderAs: "ab2-bold", children: N ? "Welcome to the all new learning homepage." : "Welcome to the all new tutoring homepage." }),
111
+ /* @__PURE__ */ o(
112
+ C,
81
113
  {
82
114
  label: "Next",
83
115
  size: "xsmall",
84
116
  widthX: 6,
85
117
  renderAs: "secondary",
86
- onClick: () => r(o, !1, 0, !0)
118
+ onClick: d
87
119
  }
88
120
  )
89
121
  ] })
90
122
  }
91
123
  },
92
124
  {
93
- originalElementToHighlightRef: n,
94
- elementToHighlight: /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(P, { userType: g, studentId: a, stream: m }) }),
95
- type: C.TOOLTIP,
125
+ originalElementToHighlightRef: a,
126
+ elementToHighlight: /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
127
+ H,
128
+ {
129
+ userType: c,
130
+ studentId: l,
131
+ isHwProcessing: !1,
132
+ hwDetails: w,
133
+ onTestStart: e,
134
+ onNodeAttempt: e,
135
+ onTestPreview: e,
136
+ onNodeView: e,
137
+ onTestReview: e,
138
+ onNodeReview: e,
139
+ onNodeUnassign: e
140
+ }
141
+ ) }),
142
+ type: u.TOOLTIP,
96
143
  indicator: {
97
144
  position: "top",
98
145
  tooltipXCoOrdinates: -197,
@@ -103,16 +150,16 @@ const V = () => {
103
150
  arrowColor: "BLACK",
104
151
  width: 264,
105
152
  arrowSize: 12,
106
- tooltipItem: /* @__PURE__ */ p(c, { $flexRowGapX: 0.75, children: [
107
- /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: O ? "Homework is now easy to access and easy to complete!" : "Homework is now easy to access and easy to review!" }),
108
- /* @__PURE__ */ e(
109
- h,
153
+ tooltipItem: /* @__PURE__ */ t(r, { $flexRowGapX: 0.75, children: [
154
+ /* @__PURE__ */ o(s, { $renderAs: "ab2-bold", children: N ? "Homework is now easy to access and easy to complete!" : "Homework is now easy to access and easy to review!" }),
155
+ /* @__PURE__ */ o(
156
+ C,
110
157
  {
111
158
  label: "Next",
112
159
  size: "xsmall",
113
160
  widthX: 6,
114
161
  renderAs: "secondary",
115
- onClick: () => r(o, !1, 0, !0)
162
+ onClick: d
116
163
  }
117
164
  )
118
165
  ] })
@@ -120,21 +167,21 @@ const V = () => {
120
167
  isActive: !1
121
168
  },
122
169
  {
123
- originalElementToHighlightRef: l,
124
- elementToHighlight: /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(
125
- G,
170
+ originalElementToHighlightRef: a,
171
+ elementToHighlight: /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
172
+ U,
126
173
  {
127
174
  isInQueue: !1,
128
- userType: g,
129
- header: k,
130
- subHeader: X || "",
131
- nodeData: t[0],
175
+ userType: c,
176
+ header: S,
177
+ subHeader: B || "",
178
+ nodeData: w[0],
132
179
  renderAs: "homework",
133
- studentId: a,
180
+ studentId: l,
134
181
  shouldOpenOnRight: !1
135
182
  }
136
183
  ) }),
137
- type: C.TOOLTIP,
184
+ type: u.TOOLTIP,
138
185
  indicator: {
139
186
  position: "top",
140
187
  tooltipXCoOrdinates: -35,
@@ -145,16 +192,61 @@ const V = () => {
145
192
  arrowXCoOrdinates: -97,
146
193
  arrowSize: 12,
147
194
  width: 264,
148
- tooltipItem: /* @__PURE__ */ p(c, { $flexRowGapX: 0.75, children: [
149
- /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: "Track homework status and their due dates." }),
150
- /* @__PURE__ */ e(
151
- h,
195
+ tooltipItem: /* @__PURE__ */ t(r, { $flexRowGapX: 0.75, children: [
196
+ /* @__PURE__ */ o(s, { $renderAs: "ab2-bold", children: "Track homework status and their due dates." }),
197
+ /* @__PURE__ */ o(
198
+ C,
199
+ {
200
+ label: "Next",
201
+ size: "xsmall",
202
+ widthX: 6,
203
+ renderAs: "secondary",
204
+ onClick: d
205
+ }
206
+ )
207
+ ] })
208
+ },
209
+ isActive: !1
210
+ },
211
+ {
212
+ originalElementToHighlightRef: i,
213
+ elementToHighlight: /* @__PURE__ */ o(A, { children: /* @__PURE__ */ t(r, { $flexRowGapX: 1, children: [
214
+ /* @__PURE__ */ t(s, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
215
+ "Recent Chapters (",
216
+ (L = f) == null ? void 0 : L.length,
217
+ ")"
218
+ ] }),
219
+ /* @__PURE__ */ o(X, { children: f.map((m, T) => /* @__PURE__ */ o(
220
+ P,
221
+ {
222
+ chapter: m,
223
+ onChapterClick: e,
224
+ itemIndex: T
225
+ },
226
+ m.id
227
+ )) })
228
+ ] }) }),
229
+ type: u.TOOLTIP,
230
+ indicator: {
231
+ position: "top",
232
+ tooltipXCoOrdinates: -200,
233
+ tooltipYCoOrdinates: -10,
234
+ backgroundColor: "PURPLE_4",
235
+ borderColor: "BLACK",
236
+ arrowColor: "BLACK",
237
+ arrowXCoOrdinates: -97,
238
+ arrowSize: 12,
239
+ width: 264,
240
+ tooltipItem: /* @__PURE__ */ t(r, { $flexRowGapX: 0.75, $justifyContent: "flex-start", children: [
241
+ /* @__PURE__ */ o(s, { $renderAs: "ab2-bold", children: "Access all your recent chapters in one place." }),
242
+ /* @__PURE__ */ o(
243
+ C,
152
244
  {
153
- label: d.current ? "Next" : "Got it",
245
+ label: "Got it",
154
246
  size: "xsmall",
155
247
  widthX: 6,
156
248
  renderAs: "secondary",
157
- onClick: () => b(a, O, m)
249
+ onClick: O
158
250
  }
159
251
  )
160
252
  ] })
@@ -162,28 +254,26 @@ const V = () => {
162
254
  isActive: !1
163
255
  }
164
256
  ];
165
- A(o, S);
166
- const x = setTimeout(() => {
167
- clearTimeout(x), r(o);
257
+ b(n, _);
258
+ const k = setTimeout(() => {
259
+ clearTimeout(k), d();
168
260
  }, 200);
169
- f.current.push(x);
261
+ g.current.push(k);
170
262
  },
171
- [A, o, r, b]
172
- ), R = I(
263
+ [O, e, d, n, b]
264
+ ), I = K(
173
265
  () => ({
174
266
  homepageRef: i,
175
- homeworkRef: n,
176
- individualHomeworkRef: l,
177
- recentChaptersRef: d,
178
- startJourney: y
267
+ homeworkRef: a,
268
+ startJourney: x
179
269
  }),
180
- [y]
270
+ [x]
181
271
  );
182
- return N(() => () => {
183
- f.current.forEach((t) => clearTimeout(t)), f.current = [];
184
- }, []), R;
272
+ return G(() => () => {
273
+ g.current.forEach((l) => clearTimeout(l)), g.current = [];
274
+ }, []), I;
185
275
  };
186
276
  export {
187
- V as useHomePageJourney
277
+ ae as useHomePageJourney
188
278
  };
189
279
  //# sourceMappingURL=use-home-page-journey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-home-page-journey.js","sources":["../../../../src/features/journey/hooks/use-home-page-journey.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { TCourseStream } from '../../milestone/create/milestone-create-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { IHomepageStartJourneyProps } from '../types/homepage-journey-types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport HWCardList from '../../homework/hw-card-list/hw-card-list';\nimport RecentChapters from '../../recent-chapters/recent-chapters';\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { ELementWrapper } from '../comps/coachmark/coachmark-styled';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\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 individualHomeworkRef = useRef<HTMLDivElement>(null);\n const recentChaptersRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney, addCoachmark } = useJourney();\n\n const handleLastStep = useCallback(\n (userId: string, isStudent: boolean, courseValue: string) => {\n if (recentChaptersRef.current) {\n addCoachmark(JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY, {\n originalElementToHighlightRef: recentChaptersRef,\n elementToHighlight: (\n <FlexView $widthX={45}>\n <RecentChapters\n studentId={userId}\n courseStream={courseValue as TCourseStream}\n userType={isStudent ? 'STUDENT' : 'TEACHER'}\n onChapterClick={() => null}\n />\n </FlexView>\n ),\n isActive: false,\n type: IndicatorType.TOOLTIP,\n indicator: {\n tooltipItem: (\n <FlexView $flexRowGapX={0.75} $justifyContent=\"flex-start\">\n <Text $renderAs=\"ab2-bold\">Access all your recent chapters in one place.</Text>\n <Button\n label=\"Got it\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => endJourney(JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY)}\n />\n </FlexView>\n ),\n position: 'top',\n renderAs: 'primary',\n tooltipXCoOrdinates: -227,\n tooltipYCoOrdinates: 12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'YELLOW_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n } as IArrowTooltipProps,\n });\n nextCoachmark(journeyId, false, 0, true);\n } else {\n endJourney(journeyId);\n }\n },\n [nextCoachmark, journeyId, addCoachmark, endJourney],\n );\n\n const startJourney = useCallback(\n ({ hwDetails, studentId, stream, userType }: IHomepageStartJourneyProps) => {\n const { title, subtext } = hwDetails[0] as INodeDataProps;\n const isStudent = userType === 'STUDENT';\n\n if (!homepageRef?.current || !homeworkRef?.current || !individualHomeworkRef?.current) {\n return;\n }\n\n const homepageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: homepageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: 360,\n tooltipYCoOrdinates: 30,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Welcome to the all new learning homepage.'\n : 'Welcome to the all new tutoring homepage.'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HWCardList userType={userType} studentId={studentId} stream={stream} />\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 <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Homework is now easy to access and easy to complete!'\n : 'Homework is now easy to access and easy to review!'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: individualHomeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HomeworkCard\n isInQueue={false}\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={hwDetails[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 <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">Track homework status and their due dates.</Text>\n <Button\n label={recentChaptersRef.current ? 'Next' : 'Got it'}\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => handleLastStep(studentId, isStudent, stream)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, homepageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, 200);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n },\n [setJourney, journeyId, nextCoachmark, handleLastStep],\n );\n\n const data = useMemo(\n () => ({\n homepageRef,\n homeworkRef,\n individualHomeworkRef,\n recentChaptersRef,\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","individualHomeworkRef","recentChaptersRef","timerRefs","nextCoachmark","setJourney","endJourney","addCoachmark","useJourney","handleLastStep","useCallback","userId","isStudent","courseValue","jsx","FlexView","RecentChapters","IndicatorType","jsxs","Text","Button","startJourney","hwDetails","studentId","stream","userType","title","subtext","homepageSteps","Fragment","ELementWrapper","HWCardList","HomeworkCard","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;AAmBO,MAAMA,IAAqB,MAAM;AACtC,QAAMC,IAAYC,EAAmB,kBAE/BC,IAAcC,EAAuB,IAAI,GACzCC,IAAcD,EAAuB,IAAI,GACzCE,IAAwBF,EAAuB,IAAI,GACnDG,IAAoBH,EAAuB,IAAI,GAC/CI,IAAYJ,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAK,GAAe,YAAAC,GAAY,YAAAC,GAAY,cAAAC,EAAA,IAAiBC,KAE1DC,IAAiBC;AAAA,IACrB,CAACC,GAAgBC,GAAoBC,MAAwB;AAC3D,MAAIX,EAAkB,WACpBK,EAAaV,EAAmB,kBAAkB;AAAA,QAChD,+BAA+BK;AAAA,QAC/B,oBACE,gBAAAY,EAACC,GAAS,EAAA,SAAS,IACjB,UAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,WAAWL;AAAA,YACX,cAAcE;AAAA,YACd,UAAUD,IAAY,YAAY;AAAA,YAClC,gBAAgB,MAAM;AAAA,UAAA;AAAA,QAAA,GAE1B;AAAA,QAEF,UAAU;AAAA,QACV,MAAMK,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,aACG,gBAAAC,EAAAH,GAAA,EAAS,cAAc,MAAM,iBAAgB,cAC5C,UAAA;AAAA,YAAC,gBAAAD,EAAAK,GAAA,EAAK,WAAU,YAAW,UAA6C,iDAAA;AAAA,YACxE,gBAAAL;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,OAAM;AAAA,gB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B,CAAE,CAAA,GAEE+B;AACT;"}
1
+ {"version":3,"file":"use-home-page-journey.js","sources":["../../../../src/features/journey/hooks/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 { IHomepageStartJourneyProps } from '../types/homepage-journey-types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-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 Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { ELementWrapper, ChaptersWrapper } from '../comps/coachmark/coachmark-styled';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { HOMEWORK_DETAILS } from '../mocks/home-page-homwworks-mock';\nimport { RECENT_CHAPTERS } from '../mocks/recent-chapters-mock';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\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 }, [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 $flexGapX={2.5} $marginBottomX={8} $background=\"WHITE\" $widthX={45}>\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 <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Welcome to the all new learning homepage.'\n : 'Welcome to the all new tutoring homepage.'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={handleNextCoachmark}\n />\n </FlexView>\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 <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Homework is now easy to access and easy to complete!'\n : 'Homework is now easy to access and easy to review!'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={handleNextCoachmark}\n />\n </FlexView>\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 <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">Track homework status and their due dates.</Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={handleNextCoachmark}\n />\n </FlexView>\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: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75} $justifyContent=\"flex-start\">\n <Text $renderAs=\"ab2-bold\">Access all your recent chapters in one place.</Text>\n <Button\n label=\"Got it\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={handleEndJourney}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, homepageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\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","Button","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,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