@cuemath/leap 3.3.29 → 3.3.30-beta.0

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 (166) hide show
  1. package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
  2. package/dist/features/auth/pla-signup/pla-analytics-events.js +9 -3
  3. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  4. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
  5. package/dist/features/auth/signup/custom-input-field/custom-input-field.js +8 -8
  6. package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
  7. package/dist/features/circle-games/sign-up/sign-up.js +6 -6
  8. package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
  9. package/dist/features/homework/hw-card-list/hw-card-list-view.js +17 -17
  10. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
  11. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +2 -2
  12. package/dist/features/milestone/create/milestone-create-helpers.js +13 -7
  13. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  14. package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
  15. package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
  16. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
  17. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
  18. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +96 -0
  19. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
  20. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-constants.js +1 -1
  21. package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +1 -0
  22. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-styled.js +1 -1
  23. package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +1 -0
  24. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps.js +5 -5
  25. package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +1 -0
  26. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +28 -22
  27. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
  28. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +34 -0
  29. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +1 -0
  30. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +137 -0
  31. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +1 -0
  32. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +20 -0
  33. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +1 -0
  34. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +19 -0
  35. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +1 -0
  36. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-status/session-status-styled.js +2 -2
  37. package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +1 -0
  38. package/dist/features/parent-dashboard/comps/session-status/session-status.js +124 -0
  39. package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +1 -0
  40. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/session-summary-constants.js +2 -2
  41. package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +1 -0
  42. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +53 -0
  43. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +1 -0
  44. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/summary-card/summary-card-styled.js +1 -1
  45. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +1 -0
  46. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +63 -0
  47. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +1 -0
  48. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
  49. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
  50. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
  51. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
  52. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions.js +14 -14
  53. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +1 -0
  54. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
  55. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
  56. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +48 -46
  57. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  58. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
  59. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
  60. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
  61. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
  62. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
  63. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
  64. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
  65. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
  66. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +59 -0
  67. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
  68. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +93 -0
  69. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
  70. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +66 -0
  71. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
  72. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
  73. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  74. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
  75. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
  76. package/dist/features/parent-dashboard/parent-dashboard-constants.js +45 -4
  77. package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
  78. package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
  79. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  80. package/dist/features/parent-dashboard/parent-dashboard-view.js +197 -173
  81. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  82. package/dist/features/student-details/class-details/class-details-utils.js +6 -6
  83. package/dist/features/student-username/add/add-student-username-constants.js +6 -0
  84. package/dist/features/student-username/add/add-student-username-constants.js.map +1 -0
  85. package/dist/features/student-username/add/add-student-username-helpers.js +6 -0
  86. package/dist/features/student-username/add/add-student-username-helpers.js.map +1 -0
  87. package/dist/features/student-username/add/add-student-username-styled.js +10 -0
  88. package/dist/features/student-username/add/add-student-username-styled.js.map +1 -0
  89. package/dist/features/student-username/add/add-student-username.js +78 -0
  90. package/dist/features/student-username/add/add-student-username.js.map +1 -0
  91. package/dist/features/student-username/add/api/update-username.js +9 -0
  92. package/dist/features/student-username/add/api/update-username.js.map +1 -0
  93. package/dist/features/student-username/add/api/username-availability.js +10 -0
  94. package/dist/features/student-username/add/api/username-availability.js.map +1 -0
  95. package/dist/features/student-username/add/hooks/use-check-username-availability.js +41 -0
  96. package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +1 -0
  97. package/dist/features/trial-session/api/teacher-availability.js +9 -0
  98. package/dist/features/trial-session/api/teacher-availability.js.map +1 -0
  99. package/dist/features/trial-session/comps/class-preference/class-preference.js +61 -49
  100. package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
  101. package/dist/features/trial-session/comps/class-preference/helpers.js +28 -0
  102. package/dist/features/trial-session/comps/class-preference/helpers.js.map +1 -0
  103. package/dist/features/trial-session/comps/navigation-bar/index.js +24 -24
  104. package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
  105. package/dist/features/trial-session/comps/school-goals/school-goals.js +55 -53
  106. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  107. package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
  108. package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
  109. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +39 -38
  110. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
  111. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +5 -0
  112. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
  113. package/dist/features/trial-session/comps/student-feedback/student-feedback.js +96 -51
  114. package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
  115. package/dist/features/trial-session/comps/student-profile/student-profile.js +70 -63
  116. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  117. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +43 -44
  118. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  119. package/dist/features/trial-session/comps/test-prep/test-prep.js +40 -39
  120. package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
  121. package/dist/features/trial-session/helper.js +69 -53
  122. package/dist/features/trial-session/helper.js.map +1 -1
  123. package/dist/features/trial-session/hooks/use-slide-config-update.js +49 -0
  124. package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -0
  125. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +150 -130
  126. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  127. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  128. package/dist/features/trial-session/trial-session-view.js +103 -112
  129. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  130. package/dist/features/utils/utils.js +1 -1
  131. package/dist/features/utils/utils.js.map +1 -1
  132. package/dist/index.d.ts +77 -77
  133. package/dist/index.js +310 -309
  134. package/package.json +2 -3
  135. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +0 -1
  136. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +0 -1
  137. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +0 -1
  138. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +0 -29
  139. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +0 -1
  140. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +0 -132
  141. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +0 -1
  142. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +0 -11
  143. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +0 -1
  144. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +0 -19
  145. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +0 -1
  146. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +0 -1
  147. package/dist/features/trial-session/comps/pla/session-status/session-status.js +0 -127
  148. package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +0 -1
  149. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +0 -1
  150. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +0 -53
  151. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +0 -1
  152. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +0 -1
  153. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +0 -56
  154. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +0 -1
  155. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
  156. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
  157. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
  158. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +0 -1
  159. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -10
  160. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +0 -1
  161. package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -9
  162. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +0 -1
  163. package/dist/node_modules/date-fns/differenceInSeconds.js +0 -11
  164. package/dist/node_modules/date-fns/differenceInSeconds.js.map +0 -1
  165. /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
  166. /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-types.js +0 -0
