@cuemath/leap 3.5.30-link.4 → 3.5.31-as1

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 (270) hide show
  1. package/dist/assets/illustrations/illustrations.js +43 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/images/images.js +0 -12
  4. package/dist/assets/images/images.js.map +1 -1
  5. package/dist/assets/line-icons/icons/carat-right.js +26 -0
  6. package/dist/assets/line-icons/icons/carat-right.js.map +1 -0
  7. package/dist/assets/line-icons/icons/dots-icon.js +21 -0
  8. package/dist/assets/line-icons/icons/dots-icon.js.map +1 -0
  9. package/dist/assets/line-icons/icons/pause-icon.js +24 -0
  10. package/dist/assets/line-icons/icons/pause-icon.js.map +1 -0
  11. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js +82 -0
  12. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js.map +1 -0
  13. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.styled.js +77 -0
  14. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.styled.js.map +1 -0
  15. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +18 -91
  16. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  17. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +42 -58
  18. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  19. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +16 -32
  20. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +1 -1
  21. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +85 -87
  22. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
  23. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +35 -35
  24. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  25. package/dist/features/homework/card-title.js +8 -8
  26. package/dist/features/homework/card-title.js.map +1 -1
  27. package/dist/features/milestone/constants.js +15 -28
  28. package/dist/features/milestone/constants.js.map +1 -1
  29. package/dist/features/milestone/create/milestone-create-helpers.js +42 -43
  30. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  31. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +5 -5
  32. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -1
  33. package/dist/features/timeline/comps/constants.js +18 -18
  34. package/dist/features/timeline/comps/constants.js.map +1 -1
  35. package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js +14 -14
  36. package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js.map +1 -1
  37. package/dist/features/timeline/daily-timeline-styled.js +13 -9
  38. package/dist/features/timeline/daily-timeline-styled.js.map +1 -1
  39. package/dist/features/timeline/daily-timeline-types.js +4 -4
  40. package/dist/features/timeline/daily-timeline-types.js.map +1 -1
  41. package/dist/features/timeline/daily-timeline-view.js +9 -10
  42. package/dist/features/timeline/daily-timeline-view.js.map +1 -1
  43. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js +13 -0
  44. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js.map +1 -0
  45. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js +59 -0
  46. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js.map +1 -0
  47. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js +15 -0
  48. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js.map +1 -0
  49. package/dist/features/timeline/monthly-report/comps/achievements/constant.js +16 -0
  50. package/dist/features/timeline/monthly-report/comps/achievements/constant.js.map +1 -0
  51. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js +128 -0
  52. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -0
  53. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js +53 -0
  54. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +1 -0
  55. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +121 -0
  56. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -0
  57. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +58 -0
  58. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +1 -0
  59. package/dist/features/timeline/monthly-report/comps/activities/activities.js +27 -0
  60. package/dist/features/timeline/monthly-report/comps/activities/activities.js.map +1 -0
  61. package/dist/features/timeline/monthly-report/comps/activities/constants.js +96 -0
  62. package/dist/features/timeline/monthly-report/comps/activities/constants.js.map +1 -0
  63. package/dist/features/timeline/monthly-report/comps/activities/utils.js +15 -0
  64. package/dist/features/timeline/monthly-report/comps/activities/utils.js.map +1 -0
  65. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js +29 -0
  66. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js.map +1 -0
  67. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js +107 -0
  68. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js.map +1 -0
  69. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js +44 -0
  70. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js.map +1 -0
  71. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js +39 -0
  72. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js.map +1 -0
  73. package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js +52 -0
  74. package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js.map +1 -0
  75. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js +9 -0
  76. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js.map +1 -0
  77. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js +94 -0
  78. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js.map +1 -0
  79. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js +48 -0
  80. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +1 -0
  81. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js +28 -0
  82. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +1 -0
  83. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js +113 -0
  84. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +1 -0
  85. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js +30 -0
  86. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js.map +1 -0
  87. package/dist/features/timeline/monthly-report/comps/goals/goals.js +22 -0
  88. package/dist/features/timeline/monthly-report/comps/goals/goals.js.map +1 -0
  89. package/dist/features/timeline/monthly-report/monthly-report-styled.js +14 -0
  90. package/dist/features/timeline/monthly-report/monthly-report-styled.js.map +1 -0
  91. package/dist/features/timeline/monthly-report/monthly-report-types.js +5 -0
  92. package/dist/features/timeline/monthly-report/monthly-report-types.js.map +1 -0
  93. package/dist/features/timeline/monthly-report/monthly-report.js +69 -0
  94. package/dist/features/timeline/monthly-report/monthly-report.js.map +1 -0
  95. package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +10 -0
  96. package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +1 -0
  97. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +87 -0
  98. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -0
  99. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js +9 -0
  100. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js.map +1 -0
  101. package/dist/features/timeline/monthly-timeline/constants.js +40 -0
  102. package/dist/features/timeline/monthly-timeline/constants.js.map +1 -0
  103. package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js +13 -0
  104. package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js.map +1 -0
  105. package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js +6 -0
  106. package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js.map +1 -0
  107. package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js +28 -0
  108. package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js.map +1 -0
  109. package/dist/features/timeline/monthly-timeline/monthly-timeline.js +62 -0
  110. package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -0
  111. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js +9 -0
  112. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js.map +1 -0
  113. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js +9 -0
  114. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js.map +1 -0
  115. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js +35 -0
  116. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js.map +1 -0
  117. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js +53 -0
  118. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js.map +1 -0
  119. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js +19 -0
  120. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +1 -0
  121. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js +50 -0
  122. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +1 -0
  123. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js +9 -0
  124. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js.map +1 -0
  125. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js +22 -0
  126. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js.map +1 -0
  127. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js +9 -0
  128. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js.map +1 -0
  129. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js +84 -0
  130. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js.map +1 -0
  131. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js +11 -0
  132. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js.map +1 -0
  133. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js +36 -0
  134. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js.map +1 -0
  135. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js +55 -0
  136. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +1 -0
  137. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js +35 -0
  138. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js.map +1 -0
  139. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js +21 -0
  140. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js.map +1 -0
  141. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js +21 -0
  142. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js.map +1 -0
  143. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js +9 -0
  144. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js.map +1 -0
  145. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js +30 -0
  146. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js.map +1 -0
  147. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js +9 -0
  148. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +1 -0
  149. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js +56 -0
  150. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +1 -0
  151. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js +15 -0
  152. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +1 -0
  153. package/dist/features/timeline/ptm-report/ptm-report-constants.js +16 -0
  154. package/dist/features/timeline/ptm-report/ptm-report-constants.js.map +1 -0
  155. package/dist/features/timeline/ptm-report/ptm-report-helpers.js +8 -0
  156. package/dist/features/timeline/ptm-report/ptm-report-helpers.js.map +1 -0
  157. package/dist/features/timeline/ptm-report/ptm-report-styled.js +11 -0
  158. package/dist/features/timeline/ptm-report/ptm-report-styled.js.map +1 -0
  159. package/dist/features/timeline/ptm-report/ptm-report-types.js +5 -0
  160. package/dist/features/timeline/ptm-report/ptm-report-types.js.map +1 -0
  161. package/dist/features/timeline/ptm-report/ptm-report.js +113 -0
  162. package/dist/features/timeline/ptm-report/ptm-report.js.map +1 -0
  163. package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js +5 -0
  164. package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js.map +1 -0
  165. package/dist/features/timeline/timeline-tabs/timeline-tabs.js +42 -0
  166. package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +1 -0
  167. package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js +37 -0
  168. package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js.map +1 -0
  169. package/dist/features/trial-session/comps/school-goals/school-goals.js +71 -82
  170. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  171. package/dist/features/trial-session/comps/worksheet/worksheet.js +33 -42
  172. package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
  173. package/dist/features/trial-session/helper.js +66 -69
  174. package/dist/features/trial-session/helper.js.map +1 -1
  175. package/dist/features/trial-session/hooks/use-slide-config-update.js +17 -22
  176. package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -1
  177. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +128 -139
  178. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  179. package/dist/features/trial-session/left-panel/index.js.map +1 -1
  180. package/dist/features/trial-session/trial-session-constants.js +9 -16
  181. package/dist/features/trial-session/trial-session-constants.js.map +1 -1
  182. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  183. package/dist/features/trial-session/trial-session.js +66 -68
  184. package/dist/features/trial-session/trial-session.js.map +1 -1
  185. package/dist/features/ui/animated-arc/animated-arc-styled.js +7 -7
  186. package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -1
  187. package/dist/features/ui/animated-arc/animated-arc.js +37 -26
  188. package/dist/features/ui/animated-arc/animated-arc.js.map +1 -1
  189. package/dist/features/ui/linear-progress-bar/linear-progress-bar.js +39 -0
  190. package/dist/features/ui/linear-progress-bar/linear-progress-bar.js.map +1 -0
  191. package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js +23 -0
  192. package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js.map +1 -0
  193. package/dist/features/ui/swipeable-carousel/constants.js +16 -0
  194. package/dist/features/ui/swipeable-carousel/constants.js.map +1 -0
  195. package/dist/features/ui/swipeable-carousel/swipeable-carousel-styled.js +57 -0
  196. package/dist/features/ui/swipeable-carousel/swipeable-carousel-styled.js.map +1 -0
  197. package/dist/features/ui/swipeable-carousel/swipeable-carousel.js +150 -0
  198. package/dist/features/ui/swipeable-carousel/swipeable-carousel.js.map +1 -0
  199. package/dist/features/ui/swipeable-component/swipeable-component-styled.js.map +1 -0
  200. package/dist/features/ui/swipeable-component/swipeable-component.js +27 -0
  201. package/dist/features/ui/swipeable-component/swipeable-component.js.map +1 -0
  202. package/dist/features/ui/theme/text.js +14 -0
  203. package/dist/features/ui/theme/text.js.map +1 -1
  204. package/dist/index.d.ts +246 -41
  205. package/dist/index.js +588 -568
  206. package/dist/index.js.map +1 -1
  207. package/dist/static/2021.2a1a2ec9.svg +1 -0
  208. package/dist/static/2022.2091553a.svg +1 -0
  209. package/dist/static/2023.ed718b4e.svg +1 -0
  210. package/dist/static/2024.aa60edc5.svg +1 -0
  211. package/dist/static/2025.014a8ad3.svg +1 -0
  212. package/dist/static/2026.95d70f27.svg +1 -0
  213. package/dist/static/2027.fe83a41c.svg +1 -0
  214. package/dist/static/2028.b1c253ef.svg +1 -0
  215. package/dist/static/apr.cd56f13d.svg +1 -0
  216. package/dist/static/aug.3ceade02.svg +1 -0
  217. package/dist/static/coding-report-icon.91a1e900.svg +1 -0
  218. package/dist/static/dec.90729a5e.svg +1 -0
  219. package/dist/static/elp-icon.d45b457d.svg +1 -0
  220. package/dist/static/empty-reports.fe92faad.svg +1 -0
  221. package/dist/static/english-icon.50c2e005.svg +1 -0
  222. package/dist/static/feb.a9ecd320.svg +1 -0
  223. package/dist/static/focus-blue.664be268.svg +1 -0
  224. package/dist/static/full-report.00112c74.svg +1 -0
  225. package/dist/static/jan.f8fb9c39.svg +1 -0
  226. package/dist/static/jul.04a98cf0.svg +1 -0
  227. package/dist/static/jun.9b6ab6bf.svg +1 -0
  228. package/dist/static/key.fa0b4c98.svg +1 -0
  229. package/dist/static/live-session-blue.ec7fa85f.svg +1 -0
  230. package/dist/static/mar.f8b372ef.svg +1 -0
  231. package/dist/static/math-fit-grey.c32f37b3.svg +1 -0
  232. package/dist/static/may.23adae48.svg +1 -0
  233. package/dist/static/no-report.4158fad3.svg +1 -0
  234. package/dist/static/nov.c44e4739.svg +1 -0
  235. package/dist/static/oct.856b3b3f.svg +1 -0
  236. package/dist/static/opened-book-green.faacda34.svg +1 -0
  237. package/dist/static/percentage-pattern-yellow.6a25e820.svg +1 -0
  238. package/dist/static/pi-orange.132b108d.svg +1 -0
  239. package/dist/static/ptm-report-icon.5089218f.svg +1 -0
  240. package/dist/static/puzzle-purple.60ff4884.svg +1 -0
  241. package/dist/static/question-mark-yellow.1925aa04.svg +1 -0
  242. package/dist/static/renewal-blue.1ab3b2d4.svg +1 -0
  243. package/dist/static/sat-report-icon.4331be86.svg +1 -0
  244. package/dist/static/science-report-icon.a0014c40.svg +1 -0
  245. package/dist/static/sep.2d547b31.svg +1 -0
  246. package/dist/static/thumbs-up-green.6a03b9d2.svg +1 -0
  247. package/dist/static/thumps-down.a1192a62.svg +1 -0
  248. package/dist/static/thumps-up.caa35a98.svg +1 -0
  249. package/dist/static/time-purple.ab1a458d.svg +1 -0
  250. package/package.json +3 -2
  251. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
  252. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
  253. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
  254. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
  255. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component-styled.js.map +0 -1
  256. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js +0 -26
  257. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js.map +0 -1
  258. package/dist/static/apr.09a50ff7.png +0 -0
  259. package/dist/static/aug.7179d37e.png +0 -0
  260. package/dist/static/dec.09f7e315.png +0 -0
  261. package/dist/static/feb.9e72504d.png +0 -0
  262. package/dist/static/jan.da91944a.png +0 -0
  263. package/dist/static/jul.5a1c4932.png +0 -0
  264. package/dist/static/jun.62639c2f.png +0 -0
  265. package/dist/static/mar.f51bcfa6.png +0 -0
  266. package/dist/static/may.7c542020.png +0 -0
  267. package/dist/static/nov.058343e7.png +0 -0
  268. package/dist/static/oct.573ee19d.png +0 -0
  269. package/dist/static/sep.3ccb6468.png +0 -0
  270. /package/dist/features/{circle-games/game-launcher/comps/swipable-component → ui/swipeable-component}/swipeable-component-styled.js +0 -0
