@cuemath/leap 3.3.11 → 3.3.12-j1

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 (61) hide show
  1. package/dist/features/parent-dashboard/api/get-student-profile-summary.js +9 -0
  2. package/dist/features/parent-dashboard/api/get-student-profile-summary.js.map +1 -0
  3. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js +9 -0
  4. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js.map +1 -0
  5. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +42 -0
  6. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -0
  7. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +45 -42
  8. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  9. package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js +20 -0
  10. package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js.map +1 -0
  11. package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js +40 -0
  12. package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js.map +1 -0
  13. package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js +44 -0
  14. package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js.map +1 -0
  15. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js +32 -0
  16. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js.map +1 -0
  17. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +13 -0
  18. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
  19. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +44 -0
  20. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -0
  21. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +14 -0
  22. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -0
  23. package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +28 -0
  24. package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -0
  25. package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -2
  26. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  27. package/dist/features/parent-dashboard/parent-dashboard-view.js +139 -127
  28. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  29. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +8 -7
  30. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -1
  31. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +27 -26
  32. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -1
  33. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +15 -13
  34. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
  35. package/dist/features/trial-session/comps/session-report/report-information/report-information.js +1 -1
  36. package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
  37. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +17 -18
  38. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
  39. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  40. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +30 -31
  41. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  42. package/dist/index.d.ts +50 -17
  43. package/dist/index.js +250 -238
  44. package/dist/index.js.map +1 -1
  45. package/dist/node_modules/decode-uri-component/index.js.map +1 -0
  46. package/dist/node_modules/query-string/base.js +1 -1
  47. package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
  48. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  49. package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
  50. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  51. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
  52. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  53. package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
  54. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
  57. package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
  58. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
  59. package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
  60. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
  61. /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