@@ -1,208 +1,232 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { memo as Z, useCallback as t, useMemo as ee } from "react";
3
- import { useTheme as re } from "styled-components";
4
- import te from "../auth/pla-signup/onboarding-guide/onboarding-guide.js";
5
- import oe from "../auth/pla-signup/signup-header/signup-header.js";
6
- import ne from "../trial-session/comps/pla/next-steps/next-steps.js";
7
- import ae from "../trial-session/comps/pla/session-status/session-status.js";
8
- import ie from "../trial-session/comps/pla/session-summary/session-summary.js";
9
- import se from "../trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js";
10
- import q from "../trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js";
11
- import le from "../ui/buttons/button/button.js";
12
- import me from "../ui/buttons/text-button/text-button.js";
13
- import ce from "../ui/error/error.js";
14
- import n from "../ui/layout/flex-view.js";
15
- import he from "../ui/loader/app-loader/app-loader.js";
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { memo as hr, useMemo as t, useCallback as g } from "react";
3
+ import { useTheme as pr } from "styled-components";
4
+ import ur from "../auth/pla-signup/onboarding-guide/onboarding-guide.js";
5
+ import dr from "../auth/pla-signup/signup-header/signup-header.js";
6
+ import Z from "../trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js";
7
+ import fr from "../ui/buttons/button/button.js";
8
+ import gr from "../ui/buttons/text-button/text-button.js";
9
+ import Sr from "../ui/error/error.js";
10
+ import i from "../ui/layout/flex-view.js";
11
+ import xr from "../ui/loader/app-loader/app-loader.js";
16
12
  import a from "../ui/separator/separator.js";
