@cuemath/leap 3.3.34 → 3.3.35

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 (224) hide show
  1. package/dist/assets/gif/gif.js +1 -4
  2. package/dist/assets/gif/gif.js.map +1 -1
  3. package/dist/assets/illustrations/illustrations.js +1 -1
  4. package/dist/assets/illustrations/illustrations.js.map +1 -1
  5. package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
  6. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +1 -1
  7. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
  8. package/dist/features/auth/comps/otp-input/otp-input.js +29 -35
  9. package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
  10. package/dist/features/auth/pla-signup/pla-analytics-events.js +3 -12
  11. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  12. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +34 -43
  13. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
  14. package/dist/features/chapters-v2/chapter-details/chapter-details.js +101 -140
  15. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  16. package/dist/features/chapters-v2/utils/index.js +16 -20
  17. package/dist/features/chapters-v2/utils/index.js.map +1 -1
  18. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +6 -6
  19. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +1 -1
  20. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +21 -20
  21. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
  22. package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
  23. package/dist/features/circle-games/sign-up/sign-up.js +6 -6
  24. package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
  25. package/dist/features/homework/hw-card-list/hw-card-list-view.js +17 -17
  26. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  27. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  28. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  29. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  30. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +0 -400
  31. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
  32. package/dist/features/milestone/constants.js +15 -28
  33. package/dist/features/milestone/constants.js.map +1 -1
  34. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
  35. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +2 -2
  36. package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js +16 -23
  37. package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js.map +1 -1
  38. package/dist/features/milestone/create/milestone-create-helpers.js +7 -13
  39. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  40. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +22 -28
  41. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
  42. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
  43. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
  44. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +46 -48
  45. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  46. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +12 -0
  47. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
  48. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +17 -16
  49. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
  50. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +8 -4
  51. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
  52. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
  53. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  54. package/dist/features/parent-dashboard/parent-dashboard-constants.js +4 -45
  55. package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
  56. package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
  57. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  58. package/dist/features/parent-dashboard/parent-dashboard-view.js +174 -197
  59. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  60. package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +32 -0
  61. package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +1 -0
  62. package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js +72 -0
  63. package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +1 -0
  64. package/dist/features/stickers/sticker-selector/sticker-selector.js +58 -57
  65. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
  66. package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js +34 -0
  67. package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js.map +1 -0
  68. package/dist/features/stickers/stickers-effects/constants.js +26 -0
  69. package/dist/features/stickers/stickers-effects/constants.js.map +1 -0
  70. package/dist/features/stickers/stickers-effects/context/sticker-provider.js +28 -0
  71. package/dist/features/stickers/stickers-effects/context/sticker-provider.js.map +1 -0
  72. package/dist/features/stickers/stickers-effects/hooks/use-stickers.js +12 -0
  73. package/dist/features/stickers/stickers-effects/hooks/use-stickers.js.map +1 -0
  74. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -1
  75. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +32 -17
  76. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -1
  77. package/dist/features/stickers/stickers-effects/stickers-effects-types.js +6 -0
  78. package/dist/features/stickers/stickers-effects/stickers-effects-types.js.map +1 -0
  79. package/dist/features/stickers/stickers-effects/stickers-effects.js +40 -56
  80. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -1
  81. package/dist/features/student-details/class-details/class-details-utils.js +6 -6
  82. package/dist/features/trial-session/comps/class-preference/class-preference.js +58 -74
  83. package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
  84. package/dist/features/trial-session/comps/learning-plan/index.js +45 -47
  85. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  86. package/dist/features/trial-session/comps/navigation-bar/index.js +40 -41
  87. package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
  88. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-constants.js +1 -1
  89. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
  90. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-styled.js +1 -1
  91. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
  92. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps.js +5 -5
  93. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
  94. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
  95. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
  96. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +132 -0
  97. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
  98. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
  99. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
  100. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
  101. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
  102. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-status/session-status-styled.js +2 -2
  103. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
  104. package/dist/features/trial-session/comps/pla/session-status/session-status.js +127 -0
  105. package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
  106. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/session-summary-constants.js +12 -18
  107. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
  108. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +53 -0
  109. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
  110. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/summary-card/summary-card-styled.js +1 -1
  111. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
  112. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
  113. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
  114. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
  115. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
  116. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
  117. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
  118. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions.js +14 -14
  119. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
  120. package/dist/features/trial-session/comps/school-goals/school-goals.js +57 -59
  121. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  122. package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
  123. package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
  124. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +40 -41
  125. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
  126. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +0 -5
  127. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
  128. package/dist/features/trial-session/comps/student-feedback/student-feedback.js +51 -96
  129. package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
  130. package/dist/features/trial-session/comps/student-profile/student-profile.js +63 -70
  131. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  132. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +44 -43
  133. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  134. package/dist/features/trial-session/comps/test-prep/test-prep.js +40 -41
  135. package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
  136. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +61 -60
  137. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
  138. package/dist/features/trial-session/helper.js +61 -76
  139. package/dist/features/trial-session/helper.js.map +1 -1
  140. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +144 -174
  141. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  142. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  143. package/dist/features/trial-session/trial-session-view.js +110 -99
  144. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  145. package/dist/features/ui/accordion/accordion-items/accordion-items.js +13 -13
  146. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -1
  147. package/dist/features/ui/modals/modal-styled.js +13 -45
  148. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  149. package/dist/features/ui/modals/modal.js +31 -31
  150. package/dist/features/ui/modals/modal.js.map +1 -1
  151. package/dist/features/utils/utils.js +1 -1
  152. package/dist/features/utils/utils.js.map +1 -1
  153. package/dist/index.d.ts +142 -94
  154. package/dist/index.js +301 -292
  155. package/dist/index.js.map +1 -1
  156. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
  157. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
  158. package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
  159. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
  160. package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
  161. package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
  162. package/dist/static/trophy.a8ea85ef.json +6813 -0
  163. package/package.json +3 -2
  164. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js +0 -86
  165. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +0 -1
  166. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +0 -140
  167. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +0 -1
  168. package/dist/features/parent-dashboard/api/cancel-subscription.js +0 -9
  169. package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
  170. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
  171. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
  172. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -74
  173. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
  174. package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +0 -1
  175. package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +0 -1
  176. package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +0 -1
  177. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +0 -34
  178. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +0 -1
  179. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +0 -137
  180. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +0 -1
  181. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +0 -20
  182. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +0 -1
  183. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +0 -19
  184. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +0 -1
  185. package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +0 -1
  186. package/dist/features/parent-dashboard/comps/session-status/session-status.js +0 -124
  187. package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +0 -1
  188. package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +0 -1
  189. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +0 -54
  190. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +0 -1
  191. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +0 -1
  192. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +0 -72
  193. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +0 -1
  194. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
  195. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
  196. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
  197. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +0 -1
  198. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
  199. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
  200. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -85
  201. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
  202. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
  203. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
  204. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
  205. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
  206. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -71
  207. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
  208. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -119
  209. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
  210. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -58
  211. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
  212. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -76
  213. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
  214. package/dist/features/trial-session/api/teacher-availability.js +0 -9
  215. package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
  216. package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
  217. package/dist/features/trial-session/comps/class-preference/helpers.js.map +0 -1
  218. package/dist/features/trial-session/hooks/use-slide-config-update.js +0 -49
  219. package/dist/features/trial-session/hooks/use-slide-config-update.js.map +0 -1
  220. package/dist/static/learning-session-grid-bg-mobile.8d2b7258.gif +0 -0
  221. package/dist/static/way-forward-grid-bg-mobile.374043d7.gif +0 -0
  222. package/dist/static/your-goals-grid-bg-mobile.62557024.gif +0 -0
  223. /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
  224. /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-types.js +0 -0