@@ -0,0 +1,113 @@
1
+ import { jsx as e, jsxs as a, Fragment as ie } from "react/jsx-runtime";
2
+ import { memo as me, useCallback as ge, useEffect as le } from "react";
3
+ import { usePTMReportGet as fe } from "./api/use-ptm-report-get.js";
4
+ import { EPTMTypes as he } from "./ptm-report-types.js";
5
+ import de from "../../ui/loader/app-loader/app-loader.js";
6
+ import _e from "./comps/student-info/student-info.js";
7
+ import { Container as ue } from "./ptm-report-styled.js";
8
+ import Ce from "./comps/key-need/key-need.js";
9
+ import m from "../../ui/layout/flex-view.js";
10
+ import Re from "./comps/teacher-observations/teacher-observations.js";
11
+ import ke from "./comps/strategies/strategies.js";
12
+ import Te from "./comps/parent-support/parent-support.js";
13
+ import Pe from "./comps/upcoming-chapters/upcoming-chapters.js";
14
+ import Se from "./comps/real-world-projects/real-world-projects.js";
15
+ import we from "./comps/school-support/school-support.js";
16
+ import ye from "../../ui/error/error.js";
17
+ const Ae = ({ ptmId: t }) => {
18
+ const {
19
+ get: p,
20
+ data: c,
21
+ isProcessing: g,
22
+ isProcessingFailed: l
23
+ } = fe(t), o = ge(() => {
24
+ p(t);
25
+ }, [p, t]);
26
+ if (le(() => {
27
+ o();
28
+ }, [o]), g || !c)
29
+ return /* @__PURE__ */ e(de, { height: "100dvh" });
30
+ if (l)
31
+ return /* @__PURE__ */ e(m, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(ye, { onTryAgain: o }) });
32
+ const { ptm_config: f, report: h } = c, { ptm_type: r, config: d } = f || {}, { ptm_report_sections: _, late_if_minutes: u } = d || {}, {
33
+ teacher_observation: C,
34
+ learning_strategy: R,
35
+ parent_support: k,
36
+ school_support: T
37
+ } = _ || {}, { subsections: P } = T || {}, { homework_help: S, test_help: w } = P || {}, { options: y } = k || {}, { strategies: A } = R || {}, { subsections: M } = C || {}, {
38
+ focus_area: b,
39
+ strengths: D,
40
+ teacher_remarks: O
41
+ } = M || {}, { areas: j = [], report_tag: x } = b || {}, { areas: v = [] } = D || {}, { report_tag: E } = O || {}, { report_sections: F, student_data: N } = h, {
42
+ teacher_observation: U,
43
+ parent_support: $,
44
+ strategies: H,
45
+ real_world_project: W,
46
+ school_support: G,
47
+ upcoming_chapters: I
48
+ } = F || {}, { homework_help: K, test_help: X } = G || {}, { upcoming_chapters: L } = I || {}, {
49
+ strengths: V = {},
50
+ focus_area: q,
51
+ teacher_remarks: z
52
+ } = U || {}, {
53
+ first_name: i,
54
+ grade: B,
55
+ key_need: s,
56
+ attendance_data: J,
57
+ homework_data: Q,
58
+ late_class_data: Y = [],
59
+ real_world_project: Z
60
+ } = N || {}, { classes_completed: ee, weeks_completed: te } = J || {}, { sheets_assigned: oe, sheets_not_completed: re } = Q || {}, se = j.find(
61
+ ({ area_key: ce }) => ce === q
62
+ ), ne = (s == null ? void 0 : s.key_need) ?? "", n = r === he.ON_DEMAND, ae = Y.length, pe = r && r.split("_").includes("UPGRADE");
63
+ return /* @__PURE__ */ a(ue, { children: [
64
+ /* @__PURE__ */ e(_e, { name: i, grade: B }),
65
+ /* @__PURE__ */ a(m, { $gutterX: 1, $gapX: 1, children: [
66
+ /* @__PURE__ */ e(Ce, { text: ne }),
67
+ (n || pe) && /* @__PURE__ */ a(ie, { children: [
68
+ /* @__PURE__ */ e(Se, { projectReport: W, projectInfo: Z }),
69
+ /* @__PURE__ */ e(
70
+ we,
71
+ {
72
+ homeworkHelpReport: K,
73
+ homeworkHelpConfig: S,
74
+ testHelpReport: X,
75
+ testHelpConfig: w,
76
+ studentName: i,
77
+ isOnDemandPTM: n
78
+ }
79
+ )
80
+ ] }),
81
+ /* @__PURE__ */ e(
82
+ Re,
83
+ {
84
+ strengthAreas: v,
85
+ strengthsReport: V,
86
+ focusArea: se,
87
+ focusAreaReportTag: x,
88
+ teacherRemarks: z,
89
+ teacherRemarkTag: E
90
+ }
91
+ ),
92
+ /* @__PURE__ */ e(ke, { report: H, strategyConfig: A }),
93
+ /* @__PURE__ */ e(
94
+ Te,
95
+ {
96
+ report: $,
97
+ options: y,
98
+ classesCompleted: ee,
99
+ weeksCompleted: te,
100
+ sheetsAssigned: oe,
101
+ sheetsNotCompleted: re,
102
+ lateClassesCount: ae,
103
+ lateIfMinutes: u
104
+ }
105
+ ),
106
+ n && /* @__PURE__ */ e(Pe, { chapters: L })
107
+ ] })
108
+ ] });
109
+ }, Xe = me(Ae);
110
+ export {
111
+ Xe as default
112
+ };
113
+ //# sourceMappingURL=ptm-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ptm-report.js","sources":["../../../../src/features/timeline/ptm-report/ptm-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type FC } from 'react';\n\nimport { usePTMReportGet } from './api/use-ptm-report-get';\nimport { EPTMTypes, type IPTMReportProps } from './ptm-report-types';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport StudentInfo from './comps/student-info/student-info';\nimport * as Styled from './ptm-report-styled';\nimport KeyNeed from './comps/key-need/key-need';\nimport FlexView from '../../ui/layout/flex-view';\nimport TeacherObservations from './comps/teacher-observations/teacher-observations';\nimport Strategies from './comps/strategies/strategies';\nimport ParentSupport from './comps/parent-support/parent-support';\nimport UpcomingChapters from './comps/upcoming-chapters/upcoming-chapters';\nimport RealWorldProjects from './comps/real-world-projects/real-world-projects';\nimport SchoolSupport from './comps/school-support/school-support';\nimport Error from '../../ui/error/error';\n\nconst PTMReport: FC<IPTMReportProps> = ({ ptmId }) => {\n const {\n get: getPTMReport,\n data: ptmReportData,\n isProcessing,\n isProcessingFailed,\n } = usePTMReportGet(ptmId);\n\n const fetchPTMReport = useCallback(() => {\n getPTMReport(ptmId);\n }, [getPTMReport, ptmId]);\n\n useEffect(() => {\n fetchPTMReport();\n }, [fetchPTMReport]);\n\n if (isProcessing || !ptmReportData) {\n return <AppLoader height=\"100dvh\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <Error onTryAgain={fetchPTMReport} />\n </FlexView>\n );\n }\n\n const { ptm_config: ptmConfig, report } = ptmReportData;\n const { ptm_type: ptmType, config } = ptmConfig || {};\n const { ptm_report_sections: sectionsConfig, late_if_minutes: lateIfMinutes } = config || {};\n\n const {\n teacher_observation: teacherObservationConfig,\n learning_strategy: strategyConfig,\n parent_support: parentSupportConfig,\n school_support: schoolSupportConfig,\n } = sectionsConfig || {};\n\n const { subsections: schoolSubsections } = schoolSupportConfig || {};\n const { homework_help: homeworkConfig, test_help: testConfig } = schoolSubsections || {};\n\n const { options: parentOptions } = parentSupportConfig || {};\n const { strategies: strategiesConfig } = strategyConfig || {};\n const { subsections: teacherSubsections } = teacherObservationConfig || {};\n\n const {\n focus_area: focusAreaConfig,\n strengths: strengthsConfig,\n teacher_remarks: remarksConfig,\n } = teacherSubsections || {};\n\n const { areas: focusAreas = [], report_tag: focusAreaTag } = focusAreaConfig || {};\n const { areas: strengthAreas = [] } = strengthsConfig || {};\n const { report_tag: remarksTag } = remarksConfig || {};\n\n const { report_sections: reportSections, student_data: studentData } = report;\n\n const {\n teacher_observation: teacherObservationReport,\n parent_support: parentSupportReport,\n strategies: strategiesReport,\n real_world_project: realWorldReport,\n school_support: schoolSupportReport,\n upcoming_chapters: upcomingChaptersReport,\n } = reportSections || {};\n\n const { homework_help: homeworkReport, test_help: testReport } = schoolSupportReport || {};\n\n const { upcoming_chapters: upcomingChapters } = upcomingChaptersReport || {};\n\n const {\n strengths: strengthsReport = {},\n focus_area: selectedFocusAreaKey,\n teacher_remarks: teacherRemarks,\n } = teacherObservationReport || {};\n\n const {\n first_name: studentName,\n grade: studentGrade,\n key_need: keyNeedData,\n attendance_data: attendanceData,\n homework_data: homeworkData,\n late_class_data: lateClasses = [],\n real_world_project: realWorldProjectData,\n } = studentData || {};\n\n const { classes_completed: completedClasses, weeks_completed: completedWeeks } =\n attendanceData || {};\n\n const { sheets_assigned: assignedSheets, sheets_not_completed: incompleteSheets } =\n homeworkData || {};\n\n const selectedFocusArea = focusAreas.find(\n ({ area_key: areaKey }) => areaKey === selectedFocusAreaKey,\n );\n\n const keyNeedText = keyNeedData?.key_need ?? '';\n const isOnDemandPTM = ptmType === EPTMTypes.ON_DEMAND;\n const lateClassesCount = lateClasses.length;\n const isUpgradePTM = ptmType && ptmType.split('_').includes('UPGRADE');\n const isUpgradeOrOnDemandPTM = isOnDemandPTM || isUpgradePTM;\n\n return (\n <Styled.Container>\n <StudentInfo name={studentName} grade={studentGrade} />\n <FlexView $gutterX={1} $gapX={1}>\n <KeyNeed text={keyNeedText} />\n {isUpgradeOrOnDemandPTM && (\n <>\n <RealWorldProjects projectReport={realWorldReport} projectInfo={realWorldProjectData} />\n <SchoolSupport\n homeworkHelpReport={homeworkReport}\n homeworkHelpConfig={homeworkConfig}\n testHelpReport={testReport}\n testHelpConfig={testConfig}\n studentName={studentName}\n isOnDemandPTM={isOnDemandPTM}\n />\n </>\n )}\n <TeacherObservations\n strengthAreas={strengthAreas}\n strengthsReport={strengthsReport}\n focusArea={selectedFocusArea}\n focusAreaReportTag={focusAreaTag}\n teacherRemarks={teacherRemarks}\n teacherRemarkTag={remarksTag}\n />\n <Strategies report={strategiesReport} strategyConfig={strategiesConfig} />\n <ParentSupport\n report={parentSupportReport}\n options={parentOptions}\n classesCompleted={completedClasses}\n weeksCompleted={completedWeeks}\n sheetsAssigned={assignedSheets}\n sheetsNotCompleted={incompleteSheets}\n lateClassesCount={lateClassesCount}\n lateIfMinutes={lateIfMinutes}\n />\n {isOnDemandPTM && <UpcomingChapters chapters={upcomingChapters} />}\n </FlexView>\n </Styled.Container>\n );\n};\n\nexport default memo(PTMReport);\n"],"names":["PTMReport","ptmId","getPTMReport","ptmReportData","isProcessing","isProcessingFailed","usePTMReportGet","fetchPTMReport","useCallback","useEffect","jsx","AppLoader","FlexView","Error","ptmConfig","report","ptmType","config","sectionsConfig","lateIfMinutes","teacherObservationConfig","strategyConfig","parentSupportConfig","schoolSupportConfig","schoolSubsections","homeworkConfig","testConfig","parentOptions","strategiesConfig","teacherSubsections","focusAreaConfig","strengthsConfig","remarksConfig","focusAreas","focusAreaTag","strengthAreas","remarksTag","reportSections","studentData","teacherObservationReport","parentSupportReport","strategiesReport","realWorldReport","schoolSupportReport","upcomingChaptersReport","homeworkReport","testReport","upcomingChapters","strengthsReport","selectedFocusAreaKey","teacherRemarks","studentName","studentGrade","keyNeedData","attendanceData","homeworkData","lateClasses","realWorldProjectData","completedClasses","completedWeeks","assignedSheets","incompleteSheets","selectedFocusArea","areaKey","keyNeedText","isOnDemandPTM","EPTMTypes","lateClassesCount","isUpgradePTM","jsxs","Styled.Container","StudentInfo","KeyNeed","Fragment","RealWorldProjects","SchoolSupport","TeacherObservations","Strategies","ParentSupport","UpcomingChapters","ptmReport","memo"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAMA,KAAiC,CAAC,EAAE,OAAAC,QAAY;AAC9C,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,IACEC,GAAgBL,CAAK,GAEnBM,IAAiBC,GAAY,MAAM;AACvC,IAAAN,EAAaD,CAAK;AAAA,EAAA,GACjB,CAACC,GAAcD,CAAK,CAAC;AAMpB,MAJJQ,GAAU,MAAM;AACC,IAAAF;EAAA,GACd,CAACA,CAAc,CAAC,GAEfH,KAAgB,CAACD;AACZ,WAAA,gBAAAO,EAACC,IAAU,EAAA,QAAO,SAAS,CAAA;AAGpC,MAAIN;AACF,WACG,gBAAAK,EAAAE,GAAA,EAAS,OAAO,GAAG,aAAY,UAAS,iBAAgB,UACvD,UAAC,gBAAAF,EAAAG,IAAA,EAAM,YAAYN,EAAA,CAAgB,EACrC,CAAA;AAIJ,QAAM,EAAE,YAAYO,GAAW,QAAAC,EAAA,IAAWZ,GACpC,EAAE,UAAUa,GAAS,QAAAC,EAAO,IAAIH,KAAa,CAAA,GAC7C,EAAE,qBAAqBI,GAAgB,iBAAiBC,EAAc,IAAIF,KAAU,IAEpF;AAAA,IACJ,qBAAqBG;AAAA,IACrB,mBAAmBC;AAAA,IACnB,gBAAgBC;AAAA,IAChB,gBAAgBC;AAAA,EAAA,IACdL,KAAkB,CAAA,GAEhB,EAAE,aAAaM,MAAsBD,KAAuB,CAAA,GAC5D,EAAE,eAAeE,GAAgB,WAA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AA;AAAA,MACF;AAAA,MACC8C,KAAiB,gBAAAvD,EAACqE,IAAiB,EAAA,UAAUhC,EAAkB,CAAA;AAAA,IAAA,GAClE;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeiC,KAAAC,GAAKjF,EAAS;"}
@@ -0,0 +1,5 @@
1
+ var t = /* @__PURE__ */ ((r) => (r.DAILY = "daily", r.MONTHLY = "monthly", r))(t || {});
2
+ export {
3
+ t as ETAB_IDS
4
+ };
5
+ //# sourceMappingURL=timeline-tabs-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-tabs-types.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs-types.ts"],"sourcesContent":["export enum ETAB_IDS {\n DAILY = 'daily',\n MONTHLY = 'monthly',\n}\n\nexport interface IProgressTimelineTabs {\n onTabClick: (tab: ETAB_IDS) => void;\n activeTab: string;\n headerHeight: number;\n}\n\nexport interface ITab {\n id: ETAB_IDS;\n label: string;\n path: string;\n}\n"],"names":["ETAB_IDS"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,UAAU,WAFAA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -0,0 +1,42 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { memo as a } from "react";
3
+ import { TabContainer as d, TabItem as c } from "./timeline-tabs.styled.js";
4
+ import { ETAB_IDS as r } from "./timeline-tabs-types.js";
5
+ import h from "../../ui/text/text.js";
6
+ const T = ({ onTabClick: o, activeTab: n, headerHeight: l }) => {
7
+ const m = [
8
+ {
9
+ id: r.DAILY,
10
+ label: "Daily",
11
+ path: "daily"
12
+ },
13
+ {
14
+ id: r.MONTHLY,
15
+ label: "Monthly",
16
+ path: "monthly"
17
+ }
18
+ ];
19
+ return /* @__PURE__ */ t(d, { $heightX: 4, $headerHeight: l, children: m.map((e) => {
20
+ const i = e.id === n;
21
+ return /* @__PURE__ */ t(
22
+ c,
23
+ {
24
+ $isActive: i,
25
+ $justifyContent: "center",
26
+ $borderColor: "BLACK_T_38",
27
+ $background: i ? "BLACK_1" : "WHITE",
28
+ $gapX: 0.46875,
29
+ $gutterX: 1,
30
+ $widthX: 6.5,
31
+ $width: "100%",
32
+ onClick: () => o(e.id),
33
+ children: /* @__PURE__ */ t(h, { $renderAs: "ac4", $color: i ? "WHITE" : "BLACK_T_38", children: e.label })
34
+ },
35
+ e.id
36
+ );
37
+ }) });
38
+ }, C = a(T);
39
+ export {
40
+ C as default
41
+ };
42
+ //# sourceMappingURL=timeline-tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-tabs.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport * as Styled from './timeline-tabs.styled';\nimport { ETAB_IDS, type ITab, type IProgressTimelineTabs } from './timeline-tabs-types';\nimport Text from '../../ui/text/text';\n\nconst TimelineTabs = ({ onTabClick, activeTab, headerHeight }: IProgressTimelineTabs) => {\n const TABS: ITab[] = [\n {\n id: ETAB_IDS.DAILY,\n label: 'Daily',\n path: 'daily',\n },\n {\n id: ETAB_IDS.MONTHLY,\n label: 'Monthly',\n path: 'monthly',\n },\n ];\n\n return (\n <Styled.TabContainer $heightX={4} $headerHeight={headerHeight}>\n {TABS.map(tab => {\n const isActive = tab.id === activeTab;\n\n return (\n <Styled.TabItem\n key={tab.id}\n $isActive={isActive}\n $justifyContent=\"center\"\n $borderColor=\"BLACK_T_38\"\n $background={isActive ? 'BLACK_1' : 'WHITE'}\n $gapX={0.46875}\n $gutterX={1}\n $widthX={6.5}\n $width=\"100%\"\n onClick={() => onTabClick(tab.id)}\n >\n <Text $renderAs=\"ac4\" $color={isActive ? 'WHITE' : 'BLACK_T_38'}>\n {tab.label}\n </Text>\n </Styled.TabItem>\n );\n })}\n </Styled.TabContainer>\n );\n};\n\nexport default memo(TimelineTabs);\n"],"names":["TimelineTabs","onTabClick","activeTab","headerHeight","TABS","ETAB_IDS","jsx","Styled.TabContainer","tab","isActive","Styled.TabItem","Text","timelineTabs","memo"],"mappings":";;;;;AAMA,MAAMA,IAAe,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,cAAAC,QAA0C;AACvF,QAAMC,IAAe;AAAA,IACnB;AAAA,MACE,IAAIC,EAAS;AAAA,MACb,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,IAAIA,EAAS;AAAA,MACb,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EAAA;AAIA,SAAA,gBAAAC,EAACC,GAAA,EAAoB,UAAU,GAAG,eAAeJ,GAC9C,UAAKC,EAAA,IAAI,CAAOI,MAAA;AACT,UAAAC,IAAWD,EAAI,OAAON;AAG1B,WAAA,gBAAAI;AAAA,MAACI;AAAAA,MAAA;AAAA,QAEC,WAAWD;AAAA,QACX,iBAAgB;AAAA,QAChB,cAAa;AAAA,QACb,aAAaA,IAAW,YAAY;AAAA,QACpC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAO;AAAA,QACP,SAAS,MAAMR,EAAWO,EAAI,EAAE;AAAA,QAEhC,UAAA,gBAAAF,EAACK,KAAK,WAAU,OAAM,QAAQF,IAAW,UAAU,cAChD,UAAAD,EAAI,MACP,CAAA;AAAA,MAAA;AAAA,MAbKA,EAAI;AAAA,IAAA;AAAA,EAgBd,CAAA,EACH,CAAA;AAEJ,GAEeI,IAAAC,EAAKb,CAAY;"}
@@ -0,0 +1,37 @@
1
+ import i from "styled-components";
2
+ import o from "../../ui/layout/flex-view.js";
3
+ const n = i(o)`
4
+ position: sticky;
5
+ top: ${({ $headerHeight: t }) => t}px;
6
+ left: calc(
7
+ ((100% * 0.5) - (512px * 0.5) - 104px - 32px)
8
+ ); // 104 tab width + 32 left right margin of container
9
+ `;
10
+ i(o)`
11
+ flex: 1;
12
+ overflow: hidden;
13
+ position: relative;
14
+ `;
15
+ const p = i(o)`
16
+ position: relative;
17
+ cursor: pointer;
18
+ transition: all 0.3s ease;
19
+
20
+ &::after {
21
+ content: '';
22
+ visibility: ${({ $isActive: t }) => t ? "visible" : "hidden"};
23
+ position: absolute;
24
+ right: -6px;
25
+ top: 11px;
26
+ width: 0;
27
+ height: 0;
28
+ border-left: 6px solid black;
29
+ border-top: 5px solid transparent;
30
+ border-bottom: 5px solid transparent;
31
+ }
32
+ `;
33
+ export {
34
+ n as TabContainer,
35
+ p as TabItem
36
+ };
37
+ //# sourceMappingURL=timeline-tabs.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-tabs.styled.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\ninterface ITabItem {\n $isActive: boolean;\n}\n\nconst TabContainer = styled(FlexView)<{ $headerHeight: number }>`\n position: sticky;\n top: ${({ $headerHeight }) => $headerHeight}px;\n left: calc(\n ((100% * 0.5) - (512px * 0.5) - 104px - 32px)\n ); // 104 tab width + 32 left right margin of container\n`;\n\nconst ContentContainer = styled(FlexView)`\n flex: 1;\n overflow: hidden;\n position: relative;\n`;\n\nconst TabItem = styled(FlexView)<ITabItem>`\n position: relative;\n cursor: pointer;\n transition: all 0.3s ease;\n\n &::after {\n content: '';\n visibility: ${({ $isActive }) => ($isActive ? 'visible' : 'hidden')};\n position: absolute;\n right: -6px;\n top: 11px;\n width: 0;\n height: 0;\n border-left: 6px solid black;\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n }\n`;\n\nexport { TabContainer, ContentContainer, TabItem };\n"],"names":["TabContainer","styled","FlexView","$headerHeight","TabItem","$isActive"],"mappings":";;AAQM,MAAAA,IAAeC,EAAOC,CAAQ;AAAA;AAAA,SAE3B,CAAC,EAAE,eAAAC,EAAc,MAAMA,CAAa;AAAA;AAAA;AAAA;AAAA;AAMpBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAMlC,MAAAE,IAAUH,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOb,CAAC,EAAE,WAAAG,EAAA,MAAiBA,IAAY,YAAY,QAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,121 +1,110 @@
1
- import { jsx as q } from "react/jsx-runtime";
2
- import { memo as z, useMemo as h, useCallback as s, useEffect as G } from "react";
3
- import { GOAL_CATEGORY as m, ENROLLMENT_TYPES as E } from "../../../milestone/constants.js";
4
- import { getCategorizedCurriculumStandards as V } from "../../../milestone/create/comps/class-details-step/class-details-utils.js";
5
- import { getGradesFromConfig as k, getGoalsFromConfig as J } from "../../../milestone/create/milestone-create-helpers.js";
6
- import { epochTimestampAfterOneYear as b } from "../../../utils/utils.js";
7
- import { useTrialSessionContext as K } from "../../context/use-trial-session-context.js";
8
- import { isPLASource as Q, updateGoalInFormData as I } from "../../helper.js";
9
- import W from "./school-goals-view.js";
10
- import { HIGH_ENROLLMENT_PROGRAMS_MAP as X } from "../../trial-session-constants.js";
11
- const co = z(function() {
1
+ import { jsx as Y } from "react/jsx-runtime";
2
+ import { memo as j, useMemo as p, useCallback as l, useEffect as h } from "react";
3
+ import { GOAL_CATEGORY as m } from "../../../milestone/constants.js";
4
+ import { getCategorizedCurriculumStandards as q } from "../../../milestone/create/comps/class-details-step/class-details-utils.js";
5
+ import { getGradesFromConfig as v, getGoalsFromConfig as z } from "../../../milestone/create/milestone-create-helpers.js";
6
+ import { epochTimestampAfterOneYear as L } from "../../../utils/utils.js";
7
+ import { useTrialSessionContext as M } from "../../context/use-trial-session-context.js";
8
+ import { isPLASource as V, updateGoalInFormData as b } from "../../helper.js";
9
+ import J from "./school-goals-view.js";
10
+ const to = j(function() {
12
11
  const {
13
12
  milestoneConfig: n,
14
13
  formData: U,
15
- updateSlideConfig: r,
16
- updateButtonState: O,
14
+ updateSlideConfig: a,
15
+ updateButtonState: _,
17
16
  onRemoveOptionalSlides: S,
18
- trialHomeData: A
19
- } = K(), { name: T, grade: e, goals: t, curriculum: c, numberInNameError: N } = U || {}, { demo_info: P, intel_student: f, student: R } = A, { enrollment_type: i } = R || {}, { stream: d, region_data: D } = P || {}, { opportunity_country: u = "US" } = D || {}, M = k(n), g = Q(f == null ? void 0 : f.source), H = Object.keys(X), v = h(
20
- () => V(n, {
21
- countryCode: u,
17
+ trialHomeData: y
18
+ } = M(), { name: G, grade: e, goals: t, curriculum: u, numberInNameError: A } = U || {}, { demo_info: H, intel_student: f, student: T } = y, { enrollment_type: c } = T || {}, { stream: i, region_data: D } = H || {}, { opportunity_country: d = "US" } = D || {}, I = v(n), g = V(f == null ? void 0 : f.source), F = p(
19
+ () => q(n, {
20
+ countryCode: d,
22
21
  grade: e ?? "",
23
22
  goalCategory: m.SCHOOL_SUCCESS,
24
- courseStream: d,
25
- enrollmentType: i,
23
+ courseStream: i,
24
+ enrollmentType: c,
26
25
  flow: "CREATE"
27
26
  }),
28
- [n, u, e, d, i]
29
- ), C = h(
30
- () => J(n, {
31
- countryCode: u,
27
+ [n, d, e, i, c]
28
+ ), C = p(
29
+ () => z(n, {
30
+ countryCode: d,
32
31
  grade: e ?? "",
33
32
  goalCategory: m.SCHOOL_SUCCESS,
34
- courseStream: d,
35
- curriculumStandard: c,
36
- enrollmentType: i
33
+ courseStream: i,
34
+ curriculumStandard: u,
35
+ enrollmentType: c
37
36
  }),
38
- [n, u, e, d, c, i]
39
- ), { goal_code: p } = h(
37
+ [n, d, e, i, u, c]
38
+ ), { goal_code: O } = p(
40
39
  () => (t == null ? void 0 : t.find((o) => o.goal_category === m.SCHOOL_SUCCESS)) ?? {},
41
40
  [t]
42
- ), L = !!(T && e && c && p), a = s(
43
- (o, l) => {
44
- r({
45
- [o]: l,
46
- ...o === "grade" || o === "curriculum" ? { goals: [], enrollmentType: void 0 } : {}
41
+ ), E = !!(G && e && u && O), r = l(
42
+ (o, s) => {
43
+ a({
44
+ [o]: s,
45
+ ...o === "grade" || o === "curriculum" ? { goals: [] } : {}
47
46
  });
48
47
  },
49
- [r]
50
- ), F = s(
48
+ [a]
49
+ ), N = l(
51
50
  (o) => {
52
- r({ numberInNameError: !1, enrollmentType: E.HIGH }), a("name", o.target.value);
51
+ a({ numberInNameError: !1 }), r("name", o.target.value);
53
52
  },
54
- [r, a]
55
- ), x = s(
56
- (o, l) => {
57
- const { label: _, programCode: y = "" } = l, w = I(t, m.SCHOOL_SUCCESS, {
53
+ [a, r]
54
+ ), x = l(
55
+ (o, s) => {
56
+ const { label: P } = s, R = b(t, m.SCHOOL_SUCCESS, {
58
57
  goal_code: o,
59
- milestone_name: _,
60
- milestone_date_ts: b(),
61
- publish: g,
62
- program_code: y
63
- }), B = H.includes(y) ? E.HIGH : void 0;
64
- r({
65
- goals: w,
66
- enrollmentType: B
58
+ milestone_name: P,
59
+ milestone_date_ts: L(),
60
+ publish: g
67
61
  });
62
+ a({ goals: R });
68
63
  },
69
- [t, g, r]
70
- ), Y = s(
71
- (o) => a("curriculum", o),
72
- [a]
73
- ), j = s(
64
+ [t, g, a]
65
+ ), w = l(
66
+ (o) => r("curriculum", o),
67
+ [r]
68
+ ), B = l(
74
69
  (o) => {
75
- a("grade", o), a("curriculum", "");
70
+ r("grade", o), r("curriculum", "");
76
71
  },
77
- [a]
72
+ [r]
78
73
  );
79
- return G(() => {
80
- O("right", { isDisabled: !L, isLoading: !1 });
81
- }, [L, O]), G(() => {
82
- e && (S == null || S(e, p));
83
- }, [e, p]), G(() => {
74
+ return h(() => {
75
+ _("right", { isDisabled: !E, isLoading: !1 });
76
+ }, [E, _]), h(() => {
77
+ e && (S == null || S(e));
78
+ }, [e]), h(() => {
84
79
  const o = C.length === 1 ? C[0] : void 0;
85
80
  if (o) {
86
- const l = I(t, m.SCHOOL_SUCCESS, {
81
+ const s = b(t, m.SCHOOL_SUCCESS, {
87
82
  goal_code: o.id ?? "",
88
83
  milestone_name: o.label ?? "",
89
- milestone_date_ts: b(),
90
- publish: g,
91
- program_code: o.programCode
92
- }), _ = H.includes(
93
- (o == null ? void 0 : o.programCode) ?? ""
94
- ) ? E.HIGH : void 0;
95
- r({
96
- goals: l,
97
- enrollmentType: _
84
+ milestone_date_ts: L(),
85
+ publish: g
98
86
  });
87
+ a({ goals: s });
99
88
  }
100
- }, [C, g]), /* @__PURE__ */ q(
101
- W,
89
+ }, [C, g]), /* @__PURE__ */ Y(
90
+ J,
102
91
  {
103
- name: T,
92
+ name: G,
104
93
  grade: e,
105
- grades: M,
94
+ grades: I,
106
95
  goalsList: C,
107
- curriculum: c,
108
- selectedGoal: p,
109
- numberInNameError: N,
110
- curriculumStandards: v,
111
- onNameChange: F,
96
+ curriculum: u,
97
+ selectedGoal: O,
98
+ numberInNameError: A,
99
+ curriculumStandards: F,
100
+ onNameChange: N,
112
101
  onGoalChange: x,
113
- onGradeChange: j,
114
- onCurriculumChange: Y
102
+ onGradeChange: B,
103
+ onCurriculumChange: w
115
104
  }
116
105
  );
117
106
  });
118
107
  export {
119
- co as default
108
+ to as default
120
109
  };
121
110
  //# sourceMappingURL=school-goals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"school-goals.js","sources":["../../../../../src/features/trial-session/comps/school-goals/school-goals.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type InputHTMLAttributes } from 'react';\n\nimport { ENROLLMENT_TYPES, GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport {\n getGoalsFromConfig,\n getGradesFromConfig,\n} from '../../../milestone/create/milestone-create-helpers';\nimport type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SchoolGoalsView from './school-goals-view';\nimport { HIGH_ENROLLMENT_PROGRAMS_MAP } from '../../trial-session-constants';\n\nconst SchoolGoals = memo(function SchoolGoals() {\n const {\n milestoneConfig,\n formData,\n updateSlideConfig,\n updateButtonState,\n onRemoveOptionalSlides,\n trialHomeData,\n } = useTrialSessionContext();\n const { name, grade, goals, curriculum, numberInNameError } = formData || {};\n\n const { demo_info: demoInfo, intel_student: intelStudent, student } = trialHomeData;\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n const isPLA = isPLASource(intelStudent?.source);\n const highEnrollmentPrograms = Object.keys(HIGH_ENROLLMENT_PROGRAMS_MAP);\n\n const curriculumStandards = useMemo(\n () =>\n getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType: enrollmentType,\n flow: 'CREATE',\n }),\n [milestoneConfig, countryCode, grade, stream, enrollmentType],\n );\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n curriculumStandard: curriculum,\n enrollmentType: enrollmentType,\n }),\n [milestoneConfig, countryCode, grade, stream, curriculum, enrollmentType],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.SCHOOL_SUCCESS) ?? {},\n [goals],\n );\n\n const hasRequiredFields = Boolean(name && grade && curriculum && selectedGoal);\n\n const updateStudentInformation = useCallback(\n (key: string, value: string) => {\n updateSlideConfig({\n [key]: value,\n ...(key === 'grade' || key === 'curriculum'\n ? { goals: [], enrollmentType: undefined }\n : {}),\n });\n },\n [updateSlideConfig],\n );\n\n const handleNameChange = useCallback<\n NonNullable<InputHTMLAttributes<HTMLInputElement>['onChange']>\n >(\n event => {\n updateSlideConfig({ numberInNameError: false, enrollmentType: ENROLLMENT_TYPES.HIGH });\n updateStudentInformation('name', event.target.value);\n },\n [updateSlideConfig, updateStudentInformation],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n const { label, programCode = '' } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n program_code: programCode as string,\n });\n\n const enrollmentToUpdate = highEnrollmentPrograms.includes(programCode as string)\n ? ENROLLMENT_TYPES.HIGH\n : undefined;\n\n updateSlideConfig({\n goals: updatedGoals,\n enrollmentType: enrollmentToUpdate,\n });\n },\n [goals, isPLA, updateSlideConfig],\n );\n\n const handleCurriculumChange = useCallback(\n (value: string) => updateStudentInformation('curriculum', value),\n [updateStudentInformation],\n );\n\n const handleGradeChange = useCallback(\n (value: string) => {\n updateStudentInformation('grade', value);\n updateStudentInformation('curriculum', '');\n },\n [updateStudentInformation],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n useEffect(() => {\n if (grade) {\n onRemoveOptionalSlides?.(grade, selectedGoal);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [grade, selectedGoal]);\n\n useEffect(() => {\n // If there is only one goal in the list, set it as the selected goal\n // and update the form data with the goal code, milestone name, and date\n const defaultGoal = goalsList.length === 1 ? goalsList[0] : undefined;\n\n if (defaultGoal) {\n const goalToUpdate = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: defaultGoal.id ?? '',\n milestone_name: defaultGoal.label ?? '',\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n program_code: defaultGoal.programCode,\n });\n\n const enrollmentToUpdate = highEnrollmentPrograms.includes(\n (defaultGoal?.programCode ?? '') as string,\n )\n ? ENROLLMENT_TYPES.HIGH\n : undefined;\n\n updateSlideConfig({\n goals: goalToUpdate,\n enrollmentType: enrollmentToUpdate,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [goalsList, isPLA]);\n\n return (\n <SchoolGoalsView\n name={name}\n grade={grade}\n grades={grades}\n goalsList={goalsList}\n curriculum={curriculum}\n selectedGoal={selectedGoal}\n numberInNameError={numberInNameError}\n curriculumStandards={curriculumStandards}\n onNameChange={handleNameChange}\n onGoalChange={handleGoalChange}\n onGradeChange={handleGradeChange}\n onCurriculumChange={handleCurriculumChange}\n />\n );\n});\n\nexport default SchoolGoals;\n"],"names":["SchoolGoals","memo","milestoneConfig","formData","updateSlideConfig","updateButtonState","onRemoveOptionalSlides","trialHomeData","useTrialSessionContext","name","grade","goals","curriculum","numberInNameError","demoInfo","intelStudent","student","enrollmentType","stream","regionData","countryCode","grades","getGradesFromConfig","isPLA","isPLASource","highEnrollmentPrograms","HIGH_ENROLLMENT_PROGRAMS_MAP","curriculumStandards","useMemo","getCategorizedCurriculumStandards","GOAL_CATEGORY","goalsList","getGoalsFromConfig","selectedGoal","goal","hasRequiredFields","updateStudentInformation","useCallback","key","value","handleNameChange","event","ENROLLMENT_TYPES","handleGoalChange","option","label","programCode","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","enrollmentToUpdate","handleCurriculumChange","handleGradeChange","useEffect","defaultGoal","goalToUpdate","jsx","SchoolGoalsView"],"mappings":";;;;;;;;;;AAeM,MAAAA,KAAcC,EAAK,WAAuB;AACxC,QAAA;AAAA,IACJ,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,eAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,MAAAC,GAAM,OAAAC,GAAO,OAAAC,GAAO,YAAAC,GAAY,mBAAAC,EAAkB,IAAIV,KAAY,IAEpE,EAAE,WAAWW,GAAU,eAAeC,GAAc,SAAAC,EAAY,IAAAT,GAChE,EAAE,iBAAiBU,MAAmBD,KAAW,CAAA,GAC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B,EAAU,MAAM;AAGd,UAAMC,IAAcvB,EAAU,WAAW,IAAIA,EAAU,CAAC,IAAI;AAE5D,QAAIuB,GAAa;AACf,YAAMC,IAAeP,EAAqBrC,GAAOmB,EAAc,gBAAgB;AAAA,QAC7E,WAAWwB,EAAY,MAAM;AAAA,QAC7B,gBAAgBA,EAAY,SAAS;AAAA,QACrC,mBAAmBL,EAA2B;AAAA,QAC9C,SAAS1B;AAAA,QACT,cAAc+B,EAAY;AAAA,MAAA,CAC3B,GAEKJ,IAAqBzB,EAAuB;AAAA,SAC/C6B,KAAA,gBAAAA,EAAa,gBAAe;AAAA,MAAA,IAE3BZ,EAAiB,OACjB;AAEc,MAAAtC,EAAA;AAAA,QAChB,OAAOmD;AAAA,QACP,gBAAgBL;AAAA,MAAA,CACjB;AAAA,IACH;AAAA,EAAA,GAEC,CAACnB,GAAWR,CAAK,CAAC,GAGnB,gBAAAiC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAhD;AAAA,MACA,OAAAC;AAAA,MACA,QAAAW;AAAA,MACA,WAAAU;AAAA,MACA,YAAAnB;AAAA,MACA,cAAAqB;AAAA,MACA,mBAAApB;AAAA,MACA,qBAAAc;AAAA,MACA,cAAca;AAAA,MACd,cAAcG;AAAA,MACd,eAAeS;AAAA,MACf,oBAAoBD;AAAA,IAAA;AAAA,EAAA;AAG1B,CAAC;"}
1
+ {"version":3,"file":"school-goals.js","sources":["../../../../../src/features/trial-session/comps/school-goals/school-goals.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type InputHTMLAttributes } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport {\n getGoalsFromConfig,\n getGradesFromConfig,\n} from '../../../milestone/create/milestone-create-helpers';\nimport type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SchoolGoalsView from './school-goals-view';\n\nconst SchoolGoals = memo(function SchoolGoals() {\n const {\n milestoneConfig,\n formData,\n updateSlideConfig,\n updateButtonState,\n onRemoveOptionalSlides,\n trialHomeData,\n } = useTrialSessionContext();\n const { name, grade, goals, curriculum, numberInNameError } = formData || {};\n\n const { demo_info: demoInfo, intel_student: intelStudent, student } = trialHomeData;\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n const isPLA = isPLASource(intelStudent?.source);\n\n const curriculumStandards = useMemo(\n () =>\n getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType: enrollmentType,\n flow: 'CREATE',\n }),\n [milestoneConfig, countryCode, grade, stream, enrollmentType],\n );\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n curriculumStandard: curriculum,\n enrollmentType: enrollmentType,\n }),\n [milestoneConfig, countryCode, grade, stream, curriculum, enrollmentType],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.SCHOOL_SUCCESS) ?? {},\n [goals],\n );\n\n const hasRequiredFields = Boolean(name && grade && curriculum && selectedGoal);\n\n const updateStudentInformation = useCallback(\n (key: string, value: string) => {\n updateSlideConfig({\n [key]: value,\n ...(key === 'grade' || key === 'curriculum' ? { goals: [] } : {}),\n });\n },\n [updateSlideConfig],\n );\n\n const handleNameChange = useCallback<\n NonNullable<InputHTMLAttributes<HTMLInputElement>['onChange']>\n >(\n event => {\n updateSlideConfig({ numberInNameError: false });\n updateStudentInformation('name', event.target.value);\n },\n [updateSlideConfig, updateStudentInformation],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, isPLA, updateSlideConfig],\n );\n\n const handleCurriculumChange = useCallback(\n (value: string) => updateStudentInformation('curriculum', value),\n [updateStudentInformation],\n );\n\n const handleGradeChange = useCallback(\n (value: string) => {\n updateStudentInformation('grade', value);\n updateStudentInformation('curriculum', '');\n },\n [updateStudentInformation],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n useEffect(() => {\n if (grade) {\n onRemoveOptionalSlides?.(grade);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [grade]);\n\n useEffect(() => {\n // If there is only one goal in the list, set it as the selected goal\n // and update the form data with the goal code, milestone name, and date\n const defaultGoal = goalsList.length === 1 ? goalsList[0] : undefined;\n\n if (defaultGoal) {\n const goalToUpdate = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: defaultGoal.id ?? '',\n milestone_name: defaultGoal.label ?? '',\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n });\n\n updateSlideConfig({ goals: goalToUpdate });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [goalsList, isPLA]);\n\n return (\n <SchoolGoalsView\n name={name}\n grade={grade}\n grades={grades}\n goalsList={goalsList}\n curriculum={curriculum}\n selectedGoal={selectedGoal}\n numberInNameError={numberInNameError}\n curriculumStandards={curriculumStandards}\n onNameChange={handleNameChange}\n onGoalChange={handleGoalChange}\n onGradeChange={handleGradeChange}\n onCurriculumChange={handleCurriculumChange}\n />\n );\n});\n\nexport default SchoolGoals;\n"],"names":["SchoolGoals","memo","milestoneConfig","formData","updateSlideConfig","updateButtonState","onRemoveOptionalSlides","trialHomeData","useTrialSessionContext","name","grade","goals","curriculum","numberInNameError","demoInfo","intelStudent","student","enrollmentType","stream","regionData","countryCode","grades","getGradesFromConfig","isPLA","isPLASource","curriculumStandards","useMemo","getCategorizedCurriculumStandards","GOAL_CATEGORY","goalsList","getGoalsFromConfig","selectedGoal","goal","hasRequiredFields","updateStudentInformation","useCallback","key","value","handleNameChange","event","handleGoalChange","option","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","handleCurriculumChange","handleGradeChange","useEffect","defaultGoal","goalToUpdate","jsx","SchoolGoalsView"],"mappings":";;;;;;;;;AAcM,MAAAA,KAAcC,EAAK,WAAuB;AACxC,QAAA;AAAA,IACJ,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,eAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,MAAAC,GAAM,OAAAC,GAAO,OAAAC,GAAO,YAAAC,GAAY,mBAAAC,EAAkB,IAAIV,KAAY,IAEpE,EAAE,WAAWW,GAAU,eAAeC,GAAc,SAAAC,EAAY,IAAAT,GAChE,EAAE,iBAAiBU,MAAmBD,KAAW,CAAA,GACjD,EAAE,QAAAE,GAAQ,aAAaC,EAAW,IAAIL,KAAY,CAAA,GAClD,EAAE,qBAAqBM,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5DE,IAASC,EAAoBpB,CAAe,GAC5CqB,IAAQC,EAAYT,KAAA,gBAAAA,EAAc,MAAM,GAExCU,IAAsBC;AAAA,IAC1B,MACEC,EAAkCzB,GAAiB;AAAA,MACjD,aAAAkB;AAAA,MACA,OAAOV,KAAS;AAAA,MAChB,cAAckB,EAAc;AAAA,MAC5B,cAAcV;AAAA,MACd,gBAAAD;AAAA,MACA,MAAM;AAAA,IA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A,MACd,cAAcE;AAAA,MACd,eAAeO;AAAA,MACf,oBAAoBD;AAAA,IAAA;AAAA,EAAA;AAG1B,CAAC;"}
@@ -1,52 +1,43 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useState as h, useMemo as k, useCallback as G, useEffect as H } from "react";
3
- import M from "../../../ui/error/error.js";
4
- import N from "../../../ui/loader/app-loader/app-loader.js";
5
- import { useResumeTrialWorksheet as x } from "../../api/trial-nodes.js";
6
- import { useTrialSessionContext as D } from "../../context/use-trial-session-context.js";
7
- import { GOAL_CATEGORY as U } from "../../../milestone/constants.js";
8
- import { HIGH_ENROLLMENT_PROGRAMS_MAP as W } from "../../trial-session-constants.js";
9
- const F = () => {
10
- const { isTeacher: n, studentId: i, worksheet: a, formData: S, updateSlideConfig: g, trialHomeData: C } = D(), [y, c] = h(!1), [d, A] = h(!1), { goals: o, resetAttempt: t } = S || {}, { demo_info: I } = C, { region_data: T, course: m } = I || {}, { opportunity_country: f = "US" } = T || {}, { program_code: u = "" } = k(
11
- () => (o == null ? void 0 : o.find((e) => e.goal_category === U.SCHOOL_SUCCESS)) ?? {},
12
- [o]
13
- ), E = (e, _) => {
14
- if (e && c(!0), _) {
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useState as p, useCallback as D, useEffect as E } from "react";
3
+ import N from "../../../ui/error/error.js";
4
+ import W from "../../../ui/loader/app-loader/app-loader.js";
5
+ import { useResumeTrialWorksheet as b } from "../../api/trial-nodes.js";
6
+ import { useTrialSessionContext as j } from "../../context/use-trial-session-context.js";
7
+ const q = () => {
8
+ const { isTeacher: r, studentId: s, worksheet: n, formData: l, updateSlideConfig: h, trialHomeData: _ } = j(), [g, i] = p(!1), [a, y] = p(!1), { resetAttempt: e } = l || {}, { demo_info: I } = _, { region_data: C, course: c } = I || {}, { opportunity_country: d = "US" } = C || {}, P = (S, f) => {
9
+ if (S && i(!0), f) {
15
10
  const {
16
- user_node_id: P,
17
- node_id: O,
18
- user_attempt_id: L,
19
- node_type: R
20
- } = _;
21
- A(!0), g({ userNodeId: P, nodeId: O, attemptId: L, nodeType: R, resetAttempt: !1 });
22
- }
23
- }, { patch: p, isProcessing: r } = x({
24
- onComplete: E
25
- }), s = G(() => {
26
- if (n && !r && !d) {
27
- const e = W[u] || m;
28
- c(!1), p(i, {
29
- course: e,
30
- country_code: f,
31
- reset_attempt: t === void 0 || t
32
- });
11
+ user_node_id: T,
12
+ node_id: k,
13
+ user_attempt_id: A,
14
+ node_type: x
15
+ } = f;
16
+ y(!0), h({ userNodeId: T, nodeId: k, attemptId: A, nodeType: x, resetAttempt: !1 });
33
17
  }
18
+ }, { patch: m, isProcessing: t } = b({
19
+ onComplete: P
20
+ }), o = D(() => {
21
+ r && !t && !a && (i(!1), m(s, {
22
+ country_code: d,
23
+ course: c,
24
+ reset_attempt: e === void 0 || e
25
+ }));
34
26
  }, [
35
- f,
27
+ d,
28
+ c,
29
+ r,
36
30
  m,
37
- u,
38
- n,
39
- p,
40
- i,
31
+ s,
32
+ e,
41
33
  t,
42
- r,
43
- d
34
+ a
44
35
  ]);
45
- return H(() => {
46
- s();
47
- }, [s]), y ? /* @__PURE__ */ l(M, { height: "100%", onTryAgain: s }) : r || !a ? /* @__PURE__ */ l(N, { height: "100%" }) : a;
36
+ return E(() => {
37
+ o();
38
+ }, [o]), g ? /* @__PURE__ */ u(N, { height: "100%", onTryAgain: o }) : t || !n ? /* @__PURE__ */ u(W, { height: "100%" }) : n;
48
39
  };
49
40
  export {
50
- F as default
41
+ q as default
51
42
  };
52
43
  //# sourceMappingURL=worksheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet.js","sources":["../../../../../src/features/trial-session/comps/worksheet/worksheet.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type FC } from 'react';\n\nimport type { IResumeWorksheetModel } from '../../../../types/models/worksheet';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport { useResumeTrialWorksheet } from '../../api/trial-nodes';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { HIGH_ENROLLMENT_PROGRAMS_MAP } from '../../trial-session-constants';\n\nconst SessionWorksheet: FC = () => {\n const { isTeacher, studentId, worksheet, formData, updateSlideConfig, trialHomeData } =\n useTrialSessionContext();\n const [isError, setIserror] = useState<boolean>(false);\n const [isPatchProcessed, setIsPatchProcessed] = useState(false);\n\n const { goals, resetAttempt } = formData || {};\n const { demo_info: demoInfo } = trialHomeData;\n const { region_data: regionData, course } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n\n const { program_code: programCode = '' } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.SCHOOL_SUCCESS) ?? {},\n [goals],\n );\n\n const onComplete = (error: string | null, sheetData?: IResumeWorksheetModel) => {\n if (error) {\n setIserror(true);\n }\n\n if (sheetData) {\n const {\n user_node_id: userNodeId,\n node_id: nodeId,\n user_attempt_id: attemptId,\n node_type: nodeType,\n } = sheetData;\n\n setIsPatchProcessed(true);\n updateSlideConfig({ userNodeId, nodeId, attemptId, nodeType, resetAttempt: false });\n }\n };\n\n const { patch: resumeNode, isProcessing } = useResumeTrialWorksheet({\n onComplete,\n });\n\n const fetchData = useCallback(() => {\n if (isTeacher && !isProcessing && !isPatchProcessed) {\n const courseToSend =\n HIGH_ENROLLMENT_PROGRAMS_MAP[programCode as keyof typeof HIGH_ENROLLMENT_PROGRAMS_MAP] ||\n course;\n setIserror(false);\n resumeNode(studentId, {\n course: courseToSend,\n country_code: countryCode,\n reset_attempt: resetAttempt === undefined || resetAttempt,\n });\n }\n }, [\n countryCode,\n course,\n programCode,\n isTeacher,\n resumeNode,\n studentId,\n resetAttempt,\n isProcessing,\n isPatchProcessed,\n ]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isError) {\n return <Error height=\"100%\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !worksheet) {\n return <AppLoader height=\"100%\" />;\n }\n\n return worksheet;\n};\n\nexport default SessionWorksheet;\n"],"names":["SessionWorksheet","isTeacher","studentId","worksheet","formData","updateSlideConfig","trialHomeData","useTrialSessionContext","isError","setIserror","useState","isPatchProcessed","setIsPatchProcessed","goals","resetAttempt","demoInfo","regionData","course","countryCode","programCode","useMemo","goal","GOAL_CATEGORY","onComplete","error","sheetData","userNodeId","nodeId","attemptId","nodeType","resumeNode","isProcessing","useResumeTrialWorksheet","fetchData","useCallback","courseToSend","HIGH_ENROLLMENT_PROGRAMS_MAP","useEffect","jsx","Error","AppLoader"],"mappings":";;;;;;;;AAUA,MAAMA,IAAuB,MAAM;AAC3B,QAAA,EAAE,WAAAC,GAAW,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,MACpEC,KACI,CAACC,GAASC,CAAU,IAAIC,EAAkB,EAAK,GAC/C,CAACC,GAAkBC,CAAmB,IAAIF,EAAS,EAAK,GAExD,EAAE,OAAAG,GAAO,cAAAC,MAAiBV,KAAY,CAAA,GACtC,EAAE,WAAWW,EAAa,IAAAT,GAC1B,EAAE,aAAaU,GAAY,QAAAC,EAAO,IAAIF,KAAY,CAAA,GAClD,EAAE,qBAAqBG,IAAc,KAAK,IAAIF,KAAc,CAAA,GAE5D,EAAE,cAAcG,IAAc,GAAO,IAAAC;AAAA,IACzC,OAAMP,KAAA,gBAAAA,EAAO,KAAK,CAAAQ,MAAQA,EAAK,kBAAkBC,EAAc,oBAAmB,CAAC;AAAA,IACnF,CAACT,CAAK;AAAA,EAAA,GAGFU,IAAa,CAACC,GAAsBC,MAAsC;AAK9E,QAJID,KACFf,EAAW,EAAI,GAGbgB,GAAW;AACP,YAAA;AAAA,QACJ,cAAcC;AAAA,QACd,SAASC;AAAA,QACT,iBAAiBC;AAAA,QACjB,WAAWC;AAAA,MACT,IAAAJ;AAEJ,MAAAb,EAAoB,EAAI,GACxBP,EAAkB,EAAE,YAAAqB,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,GAAU,cAAc,IAAO;AAAA,IACpF;AAAA,EAAA,GAGI,EAAE,OAAOC,GAAY,cAAAC,EAAA,IAAiBC,EAAwB;AAAA,IAClE,YAAAT;AAAA,EAAA,CACD,GAEKU,IAAYC,EAAY,MAAM;AAClC,QAAIjC,KAAa,CAAC8B,KAAgB,CAACpB,GAAkB;AAC7C,YAAAwB,IACJC,EAA6BjB,CAAwD,KACrFF;AACF,MAAAR,EAAW,EAAK,GAChBqB,EAAW5B,GAAW;AAAA,QACpB,QAAQiC;AAAA,QACR,cAAcjB;AAAA,QACd,eAAeJ,MAAiB,UAAaA;AAAA,MAAA,CAC9C;AAAA,IACH;AAAA,EAAA,GACC;AAAA,IACDI;AAAA,IACAD;AAAA,IACAE;AAAA,IACAlB;AAAA,IACA6B;AAAA,IACA5B;AAAA,IACAY;AAAA,IACAiB;AAAA,IACApB;AAAA,EAAA,CACD;AAMD,SAJA0B,EAAU,MAAM;AACJ,IAAAJ;EAAA,GACT,CAACA,CAAS,CAAC,GAEVzB,IACM,gBAAA8B,EAAAC,GAAA,EAAM,QAAO,QAAO,YAAYN,EAAW,CAAA,IAGjDF,KAAgB,CAAC5B,IACZ,gBAAAmC,EAACE,GAAU,EAAA,QAAO,OAAO,CAAA,IAG3BrC;AACT;"}
1
+ {"version":3,"file":"worksheet.js","sources":["../../../../../src/features/trial-session/comps/worksheet/worksheet.tsx"],"sourcesContent":["import { useCallback, useEffect, useState, type FC } from 'react';\n\nimport type { IResumeWorksheetModel } from '../../../../types/models/worksheet';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport { useResumeTrialWorksheet } from '../../api/trial-nodes';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\n\nconst SessionWorksheet: FC = () => {\n const { isTeacher, studentId, worksheet, formData, updateSlideConfig, trialHomeData } =\n useTrialSessionContext();\n const [isError, setIserror] = useState<boolean>(false);\n const [isPatchProcessed, setIsPatchProcessed] = useState(false);\n\n const { resetAttempt } = formData || {};\n const { demo_info: demoInfo } = trialHomeData;\n const { region_data: regionData, course } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n\n const onComplete = (error: string | null, sheetData?: IResumeWorksheetModel) => {\n if (error) {\n setIserror(true);\n }\n\n if (sheetData) {\n const {\n user_node_id: userNodeId,\n node_id: nodeId,\n user_attempt_id: attemptId,\n node_type: nodeType,\n } = sheetData;\n\n setIsPatchProcessed(true);\n updateSlideConfig({ userNodeId, nodeId, attemptId, nodeType, resetAttempt: false });\n }\n };\n\n const { patch: resumeNode, isProcessing } = useResumeTrialWorksheet({\n onComplete,\n });\n\n const fetchData = useCallback(() => {\n if (isTeacher && !isProcessing && !isPatchProcessed) {\n setIserror(false);\n resumeNode(studentId, {\n country_code: countryCode,\n course,\n reset_attempt: resetAttempt === undefined || resetAttempt,\n });\n }\n }, [\n countryCode,\n course,\n isTeacher,\n resumeNode,\n studentId,\n resetAttempt,\n isProcessing,\n isPatchProcessed,\n ]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isError) {\n return <Error height=\"100%\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !worksheet) {\n return <AppLoader height=\"100%\" />;\n }\n\n return worksheet;\n};\n\nexport default SessionWorksheet;\n"],"names":["SessionWorksheet","isTeacher","studentId","worksheet","formData","updateSlideConfig","trialHomeData","useTrialSessionContext","isError","setIserror","useState","isPatchProcessed","setIsPatchProcessed","resetAttempt","demoInfo","regionData","course","countryCode","onComplete","error","sheetData","userNodeId","nodeId","attemptId","nodeType","resumeNode","isProcessing","useResumeTrialWorksheet","fetchData","useCallback","useEffect","jsx","Error","AppLoader"],"mappings":";;;;;;AAQA,MAAMA,IAAuB,MAAM;AAC3B,QAAA,EAAE,WAAAC,GAAW,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,MACpEC,KACI,CAACC,GAASC,CAAU,I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