17
- import G from "../ui/text/text.js";
18
- import { EDeviceType as pe } from "../ui/theme/constants.js";
19
- import { invalidateParentHome as de } from "./api/parent-home.js";
20
- import ue from "./comps/compact-header/compact-header.js";
21
- import fe from "./comps/cuemath-app-features/cuemath-app-features.js";
22
- import ge from "./comps/math-practice/math-practice.js";
23
- import Se from "./comps/parent-dashboard-faqs/parent-dashboard-faqs.js";
24
- import xe from "./hooks/use-parent-home-data.js";
25
- import be from "./hooks/use-student-profile-summary-data.js";
26
- import { MOBILE_SPACING as Le, DESKTOP_SPACING as Ce } from "./parent-dashboard-constants.js";
27
- import { MathPracticeWrapper as Te, Container as $e, ContentWrapper as Pe } from "./parent-dashboard-styled.js";
28
- const Ye = Z(
13
+ import rr from "../ui/text/text.js";
14
+ import { EDeviceType as Lr } from "../ui/theme/constants.js";
15
+ import { invalidateParentHome as br } from "./api/parent-home.js";
16
+ import Tr from "./comps/billing-information/billing-information.js";
17
+ import Cr from "./comps/compact-header/compact-header.js";
18
+ import Pr from "./comps/cuemath-app-features/cuemath-app-features.js";
19
+ import Dr from "./comps/math-practice/math-practice.js";
20
+ import $r from "./comps/next-steps/next-steps.js";
21
+ import Ar from "./comps/parent-dashboard-faqs/parent-dashboard-faqs.js";
22
+ import yr from "./comps/session-status/session-status.js";
23
+ import Mr from "./comps/session-summary/session-summary.js";
24
+ import Er from "./comps/upcoming-sessions/upcoming-sessions.js";
25
+ import Ir from "./hooks/use-parent-home-data.js";
26
+ import Or from "./hooks/use-student-profile-summary-data.js";
27
+ import { usePLAModalHandlers as wr } from "./modals/hooks/use-pla-model-handlers.js";
28
+ import { MOBILE_SPACING as Hr, DESKTOP_SPACING as kr } from "./parent-dashboard-constants.js";
29
+ import { MathPracticeWrapper as Br, Container as Fr, ContentWrapper as Wr } from "./parent-dashboard-styled.js";
30
+ const de = hr(
29
31
  ({
30
32
  studentName: l,
31
- studentId: m,
32
- onRescheduleDemo: f,
33
- onViewSummary: c,
34
- onGetStartedAgain: d,
35
- onChangeTutor: g,
36
- canChangeTutor: S,
37
- onSwitchUser: x,
38
- isSubscriptionCancelled: K,
39
- HeaderAvatar: z
33
+ studentId: c,
34
+ onRescheduleDemo: S,
35
+ onViewSummary: h,
36
+ onGetStartedAgain: x,
37
+ onChangeTutor: L,
38
+ onSwitchUser: C,
39
+ HeaderAvatar: er
40
40
  }) => {
41
- const { device: N } = re(), u = N <= pe.MOBILE, {
42
- teacherDetails: i,
41
+ const { device: tr } = pr(), p = tr <= Lr.MOBILE, or = Ir(c), {
42
+ isStudentNoShow: P,
43
+ isTutorNoShow: D,
44
+ teacherDetails: s,
45
+ billingDetails: u,
43
46
  teacherName: b,
44
- completedSessions: L,
45
- nextSessionStart: C,
46
- nextSessionEnd: T,
47
- classStatus: $,
48
- upcomingSessions: P,
49
- isDemoDone: s,
50
- isOnlyOneSessionCompleted: A,
51
- isMoreThanOneSessionCompleted: h,
52
- showLoading: R = !1,
53
- demoId: p,
54
- isProcessingFailed: X,
55
- userAttemptId: y
56
- } = xe(m), { summaryInfo: D, fetchSummaryData: M } = be(m), J = t(() => {
57
- de(m), M();
58
- }, [M, m]), O = t(() => {
59
- f(p);
60
- }, [p, f]), E = t(() => {
61
- g(p);
62
- }, [p, g]), r = ee(
63
- () => u ? Le : Ce,
64
- [u]
65
- ), I = t(
66
- (Y) => {
67
- c == null || c(Y, { ...D, userAttemptId: y ?? null });
47
+ completedSessions: T,
48
+ nextSessionStart: $,
49
+ nextSessionEnd: A,
50
+ upcomingSessions: y,
51
+ isTrialDone: n,
52
+ isOnlyTrialDone: d,
53
+ isRegularClassDone: f,
54
+ showLoading: M = !1,
55
+ demoId: m,
56
+ isProcessingFailed: ir,
57
+ userAttemptId: E,
58
+ isSubscriptionCancelled: ar,
59
+ canChangeTutor: I,
60
+ sessionDetails: O,
61
+ cardOnFileNotAvailable: w,
62
+ isCardDeclined: H
63
+ } = or, { summaryInfo: k, fetchSummaryData: B } = Or(c), e = t(
64
+ () => p ? Hr : kr,
65
+ [p]
66
+ ), F = t(() => p ? "100%" : 200, [p]), nr = g(() => {
67
+ br(c), B();
68
+ }, [B, c]), { onCancelSubscription: W, onViewPaymentMethod: v } = wr({
69
+ demoId: m,
70
+ studentId: c,
71
+ studentName: l,
72
+ billingDetails: u,
73
+ completedSessions: T,
74
+ withTutor: !!b,
75
+ onRescheduleDemo: S,
76
+ onChangeTutor: L
77
+ }), N = g(() => {
78
+ S(m);
79
+ }, [m, S]), _ = g(() => {
80
+ L(m);
81
+ }, [m, L]), j = g(
82
+ (mr) => {
83
+ h == null || h(mr, { ...k, userAttemptId: E ?? null });
68
84
  },
69
- [c, D, y]
70
- ), k = u ? "100%" : 200, Q = t(
71
- () => /* @__PURE__ */ o(n, { children: [
72
- /* @__PURE__ */ e(oe, {}),
73
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
74
- /* @__PURE__ */ e(te, { orientation: "horizontal" }),
75
- d && /* @__PURE__ */ o(n, { children: [
76
- /* @__PURE__ */ e(a, { height: r.medium }),
77
- /* @__PURE__ */ e(
78
- le,
85
+ [h, k, E]
86
+ ), q = t(
87
+ () => ({
88
+ completedSessions: T,
89
+ nextSessionStartTime: $,
90
+ teacherName: b,
91
+ isTutorNoShow: D,
92
+ isStudentNoShow: P,
93
+ nextSessionEndTime: A,
94
+ studentName: l,
95
+ onRescheduleClick: N,
96
+ isTrialDone: n,
97
+ isOnlyTrialDone: d
98
+ }),
99
+ [
100
+ T,
101
+ $,
102
+ b,
103
+ D,
104
+ P,
105
+ A,
106
+ l,
107
+ N,
108
+ n,
109
+ d
110
+ ]
111
+ ), z = t(
112
+ () => ({
113
+ isTrialDone: n,
114
+ studentName: l,
115
+ onViewSummary: j
116
+ }),
117
+ [n, l, j]
118
+ ), sr = t(
119
+ () => /* @__PURE__ */ o(i, { children: [
120
+ /* @__PURE__ */ r(dr, {}),
121
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
122
+ /* @__PURE__ */ r(ur, { orientation: "horizontal" }),
123
+ x && /* @__PURE__ */ o(i, { children: [
124
+ /* @__PURE__ */ r(a, { height: e.medium }),
125
+ /* @__PURE__ */ r(
126
+ fr,
79
127
  {
80
128
  label: "Get Started",
81
129
  renderAs: "yellow-dark",
82
130
  shape: "square",
83
- width: k,
84
- onClick: d
131
+ size: "small",
132
+ width: F,
133
+ onClick: x
85
134
  }
86
135
  )
87
136
  ] })
88
137
  ] }),
89
- [r, k, d]
90
- ), H = t(
91
- () => /* @__PURE__ */ e(
92
- ae,
93
- {
94
- completedSessions: L,
95
- nextSessionStartTime: C,
96
- teacherName: b,
97
- status: $,
98
- nextSessionEndTime: T,
99
- studentName: l,
100
- onRescheduleClick: O
101
- }
102
- ),
103
- [
104
- L,
105
- C,
106
- b,
107
- $,
108
- T,
109
- l,
110
- O
111
- ]
112
- ), F = t(() => !i || s ? null : /* @__PURE__ */ o(n, { children: [
113
- /* @__PURE__ */ e(a, { height: r.separator.large }),
114
- /* @__PURE__ */ e(q, { teacherProfile: i })
115
- ] }), [i, s, r.separator.large]), W = t(() => h ? null : /* @__PURE__ */ o(n, { children: [
116
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
117
- /* @__PURE__ */ e(
118
- ie,
119
- {
120
- isDemoDone: s,
121
- studentName: l,
122
- onViewSummary: I
123
- }
124
- )
125
- ] }), [
126
- h,
127
- r.separator.extraLarge,
128
- s,
129
- l,
130
- I
131
- ]), w = t(() => S ? /* @__PURE__ */ o(n, { children: [
132
- /* @__PURE__ */ e(a, { height: r.separator.small }),
133
- /* @__PURE__ */ o(n, { $flexDirection: "row", $flexColumnGapX: 0.25, children: [
134
- /* @__PURE__ */ e(G, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE", children: "Not the right fit for your child?" }),
135
- /* @__PURE__ */ e(
136
- me,
138
+ [e, F, x]
139
+ ), G = t(
140
+ () => /* @__PURE__ */ r(yr, { ...q }),
141
+ [q]
142
+ ), K = t(() => !s || n ? null : /* @__PURE__ */ o(i, { children: [
143
+ /* @__PURE__ */ r(a, { height: e.separator.large }),
144
+ /* @__PURE__ */ r(Z, { teacherProfile: s })
145
+ ] }), [s, n, e.separator.large]), R = t(() => f ? null : /* @__PURE__ */ o(i, { children: [
146
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
147
+ /* @__PURE__ */ r(Mr, { ...z })
148
+ ] }), [f, e.separator.extraLarge, z]), V = t(() => I ? /* @__PURE__ */ o(i, { children: [
149
+ /* @__PURE__ */ r(a, { height: e.separator.small }),
150
+ /* @__PURE__ */ o(i, { $flexDirection: "row", $flexColumnGapX: 0.25, children: [
151
+ /* @__PURE__ */ r(rr, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE", children: "Not the right fit for your child?" }),
152
+ /* @__PURE__ */ r(
153
+ gr,
137
154
  {
138
155
  color: "WHITE_1",
139
156
  sizeOnMobile: "small",
140
157
  label: "Try another tutor",
141
- onClick: E
158
+ onClick: _
142
159
  }
143
160
  )
144
161
  ] })
145
- ] }) : null, [S, r.separator.small, E]), B = t(() => i ? /* @__PURE__ */ o(n, { children: [
146
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
147
- /* @__PURE__ */ e(G, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Know your tutor" }),
148
- /* @__PURE__ */ e(a, { height: r.separator.medium }),
149
- /* @__PURE__ */ e(q, { teacherProfile: i }),
150
- w()
151
- ] }) : null, [i, r.separator, w]), v = t(() => A ? /* @__PURE__ */ o(n, { children: [
152
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
153
- /* @__PURE__ */ e(ne, {}),
154
- /* @__PURE__ */ e(se, { sessions: P }),
155
- B()
156
- ] }) : null, [
157
- A,
158
- r.separator.extraLarge,
159
- P,
160
- B
161
- ]), _ = t(() => s ? /* @__PURE__ */ o(n, { children: [
162
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
163
- /* @__PURE__ */ e(fe, {})
164
- ] }) : null, [s, r.separator.extraLarge]), j = t(() => h ? null : /* @__PURE__ */ o(n, { children: [
165
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
166
- /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(ge, { onSwitchUser: x }) })
167
- ] }), [h, r.separator.extraLarge, x]), U = t(
168
- () => /* @__PURE__ */ o(n, { children: [
169
- H(),
170
- F(),
171
- W(),
172
- v(),
173
- _(),
174
- j()
162
+ ] }) : null, [I, e.separator.small, _]), X = t(() => s ? /* @__PURE__ */ o(i, { children: [
163
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
164
+ /* @__PURE__ */ r(rr, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Know your tutor" }),
165
+ /* @__PURE__ */ r(a, { height: e.separator.medium }),
166
+ /* @__PURE__ */ r(Z, { teacherProfile: s }),
167
+ V
168
+ ] }) : null, [s, e.separator, V]), J = t(() => d ? /* @__PURE__ */ o(i, { children: [
169
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
170
+ /* @__PURE__ */ r($r, {}),
171
+ /* @__PURE__ */ r(Er, { sessions: y }),
172
+ X
173
+ ] }) : null, [d, e.separator.extraLarge, y, X]), Q = t(() => n ? /* @__PURE__ */ o(i, { children: [
174
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
175
+ /* @__PURE__ */ r(Pr, {})
176
+ ] }) : null, [n, e.separator.extraLarge]), U = t(() => f ? null : /* @__PURE__ */ o(i, { children: [
177
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
178
+ /* @__PURE__ */ r(Br, { children: /* @__PURE__ */ r(Dr, { onSwitchUser: C }) })
179
+ ] }), [f, e.separator.extraLarge, C]), Y = t(() => u ? /* @__PURE__ */ o(i, { children: [
180
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
181
+ /* @__PURE__ */ r(
182
+ Tr,
183
+ {
184
+ billingDetails: u,
185
+ onViewPaymentMethod: v,
186
+ onCancelSubscription: W
187
+ }
188
+ )
189
+ ] }) : null, [u, e.separator.extraLarge, v, W]), lr = t(
190
+ () => /* @__PURE__ */ o(i, { children: [
191
+ G,
192
+ K,
193
+ R,
194
+ J,
195
+ Q,
196
+ U,
197
+ Y
175
198
  ] }),
176
199
  [
177
- H,
178
- F,
179
- W,
180
- v,
181
- _,
182
- j
200
+ G,
201
+ K,
202
+ R,
203
+ J,
204
+ Q,
205
+ U,
206
+ Y
183
207
  ]
184
- ), V = t(
185
- () => /* @__PURE__ */ o(n, { children: [
186
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
187
- /* @__PURE__ */ e(Se, {}),
188
- /* @__PURE__ */ e(a, { height: r.separator.extraLarge })
208
+ ), cr = t(
209
+ () => /* @__PURE__ */ o(i, { children: [
210
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge }),
211
+ /* @__PURE__ */ r(Ar, {}),
212
+ /* @__PURE__ */ r(a, { height: e.separator.extraLarge })
189
213
  ] }),
190
- [r.separator.extraLarge]
214
+ [e.separator.extraLarge]
191
215
  );
192
- return R ? /* @__PURE__ */ e(he, { height: "100dvh" }) : X ? /* @__PURE__ */ e(n, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(ce, { theme: "dark", onTryAgain: J }) }) : /* @__PURE__ */ o($e, { children: [
193
- /* @__PURE__ */ e(ue, { HeaderAvatar: z }),
216
+ return t(() => H || w || !O || M, [w, H, O, M]) ? /* @__PURE__ */ r(xr, { height: "100dvh" }) : ir ? /* @__PURE__ */ r(i, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ r(Sr, { theme: "dark", onTryAgain: nr }) }) : /* @__PURE__ */ o(Fr, { children: [
217
+ /* @__PURE__ */ r(Cr, { HeaderAvatar: er }),
194
218
  /* @__PURE__ */ o(
195
- Pe,
219
+ Wr,
196
220
  {
197
221
  $flex: 1,
198
222
  $width: "100%",
199
223
  $height: "100%",
200
224
  $background: "BLACK_1",
201
- $gap: r.medium,
202
- $gutter: r.small,
225
+ $gap: e.medium,
226
+ $gutter: e.small,
203
227
  children: [
204
- K ? Q() : U(),
205
- V()
228
+ ar ? sr : lr,
229
+ cr
206
230
  ]
207
231
  }
208
232
  )
@@ -210,6 +234,6 @@ const Ye = Z(
210
234
  }
211
235
  );
212
236
  export {
213
- Ye as default
237
+ de as default
214
238
  };
215
239
  //# sourceMappingURL=parent-dashboard-view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parent-dashboard-view.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-view.tsx"],"sourcesContent":["import type { ESummaryType, IParentDashboardProps, ISpacingConfig } from './parent-dashboard-types';\n\nimport React, { memo, useMemo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport OnboardingGuide from '../auth/pla-signup/onboarding-guide/onboarding-guide';\nimport SignupHeader from '../auth/pla-signup/signup-header/signup-header';\nimport NextSteps from '../trial-session/comps/pla/next-steps/next-steps';\nimport SessionStatus from '../trial-session/comps/pla/session-status/session-status';\nimport SessionSummary from '../trial-session/comps/pla/session-summary/session-summary';\nimport UpcomingSessions from '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions';\nimport TeacherProfile from '../trial-session/comps/teacher-intro/teacher-profile/teacher-profile';\nimport Button from '../ui/buttons/button/button';\nimport TextButton from '../ui/buttons/text-button/text-button';\nimport Error from '../ui/error/error';\nimport FlexView from '../ui/layout/flex-view';\nimport AppLoader from '../ui/loader/app-loader/app-loader';\nimport Separator from '../ui/separator/separator';\nimport Text from '../ui/text/text';\nimport { EDeviceType } from '../ui/theme/constants';\nimport { invalidateParentHome } from './api/parent-home';\nimport CompactHeader from './comps/compact-header/compact-header';\nimport CuemathAppFeatures from './comps/cuemath-app-features/cuemath-app-features';\nimport MathPractice from './comps/math-practice/math-practice';\nimport ParentDashboardFaqs from './comps/parent-dashboard-faqs/parent-dashboard-faqs';\nimport useParentHomeData from './hooks/use-parent-home-data';\nimport useStudentProfileSummaryData from './hooks/use-student-profile-summary-data';\nimport { DESKTOP_SPACING, MOBILE_SPACING } from './parent-dashboard-constants';\nimport * as Styled from './parent-dashboard-styled';\n\nconst ParentDashboardView: React.FC<IParentDashboardProps> = memo(\n ({\n studentName,\n studentId,\n onRescheduleDemo,\n onViewSummary,\n onGetStartedAgain,\n onChangeTutor,\n canChangeTutor,\n onSwitchUser,\n isSubscriptionCancelled,\n HeaderAvatar,\n }) => {\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const {\n teacherDetails,\n teacherName,\n completedSessions,\n nextSessionStart,\n nextSessionEnd,\n classStatus,\n upcomingSessions,\n isDemoDone,\n isOnlyOneSessionCompleted,\n isMoreThanOneSessionCompleted,\n showLoading = false,\n demoId,\n isProcessingFailed,\n userAttemptId,\n } = useParentHomeData(studentId);\n\n const { summaryInfo, fetchSummaryData } = useStudentProfileSummaryData(studentId);\n\n const handleTryAgain = useCallback(() => {\n invalidateParentHome(studentId);\n fetchSummaryData();\n }, [fetchSummaryData, studentId]);\n\n const handleRescheduleDemo = useCallback(() => {\n onRescheduleDemo(demoId);\n }, [demoId, onRescheduleDemo]);\n\n const handleChangeTutor = useCallback(() => {\n onChangeTutor(demoId);\n }, [demoId, onChangeTutor]);\n\n const spacing: ISpacingConfig = useMemo(\n () => (isMobile ? MOBILE_SPACING : DESKTOP_SPACING),\n [isMobile],\n );\n\n const handleViewSummary = useCallback(\n (key: ESummaryType) => {\n onViewSummary?.(key, { ...summaryInfo, userAttemptId: userAttemptId ?? null });\n },\n [onViewSummary, summaryInfo, userAttemptId],\n );\n\n const buttonWidth = isMobile ? '100%' : 200;\n\n const renderCancelledSubscriptionView = useCallback(\n () => (\n <FlexView>\n <SignupHeader />\n <Separator height={spacing.separator.extraLarge} />\n <OnboardingGuide orientation=\"horizontal\" />\n {onGetStartedAgain && (\n <FlexView>\n <Separator height={spacing.medium} />\n <Button\n label=\"Get Started\"\n renderAs=\"yellow-dark\"\n shape=\"square\"\n width={buttonWidth}\n onClick={onGetStartedAgain}\n />\n </FlexView>\n )}\n </FlexView>\n ),\n [spacing, buttonWidth, onGetStartedAgain],\n );\n\n const renderSessionStatusSection = useCallback(\n () => (\n <SessionStatus\n completedSessions={completedSessions}\n nextSessionStartTime={nextSessionStart}\n teacherName={teacherName}\n status={classStatus}\n nextSessionEndTime={nextSessionEnd}\n studentName={studentName}\n onRescheduleClick={handleRescheduleDemo}\n />\n ),\n [\n completedSessions,\n nextSessionStart,\n teacherName,\n classStatus,\n nextSessionEnd,\n studentName,\n handleRescheduleDemo,\n ],\n );\n\n const renderTeacherProfileSection = useCallback(() => {\n if (!teacherDetails || isDemoDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.large} />\n <TeacherProfile teacherProfile={teacherDetails} />\n </FlexView>\n );\n }, [teacherDetails, isDemoDone, spacing.separator.large]);\n\n const renderSessionSummarySection = useCallback(() => {\n if (isMoreThanOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <SessionSummary\n isDemoDone={isDemoDone}\n studentName={studentName}\n onViewSummary={handleViewSummary}\n />\n </FlexView>\n );\n }, [\n isMoreThanOneSessionCompleted,\n spacing.separator.extraLarge,\n isDemoDone,\n studentName,\n handleViewSummary,\n ]);\n\n const renderTutorChangeSection = useCallback(() => {\n if (!canChangeTutor) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.small} />\n <FlexView $flexDirection=\"row\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE\">\n Not the right fit for your child?\n </Text>\n <TextButton\n color=\"WHITE_1\"\n sizeOnMobile=\"small\"\n label=\"Try another tutor\"\n onClick={handleChangeTutor}\n />\n </FlexView>\n </FlexView>\n );\n }, [canChangeTutor, spacing.separator.small, handleChangeTutor]);\n\n const renderTeacherDetailsSection = useCallback(() => {\n if (!teacherDetails) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Know your tutor\n </Text>\n <Separator height={spacing.separator.medium} />\n <TeacherProfile teacherProfile={teacherDetails} />\n {renderTutorChangeSection()}\n </FlexView>\n );\n }, [teacherDetails, spacing.separator, renderTutorChangeSection]);\n\n const renderOnlyOneSessionSection = useCallback(() => {\n if (!isOnlyOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <NextSteps />\n <UpcomingSessions sessions={upcomingSessions} />\n {renderTeacherDetailsSection()}\n </FlexView>\n );\n }, [\n isOnlyOneSessionCompleted,\n spacing.separator.extraLarge,\n upcomingSessions,\n renderTeacherDetailsSection,\n ]);\n\n const renderAppFeaturesSection = useCallback(() => {\n if (!isDemoDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <CuemathAppFeatures />\n </FlexView>\n );\n }, [isDemoDone, spacing.separator.extraLarge]);\n\n const renderMathPracticeSection = useCallback(() => {\n if (isMoreThanOneSessionCompleted) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Styled.MathPracticeWrapper>\n <MathPractice onSwitchUser={onSwitchUser} />\n </Styled.MathPracticeWrapper>\n </FlexView>\n );\n }, [isMoreThanOneSessionCompleted, spacing.separator.extraLarge, onSwitchUser]);\n\n const renderMainContent = useCallback(\n () => (\n <FlexView>\n {renderSessionStatusSection()}\n {renderTeacherProfileSection()}\n {renderSessionSummarySection()}\n {renderOnlyOneSessionSection()}\n {renderAppFeaturesSection()}\n {renderMathPracticeSection()}\n </FlexView>\n ),\n [\n renderSessionStatusSection,\n renderTeacherProfileSection,\n renderSessionSummarySection,\n renderOnlyOneSessionSection,\n renderAppFeaturesSection,\n renderMathPracticeSection,\n ],\n );\n\n const renderFaqsSection = useCallback(\n () => (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <ParentDashboardFaqs />\n <Separator height={spacing.separator.extraLarge} />\n </FlexView>\n ),\n [spacing.separator.extraLarge],\n );\n\n if (showLoading) {\n return <AppLoader height=\"100dvh\" />;\n }\n\n if (isProcessingFailed)\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <Error theme=\"dark\" onTryAgain={handleTryAgain} />\n </FlexView>\n );\n\n return (\n <Styled.Container>\n <CompactHeader HeaderAvatar={HeaderAvatar} />\n <Styled.ContentWrapper\n $flex={1}\n $width=\"100%\"\n $height=\"100%\"\n $background=\"BLACK_1\"\n $gap={spacing.medium}\n $gutter={spacing.small}\n >\n {isSubscriptionCancelled ? renderCancelledSubscriptionView() : renderMainContent()}\n {renderFaqsSection()}\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n },\n);\n\nexport default ParentDashboardView;\n"],"names":["ParentDashboardView","memo","studentName","studentId","onRescheduleDemo","onViewSummary","onGetStartedAgain","onChangeTutor","canChangeTutor","onSwitchUser","isSubscriptionCancelled","HeaderAvatar","device","useTheme","isMobile","EDeviceType","teacherDetails","teacherName","completedSessions","nextSessionStart","nextSessionEnd","classStatus","upcomingSessions","isDemoDone","isOnlyOneSessionCompleted","isMoreThanOneSessionCompleted","showLoading","demoId","isProcessingFailed","userAttemptId","useParentHomeData","summaryInfo","fetchSummaryData","useStudentProfileSummaryData","handleTryAgain","useCallback","invalidateParentHome","handleRescheduleDemo","handleChangeTutor","spacing","useMemo","MOBILE_SPACING","DESKTOP_SPACING","handleViewSummary","key","buttonWidth","renderCancelledSubscriptionView","FlexView","jsx","SignupHeader","Separator","OnboardingGuide","Button","renderSessionStatusSection","SessionStatus","renderTeacherProfileSection","TeacherProfile","renderSessionSummarySection","SessionSummary","renderTutorChangeSection","jsxs","Text","TextButton","renderTeacherDetailsSection","renderOnlyOneSessionSection","NextSteps","UpcomingSessions","renderAppFeaturesSection","CuemathAppFeatures","renderMathPracticeSection","Styled.MathPracticeWrapper","MathPractice","renderMainContent","renderFaqsSection","ParentDashboardFaqs","AppLoader","Error","Styled.Container","CompactHeader","Styled.ContentWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,QAAAC,MAAWC,MACbC,IAAWF,KAAUG,GAAY,QAEjC;AAAA,MACJ,gBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,2BAAAC;AAAA,MACA,+BAAAC;AAAA,MACA,aAAAC,IAAc;AAAA,MACd,QAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,eAAAC;AAAA,IAAA,IACEC,GAAkB3B,CAAS,GAEzB,EAAE,aAAA4B,GAAa,kBAAAC,EAAiB,IAAIC,GAA6B9B,CAAS,GAE1E+B,IAAi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AAA;AAAA,MAAA,gBAAA7B,EAAC8B,MAAc,cAAAnE,GAA4B;AAAA,MAC3C,gBAAAiD;AAAA,QAACmB;AAAAA,QAAA;AAAA,UACC,OAAO;AAAA,UACP,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,aAAY;AAAA,UACZ,MAAMxC,EAAQ;AAAA,UACd,SAASA,EAAQ;AAAA,UAEhB,UAAA;AAAA,YAA0B7B,IAAAoC,MAAoC0B,EAAkB;AAAA,YAChFC,EAAkB;AAAA,UAAA;AAAA,QAAA;AAAA,MACrB;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"parent-dashboard-view.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-view.tsx"],"sourcesContent":["import type { ESummaryType, IParentDashboardProps, ISpacingConfig } from './parent-dashboard-types';\n\nimport React, { memo, useMemo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport OnboardingGuide from '../auth/pla-signup/onboarding-guide/onboarding-guide';\nimport SignupHeader from '../auth/pla-signup/signup-header/signup-header';\nimport TeacherProfile from '../trial-session/comps/teacher-intro/teacher-profile/teacher-profile';\nimport Button from '../ui/buttons/button/button';\nimport TextButton from '../ui/buttons/text-button/text-button';\nimport Error from '../ui/error/error';\nimport FlexView from '../ui/layout/flex-view';\nimport AppLoader from '../ui/loader/app-loader/app-loader';\nimport Separator from '../ui/separator/separator';\nimport Text from '../ui/text/text';\nimport { EDeviceType } from '../ui/theme/constants';\nimport { invalidateParentHome } from './api/parent-home';\nimport BillingInformation from './comps/billing-information/billing-information';\nimport CompactHeader from './comps/compact-header/compact-header';\nimport CuemathAppFeatures from './comps/cuemath-app-features/cuemath-app-features';\nimport MathPractice from './comps/math-practice/math-practice';\nimport NextSteps from './comps/next-steps/next-steps';\nimport ParentDashboardFaqs from './comps/parent-dashboard-faqs/parent-dashboard-faqs';\nimport SessionStatus from './comps/session-status/session-status';\nimport SessionSummary from './comps/session-summary/session-summary';\nimport UpcomingSessions from './comps/upcoming-sessions/upcoming-sessions';\nimport useParentHomeData from './hooks/use-parent-home-data';\nimport useStudentProfileSummaryData from './hooks/use-student-profile-summary-data';\nimport { usePLAModalHandlers } from './modals/hooks/use-pla-model-handlers';\nimport { DESKTOP_SPACING, MOBILE_SPACING } from './parent-dashboard-constants';\nimport * as Styled from './parent-dashboard-styled';\n\nconst ParentDashboardView: React.FC<IParentDashboardProps> = memo(\n ({\n studentName,\n studentId,\n onRescheduleDemo,\n onViewSummary,\n onGetStartedAgain,\n onChangeTutor,\n onSwitchUser,\n HeaderAvatar,\n }) => {\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const parentHomeData = useParentHomeData(studentId);\n const {\n isStudentNoShow,\n isTutorNoShow,\n teacherDetails,\n billingDetails,\n teacherName,\n completedSessions,\n nextSessionStart,\n nextSessionEnd,\n upcomingSessions,\n isTrialDone,\n isOnlyTrialDone,\n isRegularClassDone,\n showLoading = false,\n demoId,\n isProcessingFailed,\n userAttemptId,\n isSubscriptionCancelled,\n canChangeTutor,\n sessionDetails,\n cardOnFileNotAvailable,\n isCardDeclined,\n } = parentHomeData;\n const { summaryInfo, fetchSummaryData } = useStudentProfileSummaryData(studentId);\n\n const spacing = useMemo<ISpacingConfig>(\n () => (isMobile ? MOBILE_SPACING : DESKTOP_SPACING),\n [isMobile],\n );\n\n const buttonWidth = useMemo(() => (isMobile ? '100%' : 200), [isMobile]);\n\n const handleTryAgain = useCallback(() => {\n invalidateParentHome(studentId);\n fetchSummaryData();\n }, [fetchSummaryData, studentId]);\n\n const { onCancelSubscription, onViewPaymentMethod } = usePLAModalHandlers({\n demoId,\n studentId,\n studentName,\n billingDetails,\n completedSessions,\n withTutor: !!teacherName,\n onRescheduleDemo,\n onChangeTutor,\n });\n\n const handleRescheduleDemo = useCallback(() => {\n onRescheduleDemo(demoId);\n }, [demoId, onRescheduleDemo]);\n\n const handleChangeTutor = useCallback(() => {\n onChangeTutor(demoId);\n }, [demoId, onChangeTutor]);\n\n const handleViewSummary = useCallback(\n (key: ESummaryType) => {\n onViewSummary?.(key, { ...summaryInfo, userAttemptId: userAttemptId ?? null });\n },\n [onViewSummary, summaryInfo, userAttemptId],\n );\n\n const sessionStatusProps = useMemo(\n () => ({\n completedSessions,\n nextSessionStartTime: nextSessionStart,\n teacherName,\n isTutorNoShow,\n isStudentNoShow,\n nextSessionEndTime: nextSessionEnd,\n studentName,\n onRescheduleClick: handleRescheduleDemo,\n isTrialDone,\n isOnlyTrialDone,\n }),\n [\n completedSessions,\n nextSessionStart,\n teacherName,\n isTutorNoShow,\n isStudentNoShow,\n nextSessionEnd,\n studentName,\n handleRescheduleDemo,\n isTrialDone,\n isOnlyTrialDone,\n ],\n );\n\n const sessionSummaryProps = useMemo(\n () => ({\n isTrialDone,\n studentName,\n onViewSummary: handleViewSummary,\n }),\n [isTrialDone, studentName, handleViewSummary],\n );\n\n const CancelledSubscriptionView = useMemo(\n () => (\n <FlexView>\n <SignupHeader />\n <Separator height={spacing.separator.extraLarge} />\n <OnboardingGuide orientation=\"horizontal\" />\n {onGetStartedAgain && (\n <FlexView>\n <Separator height={spacing.medium} />\n <Button\n label=\"Get Started\"\n renderAs=\"yellow-dark\"\n shape=\"square\"\n size=\"small\"\n width={buttonWidth}\n onClick={onGetStartedAgain}\n />\n </FlexView>\n )}\n </FlexView>\n ),\n [spacing, buttonWidth, onGetStartedAgain],\n );\n\n const SessionStatusSection = useMemo(\n () => <SessionStatus {...sessionStatusProps} />,\n [sessionStatusProps],\n );\n\n const TeacherProfileSection = useMemo(() => {\n if (!teacherDetails || isTrialDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.large} />\n <TeacherProfile teacherProfile={teacherDetails} />\n </FlexView>\n );\n }, [teacherDetails, isTrialDone, spacing.separator.large]);\n\n const SessionSummarySection = useMemo(() => {\n if (isRegularClassDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <SessionSummary {...sessionSummaryProps} />\n </FlexView>\n );\n }, [isRegularClassDone, spacing.separator.extraLarge, sessionSummaryProps]);\n\n const TutorChangeSection = useMemo(() => {\n if (!canChangeTutor) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.small} />\n <FlexView $flexDirection=\"row\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE\">\n Not the right fit for your child?\n </Text>\n <TextButton\n color=\"WHITE_1\"\n sizeOnMobile=\"small\"\n label=\"Try another tutor\"\n onClick={handleChangeTutor}\n />\n </FlexView>\n </FlexView>\n );\n }, [canChangeTutor, spacing.separator.small, handleChangeTutor]);\n\n const TeacherDetailsSection = useMemo(() => {\n if (!teacherDetails) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Know your tutor\n </Text>\n <Separator height={spacing.separator.medium} />\n <TeacherProfile teacherProfile={teacherDetails} />\n {TutorChangeSection}\n </FlexView>\n );\n }, [teacherDetails, spacing.separator, TutorChangeSection]);\n\n const OnlyTrialDoneSection = useMemo(() => {\n if (!isOnlyTrialDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <NextSteps />\n <UpcomingSessions sessions={upcomingSessions} />\n {TeacherDetailsSection}\n </FlexView>\n );\n }, [isOnlyTrialDone, spacing.separator.extraLarge, upcomingSessions, TeacherDetailsSection]);\n\n const AppFeaturesSection = useMemo(() => {\n if (!isTrialDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <CuemathAppFeatures />\n </FlexView>\n );\n }, [isTrialDone, spacing.separator.extraLarge]);\n\n const MathPracticeSection = useMemo(() => {\n if (isRegularClassDone) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <Styled.MathPracticeWrapper>\n <MathPractice onSwitchUser={onSwitchUser} />\n </Styled.MathPracticeWrapper>\n </FlexView>\n );\n }, [isRegularClassDone, spacing.separator.extraLarge, onSwitchUser]);\n\n const BillingInformationSection = useMemo(() => {\n if (!billingDetails) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <BillingInformation\n billingDetails={billingDetails}\n onViewPaymentMethod={onViewPaymentMethod}\n onCancelSubscription={onCancelSubscription}\n />\n </FlexView>\n );\n }, [billingDetails, spacing.separator.extraLarge, onViewPaymentMethod, onCancelSubscription]);\n\n const MainContent = useMemo(\n () => (\n <FlexView>\n {SessionStatusSection}\n {TeacherProfileSection}\n {SessionSummarySection}\n {OnlyTrialDoneSection}\n {AppFeaturesSection}\n {MathPracticeSection}\n {BillingInformationSection}\n </FlexView>\n ),\n [\n SessionStatusSection,\n TeacherProfileSection,\n SessionSummarySection,\n OnlyTrialDoneSection,\n AppFeaturesSection,\n MathPracticeSection,\n BillingInformationSection,\n ],\n );\n\n const FaqsSection = useMemo(\n () => (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <ParentDashboardFaqs />\n <Separator height={spacing.separator.extraLarge} />\n </FlexView>\n ),\n [spacing.separator.extraLarge],\n );\n\n const isLoading = useMemo(() => {\n return isCardDeclined || cardOnFileNotAvailable || !sessionDetails || showLoading;\n }, [cardOnFileNotAvailable, isCardDeclined, sessionDetails, showLoading]);\n\n if (isLoading) {\n return <AppLoader height=\"100dvh\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <Error theme=\"dark\" onTryAgain={handleTryAgain} />\n </FlexView>\n );\n }\n\n return (\n <Styled.Container>\n <CompactHeader HeaderAvatar={HeaderAvatar} />\n <Styled.ContentWrapper\n $flex={1}\n $width=\"100%\"\n $height=\"100%\"\n $background=\"BLACK_1\"\n $gap={spacing.medium}\n $gutter={spacing.small}\n >\n {isSubscriptionCancelled ? CancelledSubscriptionView : MainContent}\n {FaqsSection}\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n },\n);\n\nexport default ParentDashboardView;\n"],"names":["ParentDashboardView","memo","studentName","studentId","onRescheduleDemo","onViewSummary","onGetStartedAgain","onChangeTutor","onSwitchUser","HeaderAvatar","device","useTheme","isMobile","EDeviceType","parentHomeData","useParentHomeData","isStudentNoShow","isTutorNoShow","teacherDetails","billingDetails","teacherName","completedSessions","nextSessionStart","nextSessionEnd","upcomingSessions","isTrialDone","isOnlyTrialDone","isRegularClassDone","showLoading","demoId","isProcessingFailed","userAttemptId","isSubscriptionCancelled","canChangeTutor","sessionDetails","cardOnFileNotAvailable","isCardDeclined","summaryInfo","fetchSummaryData","useStudentProfileSummaryData","spacing","useMemo","MOBILE_SPACING","DESKTOP_SPACING","buttonWidth","handleTryAgain","useCallback","invalidateParentHome","onCancelSubscription","onViewPaymentMethod","usePLAModalHandlers","handleRescheduleDemo","handleChangeTutor","handleViewSummary","key","sessionStatusProps","sessionSummaryProps","CancelledSubscriptionView","FlexView","jsx","SignupHeader","Separator","OnboardingGuide","Button","SessionStatusSection","SessionStatus","TeacherProfileSection","TeacherProfile","SessionSummarySection","SessionSummary","TutorChangeSection","jsxs","Text","TextButton","TeacherDetailsSection","OnlyTrialDoneSection","NextSteps","UpcomingSessions","AppFeaturesSection","CuemathAppFeatures","MathPracticeSection","Styled.MathPracticeWrapper","MathPractice","BillingInformationSection","BillingInformation","MainContent","FaqsSection","ParentDashboardFaqs","AppLoader","Error","Styled.Container","CompactHeader","Styled.ContentWrapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAMA,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,QAAAC,OAAWC,MACbC,IAAWF,MAAUG,GAAY,QAEjCC,KAAiBC,GAAkBZ,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,SAAS,CAAA,IAGhC1D,KAEC,gBAAA6B,EAAAD,GAAA,EAAS,OAAO,GAAG,aAAY,UAAS,iBAAgB,UACvD,UAAA,gBAAAC,EAAC8B,IAAM,EAAA,OAAM,QAAO,YAAY5C,IAAgB,EAClD,CAAA,IAKF,gBAAA0B,EAACmB,IAAA,EACC,UAAA;AAAA,MAAA,gBAAA/B,EAACgC,MAAc,cAAAlF,IAA4B;AAAA,MAC3C,gBAAA8D;AAAA,QAACqB;AAAAA,QAAA;AAAA,UACC,OAAO;AAAA,UACP,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,aAAY;AAAA,UACZ,MAAMpD,EAAQ;AAAA,UACd,SAASA,EAAQ;AAAA,UAEhB,UAAA;AAAA,YAAAR,KAA0ByB,KAA4B4B;AAAA,YACtDC;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
@@ -1,12 +1,12 @@
1
1
  import { startOfDay as s } from "../../../node_modules/date-fns/startOfDay.js";
2
- import { isAfter as n } from "../../../node_modules/date-fns/isAfter.js";
3
- import { isBefore as i } from "../../../node_modules/date-fns/isBefore.js";
4
- import { addDays as f } from "../../../node_modules/date-fns/addDays.js";
5
- import { isToday as d } from "../../../node_modules/date-fns/isToday.js";
2
+ import { isToday as n } from "../../../node_modules/date-fns/isToday.js";
3
+ import { isAfter as i } from "../../../node_modules/date-fns/isAfter.js";
4
+ import { isBefore as f } from "../../../node_modules/date-fns/isBefore.js";
5
+ import { addDays as d } from "../../../node_modules/date-fns/addDays.js";
6
6
  import { formatDate as m } from "../../../node_modules/date-fns/format.js";
7
7
  const u = (e) => {
8
- const o = /* @__PURE__ */ new Date(), t = new Date(e), r = f(s(o), 7);
9
- return d(t) ? `Today, ${m(t, "hh:mm a")}` : n(t, o) && i(t, r) ? m(t, "eee, hh:mm a") : m(t, "MMM dd, hh:mm a");
8
+ const o = /* @__PURE__ */ new Date(), t = new Date(e), r = d(s(o), 7);
9
+ return n(t) ? `Today, ${m(t, "hh:mm a")}` : i(t, o) && f(t, r) ? m(t, "eee, hh:mm a") : m(t, "MMM dd, hh:mm a");
10
10
  }, M = (e, o, t) => {
11
11
  const r = m(e * 1e3, "hh:mm a"), a = m((e + o + t) * 1e3, "hh:mm a");
12
12
  return `${r} - ${a}`;
@@ -0,0 +1,6 @@
1
+ const E = 25, N = 3;
2
+ export {
3
+ E as USERNAME_MAX_LENGTH,
4
+ N as USERNAME_MIN_LENGTH
5
+ };
6
+ //# sourceMappingURL=add-student-username-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-student-username-constants.js","sources":["../../../../src/features/student-username/add/add-student-username-constants.ts"],"sourcesContent":["export const USERNAME_MAX_LENGTH = 25;\nexport const USERNAME_MIN_LENGTH = 3;\n"],"names":["USERNAME_MAX_LENGTH","USERNAME_MIN_LENGTH"],"mappings":"AAAO,MAAMA,IAAsB,IACtBC,IAAsB;"}
@@ -0,0 +1,6 @@
1
+ import { USERNAME_MIN_LENGTH as t, USERNAME_MAX_LENGTH as r } from "./add-student-username-constants.js";
2
+ const a = (e) => e.trim() ? e.length < t || e.length > r ? `Username must be between 3 and ${r} characters` : /^[a-z0-9_]+$/.test(e) ? null : "Only lowercase letters, numbers, and underscores are allowed" : "Username is required";
3
+ export {
4
+ a as validateUsername
5
+ };
6
+ //# sourceMappingURL=add-student-username-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-student-username-helpers.js","sources":["../../../../src/features/student-username/add/add-student-username-helpers.ts"],"sourcesContent":["import { USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH } from './add-student-username-constants';\n\nexport const validateUsername = (username: string) => {\n if (!username.trim()) return 'Username is required';\n\n if (username.length < USERNAME_MIN_LENGTH || username.length > USERNAME_MAX_LENGTH) {\n return `Username must be between 3 and ${USERNAME_MAX_LENGTH} characters`;\n }\n\n const usernameRegex = /^[a-z0-9_]+$/;\n\n if (!usernameRegex.test(username)) {\n return 'Only lowercase letters, numbers, and underscores are allowed';\n }\n\n return null;\n};\n"],"names":["validateUsername","username","USERNAME_MIN_LENGTH","USERNAME_MAX_LENGTH"],"mappings":";AAEa,MAAAA,IAAmB,CAACC,MAC1BA,EAAS,KAAK,IAEfA,EAAS,SAASC,KAAuBD,EAAS,SAASE,IACtD,kCAAkCA,CAAmB,gBAGxC,eAEH,KAAKF,CAAQ,IAIzB,OAHE,iEAToB;"}
@@ -0,0 +1,10 @@
1
+ import o from "styled-components";
2
+ import e from "../../ui/layout/flex-view.js";
3
+ const t = o(e)`
4
+ min-height: 100vh;
5
+ overflow: hidden;
6
+ `;
7
+ export {
8
+ t as Container
9
+ };
10
+ //# sourceMappingURL=add-student-username-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-student-username-styled.js","sources":["../../../../src/features/student-username/add/add-student-username-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n min-height: 100vh;\n overflow: hidden;\n`;\n"],"names":["Container","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA;AAAA;"}