@@ -1,102 +1,95 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { memo as N, useMemo as C, useCallback as U, useEffect as f } from "react";
3
- import { ILLUSTRATIONS as c } from "../../../../assets/illustrations/illustrations.js";
4
- import { GOAL_CATEGORY as L } from "../../../milestone/constants.js";
5
- import W from "../../../ui/error/error.js";
6
- import v from "../../../ui/image/image.js";
7
- import A from "../../../ui/layout/flex-view.js";
8
- import K from "../../../ui/loader/app-loader/app-loader.js";
9
- import I from "../../../ui/separator/separator.js";
10
- import p from "../../../ui/text/text.js";
11
- import { useGetStudentProfileSummary as M } from "../../api/student-profile-summary.js";
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { memo as H, useMemo as L, useCallback as k, useEffect as d } from "react";
3
+ import { ILLUSTRATIONS as f } from "../../../../assets/illustrations/illustrations.js";
4
+ import { GOAL_CATEGORY as $ } from "../../../milestone/constants.js";
5
+ import N from "../../../ui/error/error.js";
6
+ import U from "../../../ui/image/image.js";
7
+ import C from "../../../ui/layout/flex-view.js";
8
+ import v from "../../../ui/loader/app-loader/app-loader.js";
9
+ import M from "../../../ui/separator/separator.js";
10
+ import I from "../../../ui/text/text.js";
11
+ import { useGetStudentProfileSummary as W } from "../../api/student-profile-summary.js";
12
12
  import { useTrialSessionContext as X } from "../../context/use-trial-session-context.js";
13
- import { getFormattedStudentPersonalizedPreference as y } from "../../helper.js";
13
+ import { getFormattedStudentPersonalizedPreference as K } from "../../helper.js";
14
14
  import j from "../slide-header/index.js";
15
15
  import { GOAL_MAPPING as z } from "./constant.js";
16
16
  import F from "./student-profile-highlights/student-profile-highlights.js";
