@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,94 @@
1
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import { memo as X, useCallback as i } from "react";
3
+ import n from "../../../../ui/layout/flex-view.js";
4
+ import { ILLUSTRATIONS as p } from "../../../../../assets/illustrations/illustrations.js";
5
+ import g from "../../../../ui/image/image.js";
6
+ import { invalidateMonthlyReport as w, useMonthlyReportPatch as y } from "../../api/use-monthly-report-get.js";
7
+ import $ from "../../../../ui/separator/separator.js";
8
+ import P from "../../../../ui/text/text.js";
9
+ import f from "../../../../ui/buttons/clickable/clickable.js";
10
+ import { FeedbackContainer as x } from "./feedback-styled.js";
11
+ const R = ({
12
+ reportId: l,
13
+ studentName: b,
14
+ onFeedback: c,
15
+ studentCourseId: s,
16
+ showSnackbar: a
17
+ }) => {
18
+ const u = i(
19
+ (r, o) => {
20
+ r && a && a({
21
+ type: "error",
22
+ message: "Something went wrong. Please try again.",
23
+ bgColor: "red"
24
+ }), !r && c && (o != null && o.feedback) && (w(l), c(o.feedback, s));
25
+ },
26
+ [c, s]
27
+ ), { patch: m, isProcessing: d } = y({
28
+ onComplete: u
29
+ }), t = i(
30
+ (r) => {
31
+ m(l, { feedback: r });
32
+ },
33
+ [l, m]
34
+ ), C = i(() => {
35
+ t("positive");
36
+ }, [t]), k = i(() => {
37
+ t("negative");
38
+ }, [t]);
39
+ return /* @__PURE__ */ h(x, { $gapX: 1.25, $background: "WHITE_3", children: [
40
+ /* @__PURE__ */ e(n, { $gutterX: 1, children: /* @__PURE__ */ h(P, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
41
+ "Are you happy with ",
42
+ b ?? "her",
43
+ " progress?"
44
+ ] }) }),
45
+ /* @__PURE__ */ e($, { heightX: 1.5 }),
46
+ /* @__PURE__ */ h(n, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
47
+ /* @__PURE__ */ e(
48
+ f,
49
+ {
50
+ label: "Report thumps up",
51
+ disabled: d,
52
+ onClick: C,
53
+ children: /* @__PURE__ */ e(
54
+ n,
55
+ {
56
+ $widthX: 5,
57
+ $heightX: 5,
58
+ $alignItems: "center",
59
+ $justifyContent: "center",
60
+ $borderRadiusX: 2.5,
61
+ $borderColor: "BLACK_5",
62
+ children: /* @__PURE__ */ e(g, { src: p.THUMPS_UP, alt: "UP", width: 32, height: 32 })
63
+ }
64
+ )
65
+ }
66
+ ),
67
+ /* @__PURE__ */ e(
68
+ f,
69
+ {
70
+ label: "Report thumps down",
71
+ disabled: d,
72
+ onClick: k,
73
+ children: /* @__PURE__ */ e(
74
+ n,
75
+ {
76
+ $widthX: 5,
77
+ $heightX: 5,
78
+ $alignItems: "center",
79
+ $justifyContent: "center",
80
+ $borderColor: "BLACK_5",
81
+ $borderRadiusX: 2.5,
82
+ children: /* @__PURE__ */ e(g, { src: p.THUMPS_DOWN, alt: "DOWN", width: 32, height: 32 })
83
+ }
84
+ )
85
+ }
86
+ )
87
+ ] }),
88
+ /* @__PURE__ */ e($, { heightX: 1.5 })
89
+ ] });
90
+ }, I = X(R);
91
+ export {
92
+ I as default
93
+ };
94
+ //# sourceMappingURL=feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../ui/image/image';\nimport { invalidateMonthlyReport, useMonthlyReportPatch } from '../../api/use-monthly-report-get';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport * as Styled from './feedback-styled';\n\nconst Feedback = ({\n reportId,\n studentName,\n onFeedback,\n studentCourseId,\n showSnackbar,\n}: IFeedbackTypesProps) => {\n const onComplete = useCallback(\n (err: string | null, data?: IMonthlyReportResponse) => {\n if (err && showSnackbar) {\n showSnackbar({\n type: 'error',\n message: 'Something went wrong. Please try again.',\n bgColor: 'red',\n });\n }\n\n if (!err && onFeedback && data?.feedback) {\n invalidateMonthlyReport(reportId);\n onFeedback(data.feedback, studentCourseId);\n }\n },\n [onFeedback, studentCourseId],\n );\n\n const { patch: updateMilestone, isProcessing } = useMonthlyReportPatch({\n onComplete,\n });\n\n const handleFeedback = useCallback(\n (feedback: TFeedback) => {\n updateMilestone(reportId, { feedback });\n },\n [reportId, updateMilestone],\n );\n\n const handlePositiveFeedback = useCallback(() => {\n handleFeedback('positive');\n }, [handleFeedback]);\n\n const handleNegativeFeedback = useCallback(() => {\n handleFeedback('negative');\n }, [handleFeedback]);\n\n return (\n <Styled.FeedbackContainer $gapX={1.25} $background=\"WHITE_3\">\n <FlexView $gutterX={1}>\n <Text $renderAs=\"ab2-black\" $color=\"BLACK_1\" $align=\"center\">\n Are you happy with {studentName ?? 'her'} progress?\n </Text>\n </FlexView>\n <Separator heightX={1.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={3} $alignItems=\"center\" $justifyContent=\"center\">\n <Clickable\n label=\"Report thumps up\"\n disabled={isProcessing}\n onClick={handlePositiveFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2.5}\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.THUMPS_UP} alt=\"UP\" width={32} height={32} />\n </FlexView>\n </Clickable>\n <Clickable\n label=\"Report thumps down\"\n disabled={isProcessing}\n onClick={handleNegativeFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"BLACK_5\"\n $borderRadiusX={2.5}\n >\n <Image src={ILLUSTRATIONS.THUMPS_DOWN} alt=\"DOWN\" width={32} height={32} />\n </FlexView>\n </Clickable>\n </FlexView>\n <Separator heightX={1.5} />\n </Styled.FeedbackContainer>\n );\n};\n\nexport default memo(Feedback);\n"],"names":["Feedback","reportId","studentName","onFeedback","studentCourseId","showSnackbar","onComplete","useCallback","err","data","invalidateMonthlyReport","updateMilestone","isProcessing","useMonthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","handleNegativeFeedback","Styled.FeedbackContainer","jsx","FlexView","jsxs","Text","Separator","Clickable","Image","ILLUSTRATIONS","Feedback$1","memo"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAW,CAAC;AAAA,EAChB,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AACF,MAA2B;AACzB,QAAMC,IAAaC;AAAA,IACjB,CAACC,GAAoBC,MAAkC;AACrD,MAAID,KAAOH,KACIA,EAAA;AAAA,QACX,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,MAAA,CACV,GAGC,CAACG,KAAOL,MAAcM,KAAA,QAAAA,EAAM,cAC9BC,EAAwBT,CAAQ,GACrBE,EAAAM,EAAK,UAAUL,CAAe;AAAA,IAE7C;AAAA,IACA,CAACD,GAAYC,CAAe;AAAA,EAAA,GAGxB,EAAE,OAAOO,GAAiB,cAAAC,EAAA,IAAiBC,EAAsB;AAAA,IACrE,YAAAP;AAAA,EAAA,CACD,GAEKQ,IAAiBP;AAAA,IACrB,CAACQ,MAAwB;AACP,MAAAJ,EAAAV,GAAU,EAAE,UAAAc,EAAA,CAAU;AAAA,IACxC;AAAA,IACA,CAACd,GAAUU,CAAe;AAAA,EAAA,GAGtBK,IAAyBT,EAAY,MAAM;AAC/C,IAAAO,EAAe,UAAU;AAAA,EAAA,GACxB,CAACA,CAAc,CAAC,GAEbG,IAAyBV,EAAY,MAAM;AAC/C,IAAAO,EAAe,UAAU;AAAA,EAAA,GACxB,CAACA,CAAc,CAAC;AAEnB,2BACGI,GAAA,EAAyB,OAAO,MAAM,aAAY,WACjD,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAS,UAAU,GAClB,UAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,aAAY,QAAO,WAAU,QAAO,UAAS,UAAA;AAAA,MAAA;AAAA,MACvCpB,KAAe;AAAA,MAAM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 import c from "../../../../../ui/layout/flex-view.js";
4
+ import C from "../../../../../chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js";
5
+ import { calculateProgress as g } from "../goals-constants.js";
6
+ const E = ({ chapters: t }) => !t || t.length === 0 ? null : t.map((o, u) => {
7
+ const { completed: _, total: a } = o.progress_stat, { completed: $, total: m } = o.previous_progress_stat || {}, r = g(_, a), d = g($ || 0, m || 0), s = r - d, l = o.previous_progress_stat && s > 0 && a === m, f = l ? s : 0, p = r === 100;
8
+ return /* @__PURE__ */ e(
9
+ c,
10
+ {
11
+ $flexDirection: "row",
12
+ $flexGapX: 1,
13
+ $gutterX: 1,
14
+ children: [
15
+ o.image_url && /* @__PURE__ */ n(
16
+ C,
17
+ {
18
+ completionPercentage: l ? d : r,
19
+ imageUrl: o.image_url,
20
+ delta: f,
21
+ imageWidth: 42,
22
+ iconWidth: 16,
23
+ deltaProgressColor: "GREEN_5",
24
+ iconColor: "WHITE",
25
+ iconBackgroundColor: "BLACK_1",
26
+ iconPosition: { top: 0, right: 0 }
27
+ }
28
+ ),
29
+ /* @__PURE__ */ e(c, { children: [
30
+ /* @__PURE__ */ n(i, { $renderAs: "ub2", $color: "BLACK_1", children: o.chapter_name }),
31
+ /* @__PURE__ */ e(c, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.25, children: [
32
+ /* @__PURE__ */ n(i, { $renderAs: "ub3", $color: "BLACK_T_60", children: p ? "Completed" : `${r}% completed` }),
33
+ l && !p && /* @__PURE__ */ e(i, { $renderAs: "ab3", $color: "GREEN_6", children: [
34
+ "(+",
35
+ Math.round(s),
36
+ "%)"
37
+ ] })
38
+ ] })
39
+ ] })
40
+ ]
41
+ },
42
+ `${o.chapter_name}-${u}`
43
+ );
44
+ });
45
+ export {
46
+ E as default
47
+ };
48
+ //# sourceMappingURL=goal-chapter-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-chapter-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.tsx"],"sourcesContent":["import { type FC } from 'react';\n\nimport { type IGoalsCardChaptersProps } from './goals-card-types';\nimport Text from '../../../../../ui/text/text';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport ChapterCircularProgress from '../../../../../chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress';\nimport { calculateProgress } from '../goals-constants';\n\nconst GoalsCardChapters: FC<IGoalsCardChaptersProps> = ({ chapters }) => {\n if (!chapters || chapters.length === 0) {\n return null;\n }\n\n return chapters.map((chapter, i) => {\n const { completed, total } = chapter.progress_stat;\n const { completed: prevCompleted, total: prevTotal } = chapter.previous_progress_stat || {};\n const progress = calculateProgress(completed, total);\n const previousProgress = calculateProgress(prevCompleted || 0, prevTotal || 0);\n const progressDifference = progress - previousProgress;\n const showDelta =\n chapter.previous_progress_stat && progressDifference > 0 && total === prevTotal;\n const delta = showDelta ? progressDifference : 0;\n const isCompoleted = progress === 100;\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $flexGapX={1}\n $gutterX={1}\n key={`${chapter.chapter_name}-${i}`}\n >\n {chapter.image_url && (\n <ChapterCircularProgress\n completionPercentage={showDelta ? previousProgress : progress}\n imageUrl={chapter.image_url}\n delta={delta}\n imageWidth={42}\n iconWidth={16}\n deltaProgressColor=\"GREEN_5\"\n iconColor=\"WHITE\"\n iconBackgroundColor=\"BLACK_1\"\n iconPosition={{ top: 0, right: 0 }}\n />\n )}\n <FlexView>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n {chapter.chapter_name}\n </Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.25}>\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {isCompoleted ? 'Completed' : `${progress}% completed`}\n </Text>\n {showDelta && !isCompoleted && (\n <Text $renderAs=\"ab3\" $color=\"GREEN_6\">\n (+{Math.round(progressDifference)}%)\n </Text>\n )}\n </FlexView>\n </FlexView>\n </FlexView>\n );\n });\n};\n\nexport default GoalsCardChapters;\n"],"names":["GoalsCardChapters","chapters","chapter","i","completed","total","prevCompleted","prevTotal","progress","calculateProgress","previousProgress","progressDifference","showDelta","delta","isCompoleted","jsxs","FlexView","jsx","ChapterCircularProgress","Text"],"mappings":";;;;;AAQA,MAAMA,IAAiD,CAAC,EAAE,UAAAC,QACpD,CAACA,KAAYA,EAAS,WAAW,IAC5B,OAGFA,EAAS,IAAI,CAACC,GAASC,MAAM;AAClC,QAAM,EAAE,WAAAC,GAAW,OAAAC,MAAUH,EAAQ,eAC/B,EAAE,WAAWI,GAAe,OAAOC,MAAcL,EAAQ,0BAA0B,IACnFM,IAAWC,EAAkBL,GAAWC,CAAK,GAC7CK,IAAmBD,EAAkBH,KAAiB,GAAGC,KAAa,CAAC,GACvEI,IAAqBH,IAAWE,GAChCE,IACJV,EAAQ,0BAA0BS,IAAqB,KAAKN,MAAUE,GAClEM,IAAQD,IAAYD,IAAqB,GACzCG,IAAeN,MAAa;AAGhC,SAAA,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,WAAW;AAAA,MACX,UAAU;AAAA,MAGT,UAAA;AAAA,QAAAd,EAAQ,aACP,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,sBAAsBN,IAAYF,IAAmBF;AAAA,YACrD,UAAUN,EAAQ;AAAA,YAClB,OAAAW;AAAA,YACA,YAAY;AAAA,YACZ,WAAW;AAAA,YACX,oBAAmB;AAAA,YACnB,WAAU;AAAA,YACV,qBAAoB;AAAA,YACpB,cAAc,EAAE,KAAK,GAAG,OAAO,EAAE;AAAA,UAAA;AAAA,QACnC;AAAA,0BAEDG,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAC,EAACE,KAAK,WAAU,OAAM,QAAO,WAC1B,YAAQ,cACX;AAAA,4BACCH,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,WAAW,MAC7D,UAAA;AAAA,YAAC,gBAAAC,EAAAE,GAAA,EAAK,WAAU,OAAM,QAAO,cAC1B,UAAeL,IAAA,cAAc,GAAGN,CAAQ,cAC3C,CAAA;AAAA,YACCI,KAAa,CAACE,KACb,gBAAAC,EAACI,KAAK,WAAU,OAAM,QAAO,WAAU,UAAA;AAAA,cAAA;AAAA,cAClC,KAAK,MAAMR,CAAkB;AAAA,cAAE;AAAA,YAAA,GACpC;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA7BK,GAAGT,EAAQ,YAAY,IAAIC,CAAC;AAAA,EAAA;AA8BnC,CAEH;"}
@@ -0,0 +1,28 @@
1
+ import o from "styled-components";
2
+ import t from "../../../../../ui/layout/flex-view.js";
3
+ const p = o(t)`
4
+ position: absolute;
5
+ bottom: 0px;
6
+ left: 0;
7
+ right: 0;
8
+ `, s = o(t)`
9
+ border-top: none;
10
+ `, a = o(t)`
11
+ position: relative;
12
+ &::after {
13
+ content: '';
14
+ position: absolute;
15
+ height: 12px;
16
+ width: 20px;
17
+ left: 10px;
18
+ top: -8px;
19
+ clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
20
+ background-color: ${({ theme: e, $background: r }) => e.colors[r ?? "WHITE_1"]};
21
+ }
22
+ `;
23
+ export {
24
+ s as ChaptersContainer,
25
+ p as ProgressBarContainer,
26
+ a as TagContainer
27
+ };
28
+ //# sourceMappingURL=goals-card-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goals-card-styled.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const ProgressBarContainer = styled(FlexView)`\n position: absolute;\n bottom: 0px;\n left: 0;\n right: 0;\n`;\n\nexport const ChaptersContainer = styled(FlexView)`\n border-top: none;\n`;\n\nexport const TagContainer = styled(FlexView)`\n position: relative;\n &::after {\n content: '';\n position: absolute;\n height: 12px;\n width: 20px;\n left: 10px;\n top: -8px;\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n background-color: ${({ theme, $background }) => theme.colors[$background ?? 'WHITE_1']};\n }\n`;\n"],"names":["ProgressBarContainer","styled","FlexView","ChaptersContainer","TagContainer","theme","$background"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOtCC,IAAoBF,EAAOC,CAAQ;AAAA;AAAA,GAInCE,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAUnB,CAAC,EAAE,OAAAG,GAAO,aAAAC,QAAkBD,EAAM,OAAOC,KAAe,SAAS,CAAC;AAAA;AAAA;"}
@@ -0,0 +1,113 @@
1
+ import { jsxs as e, jsx as r, Fragment as h } from "react/jsx-runtime";
2
+ import { memo as F, useState as H, useMemo as O, useCallback as W } from "react";
3
+ import { GOAL_CATEGORY_CONFIG as j, calculateProgress as w } from "../goals-constants.js";
4
+ import { ProgressBarContainer as y, TagContainer as E, ChaptersContainer as V } from "./goals-card-styled.js";
5
+ import t from "../../../../../ui/text/text.js";
6
+ import l from "../../../../../ui/layout/flex-view.js";
7
+ import C from "../../../../../ui/separator/separator.js";
8
+ import Y from "../../../../../ui/image/image.js";
9
+ import G from "../../../../../ui/buttons/clickable/clickable.js";
10
+ import B from "./goal-chapter-card.js";
11
+ import q from "../../../../../ui/linear-progress-bar/linear-progress-bar.js";
12
+ const z = ({ category: L, milestone: T, isExpended: o = !1 }) => {
13
+ const [d, k] = H(!1), {
14
+ milestone_name: v,
15
+ user_chapters: p,
16
+ progress_stat: P,
17
+ previous_progress_stat: n
18
+ } = T, { completed: I, total: a } = P, { completed: $, total: u } = n ?? {}, c = w(I, a), f = n && $ && u ? w($, u) : 0, i = c - f, g = !!(n && i > 0 && a === a), S = !!(n && i <= 0 && a !== a), b = c === 100, K = Math.round(c), x = Math.round(i), _ = p.length, D = p.slice(0, 2), m = Math.max(0, _ - 2), M = d ? p.slice(2) : [], N = m > 0, s = O(() => j[L], []), A = s.icon, X = W(() => {
19
+ k((R) => !R);
20
+ }, []);
21
+ return /* @__PURE__ */ e(l, { children: [
22
+ /* @__PURE__ */ e(
23
+ l,
24
+ {
25
+ $position: "relative",
26
+ $background: s.backgroundColor,
27
+ $borderColor: o ? "WHITE_5" : void 0,
28
+ $gutterX: 1,
29
+ $gapX: 1,
30
+ $height: o ? "auto" : 72,
31
+ children: [
32
+ /* @__PURE__ */ e(l, { $flexDirection: "row", $flexGapX: o ? 1 : 0.5, children: [
33
+ A && /* @__PURE__ */ r(
34
+ Y,
35
+ {
36
+ src: A,
37
+ withLoader: !0,
38
+ width: o ? 40 : 32,
39
+ height: o ? 40 : 32,
40
+ alt: s.label
41
+ }
42
+ ),
43
+ /* @__PURE__ */ e(l, { children: [
44
+ o && /* @__PURE__ */ e(h, { children: [
45
+ /* @__PURE__ */ r(t, { $renderAs: "ac5", $color: s.labelColor, children: s.label }),
46
+ /* @__PURE__ */ r(C, { heightX: 0.25 })
47
+ ] }),
48
+ /* @__PURE__ */ r(t, { $renderAs: "ab2", $color: "BLACK_1", children: v }),
49
+ /* @__PURE__ */ r(C, { heightX: o ? 0.5 : 0.125 }),
50
+ /* @__PURE__ */ e(l, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.25, children: [
51
+ /* @__PURE__ */ r(t, { $renderAs: "ab3", $color: "BLACK_T_60", children: b ? "Completed" : `${K}% complete` }),
52
+ g && !b && /* @__PURE__ */ e(t, { $renderAs: "ab3", $color: "GREEN_6", children: [
53
+ "(+",
54
+ x,
55
+ "%)"
56
+ ] })
57
+ ] })
58
+ ] }),
59
+ /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
60
+ q,
61
+ {
62
+ percentage: g ? f : c,
63
+ delta: g ? i : 0,
64
+ height: 4,
65
+ backgroundColor: "WHITE_5",
66
+ fillColor: "BLACK_1",
67
+ deltaProgressColor: "GREEN_5"
68
+ }
69
+ ) })
70
+ ] }),
71
+ S && /* @__PURE__ */ e(h, { children: [
72
+ /* @__PURE__ */ r(C, { heightX: 0.875 }),
73
+ /* @__PURE__ */ r(E, { $gapX: 0.5, $gutterX: 1, $background: s.tagColor, children: /* @__PURE__ */ r(t, { $renderAs: "ub3", $color: "BLACK_1", children: "Learning plan was modified — progress updated accordingly." }) })
74
+ ] })
75
+ ]
76
+ }
77
+ ),
78
+ o && _ > 0 && /* @__PURE__ */ e(
79
+ V,
80
+ {
81
+ $gapX: 1,
82
+ $flexDirection: "column",
83
+ $flexGapX: 1.25,
84
+ $borderColor: "WHITE_5",
85
+ children: [
86
+ /* @__PURE__ */ r(B, { chapters: D }),
87
+ N && /* @__PURE__ */ e(h, { children: [
88
+ !d && /* @__PURE__ */ r(l, { $gutterX: 4.5, children: /* @__PURE__ */ r(
89
+ G,
90
+ {
91
+ onClick: X,
92
+ label: `+${m} chapters`,
93
+ children: /* @__PURE__ */ e(t, { $renderAs: "ub3-bold", $color: "BLACK_1", children: [
94
+ "+",
95
+ m,
96
+ " chapters"
97
+ ] })
98
+ }
99
+ ) }),
100
+ d && /* @__PURE__ */ e(h, { children: [
101
+ /* @__PURE__ */ r(B, { chapters: M }),
102
+ /* @__PURE__ */ r(l, { $gutterX: 4.5, children: /* @__PURE__ */ r(G, { onClick: X, label: "Show less", children: /* @__PURE__ */ r(t, { $renderAs: "ub3-bold", $color: "BLACK_1", children: "Show less" }) }) })
103
+ ] })
104
+ ] })
105
+ ]
106
+ }
107
+ )
108
+ ] });
109
+ }, nr = F(z);
110
+ export {
111
+ nr as default
112
+ };
113
+ //# sourceMappingURL=goals-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goals-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goals-card.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useMemo, useState } from 'react';\n\nimport { type IGoalsCardProps } from '../goals-types';\nimport { calculateProgress, GOAL_CATEGORY_CONFIG } from '../goals-constants';\nimport * as Styled from './goals-card-styled';\nimport Text from '../../../../../ui/text/text';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Image from '../../../../../ui/image/image';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport GoalsCardChapters from './goal-chapter-card';\nimport LinearProgressBar from '../../../../../ui/linear-progress-bar/linear-progress-bar';\n\nconst GoalsCard: FC<IGoalsCardProps> = ({ category, milestone, isExpended = false }) => {\n const [showAllChapters, setShowAllChapters] = useState(false);\n const {\n milestone_name: milestoneName,\n user_chapters: userChapters,\n progress_stat: progressStat,\n previous_progress_stat: prevProgressStat,\n } = milestone;\n const { completed, total } = progressStat;\n const { completed: prevCompleted, total: prevTotal } = prevProgressStat ?? {};\n const currentProgress = calculateProgress(completed, total);\n const previousProgress =\n prevProgressStat && prevCompleted && prevTotal\n ? calculateProgress(prevCompleted, prevTotal)\n : 0;\n\n const progressDifference = currentProgress - previousProgress;\n const showIndicator = Boolean(prevProgressStat && progressDifference > 0 && total === total);\n const showTag = Boolean(prevProgressStat && progressDifference <= 0 && total !== total);\n const isCompleted = currentProgress === 100;\n const roundedProgress = Math.round(currentProgress);\n const roundedDifference = Math.round(progressDifference);\n\n const totalChapters = userChapters.length;\n const visibleChapters = userChapters.slice(0, 2);\n const remainingChapters = Math.max(0, totalChapters - 2);\n const hiddenChapters = showAllChapters ? userChapters.slice(2) : [];\n const hasRemainingChapters = remainingChapters > 0;\n\n const categoryConfig = useMemo(() => GOAL_CATEGORY_CONFIG[category], []);\n const icon = categoryConfig.icon;\n\n const handleToggleChapters = useCallback(() => {\n setShowAllChapters(prev => !prev);\n }, []);\n\n return (\n <FlexView>\n <FlexView\n $position=\"relative\"\n $background={categoryConfig.backgroundColor}\n $borderColor={isExpended ? 'WHITE_5' : undefined}\n $gutterX={1}\n $gapX={1}\n $height={isExpended ? 'auto' : 72}\n >\n <FlexView $flexDirection=\"row\" $flexGapX={isExpended ? 1 : 0.5}>\n {icon && (\n <Image\n src={icon}\n withLoader\n width={isExpended ? 40 : 32}\n height={isExpended ? 40 : 32}\n alt={categoryConfig.label}\n />\n )}\n <FlexView>\n {isExpended && (\n <>\n <Text $renderAs=\"ac5\" $color={categoryConfig.labelColor}>\n {categoryConfig.label}\n </Text>\n <Separator heightX={0.25} />\n </>\n )}\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\">\n {milestoneName}\n </Text>\n <Separator heightX={isExpended ? 0.5 : 0.125} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.25}>\n <Text $renderAs=\"ab3\" $color=\"BLACK_T_60\">\n {isCompleted ? 'Completed' : `${roundedProgress}% complete`}\n </Text>\n {showIndicator && !isCompleted && (\n <Text $renderAs=\"ab3\" $color=\"GREEN_6\">\n (+{roundedDifference}%)\n </Text>\n )}\n </FlexView>\n </FlexView>\n <Styled.ProgressBarContainer>\n <LinearProgressBar\n percentage={showIndicator ? previousProgress : currentProgress}\n delta={showIndicator ? progressDifference : 0}\n height={4}\n backgroundColor=\"WHITE_5\"\n fillColor=\"BLACK_1\"\n deltaProgressColor=\"GREEN_5\"\n />\n </Styled.ProgressBarContainer>\n </FlexView>\n {showTag && (\n <>\n <Separator heightX={0.875} />\n <Styled.TagContainer $gapX={0.5} $gutterX={1} $background={categoryConfig.tagColor}>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\">\n Learning plan was modified — progress updated accordingly.\n </Text>\n </Styled.TagContainer>\n </>\n )}\n </FlexView>\n {isExpended && totalChapters > 0 && (\n <Styled.ChaptersContainer\n $gapX={1}\n $flexDirection=\"column\"\n $flexGapX={1.25}\n $borderColor=\"WHITE_5\"\n >\n <GoalsCardChapters chapters={visibleChapters} />\n {hasRemainingChapters && (\n <>\n {!showAllChapters && (\n <FlexView $gutterX={4.5}>\n <Clickable\n onClick={handleToggleChapters}\n label={`+${remainingChapters} chapters`}\n >\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\">\n +{remainingChapters} chapters\n </Text>\n </Clickable>\n </FlexView>\n )}\n {showAllChapters && (\n <>\n <GoalsCardChapters chapters={hiddenChapters} />\n <FlexView $gutterX={4.5}>\n <Clickable onClick={handleToggleChapters} label=\"Show less\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\">\n Show less\n </Text>\n </Clickable>\n </FlexView>\n </>\n )}\n </>\n )}\n </Styled.ChaptersContainer>\n )}\n </FlexView>\n );\n};\n\nexport default memo(GoalsCard);\n"],"names":["GoalsCard","category","milestone","isExpended","showAllChapters","setShowAllChapters","useState","milestoneName","userChapters","progressStat","prevProgressStat","completed","total","prevCompleted","prevTotal","currentProgress","calculateProgress","previousProgress","progressDifference","showIndicator","showTag","isCompleted","roundedProgress","roundedDifference","totalChapters","visibleChapters","remainingChapters","hiddenChapters","hasRemainingChapters","categoryConfig","useMemo","GOAL_CATEGORY_CONFIG","icon","handleToggleChapters","useCallback","prev","FlexView","jsxs","jsx","Image","Fragment","Text","Separator","Styled.ProgressBarContainer","LinearProgressBar","Styled.TagContainer","Styled.ChaptersContainer","GoalsCardChapters","Clickable","GoalsCard$1","memo"],"mappings":";;;;;;;;;;;AAaA,MAAMA,IAAiC,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,YAAAC,IAAa,SAAY;AACtF,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAK,GACtD;AAAA,IACJ,gBAAgBC;AAAA,IAChB,eAAeC;AAAA,IACf,eAAeC;AAAA,IACf,wBAAwBC;AAAA,EACtB,IAAAR,GACE,EAAE,WAAAS,GAAW,OAAAC,EAAU,IAAAH,GACvB,EAAE,WAAWI,GAAe,OAAOC,EAAU,IAAIJ,KAAoB,IACrEK,IAAkBC,EAAkBL,GAAWC,CAAK,GACpDK,IACJP,KAAoBG,KAAiBC,IACjCE,EAAkBH,GAAeC,CAAS,IAC1C,GAEAI,IAAqBH,IAAkBE,GACvCE,IAAgB,GAAQT,KAAoBQ,IAAqB,KAAKN,MAAUA,IAChFQ,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BAAe;AAAA,QACf,WAAW;AAAA,QACX,cAAa;AAAA,QAEb,UAAA;AAAA,UAAC,gBAAAR,EAAAS,GAAA,EAAkB,UAAUtB,EAAiB,CAAA;AAAA,UAC7CG,KAEI,gBAAAS,EAAAG,GAAA,EAAA,UAAA;AAAA,YAAA,CAACpC,KACA,gBAAAkC,EAACF,GAAS,EAAA,UAAU,KAClB,UAAA,gBAAAE;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,SAASf;AAAA,gBACT,OAAO,IAAIP,CAAiB;AAAA,gBAE5B,UAAC,gBAAAW,EAAAI,GAAA,EAAK,WAAU,YAAW,QAAO,WAAU,UAAA;AAAA,kBAAA;AAAA,kBACxCf;AAAA,kBAAkB;AAAA,gBAAA,GACtB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,YAEDtB,KAEG,gBAAAiC,EAAAG,GAAA,EAAA,UAAA;AAAA,cAAC,gBAAAF,EAAAS,GAAA,EAAkB,UAAUpB,EAAgB,CAAA;AAAA,gCAC5CS,GAAS,EAAA,UAAU,KAClB,UAAC,gBAAAE,EAAAU,GAAA,EAAU,SAASf,GAAsB,OAAM,aAC9C,UAAA,gBAAAK,EAACG,KAAK,WAAU,YAAW,QAAO,WAAU,UAAA,aAE5C,GACF,EACF,CAAA;AAAA,YAAA,GACF;AAAA,UAAA,GAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEeQ,KAAAC,EAAKlD,CAAS;"}
@@ -0,0 +1,30 @@
1
+ import { ILLUSTRATIONS as o } from "../../../../../assets/illustrations/illustrations.js";
2
+ import { EGoalCategory as l } from "../../../monthly-timeline/monthly-timeline-types.js";
3
+ const a = {
4
+ [l.SCHOOL_SUCCESS]: {
5
+ label: "School Success",
6
+ icon: o.GRADUATE_ICON_PINK,
7
+ backgroundColor: "PURPLE_1",
8
+ labelColor: "PURPLE_6",
9
+ tagColor: "PURPLE_2"
10
+ },
11
+ [l.ENRICHMENT]: {
12
+ label: "Enrichment",
13
+ icon: o.STAR_ORANGE,
14
+ backgroundColor: "ORANGE_1",
15
+ labelColor: "ORANGE_6",
16
+ tagColor: "ORANGE_2"
17
+ },
18
+ [l.TEST_PREP]: {
19
+ label: "Test Prep",
20
+ icon: o.TROPHY_BLUE,
21
+ backgroundColor: "BLUE_1",
22
+ labelColor: "BLUE_6",
23
+ tagColor: "BLUE_2"
24
+ }
25
+ }, e = (E, r) => r > 0 ? Math.floor(E / r * 100) : 0;
26
+ export {
27
+ a as GOAL_CATEGORY_CONFIG,
28
+ e as calculateProgress
29
+ };
30
+ //# sourceMappingURL=goals-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goals-constants.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/goals/goals-constants.ts"],"sourcesContent":["import { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport { EGoalCategory } from '../../../monthly-timeline/monthly-timeline-types';\n\nexport const GOAL_CATEGORY_CONFIG = {\n [EGoalCategory.SCHOOL_SUCCESS]: {\n label: 'School Success',\n icon: ILLUSTRATIONS.GRADUATE_ICON_PINK,\n backgroundColor: 'PURPLE_1',\n labelColor: 'PURPLE_6',\n tagColor: 'PURPLE_2',\n },\n [EGoalCategory.ENRICHMENT]: {\n label: 'Enrichment',\n icon: ILLUSTRATIONS.STAR_ORANGE,\n backgroundColor: 'ORANGE_1',\n labelColor: 'ORANGE_6',\n tagColor: 'ORANGE_2',\n },\n [EGoalCategory.TEST_PREP]: {\n label: 'Test Prep',\n icon: ILLUSTRATIONS.TROPHY_BLUE,\n backgroundColor: 'BLUE_1',\n labelColor: 'BLUE_6',\n tagColor: 'BLUE_2',\n },\n} as const;\n\nexport const calculateProgress = (completed: number, total: number): number => {\n return total > 0 ? Math.floor((completed / total) * 100) : 0;\n};\n"],"names":["GOAL_CATEGORY_CONFIG","EGoalCategory","ILLUSTRATIONS","calculateProgress","completed","total"],"mappings":";;AAGO,MAAMA,IAAuB;AAAA,EAClC,CAACC,EAAc,cAAc,GAAG;AAAA,IAC9B,OAAO;AAAA,IACP,MAAMC,EAAc;AAAA,IACpB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA,CAACD,EAAc,UAAU,GAAG;AAAA,IAC1B,OAAO;AAAA,IACP,MAAMC,EAAc;AAAA,IACpB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA,CAACD,EAAc,SAAS,GAAG;AAAA,IACzB,OAAO;AAAA,IACP,MAAMC,EAAc;AAAA,IACpB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AACF,GAEaC,IAAoB,CAACC,GAAmBC,MAC5CA,IAAQ,IAAI,KAAK,MAAOD,IAAYC,IAAS,GAAG,IAAI;"}
@@ -0,0 +1,22 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import f from "./goals-card/goals-card.js";
3
+ import t from "../../../../ui/layout/flex-view.js";
4
+ import i from "../../../../ui/text/text.js";
5
+ import m from "../../../../ui/separator/separator.js";
6
+ const n = ({ milestones: o, isExpended: l = !1 }) => !o || o.length === 0 ? null : /* @__PURE__ */ e(t, { children: [
7
+ /* @__PURE__ */ r(i, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Goals" }),
8
+ /* @__PURE__ */ r(m, { heightX: 1 }),
9
+ /* @__PURE__ */ r(t, { $flexRowGapX: l ? 1.5 : 0, children: o.map((a) => /* @__PURE__ */ r(
10
+ f,
11
+ {
12
+ category: a.goal_category,
13
+ milestone: a,
14
+ isExpended: l
15
+ },
16
+ a.user_milestone_id
17
+ )) })
18
+ ] });
19
+ export {
20
+ n as default
21
+ };
22
+ //# sourceMappingURL=goals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goals.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/goals/goals.tsx"],"sourcesContent":["import { type FC } from 'react';\n\nimport { type IGoalsProps } from './goals-types';\nimport GoalsCard from './goals-card/goals-card';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport Separator from '../../../../ui/separator/separator';\n\nconst Goals: FC<IGoalsProps> = ({ milestones, isExpended = false }) => {\n if (!milestones || milestones.length === 0) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Goals\n </Text>\n <Separator heightX={1} />\n <FlexView $flexRowGapX={isExpended ? 1.5 : 0}>\n {milestones.map(milestone => (\n <GoalsCard\n key={milestone.user_milestone_id}\n category={milestone.goal_category}\n milestone={milestone}\n isExpended={isExpended}\n />\n ))}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default Goals;\n"],"names":["Goals","milestones","isExpended","FlexView","jsx","Text","Separator","milestone","GoalsCard"],"mappings":";;;;;AAQA,MAAMA,IAAyB,CAAC,EAAE,YAAAC,GAAY,YAAAC,IAAa,SACrD,CAACD,KAAcA,EAAW,WAAW,IAChC,yBAINE,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,SAAA;AAAA,EACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EACvB,gBAAAF,EAACD,KAAS,cAAcD,IAAa,MAAM,GACxC,UAAAD,EAAW,IAAI,CACdM,MAAA,gBAAAH;AAAA,IAACI;AAAA,IAAA;AAAA,MAEC,UAAUD,EAAU;AAAA,MACpB,WAAAA;AAAA,MACA,YAAAL;AAAA,IAAA;AAAA,IAHKK,EAAU;AAAA,EAKlB,CAAA,GACH;AACF,EAAA,CAAA;"}
@@ -0,0 +1,14 @@
1
+ import t from "styled-components";
2
+ const o = t.div`
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 24px;
6
+ padding: 0 16px;
7
+ max-width: 512px;
8
+ width: 100%;
9
+ margin: 0 auto;
10
+ `;
11
+ export {
12
+ o as MonthlyReportContainer
13
+ };
14
+ //# sourceMappingURL=monthly-report-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthly-report-styled.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const MonthlyReportContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 0 16px;\n max-width: 512px;\n width: 100%;\n margin: 0 auto;\n`;\n"],"names":["MonthlyReportContainer","styled"],"mappings":";AAEO,MAAMA,IAAyBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,5 @@
1
+ var e = /* @__PURE__ */ ((t) => (t.general = "general", t.legacy = "legacy", t.diagnostic = "diagnostic", t.remedial = "remedial", t.recap = "recap", t.learn = "learn", t.extra_practice = "extra_practice", t.practice = "practice", t.test = "test", t.revision = "revision", t.advanced = "advanced", t.challenge = "challenge", t.video = "video", t.simulation = "simulation", t.note = "note", t.subjective = "subjective", t.deck = "deck", t.puzzle = "puzzle", t.test_series = "test_series", t.activity = "activity", t.project = "project", t.certificate = "certificate", t.ppt_viva = "ppt_viva", t.ppt_content = "ppt_content", t.wb_activity = "wb_activity", t.smart_practice = "smart_practice", t.exit_ticket = "exit_ticket", t.monthly_mastery_test = "monthly_mastery_test", t.supplementary_mastery_test = "supplementary_mastery_test", t.trial_diagnostic = "trial_diagnostic", t.trial_basic = "trial_basic", t.trial_intermediate = "trial_intermediate", t.trial_advanced = "trial_advanced", t.sat_mock_test = "sat_mock_test", t))(e || {});
2
+ export {
3
+ e as CARD_TYPE
4
+ };
5
+ //# sourceMappingURL=monthly-report-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthly-report-types.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report-types.ts"],"sourcesContent":["import { type NODE_TYPES } from '../../../types/models/worksheet';\nimport { type TCourseStream } from '../../milestone/create/milestone-create-types';\nimport { type THueNames } from '../../ui/types';\nimport { type NODE_STATE } from '../daily-timeline-types';\nimport { type IUserMilestone } from '../monthly-timeline/monthly-timeline-types';\n\nexport enum CARD_TYPE {\n 'general' = 'general',\n 'legacy' = 'legacy',\n 'diagnostic' = 'diagnostic',\n 'remedial' = 'remedial',\n 'recap' = 'recap',\n 'learn' = 'learn',\n 'extra_practice' = 'extra_practice',\n 'practice' = 'practice',\n 'test' = 'test',\n 'revision' = 'revision',\n 'advanced' = 'advanced',\n 'challenge' = 'challenge',\n 'video' = 'video',\n 'simulation' = 'simulation',\n 'note' = 'note',\n 'subjective' = 'subjective',\n 'deck' = 'deck',\n 'puzzle' = 'puzzle',\n 'test_series' = 'test_series',\n 'activity' = 'activity',\n 'project' = 'project',\n 'certificate' = 'certificate',\n 'ppt_viva' = 'ppt_viva',\n 'ppt_content' = 'ppt_content',\n 'wb_activity' = 'wb_activity',\n 'smart_practice' = 'smart_practice',\n 'exit_ticket' = 'exit_ticket',\n 'monthly_mastery_test' = 'monthly_mastery_test',\n 'supplementary_mastery_test' = 'supplementary_mastery_test',\n 'trial_diagnostic' = 'trial_diagnostic',\n 'trial_basic' = 'trial_basic',\n 'trial_intermediate' = 'trial_intermediate',\n 'trial_advanced' = 'trial_advanced',\n 'sat_mock_test' = 'sat_mock_test',\n}\n\nexport type ActivitiesByCardType = Partial<{\n [K in CARD_TYPE]: IMonthlyActivity[];\n}>;\n\nexport type TFeedback = 'positive' | 'negative';\n\nexport interface IMonthlyReportResponse {\n course_stream: TCourseStream;\n id: string;\n created_on_ts: number;\n is_deleted: boolean;\n report_date: string;\n report_date_ts: number;\n report_month: number;\n report_year: number;\n student_course_ids: string[];\n user_id: string;\n updated_on_ts: number;\n calendar_data: TCalendarData | null;\n progress_data: {\n user_milestones: IUserMilestone[];\n activities: ActivitiesByCardType;\n user_achievements: IAchievementAsset[];\n };\n feedback: TFeedback | null;\n}\n\nexport interface IProgressStat {\n completed: number;\n total: number;\n}\n\nexport interface IMonthlyActivity {\n id: string;\n node_type: NODE_TYPES;\n card_type: CARD_TYPE;\n card_header: CARD_TYPE | null;\n feedback_comments: string | null;\n state: NODE_STATE;\n title?: string;\n accuracy?: number | null;\n subtext?: string | null;\n is_timed?: boolean;\n image_hue?: THueNames;\n image_url?: string;\n sat_max_score?: number | null;\n sat_total_score?: number | null;\n item_ref?: string | null;\n thumbnail_url?: string;\n user_attempt_id?: string | null;\n tip: string | null;\n user_block_id: string | null;\n user_chapter_id: string | null;\n user_node_id: string | null;\n}\n\nexport interface IAchievementAsset {\n asset_id: string;\n url: string;\n}\n\nexport interface IMonthlyReportProps {\n reportId: string;\n studentName: string;\n onPuzzleClick?: (params: {\n item_ref: IMonthlyActivity['item_ref'];\n feedback_comments: IMonthlyActivity['feedback_comments'];\n image_hue: IMonthlyActivity['image_hue'];\n title: IMonthlyActivity['title'];\n tip: IMonthlyActivity['tip'];\n }) => void;\n showSnackbar?: (params: { type: 'error' | 'info'; message: string; bgColor: string }) => void;\n onFeedback?: (feedback: TFeedback, studentCourseId: string) => void;\n}\n\nexport type TClassType = 'REGULAR' | 'EXTRA';\nexport interface IClassEvent {\n class_type: TClassType;\n is_paused: boolean;\n is_present: boolean;\n status: string;\n tag: string | null;\n theme: string;\n time: number;\n}\n\nexport type TCalendarData = Record<string, IClassEvent[]>;\n"],"names":["CARD_TYPE"],"mappings":"AAMY,IAAAA,sBAAAA,OACVA,EAAA,UAAY,WACZA,EAAA,SAAW,UACXA,EAAA,aAAe,cACfA,EAAA,WAAa,YACbA,EAAA,QAAU,SACVA,EAAA,QAAU,SACVA,EAAA,iBAAmB,kBACnBA,EAAA,WAAa,YACbA,EAAA,OAAS,QACTA,EAAA,WAAa,YACbA,EAAA,WAAa,YACbA,EAAA,YAAc,aACdA,EAAA,QAAU,SACVA,EAAA,aAAe,cACfA,EAAA,OAAS,QACTA,EAAA,aAAe,cACfA,EAAA,OAAS,QACTA,EAAA,SAAW,UACXA,EAAA,cAAgB,eAChBA,EAAA,WAAa,YACbA,EAAA,UAAY,WACZA,EAAA,cAAgB,eAChBA,EAAA,WAAa,YACbA,EAAA,cAAgB,eAChBA,EAAA,cAAgB,eAChBA,EAAA,iBAAmB,kBACnBA,EAAA,cAAgB,eAChBA,EAAA,uBAAyB,wBACzBA,EAAA,6BAA+B,8BAC/BA,EAAA,mBAAqB,oBACrBA,EAAA,cAAgB,eAChBA,EAAA,qBAAuB,sBACvBA,EAAA,iBAAmB,kBACnBA,EAAA,gBAAkB,iBAlCRA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -0,0 +1,69 @@
1
+ import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
+ import { memo as h, useCallback as _, useEffect as p } from "react";
3
+ import { useMonthlyReportGet as g } from "./api/use-monthly-report-get.js";
4
+ import y from "../../ui/loader/app-loader/app-loader.js";
5
+ import v from "../../ui/error/error.js";
6
+ import { MonthlyReportContainer as x } from "./monthly-report-styled.js";
7
+ import R from "./comps/goals/goals.js";
8
+ import A from "./comps/activities/activities.js";
9
+ import c from "../../ui/layout/flex-view.js";
10
+ import C from "./comps/attendance/attendance.js";
11
+ import $ from "./comps/feedback/feedback.js";
12
+ import j from "./comps/achievements/achievements.js";
13
+ import { IS_APP_RUNNING_IN_RN as D } from "../../../constants/app-config.js";
14
+ import I from "../../ui/separator/separator.js";
15
+ const M = ({
16
+ studentName: s,
17
+ reportId: o,
18
+ onPuzzleClick: f,
19
+ showSnackbar: n,
20
+ onFeedback: l
21
+ }) => {
22
+ const {
23
+ get: a,
24
+ data: e,
25
+ isProcessing: i,
26
+ isProcessingFailed: d,
27
+ isStale: m
28
+ } = g(), r = _(() => {
29
+ a(o);
30
+ }, [a, o]);
31
+ return p(() => {
32
+ r();
33
+ }, [r]), p(() => {
34
+ m && !i && r();
35
+ }, [m, i, r]), i || !e ? /* @__PURE__ */ t(c, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(y, { height: "100dvh" }) }) : d ? /* @__PURE__ */ t(c, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(v, { onTryAgain: r }) }) : e ? /* @__PURE__ */ u(x, { children: [
36
+ /* @__PURE__ */ t(R, { milestones: e.progress_data.user_milestones, isExpended: !0 }),
37
+ /* @__PURE__ */ t(A, { activities: e.progress_data.activities, onPuzzleClick: f }),
38
+ /* @__PURE__ */ t(
39
+ j,
40
+ {
41
+ achievements: e.progress_data.user_achievements,
42
+ studentName: s
43
+ }
44
+ ),
45
+ /* @__PURE__ */ t(
46
+ C,
47
+ {
48
+ calendarData: e.calendar_data,
49
+ reportMonth: e.report_month,
50
+ reportYear: e.report_year,
51
+ onDateClick: n
52
+ }
53
+ ),
54
+ D && !e.feedback && e.student_course_ids[0] ? /* @__PURE__ */ t(
55
+ $,
56
+ {
57
+ reportId: o,
58
+ studentName: s,
59
+ onFeedback: l,
60
+ studentCourseId: e.student_course_ids[0],
61
+ showSnackbar: n
62
+ }
63
+ ) : /* @__PURE__ */ t(I, { heightX: 1 })
64
+ ] }) : null;
65
+ }, q = h(M);
66
+ export {
67
+ q as default
68
+ };
69
+ //# sourceMappingURL=monthly-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthly-report.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { type IMonthlyReportProps } from './monthly-report-types';\nimport { useMonthlyReportGet } from './api/use-monthly-report-get';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Error from '../../ui/error/error';\nimport * as Styled from './monthly-report-styled';\nimport Goals from './comps/goals/goals';\nimport Activities from './comps/activities/activities';\nimport FlexView from '../../ui/layout/flex-view';\nimport Attendance from './comps/attendance/attendance';\nimport Feedback from './comps/feedback/feedback';\nimport Achievements from './comps/achievements/achievements';\nimport { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\nimport Separator from '../../ui/separator/separator';\n\nconst MonthlyReport: FC<IMonthlyReportProps> = ({\n studentName,\n reportId,\n onPuzzleClick,\n showSnackbar,\n onFeedback,\n}) => {\n const {\n get: getReport,\n data: reportData,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useMonthlyReportGet();\n\n const fetchData = useCallback(() => {\n getReport(reportId);\n }, [getReport, reportId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n if (isStale && !isProcessing) {\n fetchData();\n }\n }, [isStale, isProcessing, fetchData]);\n\n if (isProcessing || !reportData) {\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <AppLoader height=\"100dvh\" />\n </FlexView>\n );\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <Error onTryAgain={fetchData} />\n </FlexView>\n );\n }\n\n if (!reportData) {\n return null;\n }\n\n return (\n <Styled.MonthlyReportContainer>\n <Goals milestones={reportData.progress_data.user_milestones} isExpended={true} />\n <Activities activities={reportData.progress_data.activities} onPuzzleClick={onPuzzleClick} />\n <Achievements\n achievements={reportData.progress_data.user_achievements}\n studentName={studentName}\n />\n <Attendance\n calendarData={reportData.calendar_data}\n reportMonth={reportData.report_month}\n reportYear={reportData.report_year}\n onDateClick={showSnackbar}\n />\n {IS_APP_RUNNING_IN_RN && !reportData.feedback && reportData.student_course_ids[0] ? (\n <Feedback\n reportId={reportId}\n studentName={studentName}\n onFeedback={onFeedback}\n studentCourseId={reportData.student_course_ids[0]}\n showSnackbar={showSnackbar}\n />\n ) : (\n <Separator heightX={1} />\n )}\n </Styled.MonthlyReportContainer>\n );\n};\n\nexport default memo(MonthlyReport);\n"],"names":["MonthlyReport","studentName","reportId","onPuzzleClick","showSnackbar","onFeedback","getReport","reportData","isProcessing","isProcessingFailed","isStale","useMonthlyReportGet","fetchData","useCallback","useEffect","jsx","FlexView","AppLoader","Error","jsxs","Styled.MonthlyReportContainer","Goals","Activities","Achievements","Attendance","IS_APP_RUNNING_IN_RN","Feedback","Separator","monthlyReport","memo"],"mappings":";;;;;;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AAAA,QACxB,YAAYA,EAAW;AAAA,QACvB,aAAaH;AAAA,MAAA;AAAA,IACf;AAAA,IACCqB,KAAwB,CAAClB,EAAW,YAAYA,EAAW,mBAAmB,CAAC,IAC9E,gBAAAQ;AAAA,MAACW;AAAA,MAAA;AAAA,QACC,UAAAxB;AAAA,QACA,aAAAD;AAAA,QACA,YAAAI;AAAA,QACA,iBAAiBE,EAAW,mBAAmB,CAAC;AAAA,QAChD,cAAAH;AAAA,MAAA;AAAA,IAGF,IAAA,gBAAAW,EAACY,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EAE3B,EAAA,CAAA,IA5BO;AA8BX,GAEeC,IAAAC,EAAK7B,CAAa;"}
@@ -0,0 +1,10 @@
1
+ import { createGetAPI as t } from "@cuemath/rest-api";
2
+ import { BASE_URL_V1 as o } from "../../../../constants/api.js";
3
+ import { stringify as i } from "../../../../helpers/query-string.js";
4
+ const { useGet: p } = t({
5
+ getURL: (e, r) => `${o}/users/${e}/reports/?${i(r)}`
6
+ });
7
+ export {
8
+ p as useMonthlyTimelineGet
9
+ };
10
+ //# sourceMappingURL=use-monthly-timeline-get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-monthly-timeline-get.js","sources":["../../../../../src/features/timeline/monthly-timeline/api/use-monthly-timeline-get.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../../constants/api';\nimport { type IMonthlyTimeline } from '../monthly-timeline-types';\nimport { stringify } from '../../../../helpers/query-string';\n\ninterface MonthlyTimelineParams {\n course_streams?: string[];\n timezone?: string;\n}\n\nconst { useGet: useMonthlyTimelineGet } = createGetAPI<IMonthlyTimeline[], MonthlyTimelineParams>({\n getURL: (studentId, params: MonthlyTimelineParams) => {\n return `${BASE_URL_V1}/users/${studentId}/reports/?${stringify(params)}`;\n },\n});\n\nexport { useMonthlyTimelineGet };\n"],"names":["useMonthlyTimelineGet","createGetAPI","studentId","params","BASE_URL_V1","stringify"],"mappings":";;;AAWA,MAAM,EAAE,QAAQA,EAAsB,IAAIC,EAAwD;AAAA,EAChG,QAAQ,CAACC,GAAWC,MACX,GAAGC,CAAW,UAAUF,CAAS,aAAaG,EAAUF,CAAM,CAAC;AAE1E,CAAC;"}