@@ -0,0 +1,9 @@
1
+ import { createGetAPI as t } from "@cuemath/rest-api";
2
+ import { BASE_URL_V1 as r } from "../../../constants/api.js";
3
+ const { useGet: m } = t({
4
+ getURL: (e) => `${r}/students/${e}/course-streams/MATH/goals-preferences/`
5
+ });
6
+ export {
7
+ m as useStudentProfileSummaryGet
8
+ };
9
+ //# sourceMappingURL=get-student-profile-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-student-profile-summary.js","sources":["../../../../src/features/parent-dashboard/api/get-student-profile-summary.ts"],"sourcesContent":["import type { TCourseStream } from '../../milestone/create/milestone-create-types';\nimport type { IMilestoneData } from '../../milestone/milestone-list-container/milestone-list/milestone-list-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\n\nexport type TPreference = {\n preference_category: string;\n preference_code: string;\n preference_name: string;\n};\n\ninterface IStudentPreferences {\n course_stream: TCourseStream;\n preferences: TPreference[];\n student_id: string;\n updated_on_ts: number;\n}\n\nexport interface IStudentProfileSummaryResponse {\n student_preferences: IStudentPreferences;\n user_milestone_data: IMilestoneData[];\n}\n\nconst { useGet: useStudentProfileSummaryGet } = createGetAPI<IStudentProfileSummaryResponse>({\n getURL: studentId =>\n `${BASE_URL_V1}/students/${studentId}/course-streams/MATH/goals-preferences/`,\n});\n\nexport { useStudentProfileSummaryGet };\n"],"names":["useStudentProfileSummaryGet","createGetAPI","studentId","BASE_URL_V1"],"mappings":";;AAyBA,MAAM,EAAE,QAAQA,EAA4B,IAAIC,EAA6C;AAAA,EAC3F,QAAQ,CAAAC,MACN,GAAGC,CAAW,aAAaD,CAAS;AACxC,CAAC;"}
@@ -0,0 +1,9 @@
1
+ import r from "styled-components";
2
+ import e from "../../../ui/layout/flex-view.js";
3
+ const p = r(e)`
4
+ max-width: 293px;
5
+ `;
6
+ export {
7
+ p as ImageWrapper
8
+ };
9
+ //# sourceMappingURL=pla-first-session-introduction-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pla-first-session-introduction-styled.js","sources":["../../../../../src/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst ImageWrapper = styled(FlexView)`\n max-width: 293px;\n`;\n\nexport { ImageWrapper };\n"],"names":["ImageWrapper","styled","FlexView"],"mappings":";;AAIM,MAAAA,IAAeC,EAAOC,CAAQ;AAAA;AAAA;"}
@@ -0,0 +1,42 @@
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { memo as a } from "react";
3
+ import { ILLUSTRATIONS as c } from "../../../../assets/illustrations/illustrations.js";
4
+ import l from "../../../ui/buttons/button/button.js";
5
+ import h from "../../../ui/image/image.js";
6
+ import s from "../../../ui/layout/flex-view.js";
7
+ import r from "../../../ui/separator/separator.js";
8
+ import t from "../../../ui/text/text.js";
9
+ import d from "../../hooks/use-parent-home-data.js";
10
+ import { ImageWrapper as p } from "./pla-first-session-introduction-styled.js";
11
+ const f = ({
12
+ studentId: n,
13
+ onRunSystemCheck: m
14
+ }) => {
15
+ const { formattedNextSessionStart: o } = d(n);
16
+ return /* @__PURE__ */ i(s, { $justifyContent: "center", $alignItems: "center", $height: "100vh", $width: "100%", children: [
17
+ o && /* @__PURE__ */ i(s, { children: [
18
+ /* @__PURE__ */ e(t, { $renderAs: "ab1", $color: "BLACK_1", $align: "center", children: "We’re excited for your first session on" }),
19
+ /* @__PURE__ */ e(r, { height: 4 }),
20
+ /* @__PURE__ */ e(t, { $renderAs: "ab1-bold", $align: "center", children: o })
21
+ ] }),
22
+ /* @__PURE__ */ e(r, { heightX: 2.5 }),
23
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(h, { src: c.LEARNING_PUZZLE_BOT, width: "100%" }) }),
24
+ /* @__PURE__ */ e(r, { heightX: 3.5 }),
25
+ /* @__PURE__ */ e(t, { $renderAs: "ab2", $color: "BLACK_1", $align: "center", children: "Let's make sure your device is ready for your child's session." }),
26
+ /* @__PURE__ */ e(r, { heightX: 1 }),
27
+ /* @__PURE__ */ e(
28
+ l,
29
+ {
30
+ renderAs: "primary",
31
+ label: "Run a system check",
32
+ shape: "square",
33
+ size: "small",
34
+ onClick: m
35
+ }
36
+ )
37
+ ] });
38
+ }, B = a(f);
39
+ export {
40
+ B as default
41
+ };
42
+ //# sourceMappingURL=pla-first-session-introduction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pla-first-session-introduction.js","sources":["../../../../../src/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.tsx"],"sourcesContent":["import type { IFirstSessionIntroductionProps } from './pla-first-session-introduction-types';\n\nimport { memo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Button from '../../../ui/buttons/button/button';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport useParentHomeData from '../../hooks/use-parent-home-data';\nimport * as Styled from './pla-first-session-introduction-styled';\n\nconst PlaFirstSessionIntroduction: FC<IFirstSessionIntroductionProps> = ({\n studentId,\n onRunSystemCheck,\n}) => {\n const { formattedNextSessionStart } = useParentHomeData(studentId);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $height=\"100vh\" $width={'100%'}>\n {formattedNextSessionStart && (\n <FlexView>\n <Text $renderAs=\"ab1\" $color=\"BLACK_1\" $align=\"center\">\n We’re excited for your first session on\n </Text>\n <Separator height={4} />\n <Text $renderAs=\"ab1-bold\" $align=\"center\">\n {formattedNextSessionStart}\n </Text>\n </FlexView>\n )}\n <Separator heightX={2.5} />\n <Styled.ImageWrapper>\n <Image src={ILLUSTRATIONS.LEARNING_PUZZLE_BOT} width=\"100%\" />\n </Styled.ImageWrapper>\n <Separator heightX={3.5} />\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\" $align=\"center\">\n Let's make sure your device is ready for your child's session.\n </Text>\n <Separator heightX={1} />\n <Button\n renderAs=\"primary\"\n label=\"Run a system check\"\n shape=\"square\"\n size=\"small\"\n onClick={onRunSystemCheck}\n />\n </FlexView>\n );\n};\n\nexport default memo(PlaFirstSessionIntroduction);\n"],"names":["PlaFirstSessionIntroduction","studentId","onRunSystemCheck","formattedNextSessionStart","useParentHomeData","jsxs","FlexView","jsx","Text","Separator","Styled.ImageWrapper","Image","ILLUSTRATIONS","Button","plaFirstSessionIntroduction","memo"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAkE,CAAC;AAAA,EACvE,WAAAC;AAAA,EACA,kBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,2BAAAC,EAAA,IAA8BC,EAAkBH,CAAS;AAG/D,SAAA,gBAAAI,EAACC,KAAS,iBAAgB,UAAS,aAAY,UAAS,SAAQ,SAAQ,QAAQ,QAC7E,UAAA;AAAA,IAAAH,uBACEG,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAAS,UAEvD,0CAAA,CAAA;AAAA,MACA,gBAAAD,EAACE,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,wBACrBD,GAAK,EAAA,WAAU,YAAW,QAAO,UAC/B,UACHL,GAAA;AAAA,IAAA,GACF;AAAA,IAEF,gBAAAI,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IACzB,gBAAAF,EAACG,GAAA,EACC,UAAA,gBAAAH,EAACI,GAAM,EAAA,KAAKC,EAAc,qBAAqB,OAAM,OAAA,CAAO,EAC9D,CAAA;AAAA,IACA,gBAAAL,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IACzB,gBAAAF,EAACC,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAAS,UAEvD,iEAAA,CAAA;AAAA,IACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,IACvB,gBAAAF;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAM;AAAA,QACN,OAAM;AAAA,QACN,MAAK;AAAA,QACL,SAASX;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeY,IAAAC,EAAKf,CAA2B;"}
@@ -1,27 +1,26 @@
1
- import { useEffect as O, useMemo as P } from "react";
2
- import { useParentHomeGet as C } from "../api/parent-home.js";
3
- const T = ({
4
- studentName: o,
5
- studentServiceId: s
6
- }) => {
1
+ import { useCallback as H, useEffect as p, useMemo as O } from "react";
2
+ import { useParentHomeGet as P } from "../api/parent-home.js";
3
+ import { formatDate as b } from "../../../node_modules/date-fns/format.js";
4
+ const k = (s) => {
7
5
  const {
8
- get: t,
9
- data: i,
10
- isProcessing: a,
11
- isProcessed: l,
12
- isStale: m,
13
- isProcessingFailed: r
14
- } = C(s);
15
- return O(() => {
16
- s && (!a && !r && !l || m) && t(s);
17
- }, [s, m, a, t, r, l]), P(() => {
18
- const { teacher_details: c = null, session_details: n } = i ?? {};
19
- if (!n)
6
+ get: n,
7
+ data: a,
8
+ isStale: i,
9
+ isProcessingFailed: m
10
+ } = P(s), e = H(() => {
11
+ s && n(s);
12
+ }, [n, s]);
13
+ return p(() => {
14
+ e();
15
+ }, [e]), p(() => {
16
+ i && e();
17
+ }, [e, i]), O(() => {
18
+ var d;
19
+ const { teacher_details: r = null, session_details: o } = a ?? {};
20
+ if (!o)
20
21
  return {
21
22
  sessionDetails: null,
22
23
  teacherDetails: null,
23
- studentName: o,
24
- teacherName: "",
25
24
  isOnlyOneSessionCompleted: !1,
26
25
  isMoreThanOneSessionCompleted: !1,
27
26
  isDemoDone: !1,
@@ -29,36 +28,40 @@ const T = ({
29
28
  completedSessions: 0,
30
29
  nextSessionEnd: 0,
31
30
  nextSessionStart: 0,
32
- classStatus: void 0,
33
31
  upcomingSessions: [],
34
- showLoading: !0
32
+ showLoading: !0,
33
+ isProcessingFailed: m,
34
+ fetchData: e
35
35
  };
36
36
  const {
37
- completed_sessions: e = 0,
38
- next_session_end: p,
39
- next_session_start: u,
37
+ completed_sessions: t = 0,
38
+ next_session_end: u,
39
+ next_session_start: l,
40
40
  demo_class_status: S,
41
- upcoming_sessions: _ = [],
42
- student_demo_id: f
43
- } = n, { first_name: D = "", last_name: g = "" } = c ?? {}, h = `${D} ${g}`.trim(), d = e > 0, x = d && e === 1, H = e > 1;
41
+ upcoming_sessions: f = [],
42
+ student_demo_id: _,
43
+ user_attempt_id: D
44
+ } = o, { first_name: h = "", last_name: x = "" } = r ?? {}, M = (d = `${h} ${x}`) == null ? void 0 : d.trim(), c = t > 0, g = c && t === 1, E = t > 1, C = b(l, "EEEE, MMM d 'at' h:mm a");
44
45
  return {
45
- sessionDetails: n,
46
- teacherDetails: c,
47
- studentName: o,
48
- teacherName: h,
49
- completedSessions: e,
50
- nextSessionEnd: p,
51
- nextSessionStart: u,
46
+ sessionDetails: o,
47
+ teacherDetails: r,
48
+ teacherName: M,
49
+ completedSessions: t,
50
+ nextSessionEnd: u,
51
+ nextSessionStart: l,
52
52
  classStatus: S,
53
- upcomingSessions: _,
54
- isDemoDone: d,
55
- isOnlyOneSessionCompleted: x,
56
- isMoreThanOneSessionCompleted: H,
57
- demoId: f
53
+ upcomingSessions: f,
54
+ isDemoDone: c,
55
+ isOnlyOneSessionCompleted: g,
56
+ isMoreThanOneSessionCompleted: E,
57
+ demoId: _,
58
+ userAttemptId: D,
59
+ fetchData: e,
60
+ formattedNextSessionStart: C
58
61
  };
59
- }, [i, o]);
62
+ }, [e, m, a]);
60
63
  };
61
64
  export {
62
- T as default
65
+ k as default
63
66
  };
64
67
  //# sourceMappingURL=use-parent-home-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-parent-home-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-parent-home-data.ts"],"sourcesContent":["import type { TSession } from '../../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { EClassStatus, ISessionDetails, ITeacherDetails } from '../parent-dashboard-types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\n\ninterface IUseParentHomeData {\n studentName: string;\n studentServiceId: string;\n}\ninterface IUseParentHomeDataReturn {\n sessionDetails: ISessionDetails | null;\n teacherDetails: ITeacherDetails | null;\n completedSessions: number;\n nextSessionEnd: number;\n nextSessionStart: number;\n classStatus?: EClassStatus | null;\n teacherName: string;\n upcomingSessions?: TSession[];\n isDemoDone: boolean;\n isOnlyOneSessionCompleted: boolean;\n isMoreThanOneSessionCompleted: boolean;\n showLoading?: boolean;\n demoId?: string;\n}\n\nconst useParentHomeData = ({\n studentName,\n studentServiceId,\n}: IUseParentHomeData): IUseParentHomeDataReturn => {\n const {\n get: getParentHome,\n data: parentHomeData,\n isProcessing,\n isProcessed,\n isStale,\n isProcessingFailed,\n } = useParentHomeGet(studentServiceId);\n\n useEffect(() => {\n if (studentServiceId && ((!isProcessing && !isProcessingFailed && !isProcessed) || isStale)) {\n getParentHome(studentServiceId);\n }\n }, [studentServiceId, isStale, isProcessing, getParentHome, isProcessingFailed, isProcessed]);\n\n const parentHomeDataMemoised = useMemo(() => {\n const { teacher_details: teacherDetails = null, session_details: sessionDetails } =\n parentHomeData ?? {};\n\n if (!sessionDetails) {\n return {\n sessionDetails: null,\n teacherDetails: null,\n studentName,\n teacherName: '',\n isOnlyOneSessionCompleted: false,\n isMoreThanOneSessionCompleted: false,\n isDemoDone: false,\n isSubscriptionCancelled: false,\n completedSessions: 0,\n nextSessionEnd: 0,\n nextSessionStart: 0,\n classStatus: undefined,\n upcomingSessions: [],\n showLoading: true,\n };\n }\n\n const {\n completed_sessions: completedSessions = 0,\n next_session_end: nextSessionEnd,\n next_session_start: nextSessionStart,\n demo_class_status: classStatus,\n upcoming_sessions: upcomingSessions = [],\n student_demo_id: demoId,\n } = sessionDetails;\n\n const { first_name = '', last_name = '' } = teacherDetails ?? {};\n const teacherName = `${first_name} ${last_name}`.trim();\n\n const isDemoDone = completedSessions > 0;\n const isOnlyOneSessionCompleted = isDemoDone && completedSessions === 1;\n const isMoreThanOneSessionCompleted = completedSessions > 1;\n\n return {\n sessionDetails,\n teacherDetails,\n studentName,\n teacherName,\n completedSessions,\n nextSessionEnd,\n nextSessionStart,\n classStatus,\n upcomingSessions,\n isDemoDone,\n isOnlyOneSessionCompleted,\n isMoreThanOneSessionCompleted,\n demoId,\n };\n }, [parentHomeData, studentName]);\n\n return parentHomeDataMemoised;\n};\n\nexport default useParentHomeData;\n"],"names":["useParentHomeData","studentName","studentServiceId","getParentHome","parentHomeData","isProcessing","isProcessed","isStale","isProcessingFailed","useParentHomeGet","useEffect","useMemo","teacherDetails","sessionDetails","completedSessions","nextSessionEnd","nextSessionStart","classStatus","upcomingSessions","demoId","first_name","last_name","teacherName","isDemoDone","isOnlyOneSessionCompleted","isMoreThanOneSessionCompleted"],"mappings":";;AA2BA,MAAMA,IAAoB,CAAC;AAAA,EACzB,aAAAC;AAAA,EACA,kBAAAC;AACF,MAAoD;AAC5C,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,IACEC,EAAiBP,CAAgB;AAErC,SAAAQ,EAAU,MAAM;AACd,IAAIR,MAAsB,CAACG,KAAgB,CAACG,KAAsB,CAACF,KAAgBC,MACjFJ,EAAcD,CAAgB;AAAA,EAChC,GACC,CAACA,GAAkBK,GAASF,GAAcF,GAAeK,GAAoBF,CAAW,CAAC,GAE7DK,EAAQ,MAAM;AACrC,UAAA,EAAE,iBAAiBC,IAAiB,MAAM,iBAAiBC,EAAe,IAC9ET,KAAkB;AAEpB,QAAI,CAACS;AACI,aAAA;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,aAAAZ;AAAA,QACA,aAAa;AAAA,QACb,2BAA2B;AAAA,QAC3B,+BAA+B;AAAA,QAC/B,YAAY;AAAA,QACZ,yBAAyB;AAAA,QACzB,mBAAmB;AAAA,QACnB,gBAAgB;AAAA,QAChB,kBAAkB;AAAA,QAClB,aAAa;AAAA,QACb,kBAAkB,CAAC;AAAA,QACnB,aAAa;AAAA,MAAA;AAIX,UAAA;AAAA,MACJ,oBAAoBa,IAAoB;AAAA,MACxC,kBAAkBC;AAAA,MAClB,oBAAoBC;AAAA,MACpB,mBAAmBC;AAAA,MACnB,mBAAmBC,IAAmB,CAAC;AAAA,MACvC,iBAAiBC;AAAA,IACf,IAAAN,GAEE,EAAE,YAAAO,IAAa,IAAI,WAAAC,IAAY,GAAG,IAAIT,KAAkB,IACxDU,IAAc,GAAGF,CAAU,IAAIC,CAAS,GAAG,QAE3CE,IAAaT,IAAoB,GACjCU,IAA4BD,KAAcT,MAAsB,GAChEW,IAAgCX,IAAoB;AAEnD,WAAA;AAAA,MACL,gBAAAD;AAAA,MACA,gBAAAD;AAAA,MACA,aAAAX;AAAA,MACA,aAAAqB;AAAA,MACA,mBAAAR;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,YAAAK;AAAA,MACA,2BAAAC;AAAA,MACA,+BAAAC;AAAA,MACA,QAAAN;AAAA,IAAA;AAAA,EACF,GACC,CAACf,GAAgBH,CAAW,CAAC;AAGlC;"}
1
+ {"version":3,"file":"use-parent-home-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-parent-home-data.ts"],"sourcesContent":["import type { TSession } from '../../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { EClassStatus, ISessionDetails, ITeacherDetails } from '../parent-dashboard-types';\n\nimport { format } from 'date-fns';\nimport { useCallback, useEffect, useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\n\ninterface IUseParentHomeDataReturn {\n sessionDetails: ISessionDetails | null;\n teacherDetails: ITeacherDetails | null;\n completedSessions: number;\n nextSessionEnd: number;\n nextSessionStart: number;\n classStatus?: EClassStatus | null;\n teacherName?: string;\n upcomingSessions?: TSession[];\n isDemoDone: boolean;\n isOnlyOneSessionCompleted: boolean;\n isMoreThanOneSessionCompleted: boolean;\n showLoading?: boolean;\n demoId?: string;\n userAttemptId?: string;\n isProcessingFailed?: boolean;\n fetchData: () => void;\n formattedNextSessionStart?: string;\n}\n\nconst useParentHomeData = (studentId: string): IUseParentHomeDataReturn => {\n const {\n get: getParentHome,\n data: parentHomeData,\n isStale,\n isProcessingFailed,\n } = useParentHomeGet(studentId);\n\n const fetchData = useCallback(() => {\n studentId && getParentHome(studentId);\n }, [getParentHome, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n if (isStale) {\n fetchData();\n }\n }, [fetchData, isStale]);\n\n const parentHomeDataMemoised = useMemo(() => {\n const { teacher_details: teacherDetails = null, session_details: sessionDetails } =\n parentHomeData ?? {};\n\n if (!sessionDetails) {\n return {\n sessionDetails: null,\n teacherDetails: null,\n isOnlyOneSessionCompleted: false,\n isMoreThanOneSessionCompleted: false,\n isDemoDone: false,\n isSubscriptionCancelled: false,\n completedSessions: 0,\n nextSessionEnd: 0,\n nextSessionStart: 0,\n upcomingSessions: [],\n showLoading: true,\n isProcessingFailed,\n fetchData,\n };\n }\n\n const {\n completed_sessions: completedSessions = 0,\n next_session_end: nextSessionEnd,\n next_session_start: nextSessionStart,\n demo_class_status: classStatus,\n upcoming_sessions: upcomingSessions = [],\n student_demo_id: demoId,\n user_attempt_id: userAttemptId,\n } = sessionDetails;\n\n const { first_name = '', last_name = '' } = teacherDetails ?? {};\n const teacherName = `${first_name} ${last_name}`?.trim();\n\n const isDemoDone = completedSessions > 0;\n const isOnlyOneSessionCompleted = isDemoDone && completedSessions === 1;\n const isMoreThanOneSessionCompleted = completedSessions > 1;\n\n const formattedNextSessionStart = format(nextSessionStart, \"EEEE, MMM d 'at' h:mm a\");\n\n return {\n sessionDetails,\n teacherDetails,\n teacherName,\n completedSessions,\n nextSessionEnd,\n nextSessionStart,\n classStatus,\n upcomingSessions,\n isDemoDone,\n isOnlyOneSessionCompleted,\n isMoreThanOneSessionCompleted,\n demoId,\n userAttemptId,\n fetchData,\n formattedNextSessionStart,\n };\n }, [fetchData, isProcessingFailed, parentHomeData]);\n\n return parentHomeDataMemoised;\n};\n\nexport default useParentHomeData;\n"],"names":["useParentHomeData","studentId","getParentHome","parentHomeData","isStale","isProcessingFailed","useParentHomeGet","fetchData","useCallback","useEffect","useMemo","teacherDetails","sessionDetails","completedSessions","nextSessionEnd","nextSessionStart","classStatus","upcomingSessions","demoId","userAttemptId","first_name","last_name","teacherName","_a","isDemoDone","isOnlyOneSessionCompleted","isMoreThanOneSessionCompleted","formattedNextSessionStart","format"],"mappings":";;;AA4BM,MAAAA,IAAoB,CAACC,MAAgD;AACnE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,SAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,IACEC,EAAiBL,CAAS,GAExBM,IAAYC,EAAY,MAAM;AAClC,IAAAP,KAAaC,EAAcD,CAAS;AAAA,EAAA,GACnC,CAACC,GAAeD,CAAS,CAAC;AAE7B,SAAAQ,EAAU,MAAM;AACJ,IAAAF;EAAA,GACT,CAACA,CAAS,CAAC,GAEdE,EAAU,MAAM;AACd,IAAIL,KACQG;EACZ,GACC,CAACA,GAAWH,CAAO,CAAC,GAEQM,EAAQ,MAAM;;AACrC,UAAA,EAAE,iBAAiBC,IAAiB,MAAM,iBAAiBC,EAAe,IAC9ET,KAAkB;AAEpB,QAAI,CAACS;AACI,aAAA;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,2BAA2B;AAAA,QAC3B,+BAA+B;AAAA,QAC/B,YAAY;AAAA,QACZ,yBAAyB;AAAA,QACzB,mBAAmB;AAAA,QACnB,gBAAgB;AAAA,QAChB,kBAAkB;AAAA,QAClB,kBAAkB,CAAC;AAAA,QACnB,aAAa;AAAA,QACb,oBAAAP;AAAA,QACA,WAAAE;AAAA,MAAA;AAIE,UAAA;AAAA,MACJ,oBAAoBM,IAAoB;AAAA,MACxC,kBAAkBC;AAAA,MAClB,oBAAoBC;AAAA,MACpB,mBAAmBC;AAAA,MACnB,mBAAmBC,IAAmB,CAAC;AAAA,MACvC,iBAAiBC;AAAA,MACjB,iBAAiBC;AAAA,IACf,IAAAP,GAEE,EAAE,YAAAQ,IAAa,IAAI,WAAAC,IAAY,GAAG,IAAIV,KAAkB,IACxDW,KAAcC,IAAA,GAAGH,CAAU,IAAIC,CAAS,OAA1B,gBAAAE,EAA8B,QAE5CC,IAAaX,IAAoB,GACjCY,IAA4BD,KAAcX,MAAsB,GAChEa,IAAgCb,IAAoB,GAEpDc,IAA4BC,EAAOb,GAAkB,yBAAyB;AAE7E,WAAA;AAAA,MACL,gBAAAH;AAAA,MACA,gBAAAD;AAAA,MACA,aAAAW;AAAA,MACA,mBAAAT;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,YAAAO;AAAA,MACA,2BAAAC;AAAA,MACA,+BAAAC;AAAA,MACA,QAAAR;AAAA,MACA,eAAAC;AAAA,MACA,WAAAZ;AAAA,MACA,2BAAAoB;AAAA,IAAA;AAAA,EAED,GAAA,CAACpB,GAAWF,GAAoBF,CAAc,CAAC;AAGpD;"}
@@ -0,0 +1,20 @@
1
+ import { useCallback as f, useEffect as n, useMemo as u } from "react";
2
+ import { useGetMileStoneConfig as i } from "../../milestone/create/api/milestone-config.js";
3
+ import { useStudentProfileSummaryGet as s } from "../api/get-student-profile-summary.js";
4
+ import { getLearningProfileSummary as l } from "../modals/student-profile-summary/student-profile-summary-helpers.js";
5
+ const C = (e) => {
6
+ const { get: o, data: m } = s(e), { get: r, data: a } = i(e, {
7
+ demo_type: "TRIAL_V3"
8
+ }), t = f(() => {
9
+ o(e), r(e, {
10
+ demo_type: "TRIAL_V3"
11
+ });
12
+ }, [o, e, r]);
13
+ return n(() => {
14
+ t();
15
+ }, [t]), { summaryInfo: u(() => l(a, m), [a, m]), fetchSummaryData: t };
16
+ };
17
+ export {
18
+ C as default
19
+ };
20
+ //# sourceMappingURL=use-student-profile-summary-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-student-profile-summary-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-student-profile-summary-data.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from 'react';\n\nimport { useGetMileStoneConfig } from '../../milestone/create/api/milestone-config';\nimport { useStudentProfileSummaryGet } from '../api/get-student-profile-summary';\nimport { getLearningProfileSummary } from '../modals/student-profile-summary/student-profile-summary-helpers';\n\nconst useStudentProfileSummaryData = (studentId: string) => {\n const { get: getStudentProfileSummary, data: summaryData } =\n useStudentProfileSummaryGet(studentId);\n\n const { get: getMilestoneConfig, data: milestoneConfigData } = useGetMileStoneConfig(studentId, {\n demo_type: 'TRIAL_V3',\n });\n\n const fetchSummaryData = useCallback(() => {\n getStudentProfileSummary(studentId);\n getMilestoneConfig(studentId, {\n demo_type: 'TRIAL_V3',\n });\n }, [getStudentProfileSummary, studentId, getMilestoneConfig]);\n\n useEffect(() => {\n fetchSummaryData();\n }, [fetchSummaryData]);\n\n const summaryInfo = useMemo(() => {\n return getLearningProfileSummary(milestoneConfigData, summaryData);\n }, [milestoneConfigData, summaryData]);\n\n return { summaryInfo, fetchSummaryData };\n};\n\nexport default useStudentProfileSummaryData;\n"],"names":["useStudentProfileSummaryData","studentId","getStudentProfileSummary","summaryData","useStudentProfileSummaryGet","getMilestoneConfig","milestoneConfigData","useGetMileStoneConfig","fetchSummaryData","useCallback","useEffect","useMemo","getLearningProfileSummary"],"mappings":";;;;AAMM,MAAAA,IAA+B,CAACC,MAAsB;AAC1D,QAAM,EAAE,KAAKC,GAA0B,MAAMC,MAC3CC,EAA4BH,CAAS,GAEjC,EAAE,KAAKI,GAAoB,MAAMC,EAAoB,IAAIC,EAAsBN,GAAW;AAAA,IAC9F,WAAW;AAAA,EAAA,CACZ,GAEKO,IAAmBC,EAAY,MAAM;AACzC,IAAAP,EAAyBD,CAAS,GAClCI,EAAmBJ,GAAW;AAAA,MAC5B,WAAW;AAAA,IAAA,CACZ;AAAA,EACA,GAAA,CAACC,GAA0BD,GAAWI,CAAkB,CAAC;AAE5D,SAAAK,EAAU,MAAM;AACG,IAAAF;EAAA,GAChB,CAACA,CAAgB,CAAC,GAMd,EAAE,aAJWG,EAAQ,MACnBC,EAA0BN,GAAqBH,CAAW,GAChE,CAACG,GAAqBH,CAAW,CAAC,GAEf,kBAAAK;AACxB;"}
@@ -0,0 +1,40 @@
1
+ import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
+ import { memo as l, useCallback as c } from "react";
3
+ import { useTheme as d } from "styled-components";
4
+ import { ILLUSTRATIONS as a } from "../../../../assets/illustrations/illustrations.js";
5
+ import h from "../../../ui/buttons/text-button/text-button.js";
6
+ import p from "../../../ui/image/image.js";
7
+ import u from "../../../ui/layout/flex-view.js";
8
+ import $ from "../../../ui/modals/use-modal-actions.js";
9
+ import r from "../../../ui/separator/separator.js";
10
+ import t from "../../../ui/text/text.js";
11
+ import { EDeviceType as b } from "../../../ui/theme/constants.js";
12
+ const A = ({}) => {
13
+ const { device: m } = d(), e = m <= b.MOBILE, { closeModal: i } = $(), n = c(() => {
14
+ i();
15
+ }, [i]);
16
+ return /* @__PURE__ */ s(
17
+ u,
18
+ {
19
+ $gutterX: e ? 1.5 : 2.5,
20
+ $gapX: e ? 1.5 : 2.5,
21
+ $width: e ? "100%" : 560,
22
+ $background: "BLACK_2",
23
+ $borderColor: "BLACK_5",
24
+ children: [
25
+ /* @__PURE__ */ o(p, { src: a.HANDSHAKE_GREEN, width: 64, height: 64 }),
26
+ /* @__PURE__ */ o(r, { heightX: 1 }),
27
+ /* @__PURE__ */ o(t, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "GREEN_4", children: "Have questions?" }),
28
+ /* @__PURE__ */ o(r, { heightX: 1 }),
29
+ /* @__PURE__ */ o(t, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE_1", children: "Please reach out to our admissions team at" }),
30
+ /* @__PURE__ */ o("a", { href: "mailto:admissions@cuemath.com", children: /* @__PURE__ */ o(t, { $renderAs: "ub1-bold", $inline: !0, $color: "WHITE_1", $textDecoration: "underline", children: "admissions@cuemath.com" }) }),
31
+ /* @__PURE__ */ o(r, { heightX: 2.5 }),
32
+ /* @__PURE__ */ o(h, { label: "Got it", color: "WHITE", onClick: n, size: "medium" })
33
+ ]
34
+ }
35
+ );
36
+ }, _ = l(A);
37
+ export {
38
+ _ as default
39
+ };
40
+ //# sourceMappingURL=help-and-support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-and-support.js","sources":["../../../../../src/features/parent-dashboard/modals/help-and-support/help-and-support.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\n\nconst PLAHelpAndSupport = ({}) => {\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const { closeModal } = useModalActions();\n\n const handleClick = useCallback(() => {\n closeModal();\n }, [closeModal]);\n\n return (\n <FlexView\n $gutterX={isMobile ? 1.5 : 2.5}\n $gapX={isMobile ? 1.5 : 2.5}\n $width={isMobile ? '100%' : 560}\n $background=\"BLACK_2\"\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.HANDSHAKE_GREEN} width={64} height={64} />\n <Separator heightX={1} />\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"GREEN_4\">\n Have questions?\n </Text>\n <Separator heightX={1} />\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE_1\">\n Please reach out to our admissions team at\n </Text>\n <a href=\"mailto:admissions@cuemath.com\">\n <Text $renderAs=\"ub1-bold\" $inline $color=\"WHITE_1\" $textDecoration=\"underline\">\n admissions@cuemath.com\n </Text>\n </a>\n <Separator heightX={2.5} />\n <TextButton label=\"Got it\" color=\"WHITE\" onClick={handleClick} size=\"medium\" />\n </FlexView>\n );\n};\n\nexport default memo(PLAHelpAndSupport);\n"],"names":["PLAHelpAndSupport","device","useTheme","isMobile","EDeviceType","closeModal","useModalActions","handleClick","useCallback","jsxs","FlexView","jsx","Image","ILLUSTRATIONS","Separator","Text","TextButton","helpAndSupport","memo"],"mappings":";;;;;;;;;;;AAYA,MAAMA,IAAoB,CAAC,CAAA,MAAO;AAC1B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,EAAY,QACjC,EAAE,YAAAC,MAAeC,KAEjBC,IAAcC,EAAY,MAAM;AACzB,IAAAH;EAAA,GACV,CAACA,CAAU,CAAC;AAGb,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAUP,IAAW,MAAM;AAAA,MAC3B,OAAOA,IAAW,MAAM;AAAA,MACxB,QAAQA,IAAW,SAAS;AAAA,MAC5B,aAAY;AAAA,MACZ,cAAa;AAAA,MAEb,UAAA;AAAA,QAAA,gBAAAQ,EAACC,KAAM,KAAKC,EAAc,iBAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,QAClE,gBAAAF,EAACG,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QACvB,gBAAAH,EAACI,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,WAAU,UAEzE,kBAAA,CAAA;AAAA,QACA,gBAAAJ,EAACG,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QACvB,gBAAAH,EAACI,KAAK,WAAU,OAAM,mBAAkB,OAAM,QAAO,WAAU,UAE/D,6CAAA,CAAA;AAAA,QACC,gBAAAJ,EAAA,KAAA,EAAE,MAAK,iCACN,4BAACI,GAAK,EAAA,WAAU,YAAW,SAAO,IAAC,QAAO,WAAU,iBAAgB,aAAY,mCAEhF,CAAA,GACF;AAAA,QACA,gBAAAJ,EAACG,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,QACzB,gBAAAH,EAACK,KAAW,OAAM,UAAS,OAAM,SAAQ,SAAST,GAAa,MAAK,SAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGnF,GAEeU,IAAAC,EAAKlB,CAAiB;"}
@@ -0,0 +1,44 @@
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { memo as m, useCallback as a } from "react";
3
+ import { useTheme as u } from "styled-components";
4
+ import $ from "../../../ui/buttons/text-button/text-button.js";
5
+ import h from "../../../ui/layout/flex-view.js";
6
+ import p from "../../../ui/modals/use-modal-actions.js";
7
+ import b from "../../../ui/modals/use-modal-params.js";
8
+ import l from "../../../ui/separator/separator.js";
9
+ import e from "../../../ui/text/text.js";
10
+ import { EDeviceType as f } from "../../../ui/theme/constants.js";
11
+ const g = () => {
12
+ const { device: d } = u(), r = d <= f.MOBILE, { closeModal: t } = p(), { username: c, onAcknowledge: n } = b(), s = a(() => {
13
+ t(), n();
14
+ }, [t, n]);
15
+ return /* @__PURE__ */ i(
16
+ h,
17
+ {
18
+ $gutterX: r ? 1.5 : 2.5,
19
+ $gapX: r ? 1.5 : 2.5,
20
+ $width: r ? "100%" : 570,
21
+ $background: "BLACK_2",
22
+ $borderColor: "BLACK_5",
23
+ children: [
24
+ /* @__PURE__ */ o(e, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE_1", children: "Student login created" }),
25
+ /* @__PURE__ */ o(l, { heightX: 0.75 }),
26
+ /* @__PURE__ */ i(e, { $renderAs: "ub1", $color: "WHITE_1", children: [
27
+ "Your child can directly login to",
28
+ " ",
29
+ /* @__PURE__ */ o(e, { $renderAs: "ub1-bold", $color: "WHITE_1", $inline: !0, children: "leap.cuemath.com" }),
30
+ " ",
31
+ "using “",
32
+ /* @__PURE__ */ o(e, { $renderAs: "ub1", $inline: !0, $color: "GREEN_4", children: `${c}` }),
33
+ "” as both username and password."
34
+ ] }),
35
+ /* @__PURE__ */ o(l, { heightX: 2.5 }),
36
+ /* @__PURE__ */ o($, { label: "Got it", color: "WHITE", onClick: s, size: "medium" })
37
+ ]
38
+ }
39
+ );
40
+ }, w = m(g);
41
+ export {
42
+ w as default
43
+ };
44
+ //# sourceMappingURL=student-login-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"student-login-info.js","sources":["../../../../../src/features/parent-dashboard/modals/student-login-info/student-login-info.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\n\nconst StudentLoginInfoModal = () => {\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const { closeModal } = useModalActions();\n const { username, onAcknowledge } = useModalParams<{\n username: string;\n onAcknowledge: () => void;\n }>();\n\n const handleClick = useCallback(() => {\n closeModal();\n onAcknowledge();\n }, [closeModal, onAcknowledge]);\n\n return (\n <FlexView\n $gutterX={isMobile ? 1.5 : 2.5}\n $gapX={isMobile ? 1.5 : 2.5}\n $width={isMobile ? '100%' : 570}\n $background=\"BLACK_2\"\n $borderColor=\"BLACK_5\"\n >\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE_1\">\n Student login created\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub1\" $color=\"WHITE_1\">\n Your child can directly login to{' '}\n <Text $renderAs=\"ub1-bold\" $color=\"WHITE_1\" $inline>\n leap.cuemath.com\n </Text>{' '}\n using “<Text $renderAs=\"ub1\" $inline $color=\"GREEN_4\">{`${username}`}</Text>” as both\n username and password.\n </Text>\n <Separator heightX={2.5} />\n <TextButton label=\"Got it\" color=\"WHITE\" onClick={handleClick} size=\"medium\" />\n </FlexView>\n );\n};\n\nexport default memo(StudentLoginInfoModal);\n"],"names":["StudentLoginInfoModal","device","useTheme","isMobile","EDeviceType","closeModal","useModalActions","username","onAcknowledge","useModalParams","handleClick","useCallback","jsxs","FlexView","jsx","Text","Separator","TextButton","studentLoginInfo","memo"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAAwB,MAAM;AAC5B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,EAAY,QACjC,EAAE,YAAAC,MAAeC,KACjB,EAAE,UAAAC,GAAU,eAAAC,EAAc,IAAIC,EAGjC,GAEGC,IAAcC,EAAY,MAAM;AACzB,IAAAN,KACGG;EAAA,GACb,CAACH,GAAYG,CAAa,CAAC;AAG5B,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAUV,IAAW,MAAM;AAAA,MAC3B,OAAOA,IAAW,MAAM;AAAA,MACxB,QAAQA,IAAW,SAAS;AAAA,MAC5B,aAAY;AAAA,MACZ,cAAa;AAAA,MAEb,UAAA;AAAA,QAAA,gBAAAW,EAACC,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,WAAU,UAEzE,wBAAA,CAAA;AAAA,QACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,QACzB,gBAAAJ,EAAAG,GAAA,EAAK,WAAU,OAAM,QAAO,WAAU,UAAA;AAAA,UAAA;AAAA,UACJ;AAAA,UACjC,gBAAAD,EAACC,KAAK,WAAU,YAAW,QAAO,WAAU,SAAO,IAAC,UAEpD,mBAAA,CAAA;AAAA,UAAQ;AAAA,UAAI;AAAA,UACL,gBAAAD,EAACC,GAAK,EAAA,WAAU,OAAM,SAAO,IAAC,QAAO,WAAW,UAAG,GAAAR,CAAQ,GAAG,CAAA;AAAA,UAAO;AAAA,QAAA,GAE9E;AAAA,QACA,gBAAAO,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,QACzB,gBAAAF,EAACG,KAAW,OAAM,UAAS,OAAM,SAAQ,SAASP,GAAa,MAAK,SAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGnF,GAEeQ,IAAAC,EAAKnB,CAAqB;"}
@@ -0,0 +1,32 @@
1
+ import { PREFERENCE_CATEGORY as t, COURSE_STREAMS as S } from "../../../milestone/constants.js";
2
+ import { getPreferencesFromConfig as v } from "../../../milestone/create/milestone-create-helpers.js";
3
+ import { GOAL_MAPPING as C } from "../../../trial-session/comps/student-profile/constant.js";
4
+ const A = (f, c) => {
5
+ var a, p, P;
6
+ const o = {
7
+ studentLevel: "",
8
+ studentObjectives: [],
9
+ learningPlan: [],
10
+ levelPreference: ""
11
+ };
12
+ if (!f || !c) return o;
13
+ const s = ((a = c.student_preferences) == null ? void 0 : a.preferences) ?? [], d = c.user_milestone_data ?? [];
14
+ if (s.length === 0) return o;
15
+ const l = (e) => s.find((n) => n.preference_category === e), m = (e) => s.filter((n) => n.preference_category === e), i = l(t.POSITION), u = ((p = l(t.LEVEL)) == null ? void 0 : p.preference_name) ?? "", E = m(t.OBJECTIVES), r = i ? (P = v(f, {
16
+ grade: "",
17
+ courseStream: S.MATH,
18
+ preferenceCategory: t.POSITION
19
+ })) == null ? void 0 : P.find(({ id: e }) => e === i.preference_code) : null, _ = r != null && r.label && (r != null && r.description) ? `${r.label}: ${r.description}` : "", g = E.map((e) => e.preference_name), O = d.map(
20
+ ({ goal_category: e, milestone_name: n }) => `${C[e]}: ${n}`
21
+ );
22
+ return {
23
+ studentLevel: _,
24
+ studentObjectives: g,
25
+ learningPlan: O,
26
+ levelPreference: u
27
+ };
28
+ };
29
+ export {
30
+ A as getLearningProfileSummary
31
+ };
32
+ //# sourceMappingURL=student-profile-summary-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"student-profile-summary-helpers.js","sources":["../../../../../src/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.ts"],"sourcesContent":["import type {\n IMilestoneConfig,\n TGoalCategory,\n TPreferenceCategory,\n} from '../../../milestone/create/milestone-create-types';\nimport type { IStudentProfileSummaryResponse } from '../../api/get-student-profile-summary';\nimport type { IStudentProfileSummary } from '../../parent-dashboard-types';\n\nimport { COURSE_STREAMS, PREFERENCE_CATEGORY } from '../../../milestone/constants';\nimport { getPreferencesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport { GOAL_MAPPING } from '../../../trial-session/comps/student-profile/constant';\n\nexport const getLearningProfileSummary = (\n configData?: IMilestoneConfig,\n summaryData?: IStudentProfileSummaryResponse,\n): IStudentProfileSummary => {\n const defaultSummary: IStudentProfileSummary = {\n studentLevel: '',\n studentObjectives: [],\n learningPlan: [],\n levelPreference: '',\n };\n\n if (!configData || !summaryData) return defaultSummary;\n\n const preferences = summaryData.student_preferences?.preferences ?? [];\n const userMilestoneData = summaryData.user_milestone_data ?? [];\n\n if (preferences.length === 0) return defaultSummary;\n\n const findPref = (category: TPreferenceCategory) =>\n preferences.find(p => p.preference_category === category);\n\n const filterPrefs = (category: TPreferenceCategory) =>\n preferences.filter(p => p.preference_category === category);\n\n const positionPref = findPref(PREFERENCE_CATEGORY.POSITION);\n const levelPreference = findPref(PREFERENCE_CATEGORY.LEVEL)?.preference_name ?? '';\n const objectivePrefs = filterPrefs(PREFERENCE_CATEGORY.OBJECTIVES);\n\n const positionInfo = positionPref\n ? getPreferencesFromConfig(configData, {\n grade: '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.POSITION,\n })?.find(({ id }) => id === positionPref.preference_code)\n : null;\n\n const studentLevel =\n positionInfo?.label && positionInfo?.description\n ? `${positionInfo.label}: ${positionInfo.description}`\n : '';\n\n const studentObjectives = objectivePrefs.map(p => p.preference_name);\n\n const learningPlan = userMilestoneData.map(\n ({ goal_category, milestone_name }) =>\n `${GOAL_MAPPING[goal_category as TGoalCategory]}: ${milestone_name}`,\n );\n\n return {\n studentLevel,\n studentObjectives,\n learningPlan,\n levelPreference,\n };\n};\n"],"names":["getLearningProfileSummary","configData","summaryData","defaultSummary","preferences","_a","userMilestoneData","findPref","category","p","filterPrefs","positionPref","PREFERENCE_CATEGORY","levelPreference","_b","objectivePrefs","positionInfo","_c","getPreferencesFromConfig","COURSE_STREAMS","id","studentLevel","studentObjectives","learningPlan","goal_category","milestone_name","GOAL_MAPPING"],"mappings":";;;AAYa,MAAAA,IAA4B,CACvCC,GACAC,MAC2B;;AAC3B,QAAMC,IAAyC;AAAA,IAC7C,cAAc;AAAA,IACd,mBAAmB,CAAC;AAAA,IACpB,cAAc,CAAC;AAAA,IACf,iBAAiB;AAAA,EAAA;AAGnB,MAAI,CAACF,KAAc,CAACC,EAAoB,QAAAC;AAExC,QAAMC,MAAcC,IAAAH,EAAY,wBAAZ,gBAAAG,EAAiC,gBAAe,CAAA,GAC9DC,IAAoBJ,EAAY,uBAAuB;AAEzD,MAAAE,EAAY,WAAW,EAAU,QAAAD;AAE/B,QAAAI,IAAW,CAACC,MAChBJ,EAAY,KAAK,CAAKK,MAAAA,EAAE,wBAAwBD,CAAQ,GAEpDE,IAAc,CAACF,MACnBJ,EAAY,OAAO,CAAKK,MAAAA,EAAE,wBAAwBD,CAAQ,GAEtDG,IAAeJ,EAASK,EAAoB,QAAQ,GACpDC,MAAkBC,IAAAP,EAASK,EAAoB,KAAK,MAAlC,gBAAAE,EAAqC,oBAAmB,IAC1EC,IAAiBL,EAAYE,EAAoB,UAAU,GAE3DI,IAAeL,KACjBM,IAAAC,EAAyBjB,GAAY;AAAA,IACnC,OAAO;AAAA,IACP,cAAckB,EAAe;AAAA,IAC7B,oBAAoBP,EAAoB;AAAA,EAAA,CACzC,MAJD,gBAAAK,EAII,KAAK,CAAC,EAAE,IAAAG,QAASA,MAAOT,EAAa,mBACzC,MAEEU,IACJL,KAAA,QAAAA,EAAc,UAASA,KAAA,QAAAA,EAAc,eACjC,GAAGA,EAAa,KAAK,KAAKA,EAAa,WAAW,KAClD,IAEAM,IAAoBP,EAAe,IAAI,CAAAN,MAAKA,EAAE,eAAe,GAE7Dc,IAAejB,EAAkB;AAAA,IACrC,CAAC,EAAE,eAAAkB,GAAe,gBAAAC,EAAe,MAC/B,GAAGC,EAAaF,CAA8B,CAAC,KAAKC,CAAc;AAAA,EAAA;AAG/D,SAAA;AAAA,IACL,cAAAJ;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAV;AAAA,EAAA;AAEJ;"}
@@ -0,0 +1,13 @@
1
+ import t from "styled-components";
2
+ import e from "../../../ui/layout/flex-view.js";
3
+ const r = t(e)`
4
+ max-width: 100%;
5
+ width: 100%;
6
+ ${({ theme: i }) => i.mediaQueries.minWidthTablet} {
7
+ max-width: 560px;
8
+ }
9
+ `;
10
+ export {
11
+ r as Container
12
+ };
13
+ //# sourceMappingURL=student-profile-summary-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"student-profile-summary-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n max-width: 100%;\n width: 100%;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 560px;\n }\n`;\n"],"names":["Container","styled","FlexView","theme"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGpC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,44 @@
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
+ import { useMemo as u } from "react";
3
+ import { useTheme as c } from "styled-components";
4
+ import { ILLUSTRATIONS as r } from "../../../../assets/illustrations/illustrations.js";
5
+ import p from "../../../trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js";
6
+ import o from "../../../ui/layout/flex-view.js";
7
+ import f from "../../../ui/loader/app-loader/app-loader.js";
8
+ import h from "../../../ui/modals/use-modal-params.js";
9
+ import E from "../../../ui/text/text.js";
10
+ import { EDeviceType as g } from "../../../ui/theme/constants.js";
11
+ import { Container as L } from "./student-profile-summary-styled.js";
12
+ const P = () => {
13
+ const { studentName: i, summaryData: e } = h(), n = c().device <= g.MOBILE, m = u(() => {
14
+ const { studentLevel: l, studentObjectives: s = "", learningPlan: a = "" } = e ?? {};
15
+ return [
16
+ {
17
+ title: "Student Level",
18
+ description: l,
19
+ illustration: r.KNOWLEDGE_BLUE,
20
+ background: "BLUE_1"
21
+ },
22
+ {
23
+ illustration: r.ARROW_BOARD_GREEN,
24
+ background: "GREEN_1",
25
+ title: "Goals",
26
+ description: s
27
+ },
28
+ {
29
+ illustration: r.BOOK_CHECKED_PURPLE,
30
+ background: "PURPLE_1",
31
+ title: "Learning Plan",
32
+ description: a
33
+ }
34
+ ];
35
+ }, [e]);
36
+ return e ? /* @__PURE__ */ d(L, { $borderColor: "BLACK_1", children: [
37
+ n && /* @__PURE__ */ t(o, { $gutterX: 1, $gapX: 1.5, $background: "BLACK_2", children: /* @__PURE__ */ t(E, { $renderAs: "ab1-bold", $color: "WHITE_1", children: `${i}'s Profile` }) }),
38
+ /* @__PURE__ */ t(p, { profileHighlights: m })
39
+ ] }) : /* @__PURE__ */ t(o, { $height: 200, $width: 200, children: /* @__PURE__ */ t(f, { height: "100%" }) });
40
+ }, D = P;
41
+ export {
42
+ D as default
43
+ };
44
+ //# sourceMappingURL=student-profile-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"student-profile-summary.js","sources":["../../../../../src/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.tsx"],"sourcesContent":["import type { IStudentProfileSummary } from '../../parent-dashboard-types';\nimport type { TProfileHighlight } from './student-profile-summary-types';\n\nimport { useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport StudentProfileHighlights from '../../../trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './student-profile-summary-styled';\n\nconst StudentProfileSummary = () => {\n const { studentName, summaryData } = useModalParams<{\n studentName: string;\n summaryData: IStudentProfileSummary;\n }>();\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const profileHighlights: TProfileHighlight[] = useMemo(() => {\n const { studentLevel, studentObjectives = '', learningPlan = '' } = summaryData ?? {};\n\n return [\n {\n title: 'Student Level',\n description: studentLevel,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: studentObjectives,\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: learningPlan,\n },\n ];\n }, [summaryData]);\n\n if (!summaryData) {\n return (\n <FlexView $height={200} $width={200}>\n <AppLoader height=\"100%\" />\n </FlexView>\n );\n }\n\n return (\n <Styled.Container $borderColor=\"BLACK_1\">\n {isMobile && (\n <FlexView $gutterX={1} $gapX={1.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ab1-bold\" $color=\"WHITE_1\">{`${studentName}'s Profile`}</Text>\n </FlexView>\n )}\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n </Styled.Container>\n );\n};\n\nexport default StudentProfileSummary;\n"],"names":["StudentProfileSummary","studentName","summaryData","useModalParams","isMobile","useTheme","EDeviceType","profileHighlights","useMemo","studentLevel","studentObjectives","learningPlan","ILLUSTRATIONS","jsxs","Styled.Container","FlexView","jsx","Text","StudentProfileHighlights","AppLoader","StudentProfileSummary$1"],"mappings":";;;;;;;;;;;AAeA,MAAMA,IAAwB,MAAM;AAClC,QAAM,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAGlC,GAEGC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAyCC,EAAQ,MAAM;AACrD,UAAA,EAAE,cAAAC,GAAc,mBAAAC,IAAoB,IAAI,cAAAC,IAAe,GAAG,IAAIT,KAAe;AAE5E,WAAA;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,aAAaO;AAAA,QACb,cAAcG,EAAc;AAAA,QAC5B,YAAY;AAAA,MACd;AAAA,MACA;AAAA,QACE,cAAcA,EAAc;AAAA,QAC5B,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,aAAaF;AAAA,MACf;AAAA,MACA;AAAA,QACE,cAAcE,EAAc;AAAA,QAC5B,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,aAAaD;AAAA,MACf;AAAA,IAAA;AAAA,EACF,GACC,CAACT,CAAW,CAAC;AAEhB,SAAKA,IASF,gBAAAW,EAAAC,GAAA,EAAiB,cAAa,WAC5B,UAAA;AAAA,IAAAV,uBACEW,GAAS,EAAA,UAAU,GAAG,OAAO,KAAK,aAAY,WAC7C,UAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,QAAO,WAAW,UAAG,GAAAhB,CAAW,cAAa,EAC1E,CAAA;AAAA,IAEF,gBAAAe,EAACE,KAAyB,mBAAAX,GAAsC;AAAA,EAClE,EAAA,CAAA,IAdE,gBAAAS,EAACD,GAAS,EAAA,SAAS,KAAK,QAAQ,KAC9B,UAAC,gBAAAC,EAAAG,GAAA,EAAU,QAAO,OAAO,CAAA,EAC3B,CAAA;AAcN,GAEAC,IAAepB;"}
@@ -0,0 +1,14 @@
1
+ import t from "styled-components";
2
+ import e from "../../../ui/layout/flex-view.js";
3
+ const o = t(e)`
4
+ max-width: 100%;
5
+ width: 100%;
6
+ max-height: 90vh;
7
+ ${({ theme: i }) => i.mediaQueries.minWidthTablet} {
8
+ max-width: 720px;
9
+ }
10
+ `;
11
+ export {
12
+ o as Container
13
+ };
14
+ //# sourceMappingURL=trial-report-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trial-report-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/trial-report/trial-report-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n max-width: 100%;\n width: 100%;\n max-height: 90vh;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 720px;\n }\n`;\n"],"names":["Container","styled","FlexView","theme"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,IAIpC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,28 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useCallback as p, useEffect as f } from "react";
3
+ import { useGetSessionReports as d } from "../../../trial-session/api/trial-home.js";
4
+ import u from "../../../trial-session/comps/session-report/report-information/report-information.js";
5
+ import l from "../../../ui/error/error.js";
6
+ import c from "../../../ui/loader/app-loader/app-loader.js";
7
+ import h from "../../../ui/modals/use-modal-params.js";
8
+ import { Container as g } from "./trial-report-styled.js";
9
+ const R = () => {
10
+ const { studentName: t, attemptId: r, studentLevel: s } = h(), {
11
+ get: i,
12
+ isProcessingFailed: a,
13
+ data: n,
14
+ isProcessing: m
15
+ } = d(), o = p(() => {
16
+ r && t && i(r, {
17
+ student_level: s,
18
+ student_name: t
19
+ });
20
+ }, [r, i, s, t]);
21
+ return f(() => {
22
+ o();
23
+ }, [o]), a ? /* @__PURE__ */ e(l, { height: "50vh", onTryAgain: o }) : m || !n ? /* @__PURE__ */ e(c, { height: 200, width: 200 }) : /* @__PURE__ */ e(g, { $borderColor: "BLACK_1", children: /* @__PURE__ */ e(u, { sessionReports: n, studentName: t }) });
24
+ }, b = R;
25
+ export {
26
+ b as default
27
+ };
28
+ //# sourceMappingURL=trial-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trial-report.js","sources":["../../../../../src/features/parent-dashboard/modals/trial-report/trial-report.tsx"],"sourcesContent":["import { useCallback, useEffect } from 'react';\n\nimport { useGetSessionReports } from '../../../trial-session/api/trial-home';\nimport ReportInformation from '../../../trial-session/comps/session-report/report-information/report-information';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport * as Styled from './trial-report-styled';\n\nconst StudentTrialReport = () => {\n const { studentName, attemptId, studentLevel } = useModalParams<{\n studentName: string;\n attemptId: string;\n studentLevel: string;\n }>();\n\n const {\n get: getSessionReports,\n isProcessingFailed,\n data: sessionReports,\n isProcessing,\n } = useGetSessionReports();\n\n const fetchData = useCallback(() => {\n if (attemptId && studentName) {\n getSessionReports(attemptId, {\n student_level: studentLevel,\n student_name: studentName,\n });\n }\n }, [attemptId, getSessionReports, studentLevel, studentName]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isProcessingFailed) {\n return <Error height=\"50vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !sessionReports) {\n return <AppLoader height={200} width={200} />;\n }\n\n return (\n <Styled.Container $borderColor=\"BLACK_1\">\n <ReportInformation sessionReports={sessionReports} studentName={studentName} />\n </Styled.Container>\n );\n};\n\nexport default StudentTrialReport;\n"],"names":["StudentTrialReport","studentName","attemptId","studentLevel","useModalParams","getSessionReports","isProcessingFailed","sessionReports","isProcessing","useGetSessionReports","fetchData","useCallback","useEffect","jsx","Error","AppLoader","Styled.Container","ReportInformation","StudentTrialReport$1"],"mappings":";;;;;;;;AASA,MAAMA,IAAqB,MAAM;AAC/B,QAAM,EAAE,aAAAC,GAAa,WAAAC,GAAW,cAAAC,MAAiBC,EAI9C,GAEG;AAAA,IACJ,KAAKC;AAAA,IACL,oBAAAC;AAAA,IACA,MAAMC;AAAA,IACN,cAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAYC,EAAY,MAAM;AAClC,IAAIT,KAAaD,KACfI,EAAkBH,GAAW;AAAA,MAC3B,eAAeC;AAAA,MACf,cAAcF;AAAA,IAAA,CACf;AAAA,KAEF,CAACC,GAAWG,GAAmBF,GAAcF,CAAW,CAAC;AAM5D,SAJAW,EAAU,MAAM;AACJ,IAAAF;EAAA,GACT,CAACA,CAAS,CAAC,GAEVJ,IACM,gBAAAO,EAAAC,GAAA,EAAM,QAAO,QAAO,YAAYJ,EAAW,CAAA,IAGjDF,KAAgB,CAACD,IACX,gBAAAM,EAAAE,GAAA,EAAU,QAAQ,KAAK,OAAO,IAAK,CAAA,IAI3C,gBAAAF,EAACG,GAAA,EAAiB,cAAa,WAC7B,UAAC,gBAAAH,EAAAI,GAAA,EAAkB,gBAAAV,GAAgC,aAAAN,EAA0B,CAAA,EAC/E,CAAA;AAEJ,GAEAiB,IAAelB;"}
@@ -1,5 +1,6 @@
1
- var _ = /* @__PURE__ */ ((O) => (O.S_NO_SHOW = "S_NO_SHOW", O.T_NO_SHOW = "T_NO_SHOW", O))(_ || {});
1
+ var N = /* @__PURE__ */ ((_) => (_.S_NO_SHOW = "S_NO_SHOW", _.T_NO_SHOW = "T_NO_SHOW", _))(N || {}), O = /* @__PURE__ */ ((_) => (_.STUDENT_PROFILE = "studentProfile", _.INSIGHTS = "insights", _.LEARNING_PLAN = "learningPlan", _))(O || {});
2
2
  export {
3
- _ as EClassStatus
3
+ N as EClassStatus,
4
+ O as ESummaryType
4
5
  };
5
6
  //# sourceMappingURL=parent-dashboard-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parent-dashboard-types.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-types.ts"],"sourcesContent":["import type { TSession } from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { ReactElement } from 'react';\n\nexport enum EClassStatus {\n S_NO_SHOW = 'S_NO_SHOW',\n T_NO_SHOW = 'T_NO_SHOW',\n}\nexport interface ISessionDetails {\n completed_sessions: number;\n next_session_start: number;\n next_session_end: number;\n student_demo_id: string;\n upcoming_sessions: TSession[];\n demo_class_status: EClassStatus | null;\n}\n\ninterface IDegreeInfo {\n degree_name: string;\n degree_code: string;\n field_of_study: string;\n}\nexport interface ITeacherDetails {\n first_name: string;\n last_name: string;\n years_of_experience: number;\n number_of_students_taught: number;\n lower_grade: string;\n higher_grade: string;\n degree: IDegreeInfo;\n countries: string[];\n teacher_profile_url: string;\n header_image: string;\n}\n\ninterface PaymentMethodDetails {\n brand: string;\n last_4_digits: string;\n type: string;\n exp_month: number;\n exp_year: number;\n}\n\ninterface IBillingDetails {\n amount: number;\n next_due_date: string;\n payment_method_details: PaymentMethodDetails;\n}\n\nexport interface IParentHome {\n session_details: ISessionDetails;\n teacher_details: ITeacherDetails | null;\n billing_details: IBillingDetails;\n}\n\nexport interface IParentDashboardProps {\n studentName: string;\n studentServiceId: string;\n onRescheduleDemo: (demoId?: string) => void;\n onChangeTutor: (demoId: string) => void;\n onGetStartedAgain?: () => void;\n onViewSummary?: (key: string) => void;\n onSwitchUser?: () => void;\n canChangeTutor: boolean;\n isSubscriptionCancelled: boolean;\n HeaderAvatar: ReactElement;\n}\n\nexport interface ISpacingConfig {\n small: number;\n medium: number;\n large: number;\n separator: {\n small: number;\n medium: number;\n large: number;\n extraLarge: number;\n };\n}\n"],"names":["EClassStatus"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,YAAY,aAFFA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"parent-dashboard-types.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-types.ts"],"sourcesContent":["import type { TSession } from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { ReactElement } from 'react';\n\nexport enum EClassStatus {\n S_NO_SHOW = 'S_NO_SHOW',\n T_NO_SHOW = 'T_NO_SHOW',\n}\nexport interface ISessionDetails {\n completed_sessions: number;\n next_session_start: number;\n next_session_end: number;\n student_demo_id: string;\n upcoming_sessions: TSession[];\n demo_class_status: EClassStatus | null;\n user_attempt_id?: string;\n}\n\ninterface IDegreeInfo {\n degree_name: string;\n degree_code: string;\n field_of_study: string;\n}\nexport interface ITeacherDetails {\n first_name: string;\n last_name: string;\n years_of_experience: number;\n number_of_students_taught: number;\n lower_grade: string;\n higher_grade: string;\n degree: IDegreeInfo;\n countries: string[];\n teacher_profile_url: string;\n header_image: string;\n}\n\ninterface PaymentMethodDetails {\n brand: string;\n last_4_digits: string;\n type: string;\n exp_month: number;\n exp_year: number;\n}\n\ninterface IBillingDetails {\n amount: number;\n next_due_date: string;\n payment_method_details: PaymentMethodDetails;\n}\n\nexport interface IParentHome {\n session_details: ISessionDetails;\n teacher_details: ITeacherDetails | null;\n billing_details: IBillingDetails;\n}\n\nexport interface IStudentProfileSummary {\n studentLevel: string;\n studentObjectives: string[] | string;\n learningPlan: string[] | string;\n levelPreference?: string;\n}\n\nexport interface IOnViewSummaryParams extends IStudentProfileSummary {\n userAttemptId?: string;\n}\nexport enum ESummaryType {\n STUDENT_PROFILE = 'studentProfile',\n INSIGHTS = 'insights',\n LEARNING_PLAN = 'learningPlan',\n}\n\nexport interface IParentDashboardProps {\n studentName: string;\n studentId: string;\n onRescheduleDemo: (demoId?: string) => void;\n onChangeTutor: (demoId: string) => void;\n onGetStartedAgain?: () => void;\n onViewSummary?: (key: ESummaryType, summaryData: IOnViewSummaryParams) => void;\n onSwitchUser?: () => void;\n canChangeTutor: boolean;\n isSubscriptionCancelled: boolean;\n HeaderAvatar: ReactElement;\n}\n\nexport interface ISpacingConfig {\n small: number;\n medium: number;\n large: number;\n separator: {\n small: number;\n medium: number;\n large: number;\n extraLarge: number;\n };\n}\n"],"names":["EClassStatus","ESummaryType"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,YAAY,aAFFA,IAAAA,KAAA,CAAA,CAAA,GA8DAC,sBAAAA,OACVA,EAAA,kBAAkB,kBAClBA,EAAA,WAAW,YACXA,EAAA,gBAAgB,gBAHNA,IAAAA,KAAA,CAAA,CAAA;"}