17
- import { Container as V, ContentWrapper as b, AbsoluteImage as Y, ImageWrapper as q } from "./student-profile-styled.js";
18
- import { getDummyProfileImage as J, getMilestoneGoalName as G } from "./student-profile-utils.js";
19
- const he = N(() => {
17
+ import { Container as V, ContentWrapper as y, AbsoluteImage as Y, ImageWrapper as q } from "./student-profile-styled.js";
18
+ import { getDummyProfileImage as J, getMilestoneGoalName as A } from "./student-profile-utils.js";
19
+ const he = H(() => {
20
20
  const {
21
- isTeacher: n,
21
+ isTeacher: o,
22
22
  studentId: u,
23
- formData: O,
24
- slideConfig: T,
25
- milestoneConfig: m,
26
- updateSlideConfig: g,
27
- updateButtonState: h
28
- } = X(), { showProfileHighlights: r } = T, {
29
- name: x,
23
+ formData: b,
24
+ slideConfig: G,
25
+ milestoneConfig: c,
26
+ updateSlideConfig: p,
27
+ updateButtonState: g
28
+ } = X(), { showProfileHighlights: r } = G, {
29
+ name: O,
30
30
  goals: t = [],
31
- studentProfile: a,
32
- personalizedObjectives: P = [],
33
- personalizedPosition: _ = []
34
- } = O || {}, { dummyProfileImageIndex: R, profileSummary: w } = a || {}, B = J(R), l = C(() => t && t.length > 0 ? {
35
- school_success_goal: G(t, L.SCHOOL_SUCCESS),
36
- test_prep_goal: G(t, L.TEST_PREP)
31
+ studentProfile: i,
32
+ personalizedLevel: h = [],
33
+ personalizedObjectives: P = []
34
+ } = b || {}, { dummyProfileImageIndex: x, profileSummary: R } = i || {}, T = J(x), m = L(() => t && t.length > 0 ? {
35
+ school_success_goal: A(t, $.SCHOOL_SUCCESS),
36
+ test_prep_goal: A(t, $.TEST_PREP)
37
37
  } : null, [t]), {
38
38
  get: S,
39
- data: D,
40
- isProcessing: s,
41
- isProcessed: $,
42
- isProcessingFailed: H
43
- } = M(), { profile_summary: E } = D || {}, d = U(() => {
44
- l && S(u, l);
45
- }, [S, l, u]);
46
- f(() => {
47
- h("right", { isDisabled: s, isLoading: !1 });
48
- }, [s, h]), f(() => {
49
- n && !a && !r && d();
50
- }, [d, n, a, r]), f(() => {
51
- n && $ && !r && g({
39
+ data: w,
40
+ isProcessing: l,
41
+ isProcessed: _,
42
+ isProcessingFailed: D
43
+ } = W(), { profile_summary: E } = w || {}, s = k(() => {
44
+ m && S(u, m);
45
+ }, [S, m, u]);
46
+ d(() => {
47
+ g("right", { isDisabled: l, isLoading: !1 });
48
+ }, [l, g]), d(() => {
49
+ o && !i && !r && s();
50
+ }, [s, o, i, r]), d(() => {
51
+ o && _ && !r && p({
52
52
  studentProfile: {
53
53
  profileSummary: E || "",
54
54
  dummyProfileImageIndex: Math.floor(Math.random() * 6)
55
55
  }
56
56
  });
57
- }, [$, n, r, E, g]);
58
- const k = C(
57
+ }, [_, o, r, E, p]);
58
+ const B = L(
59
59
  () => [
60
60
  {
61
- title: "Student Level",
62
- description: `Catching up: ${y(
63
- m,
64
- _
65
- ).map((o) => o.preference_description)}`,
66
- illustration: c.KNOWLEDGE_BLUE,
61
+ title: "Studnet Level",
62
+ description: `Catching up: ${h[0]}`,
63
+ illustration: f.KNOWLEDGE_BLUE,
67
64
  background: "BLUE_1"
68
65
  },
69
66
  {
70
- illustration: c.ARROW_BOARD_GREEN,
67
+ illustration: f.ARROW_BOARD_GREEN,
71
68
  background: "GREEN_1",
72
69
  title: "Goals",
73
- description: y(
74
- m,
70
+ description: K(
71
+ c,
75
72
  P
76
- ).map((o) => o.preference_name)
73
+ ).map((n) => n.preference_name)
77
74
  },
78
75
  {
79
- illustration: c.BOOK_CHECKED_PURPLE,
76
+ illustration: f.BOOK_CHECKED_PURPLE,
80
77
  background: "PURPLE_1",
81
78
  title: "Learning Plan",
82
79
  description: t.map(
83
- (o) => `${z[o.goal_category]}: ${o.milestone_name}`
80
+ (n) => `${z[n.goal_category]}: ${n.milestone_name}`
84
81
  )
85
82
  }
86
83
  ],
87
- [t, m, P, _]
84
+ [t, c, h, P]
88
85
  );
89
- return H ? /* @__PURE__ */ e(W, { height: "70vh", onTryAgain: d }) : s || !a && !r ? /* @__PURE__ */ e(K, { height: "100vh" }) : /* @__PURE__ */ i(V, { children: [
90
- /* @__PURE__ */ e(I, { height: 60 }),
86
+ return D ? /* @__PURE__ */ e(N, { height: "70vh", onTryAgain: s }) : l || !i && !r ? /* @__PURE__ */ e(v, { height: "100vh" }) : /* @__PURE__ */ a(V, { children: [
87
+ /* @__PURE__ */ e(M, { height: 60 }),
91
88
  /* @__PURE__ */ e(j, { marginBottom: r ? 50 : 100 }),
92
- r ? /* @__PURE__ */ i(b, { $width: 650, children: [
93
- /* @__PURE__ */ e(F, { profileHighlights: k }),
94
- /* @__PURE__ */ e(I, { height: 16 }),
95
- /* @__PURE__ */ e(p, { $renderAs: "ub3", $color: "BLACK_T_60", $align: "center", children: "We can always revisit this later" })
96
- ] }) : /* @__PURE__ */ i(b, { $widthX: 46.875, children: [
89
+ r ? /* @__PURE__ */ e(y, { $width: 650, children: /* @__PURE__ */ e(F, { profileHighlights: B }) }) : /* @__PURE__ */ a(y, { $widthX: 46.875, children: [
97
90
  /* @__PURE__ */ e(Y, {}),
98
- /* @__PURE__ */ i(
99
- A,
91
+ /* @__PURE__ */ a(
92
+ C,
100
93
  {
101
94
  $width: "100%",
102
95
  $heightX: 21.875,
@@ -108,10 +101,10 @@ const he = N(() => {
108
101
  $borderColor: "BLACK_T_87",
109
102
  $borderRadiusX: 0.5,
110
103
  children: [
111
- /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(v, { withLoader: !0, height: 200, width: 200, src: B }) }),
112
- /* @__PURE__ */ i(A, { $flexGap: 16, children: [
113
- /* @__PURE__ */ e(p, { $renderAs: "ac2-black", children: x }),
114
- /* @__PURE__ */ e(p, { $renderAs: "ab1", children: w || "" })
104
+ /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(U, { withLoader: !0, height: 200, width: 200, src: T }) }),
105
+ /* @__PURE__ */ a(C, { $flexGap: 16, children: [
106
+ /* @__PURE__ */ e(I, { $renderAs: "ac2-black", children: O }),
107
+ /* @__PURE__ */ e(I, { $renderAs: "ab1", children: R || "" })
115
108
  ] })
116
109
  ]
117
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\nimport type { TColorNames } from '../../../ui/types';\nimport type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\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 { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { GOAL_MAPPING } from './constant';\nimport StudentProfileHighlights from './student-profile-highlights/student-profile-highlights';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(() => {\n const {\n isTeacher,\n studentId,\n formData,\n slideConfig,\n milestoneConfig,\n updateSlideConfig,\n updateButtonState,\n } = useTrialSessionContext();\n const { showProfileHighlights } = slideConfig;\n\n const {\n name,\n goals = [],\n studentProfile,\n personalizedObjectives = [],\n personalizedPosition = [],\n } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile && !showProfileHighlights) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile, showProfileHighlights]);\n\n useEffect(() => {\n if (isTeacher && isProcessed && !showProfileHighlights) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, showProfileHighlights, studentProfileSummary, updateSlideConfig]);\n\n const profileHighlights: TProfileHighlight[] = useMemo(\n () => [\n {\n title: 'Student Level',\n description: `Catching up: ${getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedPosition,\n ).map(objectives => objectives.preference_description)}`,\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: getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedObjectives,\n ).map(objectives => objectives.preference_name),\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: goals.map(\n goal => `${GOAL_MAPPING[goal.goal_category as TGoalCategory]}: ${goal.milestone_name}`,\n ),\n },\n ],\n [goals, milestoneConfig, personalizedObjectives, personalizedPosition],\n );\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || (!studentProfile && !showProfileHighlights)) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={showProfileHighlights ? 50 : 100} />\n {showProfileHighlights ? (\n <Styled.ContentWrapper $width={650}>\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n <Separator height={16} />\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\" $align=\"center\">\n We can always revisit this later\n </Text>\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","slideConfig","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","showProfileHighlights","name","goals","studentProfile","personalizedObjectives","personalizedPosition","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","profileHighlights","getFormattedStudentPersonalizedPreference","objectives","ILLUSTRATIONS","goal","GOAL_MAPPING","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","StudentProfileHighlights","Text","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image"],"mappings":";;;;;;;;;;;;;;;;;;AA8BM,MAAAA,KAAiBC,EAAK,MAAM;AAC1B,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,wBAAAC,IAA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AAA,IAAA,EACF,CAAA,IAEC,gBAAAN,EAAAI,GAAA,EAAsB,SAAS,QAC9B,UAAA;AAAA,MAAC,gBAAAP,EAAAU,GAAA,EAAqB;AAAA,MACtB,gBAAAP;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,QAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,gBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAX,EAACY,GAAA,EACC,UAAA,gBAAAZ,EAACa,GAAM,EAAA,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKnC,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAyB,EAACQ,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAX,EAAAS,GAAA,EAAK,WAAU,aAAa,UAAKtC,GAAA;AAAA,cACjC,gBAAA6B,EAAAS,GAAA,EAAK,WAAU,OAAO,eAAkB,IAAG;AAAA,YAAA,GAC9C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\nimport type { TColorNames } from '../../../ui/types';\nimport type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\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 { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { GOAL_MAPPING } from './constant';\nimport StudentProfileHighlights from './student-profile-highlights/student-profile-highlights';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(() => {\n const {\n isTeacher,\n studentId,\n formData,\n slideConfig,\n milestoneConfig,\n updateSlideConfig,\n updateButtonState,\n } = useTrialSessionContext();\n const { showProfileHighlights } = slideConfig;\n\n const {\n name,\n goals = [],\n studentProfile,\n personalizedLevel = [],\n personalizedObjectives = [],\n } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile && !showProfileHighlights) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile, showProfileHighlights]);\n\n useEffect(() => {\n if (isTeacher && isProcessed && !showProfileHighlights) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, showProfileHighlights, studentProfileSummary, updateSlideConfig]);\n\n const profileHighlights: TProfileHighlight[] = useMemo(\n () => [\n {\n title: 'Studnet Level',\n description: `Catching up: ${personalizedLevel[0]}`,\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: getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedObjectives,\n ).map(objectives => objectives.preference_name),\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: goals.map(\n goal => `${GOAL_MAPPING[goal.goal_category as TGoalCategory]}: ${goal.milestone_name}`,\n ),\n },\n ],\n [goals, milestoneConfig, personalizedLevel, personalizedObjectives],\n );\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || (!studentProfile && !showProfileHighlights)) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={showProfileHighlights ? 50 : 100} />\n {showProfileHighlights ? (\n <Styled.ContentWrapper $width={650}>\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","slideConfig","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","showProfileHighlights","name","goals","studentProfile","personalizedLevel","personalizedObjectives","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","profileHighlights","ILLUSTRATIONS","getFormattedStudentPersonalizedPreference","objectives","goal","GOAL_MAPPING","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","StudentProfileHighlights","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image","Text"],"mappings":";;;;;;;;;;;;;;;;;;AA8BM,MAAAA,KAAiBC,EAAK,MAAM;AAC1B,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,mBAAAC,IAAoB,CAAC;AAAA,IACrB,wBAAAC,IAAyB,CAAC;AAAA,EAAA,IACxBX,KAAY,CAAA,GACV,EAAE,wBAAAY,GAAwB,gBAAAC,MAAmBJ,KAAkB,CAAA,GAC/DK,IAAoBC,EAAqBH,CAAsB,GAE/DI,IAAUC,EAA+C,MACzDT,KAASA,EAAM,SAAS,IACnB;AA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KlC,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAyB,EAACO,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAV,EAAAa,GAAA,EAAK,WAAU,aAAa,UAAK1C,GAAA;AAAA,cACjC,gBAAA6B,EAAAa,GAAA,EAAK,WAAU,OAAO,eAAkB,IAAG;AAAA,YAAA,GAC9C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
@@ -1,42 +1,42 @@
1
- import { jsxs as t, Fragment as N, jsx as r } from "react/jsx-runtime";
2
- import { memo as X, useMemo as l, useCallback as m } from "react";
3
- import { useTheme as Y } from "styled-components";
1
+ import { jsxs as t, Fragment as P, jsx as r } from "react/jsx-runtime";
2
+ import { memo as Y, useMemo as l, useCallback as m } from "react";
3
+ import { useTheme as j } from "styled-components";
4
4
  import { ILLUSTRATIONS as u } from "../../../../../assets/illustrations/illustrations.js";
5
- import j from "../../../../../assets/line-icons/icons/cuemath-logo.js";
6
- import B from "../../../../ui/buttons/button/button.js";
7
- import H from "../../../../ui/image/image.js";
5
+ import B from "../../../../../assets/line-icons/icons/cuemath-logo.js";
6
+ import H from "../../../../ui/buttons/button/button.js";
7
+ import V from "../../../../ui/image/image.js";
8
8
  import s from "../../../../ui/layout/flex-view.js";
9
9
  import x from "../../../../ui/separator/separator.js";
10
10
  import c from "../../../../ui/text/text.js";
11
- import { EDeviceType as V } from "../../../../ui/theme/constants.js";
12
- import { COUNTRY_FLAGS as F } from "../teacher-intro-constants.js";
13
- import { formatCountryList as K } from "./teacher-profile-helpers.js";
14
- import { GridItem as P, ProfileWrapper as q, CueLogoWrapper as z, PositionedAsset1 as Q, PositionedAsset2 as J, PositionedAsset3 as Z, PositionedAsset4 as ee, ProfilePicture as re, GridContainer as te } from "./teacher-profile-styled.js";
15
- const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
11
+ import { EDeviceType as F } from "../../../../ui/theme/constants.js";
12
+ import { COUNTRY_FLAGS as K } from "../teacher-intro-constants.js";
13
+ import { formatCountryList as q } from "./teacher-profile-helpers.js";
14
+ import { GridItem as N, ProfileWrapper as z, CueLogoWrapper as Q, PositionedAsset1 as J, PositionedAsset2 as Z, PositionedAsset3 as ee, PositionedAsset4 as re, ProfilePicture as te, GridContainer as ne } from "./teacher-profile-styled.js";
15
+ const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
16
16
  const {
17
- degree: S,
17
+ degree: D,
18
18
  countries: o,
19
19
  lower_grade: d,
20
20
  higher_grade: i,
21
- header_image: D,
22
- years_of_experience: G,
23
- number_of_students_taught: R,
21
+ header_image: G,
22
+ years_of_experience: R,
23
+ number_of_students_taught: v,
24
24
  first_name: g,
25
25
  last_name: O,
26
26
  teacher_profile_url: n
27
- } = y || {}, {
27
+ } = S || {}, {
28
28
  degree_name: $,
29
29
  field_of_study: h,
30
30
  degree_code: C
31
- } = S || {}, b = Y(), e = l(() => b.device <= V.MOBILE, [b.device]), I = l(() => i && parseInt(i, 10) > 8, [i]), w = l(
31
+ } = D || {}, b = j(), e = l(() => b.device <= F.MOBILE, [b.device]), I = l(() => i && parseInt(i, 10) > 8, [i]), w = l(
32
32
  () => g ? `${g} ${O}`.trim() : "",
33
33
  [g, O]
34
- ), p = l(() => I ? "High School" : !d || !i ? "" : ` ${d === "K" ? "" : "G"}${d} - G${i}`, [I, i, d]), E = l(() => o && o.length > 0, [o]), v = l(() => $ && h, [$, h]), k = m(() => {
34
+ ), p = l(() => I ? "High School" : !d || !i ? "" : ` ${d === "K" ? "" : "G"}${d} - G${i}`, [I, i, d]), E = l(() => o && o.length > 0, [o]), U = l(() => $ && h, [$, h]), k = m(() => {
35
35
  n && window.open(n, "_blank");
36
- }, [n]), _ = m(() => n ? /* @__PURE__ */ t(N, { children: [
36
+ }, [n]), _ = m(() => n ? /* @__PURE__ */ t(P, { children: [
37
37
  /* @__PURE__ */ r(x, { heightX: 1.5 }),
38
38
  /* @__PURE__ */ r(
39
- B,
39
+ H,
40
40
  {
41
41
  label: "View profile",
42
42
  renderAs: "secondary",
@@ -52,7 +52,7 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
52
52
  mobileLabel: f,
53
53
  valueRenderAs: L = "ah3-black"
54
54
  }) => /* @__PURE__ */ t(
55
- P,
55
+ N,
56
56
  {
57
57
  $flex: e ? 1 : 0,
58
58
  $justifyContent: e ? "flex-start" : "center",
@@ -67,10 +67,10 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
67
67
  }
68
68
  ),
69
69
  [e]
70
- ), U = m(() => {
70
+ ), M = m(() => {
71
71
  if (!E) return null;
72
72
  if (e) {
73
- const a = K(o);
73
+ const a = q(o);
74
74
  return /* @__PURE__ */ t(s, { $gapX: 0.75, children: [
75
75
  /* @__PURE__ */ t(c, { $renderOnMobileAs: "ub3-bold", $renderAs: "ab3-black", children: [
76
76
  "Teaching ",
@@ -90,11 +90,11 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
90
90
  " kids in"
91
91
  ] }),
92
92
  /* @__PURE__ */ r(s, { $flexDirection: "row", $flexGap: 16, $flexWrap: !0, children: o.map((a) => {
93
- const T = ne.find((W) => W.name === a), { flag_icon: f = "", label: L = "", name: M } = T || {};
93
+ const T = oe.find((X) => X.name === a), { flag_icon: f = "", label: L = "", name: W } = T || {};
94
94
  return /* @__PURE__ */ t(s, { $flexDirection: "row", $flexGap: 4, children: [
95
- /* @__PURE__ */ r(H, { src: f, width: 30, height: 20, withLoader: !1 }),
95
+ /* @__PURE__ */ r(V, { src: f, width: 30, height: 20, withLoader: !1 }),
96
96
  /* @__PURE__ */ r(c, { $renderAs: "ab3-black", children: L })
97
- ] }, M || a);
97
+ ] }, W || a);
98
98
  }) })
99
99
  ] });
100
100
  }, [
@@ -113,7 +113,7 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
113
113
  $background: "WHITE_3",
114
114
  children: [
115
115
  /* @__PURE__ */ t(
116
- q,
116
+ z,
117
117
  {
118
118
  $gapX: e ? 1 : 1.5,
119
119
  $gutterX: 1,
@@ -121,21 +121,21 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
121
121
  $alignItems: "center",
122
122
  $justifyContent: "center",
123
123
  children: [
124
- e && /* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(j, { width: 54, height: 8, color: b.colors.REAL_BLACK }) }),
125
- /* @__PURE__ */ r(Q, { src: u.STAR_OUTLINED }),
126
- /* @__PURE__ */ r(J, { src: u.HEART_OUTLINED }),
127
- /* @__PURE__ */ r(Z, { src: u.EQUAL_OUTLINED }),
128
- /* @__PURE__ */ r(ee, { src: u.TROPHY_OUTLINED }),
124
+ e && /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ r(B, { width: 54, height: 8, color: b.colors.REAL_BLACK }) }),
125
+ /* @__PURE__ */ r(J, { src: u.STAR_OUTLINED }),
126
+ /* @__PURE__ */ r(Z, { src: u.HEART_OUTLINED }),
127
+ /* @__PURE__ */ r(ee, { src: u.EQUAL_OUTLINED }),
128
+ /* @__PURE__ */ r(re, { src: u.TROPHY_OUTLINED }),
129
129
  /* @__PURE__ */ r(
130
- re,
130
+ te,
131
131
  {
132
132
  withLoader: !0,
133
- src: D,
133
+ src: G,
134
134
  width: e ? 154 : 238,
135
135
  height: e ? 154 : 238
136
136
  }
137
137
  ),
138
- w && /* @__PURE__ */ t(N, { children: [
138
+ w && /* @__PURE__ */ t(P, { children: [
139
139
  /* @__PURE__ */ r(x, { heightX: e ? 0.75 : 1.5 }),
140
140
  /* @__PURE__ */ r(c, { $renderAs: "ac2-black", $color: "BLACK_1", $align: "center", children: w })
141
141
  ] }),
@@ -143,30 +143,30 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
143
143
  ]
144
144
  }
145
145
  ),
146
- /* @__PURE__ */ t(te, { children: [
146
+ /* @__PURE__ */ t(ne, { children: [
147
147
  A({
148
- value: `${G}+`,
148
+ value: `${R}+`,
149
149
  label: "Yrs of Teaching Experience",
150
150
  mobileLabel: "Years of Teaching"
151
151
  }),
152
152
  A({
153
- value: `${R}+`,
153
+ value: `${v}+`,
154
154
  label: "Students Taught"
155
155
  }),
156
- v && A({
156
+ U && A({
157
157
  value: e && C ? C : $,
158
158
  label: `In ${h}`,
159
159
  mobileLabel: h,
160
160
  valueRenderAs: "ab1-black"
161
161
  }),
162
162
  /* @__PURE__ */ r(
163
- P,
163
+ N,
164
164
  {
165
165
  $justifyContent: "center",
166
166
  $gutter: 24,
167
167
  $flexDirection: e ? "row" : "column",
168
168
  $background: e ? "YELLOW_4" : "TRANSPARENT",
169
- children: U()
169
+ children: M()
170
170
  }
171
171
  )
172
172
  ] })
@@ -174,8 +174,9 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
174
174
  }
175
175
  );
176
176
  });
177
- oe.displayName = "TeacherProfile";
177
+ y.displayName = "TeacherProfile";
178
+ const _e = y;
178
179
  export {
179
- oe as default
180
+ _e as default
180
181
  };
181
182
  //# sourceMappingURL=teacher-profile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"teacher-profile.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.tsx"],"sourcesContent":["import type { TTextVariants } from '../../../../ui/types';\nimport type { ITeacherProfileProps } from './teacher-profile-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport CuemathLogo from '../../../../../assets/line-icons/icons/cuemath-logo';\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 { EDeviceType } from '../../../../ui/theme/constants';\nimport { COUNTRY_FLAGS } from '../teacher-intro-constants';\nimport { formatCountryList } from './teacher-profile-helpers';\nimport * as Styled from './teacher-profile-styled';\n\nconst countryFlagArray = Object.values(COUNTRY_FLAGS);\n\nconst TeacherProfile: FC<ITeacherProfileProps> = memo(({ teacherProfile }) => {\n const {\n degree,\n countries,\n lower_grade: lowerGrade,\n higher_grade: higherGrade,\n header_image: headerImage,\n years_of_experience: yearsOfExperience,\n number_of_students_taught: numberOfStudentsTaught,\n first_name: firstName,\n last_name: lastName,\n teacher_profile_url: teacherProfileUrl,\n } = teacherProfile || {};\n\n const {\n degree_name: degreeName,\n field_of_study: fieldOfStudy,\n degree_code: degreeCode,\n } = degree || {};\n\n const theme = useTheme();\n const isMobile = useMemo(() => theme.device <= EDeviceType.MOBILE, [theme.device]);\n const isHighSchool = useMemo(() => higherGrade && parseInt(higherGrade, 10) > 8, [higherGrade]);\n const teacherName = useMemo(\n () => (firstName ? `${firstName} ${lastName}`.trim() : ''),\n [firstName, lastName],\n );\n\n const displayGrade = useMemo(() => {\n if (isHighSchool) return 'High School';\n\n if (!lowerGrade || !higherGrade) return '';\n\n return ` ${lowerGrade === 'K' ? '' : 'G'}${lowerGrade} - G${higherGrade}`;\n }, [isHighSchool, higherGrade, lowerGrade]);\n\n const hasValidCountries = useMemo(() => countries && countries.length > 0, [countries]);\n\n const hasDegreeInfo = useMemo(() => degreeName && fieldOfStudy, [degreeName, fieldOfStudy]);\n\n const handleViewProfile = useCallback(() => {\n if (teacherProfileUrl) {\n window.open(teacherProfileUrl, '_blank');\n }\n }, [teacherProfileUrl]);\n\n const renderViewProfileButton = useCallback(() => {\n if (!teacherProfileUrl) return null;\n\n return (\n <>\n <Separator heightX={1.5} />\n <Button\n label=\"View profile\"\n renderAs=\"secondary\"\n shape=\"square\"\n onClick={handleViewProfile}\n size=\"small\"\n />\n </>\n );\n }, [handleViewProfile, teacherProfileUrl]);\n\n const renderStatItem = useCallback(\n ({\n value,\n label,\n mobileLabel,\n valueRenderAs = 'ah3-black',\n }: {\n value?: string | number;\n label: string;\n mobileLabel?: string;\n valueRenderAs?: TTextVariants;\n }) => (\n <Styled.GridItem\n $flex={isMobile ? 1 : 0}\n $justifyContent={isMobile ? 'flex-start' : 'center'}\n $gutter={isMobile ? 8 : 24}\n $gapX={isMobile ? 0.75 : 0}\n $alignItems={isMobile ? 'center' : 'flex-start'}\n $background={isMobile ? 'YELLOW_3' : 'TRANSPARENT'}\n >\n <Text $renderAs={valueRenderAs} $renderOnMobileAs=\"ab2-black\">\n {value}\n </Text>\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $align={isMobile ? 'center' : 'left'}>\n {isMobile && mobileLabel ? mobileLabel : label}\n </Text>\n </Styled.GridItem>\n ),\n [isMobile],\n );\n\n const renderCountries = useCallback(() => {\n if (!hasValidCountries) return null;\n\n if (isMobile) {\n const formattedCountries = formatCountryList(countries!);\n\n return (\n <FlexView $gapX={0.75}>\n <Text $renderOnMobileAs=\"ub3-bold\" $renderAs=\"ab3-black\">\n Teaching {displayGrade} kids in {formattedCountries}.\n </Text>\n {renderViewProfileButton()}\n {teacherProfileUrl && <Separator heightX={0.75} />}\n </FlexView>\n );\n }\n\n return (\n <FlexView $flexDirection=\"column\" $flexGap={12}>\n <Text $renderAs=\"ab1-black\" $renderOnMobileAs=\"ub3-bold\">\n Teaching {displayGrade} kids in\n </Text>\n <FlexView $flexDirection=\"row\" $flexGap={16} $flexWrap>\n {countries!.map(country => {\n const match = countryFlagArray.find(item => item.name === country);\n const { flag_icon: flagIcon = '', label = '', name } = match || {};\n\n return (\n <FlexView key={name || country} $flexDirection=\"row\" $flexGap={4}>\n <Image src={flagIcon} width={30} height={20} withLoader={false} />\n <Text $renderAs=\"ab3-black\">{label}</Text>\n </FlexView>\n );\n })}\n </FlexView>\n </FlexView>\n );\n }, [\n hasValidCountries,\n isMobile,\n displayGrade,\n countries,\n renderViewProfileButton,\n teacherProfileUrl,\n ]);\n\n return (\n <FlexView\n $flexDirection={isMobile ? 'column' : 'row'}\n $borderColor=\"BLACK_T_87\"\n $background=\"WHITE_3\"\n >\n <Styled.ProfileWrapper\n $gapX={isMobile ? 1 : 1.5}\n $gutterX={1}\n $background=\"YELLOW_4\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {isMobile && (\n <Styled.CueLogoWrapper>\n <CuemathLogo width={54} height={8} color={theme.colors.REAL_BLACK} />\n </Styled.CueLogoWrapper>\n )}\n <Styled.PositionedAsset1 src={ILLUSTRATIONS.STAR_OUTLINED} />\n <Styled.PositionedAsset2 src={ILLUSTRATIONS.HEART_OUTLINED} />\n <Styled.PositionedAsset3 src={ILLUSTRATIONS.EQUAL_OUTLINED} />\n <Styled.PositionedAsset4 src={ILLUSTRATIONS.TROPHY_OUTLINED} />\n <Styled.ProfilePicture\n withLoader\n src={headerImage}\n width={isMobile ? 154 : 238}\n height={isMobile ? 154 : 238}\n />\n {teacherName && (\n <>\n <Separator heightX={isMobile ? 0.75 : 1.5} />\n <Text $renderAs=\"ac2-black\" $color=\"BLACK_1\" $align=\"center\">\n {teacherName}\n </Text>\n </>\n )}\n {!isMobile && renderViewProfileButton()}\n </Styled.ProfileWrapper>\n\n <Styled.GridContainer>\n {renderStatItem({\n value: `${yearsOfExperience}+`,\n label: 'Yrs of Teaching Experience',\n mobileLabel: 'Years of Teaching',\n })}\n {renderStatItem({\n value: `${numberOfStudentsTaught}+`,\n label: 'Students Taught',\n })}\n {hasDegreeInfo &&\n renderStatItem({\n value: isMobile && degreeCode ? degreeCode : degreeName,\n label: `In ${fieldOfStudy}`,\n mobileLabel: fieldOfStudy,\n valueRenderAs: 'ab1-black',\n })}\n <Styled.GridItem\n $justifyContent=\"center\"\n $gutter={24}\n $flexDirection={isMobile ? 'row' : 'column'}\n $background={isMobile ? 'YELLOW_4' : 'TRANSPARENT'}\n >\n {renderCountries()}\n </Styled.GridItem>\n </Styled.GridContainer>\n </FlexView>\n );\n});\n\nTeacherProfile.displayName = 'TeacherProfile';\n\nexport default TeacherProfile;\n"],"names":["countryFlagArray","COUNTRY_FLAGS","TeacherProfile","memo","teacherProfile","degree","countries","lowerGrade","higherGrade","headerImage","yearsOfExperience","numberOfStudentsTaught","firstName","lastName","teacherProfileUrl","degreeName","fieldOfStudy","degreeCode","theme","useTheme","isMobile","useMemo","EDeviceType","isHighSchool","teacherName","displayGrade","hasValidCountries","hasDegreeInfo","handleViewProfile","useCallback","renderViewProfileButton","jsxs","Fragment","jsx","Separator","Button","renderStatItem","value","label","mobileLabel","valueRenderAs","Styled.GridItem","Text","renderCountries","formattedCountries","formatCountryList","FlexView","country","match","item","flagIcon","name","Image","Styled.ProfileWrapper","Styled.CueLogoWrapper","CuemathLogo","Styled.PositionedAsset1","ILLUSTRATIONS","Styled.PositionedAsset2","Styled.PositionedAsset3","Styled.PositionedAsset4","Styled.ProfilePicture","Styled.GridContainer"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,KAAmB,OAAO,OAAOC,CAAa,GAE9CC,KAA2CC,EAAK,CAAC,EAAE,gBAAAC,QAAqB;AACtE,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAaC;AAAA,IACb,cAAcC;AAAA,IACd,cAAcC;AAAA,IACd,qBAAqBC;AAAA,IACrB,2BAA2BC;AAAA,IAC3B,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,qBAAqBC;AAAA,EAAA,IACnBV,KAAkB,CAAA,GAEhB;AAAA,IACJ,aAAaW;AAAA,IACb,gBAAgBC;AAAA,IAChB,aAAaC;AAAA,EAAA,IACXZ,KAAU,CAAA,GAERa,IAAQC,KACRC,IAAWC,EAAQ,MAAMH,EAAM,UAAUI,EAAY,QAAQ,CAACJ,EAAM,MAAM,CAAC,GAC3EK,IAAeF,EAAQ,MAAMb,KAAe,SAASA,GAAa,EAAE,IAAI,GAAG,CAACA,CAAW,CAAC,GACxFgB,IAAcH;AAAA,IAClB,MAAOT,IAAY,GAAGA,CAAS,IAAIC,CAAQ,GAAG,SAAS;AAAA,IACvD,CAACD,GAAWC,CAAQ;AAAA,EAAA,GAGhBY,IAAeJ,EAA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ASd,IAAW,OAAO,KAAK;AAAA,gBAC3C,gBAAAa,EAACS,KAAK,WAAU,aAAY,QAAO,WAAU,QAAO,UACjD,UACHlB,EAAA,CAAA;AAAA,cAAA,GACF;AAAA,cAED,CAACJ,KAAYU,EAAwB;AAAA,YAAA;AAAA,UAAA;AAAA,QACxC;AAAA,QAEA,gBAAAC,EAAC+B,IAAA,EACE,UAAA;AAAA,UAAe1B,EAAA;AAAA,YACd,OAAO,GAAG1B,CAAiB;AAAA,YAC3B,OAAO;AAAA,YACP,aAAa;AAAA,UAAA,CACd;AAAA,UACA0B,EAAe;AAAA,YACd,OAAO,GAAGzB,CAAsB;AAAA,YAChC,OAAO;AAAA,UAAA,CACR;AAAA,UACAgB,KACCS,EAAe;AAAA,YACb,OAAOhB,KAAYH,IAAaA,IAAaF;AAAA,YAC7C,OAAO,MAAMC,CAAY;AAAA,YACzB,aAAaA;AAAA,YACb,eAAe;AAAA,UAAA,CAChB;AAAA,UACH,gBAAAiB;AAAA,YAACQ;AAAAA,YAAA;AAAA,cACC,iBAAgB;AAAA,cAChB,SAAS;AAAA,cACT,gBAAgBrB,IAAW,QAAQ;AAAA,cACnC,aAAaA,IAAW,aAAa;AAAA,cAEpC,UAAgBuB,EAAA;AAAA,YAAA;AAAA,UACnB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDzC,GAAe,cAAc;"}
1
+ {"version":3,"file":"teacher-profile.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.tsx"],"sourcesContent":["import type { TTextVariants } from '../../../../ui/types';\nimport type { ITeacherProfileProps } from './teacher-profile-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport CuemathLogo from '../../../../../assets/line-icons/icons/cuemath-logo';\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 { EDeviceType } from '../../../../ui/theme/constants';\nimport { COUNTRY_FLAGS } from '../teacher-intro-constants';\nimport { formatCountryList } from './teacher-profile-helpers';\nimport * as Styled from './teacher-profile-styled';\n\nconst countryFlagArray = Object.values(COUNTRY_FLAGS);\n\nconst TeacherProfile: FC<ITeacherProfileProps> = memo(({ teacherProfile }) => {\n const {\n degree,\n countries,\n lower_grade: lowerGrade,\n higher_grade: higherGrade,\n header_image: headerImage,\n years_of_experience: yearsOfExperience,\n number_of_students_taught: numberOfStudentsTaught,\n first_name: firstName,\n last_name: lastName,\n teacher_profile_url: teacherProfileUrl,\n } = teacherProfile || {};\n\n const {\n degree_name: degreeName,\n field_of_study: fieldOfStudy,\n degree_code: degreeCode,\n } = degree || {};\n\n const theme = useTheme();\n const isMobile = useMemo(() => theme.device <= EDeviceType.MOBILE, [theme.device]);\n const isHighSchool = useMemo(() => higherGrade && parseInt(higherGrade, 10) > 8, [higherGrade]);\n const teacherName = useMemo(\n () => (firstName ? `${firstName} ${lastName}`.trim() : ''),\n [firstName, lastName],\n );\n\n const displayGrade = useMemo(() => {\n if (isHighSchool) return 'High School';\n\n if (!lowerGrade || !higherGrade) return '';\n\n return ` ${lowerGrade === 'K' ? '' : 'G'}${lowerGrade} - G${higherGrade}`;\n }, [isHighSchool, higherGrade, lowerGrade]);\n\n const hasValidCountries = useMemo(() => countries && countries.length > 0, [countries]);\n\n const hasDegreeInfo = useMemo(() => degreeName && fieldOfStudy, [degreeName, fieldOfStudy]);\n\n const handleViewProfile = useCallback(() => {\n if (teacherProfileUrl) {\n window.open(teacherProfileUrl, '_blank');\n }\n }, [teacherProfileUrl]);\n\n const renderViewProfileButton = useCallback(() => {\n if (!teacherProfileUrl) return null;\n\n return (\n <>\n <Separator heightX={1.5} />\n <Button\n label=\"View profile\"\n renderAs=\"secondary\"\n shape=\"square\"\n onClick={handleViewProfile}\n size=\"small\"\n />\n </>\n );\n }, [handleViewProfile, teacherProfileUrl]);\n\n const renderStatItem = useCallback(\n ({\n value,\n label,\n mobileLabel,\n valueRenderAs = 'ah3-black',\n }: {\n value?: string | number;\n label: string;\n mobileLabel?: string;\n valueRenderAs?: TTextVariants;\n }) => (\n <Styled.GridItem\n $flex={isMobile ? 1 : 0}\n $justifyContent={isMobile ? 'flex-start' : 'center'}\n $gutter={isMobile ? 8 : 24}\n $gapX={isMobile ? 0.75 : 0}\n $alignItems={isMobile ? 'center' : 'flex-start'}\n $background={isMobile ? 'YELLOW_3' : 'TRANSPARENT'}\n >\n <Text $renderAs={valueRenderAs} $renderOnMobileAs=\"ab2-black\">\n {value}\n </Text>\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $align={isMobile ? 'center' : 'left'}>\n {isMobile && mobileLabel ? mobileLabel : label}\n </Text>\n </Styled.GridItem>\n ),\n [isMobile],\n );\n\n const renderCountries = useCallback(() => {\n if (!hasValidCountries) return null;\n\n if (isMobile) {\n const formattedCountries = formatCountryList(countries!);\n\n return (\n <FlexView $gapX={0.75}>\n <Text $renderOnMobileAs=\"ub3-bold\" $renderAs=\"ab3-black\">\n Teaching {displayGrade} kids in {formattedCountries}.\n </Text>\n {renderViewProfileButton()}\n {teacherProfileUrl && <Separator heightX={0.75} />}\n </FlexView>\n );\n }\n\n return (\n <FlexView $flexDirection=\"column\" $flexGap={12}>\n <Text $renderAs=\"ab1-black\" $renderOnMobileAs=\"ub3-bold\">\n Teaching {displayGrade} kids in\n </Text>\n <FlexView $flexDirection=\"row\" $flexGap={16} $flexWrap>\n {countries!.map(country => {\n const match = countryFlagArray.find(item => item.name === country);\n const { flag_icon: flagIcon = '', label = '', name } = match || {};\n\n return (\n <FlexView key={name || country} $flexDirection=\"row\" $flexGap={4}>\n <Image src={flagIcon} width={30} height={20} withLoader={false} />\n <Text $renderAs=\"ab3-black\">{label}</Text>\n </FlexView>\n );\n })}\n </FlexView>\n </FlexView>\n );\n }, [\n hasValidCountries,\n isMobile,\n displayGrade,\n countries,\n renderViewProfileButton,\n teacherProfileUrl,\n ]);\n\n return (\n <FlexView\n $flexDirection={isMobile ? 'column' : 'row'}\n $borderColor=\"BLACK_T_87\"\n $background=\"WHITE_3\"\n >\n <Styled.ProfileWrapper\n $gapX={isMobile ? 1 : 1.5}\n $gutterX={1}\n $background=\"YELLOW_4\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {isMobile && (\n <Styled.CueLogoWrapper>\n <CuemathLogo width={54} height={8} color={theme.colors.REAL_BLACK} />\n </Styled.CueLogoWrapper>\n )}\n <Styled.PositionedAsset1 src={ILLUSTRATIONS.STAR_OUTLINED} />\n <Styled.PositionedAsset2 src={ILLUSTRATIONS.HEART_OUTLINED} />\n <Styled.PositionedAsset3 src={ILLUSTRATIONS.EQUAL_OUTLINED} />\n <Styled.PositionedAsset4 src={ILLUSTRATIONS.TROPHY_OUTLINED} />\n <Styled.ProfilePicture\n withLoader\n src={headerImage}\n width={isMobile ? 154 : 238}\n height={isMobile ? 154 : 238}\n />\n {teacherName && (\n <>\n <Separator heightX={isMobile ? 0.75 : 1.5} />\n <Text $renderAs=\"ac2-black\" $color=\"BLACK_1\" $align=\"center\">\n {teacherName}\n </Text>\n </>\n )}\n {!isMobile && renderViewProfileButton()}\n </Styled.ProfileWrapper>\n\n <Styled.GridContainer>\n {renderStatItem({\n value: `${yearsOfExperience}+`,\n label: 'Yrs of Teaching Experience',\n mobileLabel: 'Years of Teaching',\n })}\n {renderStatItem({\n value: `${numberOfStudentsTaught}+`,\n label: 'Students Taught',\n })}\n {hasDegreeInfo &&\n renderStatItem({\n value: isMobile && degreeCode ? degreeCode : degreeName,\n label: `In ${fieldOfStudy}`,\n mobileLabel: fieldOfStudy,\n valueRenderAs: 'ab1-black',\n })}\n <Styled.GridItem\n $justifyContent=\"center\"\n $gutter={24}\n $flexDirection={isMobile ? 'row' : 'column'}\n $background={isMobile ? 'YELLOW_4' : 'TRANSPARENT'}\n >\n {renderCountries()}\n </Styled.GridItem>\n </Styled.GridContainer>\n </FlexView>\n );\n});\n\nTeacherProfile.displayName = 'TeacherProfile';\n\nexport default TeacherProfile;\n"],"names":["countryFlagArray","COUNTRY_FLAGS","TeacherProfile","memo","teacherProfile","degree","countries","lowerGrade","higherGrade","headerImage","yearsOfExperience","numberOfStudentsTaught","firstName","lastName","teacherProfileUrl","degreeName","fieldOfStudy","degreeCode","theme","useTheme","isMobile","useMemo","EDeviceType","isHighSchool","teacherName","displayGrade","hasValidCountries","hasDegreeInfo","handleViewProfile","useCallback","renderViewProfileButton","jsxs","Fragment","jsx","Separator","Button","renderStatItem","value","label","mobileLabel","valueRenderAs","Styled.GridItem","Text","renderCountries","formattedCountries","formatCountryList","FlexView","country","match","item","flagIcon","name","Image","Styled.ProfileWrapper","Styled.CueLogoWrapper","CuemathLogo","Styled.PositionedAsset1","ILLUSTRATIONS","Styled.PositionedAsset2","Styled.PositionedAsset3","Styled.PositionedAsset4","Styled.ProfilePicture","Styled.GridContainer","TeacherProfile$1"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,KAAmB,OAAO,OAAOC,CAAa,GAE9CC,IAA2CC,EAAK,CAAC,EAAE,gBAAAC,QAAqB;AACtE,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAaC;AAAA,IACb,cAAcC;AAAA,IACd,cAAcC;AAAA,IACd,qBAAqBC;AAAA,IACrB,2BAA2BC;AAAA,IAC3B,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,qBAAqBC;AAAA,EAAA,IACnBV,KAAkB,CAAA,GAEhB;AAAA,IACJ,aAAaW;AAAA,IACb,gBAAgBC;AAAA,IAChB,aAAaC;AAAA,EAAA,IACXZ,KAAU,CAAA,GAERa,IAAQC,KACRC,IAAWC,EAAQ,MAAMH,EAAM,UAAUI,EAAY,QAAQ,CAACJ,EAAM,MAAM,CAAC,GAC3EK,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AAA,kBACC,YAAU;AAAA,kBACV,KAAKpD;AAAA,kBACL,OAAOW,IAAW,MAAM;AAAA,kBACxB,QAAQA,IAAW,MAAM;AAAA,gBAAA;AAAA,cAC3B;AAAA,cACCI,KAEG,gBAAAO,EAAAC,GAAA,EAAA,UAAA;AAAA,gBAAA,gBAAAC,EAACC,GAAU,EAAA,SAASd,IAAW,OAAO,KAAK;AAAA,gBAC3C,gBAAAa,EAACS,KAAK,WAAU,aAAY,QAAO,WAAU,QAAO,UACjD,UACHlB,EAAA,CAAA;AAAA,cAAA,GACF;AAAA,cAED,CAACJ,KAAYU,EAAwB;AAAA,YAAA;AAAA,UAAA;AAAA,QACxC;AAAA,QAEA,gBAAAC,EAAC+B,IAAA,EACE,UAAA;AAAA,UAAe1B,EAAA;AAAA,YACd,OAAO,GAAG1B,CAAiB;AAAA,YAC3B,OAAO;AAAA,YACP,aAAa;AAAA,UAAA,CACd;AAAA,UACA0B,EAAe;AAAA,YACd,OAAO,GAAGzB,CAAsB;AAAA,YAChC,OAAO;AAAA,UAAA,CACR;AAAA,UACAgB,KACCS,EAAe;AAAA,YACb,OAAOhB,KAAYH,IAAaA,IAAaF;AAAA,YAC7C,OAAO,MAAMC,CAAY;AAAA,YACzB,aAAaA;AAAA,YACb,eAAe;AAAA,UAAA,CAChB;AAAA,UACH,gBAAAiB;AAAA,YAACQ;AAAAA,YAAA;AAAA,cACC,iBAAgB;AAAA,cAChB,SAAS;AAAA,cACT,gBAAgBrB,IAAW,QAAQ;AAAA,cACnC,aAAaA,IAAW,aAAa;AAAA,cAEpC,UAAgBuB,EAAA;AAAA,YAAA;AAAA,UACnB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDzC,EAAe,cAAc;AAE7B,MAAA6D,KAAe7D;"}
@@ -1,53 +1,52 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import { memo as $, useMemo as G, useCallback as L } from "react";
3
- import { GIF as A } from "../../../../assets/gif/gif.js";
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import { memo as y, useMemo as $, useCallback as b } from "react";
3
+ import { GIF as G } from "../../../../assets/gif/gif.js";
4
4
  import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
5
5
  import { getGoalsFromConfig as I } from "../../../milestone/create/milestone-create-helpers.js";
6
6
  import x from "../../../ui/image/image.js";
7
- import R from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
8
- import d from "../../../ui/separator/separator.js";
9
- import D from "../../../ui/text/text.js";
10
- import { epochTimestampAfterOneYear as j } from "../../../utils/utils.js";
11
- import { useTrialSessionContext as k } from "../../context/use-trial-session-context.js";
12
- import { isPLASource as O, updateGoalInFormData as w } from "../../helper.js";
13
- import F from "../slide-header/index.js";
14
- import { Container as N, ContentWrapper as W, ImageWrapper as X, InputContainer as B } from "./test-prep-styled.js";
15
- const te = $(() => {
16
- const { milestoneConfig: i, formData: f, updateSlideConfig: a, trialHomeData: g } = k(), { demo_info: u, intel_student: n } = g, { stream: s, region_data: h } = u || {}, { opportunity_country: m = "US" } = h || {}, { grade: l, goals: e } = f || {}, p = O(n == null ? void 0 : n.source), T = G(
17
- () => I(i, {
7
+ import L from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
8
+ import p from "../../../ui/separator/separator.js";
9
+ import A from "../../../ui/text/text.js";
10
+ import { epochTimestampAfterOneYear as R } from "../../../utils/utils.js";
11
+ import { useTrialSessionContext as D } from "../../context/use-trial-session-context.js";
12
+ import { updateGoalInFormData as j } from "../../helper.js";
13
+ import k from "../slide-header/index.js";
14
+ import { Container as O, ContentWrapper as w, ImageWrapper as F, InputContainer as N } from "./test-prep-styled.js";
15
+ const Z = y(() => {
16
+ const { milestoneConfig: n, formData: c, updateSlideConfig: a, trialHomeData: d } = D(), { demo_info: f } = d, { stream: i, region_data: g } = f || {}, { opportunity_country: m = "US" } = g || {}, { grade: s, goals: e } = c || {}, u = $(
17
+ () => I(n, {
18
18
  countryCode: m,
19
- grade: l ?? "",
19
+ grade: s ?? "",
20
20
  goalCategory: r.TEST_PREP,
21
- courseStream: s,
21
+ courseStream: i,
22
22
  enrollmentType: "ONLINE"
23
23
  }),
24
- [m, l, i, s]
25
- ), { goal_code: _ } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, C = L(
26
- (t, P) => {
24
+ [m, s, n, i]
25
+ ), { goal_code: h } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, T = b(
26
+ (t, _) => {
27
27
  if (!t) {
28
- const b = e == null ? void 0 : e.filter(
29
- (y) => y.goal_category !== r.TEST_PREP
28
+ const E = e == null ? void 0 : e.filter(
29
+ (P) => P.goal_category !== r.TEST_PREP
30
30
  );
31
- a({ goals: b });
31
+ a({ goals: E });
32
32
  return;
33
33
  }
34
- const { label: S } = P, E = w(e, r.TEST_PREP, {
34
+ const { label: C } = _, S = j(e, r.TEST_PREP, {
35
35
  goal_code: t,
36
- milestone_name: S,
37
- milestone_date_ts: j(),
38
- publish: p
36
+ milestone_name: C,
37
+ milestone_date_ts: R()
39
38
  });
40
- a({ goals: E });
39
+ a({ goals: S });
41
40
  },
42
- [e, p, a]
41
+ [e, a]
43
42
  );
44
- return /* @__PURE__ */ c(N, { children: [
45
- /* @__PURE__ */ o(d, { height: 60 }),
46
- /* @__PURE__ */ o(F, {}),
47
- /* @__PURE__ */ c(W, { $flexDirection: "row", $justifyContent: "center", children: [
48
- /* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(x, { withLoader: !0, height: 402, width: 302, src: A.TEST_PREP, className: "image" }) }),
43
+ return /* @__PURE__ */ l(O, { children: [
44
+ /* @__PURE__ */ o(p, { height: 60 }),
45
+ /* @__PURE__ */ o(k, {}),
46
+ /* @__PURE__ */ l(w, { $flexDirection: "row", $justifyContent: "center", children: [
47
+ /* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(x, { withLoader: !0, height: 402, width: 302, src: G.TEST_PREP, className: "image" }) }),
49
48
  /* @__PURE__ */ o(
50
- B,
49
+ N,
51
50
  {
52
51
  $flexGap: 40,
53
52
  $justifyContent: "center",
@@ -56,26 +55,26 @@ const te = $(() => {
56
55
  $gapX: 2.5,
57
56
  $gutterX: 2.5,
58
57
  children: /* @__PURE__ */ o(
59
- R,
58
+ L,
60
59
  {
61
60
  renderAs: "primary",
62
61
  label: "Select a Test",
63
- value: _,
64
- options: T,
62
+ value: h,
63
+ options: u,
65
64
  shape: "borderLess",
66
65
  theme: "dark",
67
- onChange: C,
66
+ onChange: T,
68
67
  isTransparent: !0
69
68
  }
70
69
  )
71
70
  }
72
71
  )
73
72
  ] }),
74
- /* @__PURE__ */ o(d, { heightX: 1 }),
75
- /* @__PURE__ */ o(D, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
73
+ /* @__PURE__ */ o(p, { heightX: 1 }),
74
+ /* @__PURE__ */ o(A, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
76
75
  ] });
77
76
  });
78
77
  export {
79
- te as default
78
+ Z as default
80
79
  };
81
80
  //# sourceMappingURL=test-prep.js.map