@cuemath/leap 3.3.15-as1 → 3.3.15-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 (102) hide show
  1. package/dist/assets/lottie/lottie.js +2 -2
  2. package/dist/assets/lottie/lottie.js.map +1 -1
  3. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +4 -4
  4. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
  5. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +5 -5
  6. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
  7. package/dist/features/auth/comps/pill-button/pill-button.js +19 -19
  8. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
  9. package/dist/features/auth/pla-signup/pla-analytics-events.js +5 -4
  10. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  11. package/dist/features/auth/pla-signup/signup-header/signup-header.js +1 -1
  12. package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -1
  13. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +24 -24
  14. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
  15. package/dist/features/parent-dashboard/api/get-student-profile-summary.js +9 -0
  16. package/dist/features/parent-dashboard/api/get-student-profile-summary.js.map +1 -0
  17. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js +10 -0
  18. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js.map +1 -0
  19. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +42 -0
  20. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -0
  21. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +45 -42
  22. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  23. package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js +24 -0
  24. package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js.map +1 -0
  25. package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js +40 -0
  26. package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js.map +1 -0
  27. package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js +44 -0
  28. package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js.map +1 -0
  29. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js +32 -0
  30. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js.map +1 -0
  31. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +12 -0
  32. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
  33. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +44 -0
  34. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -0
  35. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +13 -0
  36. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -0
  37. package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +28 -0
  38. package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -0
  39. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js +43 -0
  40. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js.map +1 -0
  41. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +59 -0
  42. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -0
  43. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js +86 -0
  44. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js.map +1 -0
  45. package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -2
  46. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  47. package/dist/features/parent-dashboard/parent-dashboard-view.js +139 -127
  48. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  49. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +8 -7
  50. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -1
  51. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +27 -26
  52. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -1
  53. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +16 -16
  54. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -1
  55. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +15 -13
  56. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
  57. package/dist/features/trial-session/comps/session-report/report-information/report-information.js +1 -1
  58. package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
  59. package/dist/features/ui/constants/z-index.js +2 -5
  60. package/dist/features/ui/constants/z-index.js.map +1 -1
  61. package/dist/features/utils/utils.js +18 -18
  62. package/dist/features/utils/utils.js.map +1 -1
  63. package/dist/index.d.ts +55 -75
  64. package/dist/index.js +556 -552
  65. package/dist/index.js.map +1 -1
  66. package/dist/node_modules/decode-uri-component/index.js.map +1 -0
  67. package/dist/node_modules/query-string/base.js +1 -1
  68. package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
  69. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  70. package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
  71. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  72. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
  73. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  74. package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
  75. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  76. package/dist/static/error.dd744fa5.json +1 -0
  77. package/dist/static/username.2c755605.json +1 -0
  78. package/package.json +1 -1
  79. package/dist/features/hooks/use-visibility-change.js +0 -12
  80. package/dist/features/hooks/use-visibility-change.js.map +0 -1
  81. package/dist/features/ui/timers/class-time/animate.js +0 -100
  82. package/dist/features/ui/timers/class-time/animate.js.map +0 -1
  83. package/dist/features/ui/timers/class-time/animations/open-close.js +0 -93
  84. package/dist/features/ui/timers/class-time/animations/open-close.js.map +0 -1
  85. package/dist/features/ui/timers/class-time/animations/ripple.js +0 -44
  86. package/dist/features/ui/timers/class-time/animations/ripple.js.map +0 -1
  87. package/dist/features/ui/timers/class-time/class-time.js +0 -140
  88. package/dist/features/ui/timers/class-time/class-time.js.map +0 -1
  89. package/dist/features/ui/timers/class-time/constants.js +0 -31
  90. package/dist/features/ui/timers/class-time/constants.js.map +0 -1
  91. package/dist/features/ui/timers/clock/clock.js +0 -25
  92. package/dist/features/ui/timers/clock/clock.js.map +0 -1
  93. package/dist/features/ui/timers/timer/timer.js +0 -63
  94. package/dist/features/ui/timers/timer/timer.js.map +0 -1
  95. package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
  96. package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
  97. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
  98. package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
  99. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
  100. package/dist/static/error.cbe1ddde.json +0 -1
  101. package/dist/static/username.9e034d51.json +0 -1
  102. /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
@@ -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,24 @@
1
+ import { useCallback as s, useEffect as i, useMemo as u } from "react";
2
+ import { useGetMileStoneConfig as l } from "../../milestone/create/api/milestone-config.js";
3
+ import { useStudentProfileSummaryGet as c } from "../api/get-student-profile-summary.js";
4
+ import { getLearningProfileSummary as g } from "../modals/student-profile-summary/student-profile-summary-helpers.js";
5
+ const f = { demo_type: "TRIAL_V3" }, C = (e) => {
6
+ const { get: o, data: r } = c(e), { get: m, data: a } = l(
7
+ e,
8
+ f
9
+ ), t = s(() => {
10
+ o(e), m(e, f);
11
+ }, [o, e, m]);
12
+ i(() => {
13
+ t();
14
+ }, [t]);
15
+ const n = u(() => g(a, r), [a, r]);
16
+ return u(
17
+ () => ({ summaryInfo: n, fetchSummaryData: t }),
18
+ [n, t]
19
+ );
20
+ };
21
+ export {
22
+ C as default
23
+ };
24
+ //# 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 DEFAULT_DEMO_TYPE = { demo_type: 'TRIAL_V3' } as const;\n\nconst useStudentProfileSummaryData = (studentId: string) => {\n const { get: getStudentProfileSummary, data: summaryData } =\n useStudentProfileSummaryGet(studentId);\n\n const { get: getMilestoneConfig, data: milestoneConfigData } = useGetMileStoneConfig(\n studentId,\n DEFAULT_DEMO_TYPE,\n );\n\n const fetchSummaryData = useCallback(() => {\n getStudentProfileSummary(studentId);\n getMilestoneConfig(studentId, DEFAULT_DEMO_TYPE);\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 const result = useMemo(\n () => ({ summaryInfo, fetchSummaryData }),\n [summaryInfo, fetchSummaryData],\n );\n\n return result;\n};\n\nexport default useStudentProfileSummaryData;\n"],"names":["DEFAULT_DEMO_TYPE","useStudentProfileSummaryData","studentId","getStudentProfileSummary","summaryData","useStudentProfileSummaryGet","getMilestoneConfig","milestoneConfigData","useGetMileStoneConfig","fetchSummaryData","useCallback","useEffect","summaryInfo","useMemo","getLearningProfileSummary"],"mappings":";;;;AAMA,MAAMA,IAAoB,EAAE,WAAW,cAEjCC,IAA+B,CAACC,MAAsB;AAC1D,QAAM,EAAE,KAAKC,GAA0B,MAAMC,MAC3CC,EAA4BH,CAAS,GAEjC,EAAE,KAAKI,GAAoB,MAAMC,EAAwB,IAAAC;AAAA,IAC7DN;AAAA,IACAF;AAAA,EAAA,GAGIS,IAAmBC,EAAY,MAAM;AACzC,IAAAP,EAAyBD,CAAS,GAClCI,EAAmBJ,GAAWF,CAAiB;AAAA,EAC9C,GAAA,CAACG,GAA0BD,GAAWI,CAAkB,CAAC;AAE5D,EAAAK,EAAU,MAAM;AACG,IAAAF;EAAA,GAChB,CAACA,CAAgB,CAAC;AAEf,QAAAG,IAAcC,EAAQ,MACnBC,EAA0BP,GAAqBH,CAAW,GAChE,CAACG,GAAqBH,CAAW,CAAC;AAO9B,SALQS;AAAA,IACb,OAAO,EAAE,aAAAD,GAAa,kBAAAH;IACtB,CAACG,GAAaH,CAAgB;AAAA,EAAA;AAIlC;"}
@@ -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,12 @@
1
+ import t from "styled-components";
2
+ import e from "../../../ui/layout/flex-view.js";
3
+ const r = t(e)`
4
+ width: 100%;
5
+ ${({ theme: i }) => i.mediaQueries.minWidthTablet} {
6
+ max-width: 560px;
7
+ }
8
+ `;
9
+ export {
10
+ r as Container
11
+ };
12
+ //# 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 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,IAEpC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,44 @@
1
+ import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
+ import { memo as d, 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 f from "../../../ui/layout/flex-view.js";
7
+ import E from "../../../ui/loader/app-loader/app-loader.js";
8
+ import L from "../../../ui/modals/use-modal-params.js";
9
+ import g from "../../../ui/text/text.js";
10
+ import { EDeviceType as h } from "../../../ui/theme/constants.js";
11
+ import { Container as P } from "./student-profile-summary-styled.js";
12
+ const _ = () => {
13
+ const { studentName: o, summaryData: e } = L(), i = c().device <= h.MOBILE, n = u(() => {
14
+ const { studentLevel: m, studentObjectives: s = "", learningPlan: l = "" } = e ?? {};
15
+ return [
16
+ {
17
+ title: "Student Level",
18
+ description: m,
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: l
33
+ }
34
+ ];
35
+ }, [e]);
36
+ return e ? /* @__PURE__ */ a(P, { $borderColor: "BLACK_1", children: [
37
+ i && /* @__PURE__ */ t(f, { $gutterX: 1, $gapX: 1.5, $background: "BLACK_2", children: /* @__PURE__ */ t(g, { $renderAs: "ab1-bold", $color: "WHITE_1", children: `${o}'s Profile` }) }),
38
+ /* @__PURE__ */ t(p, { profileHighlights: n })
39
+ ] }) : /* @__PURE__ */ t(E, { height: 200, width: 200 });
40
+ }, K = d(_);
41
+ export {
42
+ K 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, memo } 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 <AppLoader height={200} width={200} />;\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 memo(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","memo"],"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,IAKF,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,IAXQ,gBAAAS,EAAAG,GAAA,EAAU,QAAQ,KAAK,OAAO,IAAK,CAAA;AAa/C,GAEeC,IAAAC,EAAKrB,CAAqB;"}
@@ -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
+ width: 100%;
5
+ max-height: 90vh;
6
+ ${({ theme: i }) => i.mediaQueries.minWidthTablet} {
7
+ max-width: 720px;
8
+ }
9
+ `;
10
+ export {
11
+ r as Container
12
+ };
13
+ //# 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 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,IAGpC,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 { memo as p, useCallback as f, useEffect as d } from "react";
3
+ import { useGetSessionReports as u } from "../../../trial-session/api/trial-home.js";
4
+ import l from "../../../trial-session/comps/session-report/report-information/report-information.js";
5
+ import c from "../../../ui/error/error.js";
6
+ import h from "../../../ui/loader/app-loader/app-loader.js";
7
+ import g from "../../../ui/modals/use-modal-params.js";
8
+ import { Container as R } from "./trial-report-styled.js";
9
+ const C = () => {
10
+ const { studentName: t, attemptId: r, studentLevel: s } = g(), {
11
+ get: i,
12
+ isProcessingFailed: m,
13
+ data: n,
14
+ isProcessing: a
15
+ } = u(), o = f(() => {
16
+ r && t && i(r, {
17
+ student_level: s,
18
+ student_name: t
19
+ });
20
+ }, [r, i, s, t]);
21
+ return d(() => {
22
+ o();
23
+ }, [o]), m ? /* @__PURE__ */ e(c, { height: "50vh", onTryAgain: o }) : a || !n ? /* @__PURE__ */ e(h, { height: 200, width: 200 }) : /* @__PURE__ */ e(R, { $borderColor: "BLACK_1", children: /* @__PURE__ */ e(l, { sessionReports: n, studentName: t }) });
24
+ }, E = p(C);
25
+ export {
26
+ E 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 { memo, 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 memo(StudentTrialReport);\n"],"names":["StudentTrialReport","studentName","attemptId","studentLevel","useModalParams","getSessionReports","isProcessingFailed","sessionReports","isProcessing","useGetSessionReports","fetchData","useCallback","useEffect","jsx","Error","AppLoader","Styled.Container","ReportInformation","trialReport","memo"],"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,GAEeiB,IAAAC,EAAKnB,CAAkB;"}
@@ -0,0 +1,43 @@
1
+ const N = {
2
+ CONFUSING_EXPLANATIONS: "CONFUSING_EXPLANATIONS",
3
+ WRONG_PACE: "WRONG_PACE",
4
+ NOT_ENGAGING: "NOT_ENGAGING",
5
+ PERSONALITY_MISMATCH: "PERSONALITY_MISMATCH",
6
+ IMPATIENT: "IMPATIENT",
7
+ UNCLEAR_COMMUNICATION: "UNCLEAR_COMMUNICATION",
8
+ OTHER: "OTHER"
9
+ }, A = [
10
+ {
11
+ id: N.CONFUSING_EXPLANATIONS,
12
+ label: "Explanations were confusing"
13
+ },
14
+ {
15
+ id: N.WRONG_PACE,
16
+ label: "Moved too fast or slow"
17
+ },
18
+ {
19
+ id: N.NOT_ENGAGING,
20
+ label: "Couldn’t keep my child engaged"
21
+ },
22
+ {
23
+ id: N.PERSONALITY_MISMATCH,
24
+ label: "Personality didn't click with my child"
25
+ },
26
+ {
27
+ id: N.IMPATIENT,
28
+ label: "Wasn’t patient enough"
29
+ },
30
+ {
31
+ id: N.UNCLEAR_COMMUNICATION,
32
+ label: "Communication wasn't clear enough"
33
+ },
34
+ {
35
+ id: N.OTHER,
36
+ label: "Something else"
37
+ }
38
+ ];
39
+ export {
40
+ N as TUTOR_CHANGE_REASON_IDS,
41
+ A as changeTutorReasons
42
+ };
43
+ //# sourceMappingURL=tutor-change-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tutor-change-constants.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change-constants.ts"],"sourcesContent":["export const TUTOR_CHANGE_REASON_IDS = {\n CONFUSING_EXPLANATIONS: 'CONFUSING_EXPLANATIONS',\n WRONG_PACE: 'WRONG_PACE',\n NOT_ENGAGING: 'NOT_ENGAGING',\n PERSONALITY_MISMATCH: 'PERSONALITY_MISMATCH',\n IMPATIENT: 'IMPATIENT',\n UNCLEAR_COMMUNICATION: 'UNCLEAR_COMMUNICATION',\n OTHER: 'OTHER',\n} as const;\n\nexport const changeTutorReasons = [\n {\n id: TUTOR_CHANGE_REASON_IDS.CONFUSING_EXPLANATIONS,\n label: 'Explanations were confusing',\n },\n {\n id: TUTOR_CHANGE_REASON_IDS.WRONG_PACE,\n label: 'Moved too fast or slow',\n },\n {\n id: TUTOR_CHANGE_REASON_IDS.NOT_ENGAGING,\n label: 'Couldn’t keep my child engaged',\n },\n {\n id: TUTOR_CHANGE_REASON_IDS.PERSONALITY_MISMATCH,\n label: `Personality didn't click with my child`,\n },\n {\n id: TUTOR_CHANGE_REASON_IDS.IMPATIENT,\n label: `Wasn’t patient enough`,\n },\n {\n id: TUTOR_CHANGE_REASON_IDS.UNCLEAR_COMMUNICATION,\n label: `Communication wasn't clear enough`,\n },\n {\n id: TUTOR_CHANGE_REASON_IDS.OTHER,\n label: `Something else`,\n },\n];\n"],"names":["TUTOR_CHANGE_REASON_IDS","changeTutorReasons"],"mappings":"AAAO,MAAMA,IAA0B;AAAA,EACrC,wBAAwB;AAAA,EACxB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,sBAAsB;AAAA,EACtB,WAAW;AAAA,EACX,uBAAuB;AAAA,EACvB,OAAO;AACT,GAEaC,IAAqB;AAAA,EAChC;AAAA,IACE,IAAID,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAIA,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAIA,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAIA,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAIA,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAIA,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAIA,EAAwB;AAAA,IAC5B,OAAO;AAAA,EACT;AACF;"}
@@ -0,0 +1,59 @@
1
+ import o from "styled-components";
2
+ import t from "../../../ui/layout/flex-view.js";
3
+ const s = o(t)`
4
+ max-width: 560px;
5
+ border: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
6
+ `, x = o(t)`
7
+ overflow-y: auto;
8
+ max-height: 468px;
9
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
10
+ max-height: unset;
11
+ overflow-y: hidden;
12
+ })}
13
+ `, h = o(t)`
14
+ padding-top: 0;
15
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
16
+ max-height: 300px;
17
+ overflow-y: auto;
18
+ })}
19
+ `, m = o(t)`
20
+ padding-bottom: 24px;
21
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
22
+ border-top: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
23
+ padding-bottom: 40px;
24
+ })}
25
+ `, c = o.textarea(({ theme: e }) => {
26
+ const {
27
+ colors: { WHITE: i, WHITE_T_38: r, BLACK_2: n, BLACK_5: a },
28
+ layout: { gutter: p }
29
+ } = e;
30
+ return `border: 1px solid ${a};
31
+ width: 100%;
32
+ min-height: ${p * 5}px;
33
+ padding: 16px;
34
+ background-color: ${n};
35
+ white-space: pre-line;
36
+ font-family: 'Untitled Sans Regular';
37
+ font-weight: 400;
38
+ font-size: 14px;
39
+ line-height: 24px;
40
+ color: ${i};
41
+ resize: none;
42
+ outline: none;
43
+ &::placeholder {
44
+ color: ${r};
45
+ }
46
+
47
+ &:focus {
48
+ outline: none;
49
+ }
50
+ `;
51
+ });
52
+ export {
53
+ s as Container,
54
+ h as ContentWrapper,
55
+ m as FooterWrapper,
56
+ x as OuterWrapper,
57
+ c as StyledTextArea
58
+ };
59
+ //# sourceMappingURL=tutor-change-styled.js.map