@cuemath/leap 3.5.31-as1 → 3.5.31-as2

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 (225) hide show
  1. package/dist/assets/illustrations/illustrations.js +3 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/features/analytics-events/whitelist-events.js +10 -8
  4. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  5. package/dist/features/timeline/{api → daily-timeline/api}/use-daily-timeline-get.js +2 -2
  6. package/dist/features/timeline/daily-timeline/api/use-daily-timeline-get.js.map +1 -0
  7. package/dist/features/timeline/{comps → daily-timeline/comps}/accordion-item/accordion-item.js +6 -6
  8. package/dist/features/timeline/daily-timeline/comps/accordion-item/accordion-item.js.map +1 -0
  9. package/dist/features/timeline/{comps → daily-timeline/comps}/constants.js +2 -2
  10. package/dist/features/timeline/daily-timeline/comps/constants.js.map +1 -0
  11. package/dist/features/timeline/{comps → daily-timeline/comps}/daily-timeline-items/daily-timeline-items-styled.js +1 -1
  12. package/dist/features/timeline/daily-timeline/comps/daily-timeline-items/daily-timeline-items-styled.js.map +1 -0
  13. package/dist/features/timeline/{comps → daily-timeline/comps}/daily-timeline-items/daily-timeline-items.js +7 -7
  14. package/dist/features/timeline/daily-timeline/comps/daily-timeline-items/daily-timeline-items.js.map +1 -0
  15. package/dist/features/timeline/{comps → daily-timeline/comps}/month-break/month-break-styled.js +1 -1
  16. package/dist/features/timeline/daily-timeline/comps/month-break/month-break-styled.js.map +1 -0
  17. package/dist/features/timeline/daily-timeline/comps/month-break/month-break.js.map +1 -0
  18. package/dist/features/timeline/{comps → daily-timeline/comps}/no-activity.js +4 -4
  19. package/dist/features/timeline/daily-timeline/comps/no-activity.js.map +1 -0
  20. package/dist/features/timeline/{comps → daily-timeline/comps}/utils.js +5 -5
  21. package/dist/features/timeline/daily-timeline/comps/utils.js.map +1 -0
  22. package/dist/features/timeline/{comps → daily-timeline/comps}/year-break/year-break-styled.js +1 -1
  23. package/dist/features/timeline/daily-timeline/comps/year-break/year-break-styled.js.map +1 -0
  24. package/dist/features/timeline/{comps → daily-timeline/comps}/year-break/year-break.js +2 -2
  25. package/dist/features/timeline/daily-timeline/comps/year-break/year-break.js.map +1 -0
  26. package/dist/features/timeline/{daily-timeline-events.js → daily-timeline/daily-timeline-events.js} +1 -1
  27. package/dist/features/timeline/daily-timeline/daily-timeline-events.js.map +1 -0
  28. package/dist/features/timeline/{daily-timeline-styled.js → daily-timeline/daily-timeline-styled.js} +2 -2
  29. package/dist/features/timeline/daily-timeline/daily-timeline-styled.js.map +1 -0
  30. package/dist/features/timeline/daily-timeline/daily-timeline-types.js.map +1 -0
  31. package/dist/features/timeline/{daily-timeline-view.js → daily-timeline/daily-timeline-view.js} +18 -18
  32. package/dist/features/timeline/daily-timeline/daily-timeline-view.js.map +1 -0
  33. package/dist/features/timeline/{daily-timeline.js → daily-timeline/daily-timeline.js} +23 -23
  34. package/dist/features/timeline/daily-timeline/daily-timeline.js.map +1 -0
  35. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +1 -1
  36. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -1
  37. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/api/use-monthly-report-get.js +1 -1
  38. package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-get.js.map +1 -0
  39. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/achievements/achievements.js +5 -5
  40. package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.js.map +1 -0
  41. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/achievements/achievements.styled.js +2 -2
  42. package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.styled.js.map +1 -0
  43. package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/constant.js.map +1 -0
  44. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/activities/activities-card/activities-card.js +32 -32
  45. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -0
  46. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/activities/activities-card/activities-card.styled.js +1 -1
  47. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +1 -0
  48. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/activities/activities-card-puzzles/activities-card-puzzles.js +43 -40
  49. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -0
  50. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +3 -3
  51. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +1 -0
  52. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js +27 -0
  53. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js.map +1 -0
  54. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/activities/constants.js +17 -17
  55. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/constants.js.map +1 -0
  56. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/activities/utils.js +1 -1
  57. package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js.map +1 -0
  58. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-constants.js.map +1 -0
  59. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-utils.js +123 -0
  60. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-utils.js.map +1 -0
  61. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.js +49 -0
  62. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.js.map +1 -0
  63. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.styled.js +48 -0
  64. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.styled.js.map +1 -0
  65. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendence-view.js +56 -0
  66. package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendence-view.js.map +1 -0
  67. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/feedback/feedback-styled.js +1 -1
  68. package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback-styled.js.map +1 -0
  69. package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js +100 -0
  70. package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js.map +1 -0
  71. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/goals/goals-card/goal-chapter-card.js +3 -3
  72. package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +1 -0
  73. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/goals/goals-card/goals-card-styled.js +1 -1
  74. package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +1 -0
  75. package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card.js +118 -0
  76. package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +1 -0
  77. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/goals/goals-constants.js +2 -2
  78. package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-constants.js.map +1 -0
  79. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/goals/goals.js +3 -3
  80. package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals.js.map +1 -0
  81. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-events.js +11 -0
  82. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-events.js.map +1 -0
  83. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/monthly-report-styled.js +1 -1
  84. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-styled.js.map +1 -0
  85. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -0
  86. package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/monthly-report.js +5 -5
  87. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js.map +1 -0
  88. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/api/use-ptm-report-get.js +1 -1
  89. package/dist/features/timeline/monthly-timeline/ptm-report/api/use-ptm-report-get.js.map +1 -0
  90. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/key-need/key-need-styled.js +1 -1
  91. package/dist/features/timeline/monthly-timeline/ptm-report/comps/key-need/key-need-styled.js.map +1 -0
  92. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/key-need/key-need.js +5 -5
  93. package/dist/features/timeline/monthly-timeline/ptm-report/comps/key-need/key-need.js.map +1 -0
  94. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/parent-support/parent-support.js +3 -3
  95. package/dist/features/timeline/monthly-timeline/ptm-report/comps/parent-support/parent-support.js.map +1 -0
  96. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/real-world-projects/real-world-projects-styled.js +1 -1
  97. package/dist/features/timeline/monthly-timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +1 -0
  98. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/real-world-projects/real-world-projects.js +3 -3
  99. package/dist/features/timeline/monthly-timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +1 -0
  100. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/report-card/report-card-styled.js +1 -1
  101. package/dist/features/timeline/monthly-timeline/ptm-report/comps/report-card/report-card-styled.js.map +1 -0
  102. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/report-card/report-card.js +4 -4
  103. package/dist/features/timeline/monthly-timeline/ptm-report/comps/report-card/report-card.js.map +1 -0
  104. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/school-support/school-support-styled.js +1 -1
  105. package/dist/features/timeline/monthly-timeline/ptm-report/comps/school-support/school-support-styled.js.map +1 -0
  106. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/school-support/school-support.js +3 -3
  107. package/dist/features/timeline/monthly-timeline/ptm-report/comps/school-support/school-support.js.map +1 -0
  108. package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategies/strategies-constant.js.map +1 -0
  109. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/strategies/strategies.js +3 -3
  110. package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategies/strategies.js.map +1 -0
  111. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/strategy-card/strategy-card-styled.js +1 -1
  112. package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +1 -0
  113. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/strategy-card/strategy-card.js +3 -3
  114. package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategy-card/strategy-card.js.map +1 -0
  115. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/student-info/student-info-styled.js +2 -2
  116. package/dist/features/timeline/monthly-timeline/ptm-report/comps/student-info/student-info-styled.js.map +1 -0
  117. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/student-info/student-info.js +5 -5
  118. package/dist/features/timeline/monthly-timeline/ptm-report/comps/student-info/student-info.js.map +1 -0
  119. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/support-card/support-card-styled.js +1 -1
  120. package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card-styled.js.map +1 -0
  121. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/support-card/support-card.js +3 -3
  122. package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card.js.map +1 -0
  123. package/dist/features/timeline/monthly-timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +1 -0
  124. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/teacher-observations/teacher-observations.js +3 -3
  125. package/dist/features/timeline/monthly-timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +1 -0
  126. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/upcoming-chapters/upcoming-chapters.js +3 -3
  127. package/dist/features/timeline/monthly-timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +1 -0
  128. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/ptm-report-constants.js +1 -1
  129. package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-constants.js.map +1 -0
  130. package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-helpers.js.map +1 -0
  131. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/ptm-report-styled.js +1 -1
  132. package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-styled.js.map +1 -0
  133. package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-types.js.map +1 -0
  134. package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/ptm-report.js +3 -3
  135. package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report.js.map +1 -0
  136. package/dist/index.d.ts +3 -0
  137. package/dist/index.js +4 -4
  138. package/dist/static/node-learn-large-bg.faa03631.svg +1 -0
  139. package/dist/static/node-puzzle-large-bg.ba23382e.svg +1 -0
  140. package/dist/static/node-test-large-bg.e9120fd1.svg +1 -0
  141. package/package.json +1 -1
  142. package/dist/features/timeline/api/use-daily-timeline-get.js.map +0 -1
  143. package/dist/features/timeline/comps/accordion-item/accordion-item.js.map +0 -1
  144. package/dist/features/timeline/comps/constants.js.map +0 -1
  145. package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items-styled.js.map +0 -1
  146. package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js.map +0 -1
  147. package/dist/features/timeline/comps/month-break/month-break-styled.js.map +0 -1
  148. package/dist/features/timeline/comps/month-break/month-break.js.map +0 -1
  149. package/dist/features/timeline/comps/no-activity.js.map +0 -1
  150. package/dist/features/timeline/comps/utils.js.map +0 -1
  151. package/dist/features/timeline/comps/year-break/year-break-styled.js.map +0 -1
  152. package/dist/features/timeline/comps/year-break/year-break.js.map +0 -1
  153. package/dist/features/timeline/daily-timeline-events.js.map +0 -1
  154. package/dist/features/timeline/daily-timeline-styled.js.map +0 -1
  155. package/dist/features/timeline/daily-timeline-types.js.map +0 -1
  156. package/dist/features/timeline/daily-timeline-view.js.map +0 -1
  157. package/dist/features/timeline/daily-timeline.js.map +0 -1
  158. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js.map +0 -1
  159. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js.map +0 -1
  160. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js.map +0 -1
  161. package/dist/features/timeline/monthly-report/comps/achievements/constant.js.map +0 -1
  162. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +0 -1
  163. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +0 -1
  164. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +0 -1
  165. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +0 -1
  166. package/dist/features/timeline/monthly-report/comps/activities/activities.js +0 -27
  167. package/dist/features/timeline/monthly-report/comps/activities/activities.js.map +0 -1
  168. package/dist/features/timeline/monthly-report/comps/activities/constants.js.map +0 -1
  169. package/dist/features/timeline/monthly-report/comps/activities/utils.js.map +0 -1
  170. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js.map +0 -1
  171. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js +0 -107
  172. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js.map +0 -1
  173. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js +0 -44
  174. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js.map +0 -1
  175. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js +0 -39
  176. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js.map +0 -1
  177. package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js +0 -52
  178. package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js.map +0 -1
  179. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js.map +0 -1
  180. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js +0 -94
  181. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js.map +0 -1
  182. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +0 -1
  183. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +0 -1
  184. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js +0 -113
  185. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +0 -1
  186. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js.map +0 -1
  187. package/dist/features/timeline/monthly-report/comps/goals/goals.js.map +0 -1
  188. package/dist/features/timeline/monthly-report/monthly-report-styled.js.map +0 -1
  189. package/dist/features/timeline/monthly-report/monthly-report-types.js.map +0 -1
  190. package/dist/features/timeline/monthly-report/monthly-report.js.map +0 -1
  191. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js.map +0 -1
  192. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js.map +0 -1
  193. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js.map +0 -1
  194. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js.map +0 -1
  195. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +0 -1
  196. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +0 -1
  197. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js.map +0 -1
  198. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js.map +0 -1
  199. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js.map +0 -1
  200. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js.map +0 -1
  201. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js.map +0 -1
  202. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js.map +0 -1
  203. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +0 -1
  204. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js.map +0 -1
  205. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js.map +0 -1
  206. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js.map +0 -1
  207. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js.map +0 -1
  208. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js.map +0 -1
  209. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +0 -1
  210. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +0 -1
  211. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +0 -1
  212. package/dist/features/timeline/ptm-report/ptm-report-constants.js.map +0 -1
  213. package/dist/features/timeline/ptm-report/ptm-report-helpers.js.map +0 -1
  214. package/dist/features/timeline/ptm-report/ptm-report-styled.js.map +0 -1
  215. package/dist/features/timeline/ptm-report/ptm-report-types.js.map +0 -1
  216. package/dist/features/timeline/ptm-report/ptm-report.js.map +0 -1
  217. /package/dist/features/timeline/{comps → daily-timeline/comps}/month-break/month-break.js +0 -0
  218. /package/dist/features/timeline/{daily-timeline-types.js → daily-timeline/daily-timeline-types.js} +0 -0
  219. /package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/achievements/constant.js +0 -0
  220. /package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/comps/attendance/attendance-constants.js +0 -0
  221. /package/dist/features/timeline/{monthly-report → monthly-timeline/monthly-report}/monthly-report-types.js +0 -0
  222. /package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/strategies/strategies-constant.js +0 -0
  223. /package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/comps/teacher-observations/teacher-observations-constant.js +0 -0
  224. /package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/ptm-report-helpers.js +0 -0
  225. /package/dist/features/timeline/{ptm-report → monthly-timeline/ptm-report}/ptm-report-types.js +0 -0
@@ -0,0 +1,27 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { memo as d } from "react";
3
+ import h from "./activities-card/activities-card.js";
4
+ import l from "../../../../../ui/layout/flex-view.js";
5
+ import u from "../../../../../ui/text/text.js";
6
+ import x from "../../../../../ui/separator/separator.js";
7
+ const A = ({ activities: o, onPuzzleClick: p }) => !o || Object.keys(o).length === 0 ? null : /* @__PURE__ */ t(l, { children: [
8
+ /* @__PURE__ */ e(u, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Activities" }),
9
+ /* @__PURE__ */ e(x, { heightX: 1 }),
10
+ /* @__PURE__ */ e(l, { $flexRowGapX: 1.5, children: Object.entries(o).map(([n, r], f) => {
11
+ var m;
12
+ return r != null && r.length ? /* @__PURE__ */ e(
13
+ h,
14
+ {
15
+ nodeType: (m = r[0]) == null ? void 0 : m.node_type,
16
+ cardType: n,
17
+ activitiesList: r,
18
+ onPuzzleClick: p
19
+ },
20
+ `${n}-${f}`
21
+ ) : null;
22
+ }) })
23
+ ] }), y = d(A);
24
+ export {
25
+ y as default
26
+ };
27
+ //# sourceMappingURL=activities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { type IActivitiesProps } from './activities-types';\nimport { type TNodeTypes } from '../../../../../chapters-v2/comps/node-card/node-card-types';\nimport ActivitiesCard from './activities-card/activities-card';\nimport { type CARD_TYPE } from '../../monthly-report-types';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport Separator from '../../../../../ui/separator/separator';\n\nconst Activities: FC<IActivitiesProps> = ({ activities, onPuzzleClick }) => {\n if (!activities || Object.keys(activities).length === 0) return null;\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Activities\n </Text>\n <Separator heightX={1} />\n <FlexView $flexRowGapX={1.5}>\n {Object.entries(activities).map(([cardType, activitiesList], index) => {\n if (!activitiesList?.length) return null;\n\n return (\n <ActivitiesCard\n key={`${cardType}-${index}`}\n nodeType={activitiesList[0]?.node_type as TNodeTypes}\n cardType={cardType as CARD_TYPE}\n activitiesList={activitiesList}\n onPuzzleClick={onPuzzleClick}\n />\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(Activities);\n"],"names":["Activities","activities","onPuzzleClick","FlexView","jsx","Text","Separator","cardType","activitiesList","index","ActivitiesCard","_a","Activities$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAAmC,CAAC,EAAE,YAAAC,GAAY,eAAAC,QAClD,CAACD,KAAc,OAAO,KAAKA,CAAU,EAAE,WAAW,IAAU,yBAG7DE,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,cAAA;AAAA,EACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EACtB,gBAAAF,EAAAD,GAAA,EAAS,cAAc,KACrB,iBAAO,QAAQF,CAAU,EAAE,IAAI,CAAC,CAACM,GAAUC,CAAc,GAAGC,MAAU;;AACjE,WAACD,KAAA,QAAAA,EAAgB,SAGnB,gBAAAJ;AAAA,MAACM;AAAA,MAAA;AAAA,QAEC,WAAUC,IAAAH,EAAe,CAAC,MAAhB,gBAAAG,EAAmB;AAAA,QAC7B,UAAAJ;AAAA,QACA,gBAAAC;AAAA,QACA,eAAAN;AAAA,MAAA;AAAA,MAJK,GAAGK,CAAQ,IAAIE,CAAK;AAAA,IAAA,IAJO;AAAA,EAWrC,CAAA,GACH;AACF,EAAA,CAAA,GAIWG,IAAAC,EAAKb,CAAU;"}
@@ -1,18 +1,18 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { LOTTIE as r } from "../../../../../assets/lottie/lottie.js";
3
- import e from "../../../../../assets/line-icons/icons/check2.js";
4
- import T from "../../../../../assets/line-icons/icons/status.js";
5
- import a from "../../../../../assets/line-icons/icons/exclamation.js";
6
- import { NODE_STATE as c } from "../../../daily-timeline-types.js";
7
- import { ILLUSTRATIONS as E } from "../../../../../assets/illustrations/illustrations.js";
2
+ import { LOTTIE as r } from "../../../../../../assets/lottie/lottie.js";
3
+ import e from "../../../../../../assets/line-icons/icons/check2.js";
4
+ import T from "../../../../../../assets/line-icons/icons/status.js";
5
+ import _ from "../../../../../../assets/line-icons/icons/exclamation.js";
6
+ import { NODE_STATE as c } from "../../../../daily-timeline/daily-timeline-types.js";
7
+ import { ILLUSTRATIONS as E } from "../../../../../../assets/illustrations/illustrations.js";
8
8
  import { CARD_TYPE as o } from "../../monthly-report-types.js";
9
- function R(_) {
10
- switch (_) {
9
+ function N(a) {
10
+ switch (a) {
11
11
  case o.learn:
12
12
  return {
13
13
  lottie: r.LEARN,
14
14
  color: "YELLOW_2",
15
- background: E.NODE_LEARN_BG
15
+ background: E.NODE_LEARN_LARGE_BG
16
16
  };
17
17
  case o.practice:
18
18
  case o.smart_practice:
@@ -26,14 +26,14 @@ function R(_) {
26
26
  return {
27
27
  lottie: r.PUZZLE,
28
28
  color: "PURPLE_2",
29
- background: E.NODE_PUZZLE_BG
29
+ background: E.NODE_PUZZLE_LARGE_BG
30
30
  };
31
31
  case o.test:
32
32
  case o.diagnostic:
33
33
  return {
34
34
  lottie: r.TEST,
35
35
  color: "ORANGE_2",
36
- background: E.NODE_CUSTOM_TEST_BG
36
+ background: E.NODE_TEST_LARGE_BG
37
37
  };
38
38
  case o.challenge:
39
39
  return {
@@ -45,7 +45,7 @@ function R(_) {
45
45
  return {
46
46
  lottie: r.TEST,
47
47
  color: "GREEN_2",
48
- background: E.NODE_TEST_PREP_BG
48
+ background: E.NODE_TEST_LARGE_BG
49
49
  };
50
50
  case o.subjective:
51
51
  return {
@@ -82,15 +82,15 @@ function R(_) {
82
82
  };
83
83
  }
84
84
  }
85
- const P = {
85
+ const G = {
86
86
  [c.COMPLETED]: /* @__PURE__ */ t(e, { color: "WHITE" }),
87
87
  [c.IN_PROGRESS]: /* @__PURE__ */ t(T, { color: "WHITE" }),
88
- [c.PENDING]: /* @__PURE__ */ t(a, { color: "WHITE" }),
89
- [c.NOT_STARTED]: /* @__PURE__ */ t(a, { color: "WHITE" }),
88
+ [c.PENDING]: /* @__PURE__ */ t(_, { color: "WHITE" }),
89
+ [c.NOT_STARTED]: /* @__PURE__ */ t(_, { color: "WHITE" }),
90
90
  [c.WAIT_FOR_REVIEW]: /* @__PURE__ */ t(e, { color: "WHITE" })
91
91
  };
92
92
  export {
93
- R as getCardTypeIconMap,
94
- P as stateIcon
93
+ N as getCardTypeIconMap,
94
+ G as stateIcon
95
95
  };
96
96
  //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/constants.tsx"],"sourcesContent":["import { LOTTIE } from '../../../../../../assets/lottie/lottie';\nimport Check2Icon from '../../../../../../assets/line-icons/icons/check2';\nimport StatusIcon from '../../../../../../assets/line-icons/icons/status';\nimport ExclamationIcon from '../../../../../../assets/line-icons/icons/exclamation';\nimport { NODE_STATE } from '../../../../daily-timeline/daily-timeline-types';\nimport { ILLUSTRATIONS } from '../../../../../../assets/illustrations/illustrations';\nimport { CARD_TYPE } from '../../monthly-report-types';\n\nexport function getCardTypeIconMap(cardType: CARD_TYPE) {\n switch (cardType) {\n case CARD_TYPE.learn:\n return {\n lottie: LOTTIE.LEARN,\n color: 'YELLOW_2',\n background: ILLUSTRATIONS.NODE_LEARN_LARGE_BG,\n };\n case CARD_TYPE.practice:\n case CARD_TYPE.smart_practice:\n case CARD_TYPE.sat_mock_test:\n return {\n lottie: LOTTIE.PRACTICE,\n color: 'PURPLE_2',\n background: ILLUSTRATIONS.NODE_PRACTICE_BG,\n };\n case CARD_TYPE.puzzle:\n return {\n lottie: LOTTIE.PUZZLE,\n color: 'PURPLE_2',\n background: ILLUSTRATIONS.NODE_PUZZLE_LARGE_BG,\n };\n case CARD_TYPE.test:\n case CARD_TYPE.diagnostic:\n return {\n lottie: LOTTIE.TEST,\n color: 'ORANGE_2',\n background: ILLUSTRATIONS.NODE_TEST_LARGE_BG,\n };\n case CARD_TYPE.challenge:\n return {\n lottie: LOTTIE.COMPETITIVE_ARENA,\n color: 'ORANGE_2',\n background: ILLUSTRATIONS.NODE_TEST_PREP_BG,\n };\n case CARD_TYPE.advanced:\n return {\n lottie: LOTTIE.TEST,\n color: 'GREEN_2',\n background: ILLUSTRATIONS.NODE_TEST_LARGE_BG,\n };\n case CARD_TYPE.subjective:\n return {\n lottie: LOTTIE.SUBJECTIVE,\n color: 'BLUE_2',\n background: ILLUSTRATIONS.NODE_SUBJECTIVE_BG,\n };\n case CARD_TYPE.recap:\n case CARD_TYPE.remedial:\n case CARD_TYPE.revision:\n return {\n lottie: LOTTIE.RECAP,\n color: 'BLUE_2',\n background: ILLUSTRATIONS.NODE_RECAP_BG,\n };\n\n case CARD_TYPE.activity:\n case CARD_TYPE.wb_activity:\n return {\n lottie: LOTTIE.ACTIVITY,\n color: 'ORANGE_2',\n background: ILLUSTRATIONS.NODE_ACTIVITY_BG,\n };\n\n case CARD_TYPE.video:\n return {\n lottie: LOTTIE.VIDEO,\n color: 'GREEN_2',\n background: ILLUSTRATIONS.NODE_VIDEO_BG,\n };\n\n default:\n return {\n lottie: LOTTIE.PROJECT,\n color: 'GREEN_2',\n background: ILLUSTRATIONS.NODE_PROJECT_BG,\n };\n }\n}\n\nexport const stateIcon = {\n [NODE_STATE.COMPLETED]: <Check2Icon color=\"WHITE\" />,\n [NODE_STATE.IN_PROGRESS]: <StatusIcon color=\"WHITE\" />,\n [NODE_STATE.PENDING]: <ExclamationIcon color=\"WHITE\" />,\n [NODE_STATE.NOT_STARTED]: <ExclamationIcon color=\"WHITE\" />,\n [NODE_STATE.WAIT_FOR_REVIEW]: <Check2Icon color=\"WHITE\" />,\n};\n"],"names":["getCardTypeIconMap","cardType","CARD_TYPE","LOTTIE","ILLUSTRATIONS","stateIcon","NODE_STATE","jsx","Check2Icon","StatusIcon","ExclamationIcon"],"mappings":";;;;;;;;AAQO,SAASA,EAAmBC,GAAqB;AACtD,UAAQA,GAAU;AAAA,IAChB,KAAKC,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AAAA,IACf,KAAKA,EAAU;AAAA,IACf,KAAKA,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AAAA,IACf,KAAKA,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAE9B,KAAKF,EAAU;AAAA,IACf,KAAKA,EAAU;AAAA,IACf,KAAKA,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAG9B,KAAKF,EAAU;AAAA,IACf,KAAKA,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAG9B,KAAKF,EAAU;AACN,aAAA;AAAA,QACL,QAAQC,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,IAG9B;AACS,aAAA;AAAA,QACL,QAAQD,EAAO;AAAA,QACf,OAAO;AAAA,QACP,YAAYC,EAAc;AAAA,MAAA;AAAA,EAEhC;AACF;AAEO,MAAMC,IAAY;AAAA,EACvB,CAACC,EAAW,SAAS,GAAI,gBAAAC,EAAAC,GAAA,EAAW,OAAM,SAAQ;AAAA,EAClD,CAACF,EAAW,WAAW,GAAI,gBAAAC,EAAAE,GAAA,EAAW,OAAM,SAAQ;AAAA,EACpD,CAACH,EAAW,OAAO,GAAI,gBAAAC,EAAAG,GAAA,EAAgB,OAAM,SAAQ;AAAA,EACrD,CAACJ,EAAW,WAAW,GAAI,gBAAAC,EAAAG,GAAA,EAAgB,OAAM,SAAQ;AAAA,EACzD,CAACJ,EAAW,eAAe,GAAI,gBAAAC,EAAAC,GAAA,EAAW,OAAM,SAAQ;AAC1D;"}
@@ -1,4 +1,4 @@
1
- import { NODE_STATE as e } from "../../../daily-timeline-types.js";
1
+ import { NODE_STATE as e } from "../../../../daily-timeline/daily-timeline-types.js";
2
2
  const T = (n) => {
3
3
  const o = n.filter(
4
4
  (t) => t.state === e.COMPLETED || t.state === e.WAIT_FOR_REVIEW
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.ts"],"sourcesContent":["import { type IMonthlyActivity } from '../../monthly-report-types';\nimport { NODE_STATE } from '../../../../daily-timeline/daily-timeline-types';\n\nexport const countActivitiesByState = (activitiesList: IMonthlyActivity[]) => {\n const totalDone = activitiesList.filter(\n activity =>\n activity.state === NODE_STATE.COMPLETED || activity.state === NODE_STATE.WAIT_FOR_REVIEW,\n ).length;\n const totalPending = activitiesList.filter(\n activity => activity.state === NODE_STATE.IN_PROGRESS,\n ).length;\n const totalOverdue = activitiesList.filter(\n activity => activity.state === NODE_STATE.PENDING || activity.state === NODE_STATE.NOT_STARTED,\n ).length;\n\n return { totalDone, totalPending, totalOverdue };\n};\n"],"names":["countActivitiesByState","activitiesList","totalDone","activity","NODE_STATE","totalPending","totalOverdue"],"mappings":";AAGa,MAAAA,IAAyB,CAACC,MAAuC;AAC5E,QAAMC,IAAYD,EAAe;AAAA,IAC/B,OACEE,EAAS,UAAUC,EAAW,aAAaD,EAAS,UAAUC,EAAW;AAAA,EAC3E,EAAA,QACIC,IAAeJ,EAAe;AAAA,IAClC,CAAAE,MAAYA,EAAS,UAAUC,EAAW;AAAA,EAC1C,EAAA,QACIE,IAAeL,EAAe;AAAA,IAClC,OAAYE,EAAS,UAAUC,EAAW,WAAWD,EAAS,UAAUC,EAAW;AAAA,EACnF,EAAA;AAEK,SAAA,EAAE,WAAAF,GAAW,cAAAG,GAAc,cAAAC;AACpC;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-constants.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-constants.ts"],"sourcesContent":["export const ATTENDANCE_STATUS = {\n ATTENDED: 'attended',\n MISSED: 'missed',\n PAUSED: 'paused',\n} as const;\n\nexport const CALENDAR_CONFIG = {\n DAYS_PER_WEEK: 7,\n DAY_HEADERS: ['S', 'M', 'Tu', 'W', 'Th', 'F', 'S'],\n FIRST_DAY_OF_WEEK: 0, // Sunday = 0\n} as const;\n\nexport const MONTH_NAMES = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\n"],"names":["ATTENDANCE_STATUS","CALENDAR_CONFIG","MONTH_NAMES"],"mappings":"AAAO,MAAMA,IAAoB;AAAA,EAC/B,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAAkB;AAAA,EAC7B,eAAe;AAAA,EACf,aAAa,CAAC,KAAK,KAAK,MAAM,KAAK,MAAM,KAAK,GAAG;AAAA,EACjD,mBAAmB;AAAA;AACrB,GAEaC,IAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -0,0 +1,123 @@
1
+ import { jsx as d, jsxs as C } from "react/jsx-runtime";
2
+ import b from "../../../../../../assets/line-icons/icons/check2.js";
3
+ import A from "../../../../../../assets/line-icons/icons/cross.js";
4
+ import y from "../../../../../../assets/line-icons/icons/dots-icon.js";
5
+ import l from "../../../../../../assets/line-icons/icons/pause-icon.js";
6
+ import { ATTENDANCE_STATUS as m } from "./attendance-constants.js";
7
+ import { StatusSymbol as S } from "./attendance.styled.js";
8
+ import I from "../../../../../ui/theme/clrs.js";
9
+ const p = I(), P = (t, o) => {
10
+ var n;
11
+ if (!(t != null && t.length)) return "";
12
+ const e = t.map((i) => h(i.time));
13
+ return t.every(
14
+ (i) => {
15
+ var r, a;
16
+ return i.is_present === ((r = t == null ? void 0 : t[0]) == null ? void 0 : r.is_present) && i.is_paused === ((a = t == null ? void 0 : t[0]) == null ? void 0 : a.is_paused);
17
+ }
18
+ ) ? `${o} / ${e.join(" / ")}
19
+ ${((n = t == null ? void 0 : t[0]) == null ? void 0 : n.status) || ""}` : [o, ...t.map(E)].join(`
20
+ `);
21
+ }, N = (t) => t.is_present ? m.ATTENDED : t.is_paused ? m.PAUSED : m.MISSED, W = (t) => {
22
+ let o = 0, e = 0, u = 0;
23
+ Object.values(t).forEach((i) => {
24
+ i.forEach((r) => {
25
+ switch (N(r)) {
26
+ case m.ATTENDED:
27
+ o++;
28
+ break;
29
+ case m.PAUSED:
30
+ u++;
31
+ break;
32
+ default:
33
+ e++;
34
+ break;
35
+ }
36
+ });
37
+ });
38
+ const n = [];
39
+ return o > 0 && n.push(`${o} attended`), e > 0 && n.push(`${e} missed`), u > 0 && n.push(`${u} paused`), `${n.join(", ")}.`;
40
+ }, B = (t) => {
41
+ if (t.length === 0)
42
+ return {
43
+ status: null,
44
+ themeColor: null,
45
+ statusSymbol: ""
46
+ };
47
+ const o = t.every((n) => n.is_present), e = t.every((n) => n.is_paused), u = t.every((n) => !n.is_present && !n.is_paused);
48
+ return o ? {
49
+ status: m.ATTENDED,
50
+ themeColor: "GREEN_1",
51
+ statusSymbol: /* @__PURE__ */ d(b, { color: p.GREEN_6, width: 14, height: 14 }),
52
+ tooltipBgColor: "GREEN_2",
53
+ snackbarBg: p.GREEN_2
54
+ } : e ? {
55
+ status: m.PAUSED,
56
+ themeColor: "WHITE_4",
57
+ statusSymbol: /* @__PURE__ */ C(S, { $top: "2px", $right: "2px", children: [
58
+ /* @__PURE__ */ d(l, { color: p.BLACK_T_60, width: 8, height: 8 }),
59
+ ","
60
+ ] }),
61
+ tooltipBgColor: "WHITE_5",
62
+ snackbarBg: p.WHITE_5
63
+ } : u ? {
64
+ status: m.MISSED,
65
+ themeColor: "ORANGE_1",
66
+ statusSymbol: /* @__PURE__ */ d(A, { color: p.RED, width: 12, height: 12 }),
67
+ tooltipBgColor: "ORANGE_2",
68
+ snackbarBg: p.ORANGE_2
69
+ } : {
70
+ status: m.PAUSED,
71
+ themeColor: "WHITE_4",
72
+ statusSymbol: /* @__PURE__ */ d(S, { $top: "2px", $right: "2px", children: /* @__PURE__ */ d(y, { color: "GREEN_6", width: 8, height: 8 }) }),
73
+ tooltipBgColor: "WHITE_5",
74
+ snackbarBg: p.WHITE_5
75
+ };
76
+ }, U = (t, o, e) => {
77
+ const u = new Date(e, o - 1, 1).getDay(), n = new Date(e, o, 0).getDate(), i = [];
78
+ for (let r = 0; r < u; r++)
79
+ i.push(null);
80
+ for (let r = 1; r <= n; r++) {
81
+ const a = `${e}-${o.toString().padStart(2, "0")}-${r.toString().padStart(2, "0")}`, g = t[a] || [], { status: _, themeColor: f, statusSymbol: T, tooltipBgColor: $, snackbarBg: D } = B(g);
82
+ i.push({
83
+ date: r,
84
+ status: _,
85
+ hasClasses: g.length > 0,
86
+ classes: g,
87
+ themeColor: f,
88
+ statusSymbol: T,
89
+ tooltipBgColor: $,
90
+ snackbarBg: D
91
+ });
92
+ }
93
+ return i;
94
+ }, h = (t) => {
95
+ const o = new Date(t * 1e3).getHours();
96
+ return `${o % 12 || 12} ${o >= 12 ? "PM" : "AM"}`;
97
+ }, E = (t) => t.status ? `${h(t.time)}: ${t.status}` : "", O = (t, o, e) => {
98
+ var i;
99
+ if (!(t != null && t.length)) return null;
100
+ const u = t.map((r) => h(r.time));
101
+ return t.every(
102
+ (r) => {
103
+ var a, g;
104
+ return r.is_present === ((a = t == null ? void 0 : t[0]) == null ? void 0 : a.is_present) && r.is_paused === ((g = t == null ? void 0 : t[0]) == null ? void 0 : g.is_paused);
105
+ }
106
+ ) ? {
107
+ dateAndTime: `${o} ${e} / ${u.join(" / ")}`,
108
+ statusLines: [((i = t == null ? void 0 : t[0]) == null ? void 0 : i.status) || ""]
109
+ } : {
110
+ dateAndTime: `${o} ${e}`,
111
+ statusLines: t.map((r) => E(r))
112
+ };
113
+ };
114
+ export {
115
+ W as attendanceStatsText,
116
+ U as generateCalendarGrid,
117
+ N as getClassStatus,
118
+ B as getDayStatusInfo,
119
+ P as getSnackbarMsg,
120
+ E as getStatusText,
121
+ O as getTooltipContent
122
+ };
123
+ //# sourceMappingURL=attendance-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-utils.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-utils.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport Check2Icon from '../../../../../../assets/line-icons/icons/check2';\nimport CrossIcon from '../../../../../../assets/line-icons/icons/cross';\nimport DotIcon from '../../../../../../assets/line-icons/icons/dots-icon';\nimport PauseIcon from '../../../../../../assets/line-icons/icons/pause-icon';\nimport type { TColorNames } from '../../../../../ui/types';\nimport type { IClassEvent, TCalendarData } from '../../monthly-report-types';\nimport { ATTENDANCE_STATUS } from './attendance-constants';\nimport type { ICalendarDay, TAttendanceStatus } from './attendance-types';\nimport * as Styled from './attendance.styled';\nimport getColors from '../../../../../ui/theme/clrs';\n\nconst colors = getColors();\n\nexport const getSnackbarMsg = (classes: IClassEvent[] | undefined, date: string) => {\n if (!classes?.length) return '';\n\n const timings = classes.map(cls => formatTimeFromTimestamp(cls.time));\n\n const allSame = classes.every(\n cls => cls.is_present === classes?.[0]?.is_present && cls.is_paused === classes?.[0]?.is_paused,\n );\n\n if (allSame) {\n return `${date} / ${timings.join(' / ')}\\n${classes?.[0]?.status || ''}`;\n }\n\n return [date, ...classes.map(getStatusText)].join('\\n');\n};\n\nexport const getClassStatus = (classEvent: IClassEvent): TAttendanceStatus => {\n if (classEvent.is_present) {\n return ATTENDANCE_STATUS.ATTENDED;\n }\n\n if (classEvent.is_paused) {\n return ATTENDANCE_STATUS.PAUSED;\n }\n\n return ATTENDANCE_STATUS.MISSED;\n};\n\nexport const attendanceStatsText = (calendarData: TCalendarData) => {\n let attended = 0;\n let missed = 0;\n let paused = 0;\n\n Object.values(calendarData).forEach(dayClasses => {\n dayClasses.forEach(classEvent => {\n const status = getClassStatus(classEvent);\n\n switch (status) {\n case ATTENDANCE_STATUS.ATTENDED:\n attended++;\n break;\n case ATTENDANCE_STATUS.PAUSED:\n paused++;\n break;\n default:\n missed++;\n break;\n }\n });\n });\n\n const parts: string[] = [];\n\n if (attended > 0) parts.push(`${attended} attended`);\n\n if (missed > 0) parts.push(`${missed} missed`);\n\n if (paused > 0) parts.push(`${paused} paused`);\n\n return `${parts.join(', ')}.`;\n};\n\nexport const getDayStatusInfo = (dayClasses: IClassEvent[]) => {\n if (dayClasses.length === 0) {\n return {\n status: null,\n themeColor: null,\n statusSymbol: '',\n };\n }\n\n const attendedClass = dayClasses.every(cls => cls.is_present);\n const pausedClass = dayClasses.every(cls => cls.is_paused);\n const missedClass = dayClasses.every(cls => !cls.is_present && !cls.is_paused);\n\n if (attendedClass) {\n return {\n status: ATTENDANCE_STATUS.ATTENDED,\n themeColor: 'GREEN_1',\n statusSymbol: <Check2Icon color={colors.GREEN_6} width={14} height={14} />,\n tooltipBgColor: 'GREEN_2',\n snackbarBg: colors.GREEN_2,\n };\n }\n\n if (pausedClass) {\n return {\n status: ATTENDANCE_STATUS.PAUSED,\n themeColor: 'WHITE_4',\n statusSymbol: (\n <Styled.StatusSymbol $top=\"2px\" $right=\"2px\">\n <PauseIcon color={colors.BLACK_T_60} width={8} height={8} />,\n </Styled.StatusSymbol>\n ),\n tooltipBgColor: 'WHITE_5',\n snackbarBg: colors.WHITE_5,\n };\n }\n\n if (missedClass) {\n return {\n status: ATTENDANCE_STATUS.MISSED,\n themeColor: 'ORANGE_1',\n statusSymbol: <CrossIcon color={colors.RED} width={12} height={12} />,\n tooltipBgColor: 'ORANGE_2',\n snackbarBg: colors.ORANGE_2,\n };\n }\n\n return {\n status: ATTENDANCE_STATUS.PAUSED,\n themeColor: 'WHITE_4',\n statusSymbol: (\n <Styled.StatusSymbol $top=\"2px\" $right=\"2px\">\n <DotIcon color=\"GREEN_6\" width={8} height={8} />\n </Styled.StatusSymbol>\n ),\n tooltipBgColor: 'WHITE_5',\n snackbarBg: colors.WHITE_5,\n };\n};\n\nexport const generateCalendarGrid = (\n calendarData: TCalendarData,\n reportMonth: number,\n reportYear: number,\n): (ICalendarDay | null)[] => {\n const firstDay = new Date(reportYear, reportMonth - 1, 1).getDay();\n const daysInMonth = new Date(reportYear, reportMonth, 0).getDate();\n const grid: (ICalendarDay | null)[] = [];\n\n // Add empty cells for days before the first day of the month\n for (let i = 0; i < firstDay; i++) {\n grid.push(null);\n }\n\n // Add all days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const dateString = `${reportYear}-${reportMonth.toString().padStart(2, '0')}-${day\n .toString()\n .padStart(2, '0')}`;\n const dayClasses = calendarData[dateString] || [];\n const { status, themeColor, statusSymbol, tooltipBgColor, snackbarBg } =\n getDayStatusInfo(dayClasses);\n\n grid.push({\n date: day,\n status,\n hasClasses: dayClasses.length > 0,\n classes: dayClasses,\n themeColor: themeColor as TColorNames | null,\n statusSymbol: statusSymbol as JSX.Element,\n tooltipBgColor: tooltipBgColor as TColorNames | null,\n snackbarBg,\n });\n }\n\n return grid;\n};\n\nconst formatTimeFromTimestamp = (timestamp: number): string => {\n const hours = new Date(timestamp * 1000).getHours();\n\n return `${hours % 12 || 12} ${hours >= 12 ? 'PM' : 'AM'}`;\n};\n\nexport const getStatusText = (classEvent: IClassEvent) => {\n if (!classEvent.status) return '';\n\n const timeStr = formatTimeFromTimestamp(classEvent.time);\n\n return `${timeStr}: ${classEvent.status}`;\n};\n\nexport const getTooltipContent = (classes: IClassEvent[], currentMonth: string, date: number) => {\n if (!classes?.length) return null;\n\n const timings = classes.map(cls => formatTimeFromTimestamp(cls.time));\n\n const allSame = classes.every(\n cls => cls.is_present === classes?.[0]?.is_present && cls.is_paused === classes?.[0]?.is_paused,\n );\n\n if (allSame) {\n return {\n dateAndTime: `${currentMonth} ${date} / ${timings.join(' / ')}`,\n statusLines: [classes?.[0]?.status || ''],\n };\n }\n\n return {\n dateAndTime: `${currentMonth} ${date}`,\n statusLines: classes.map(classEvent => getStatusText(classEvent)),\n };\n};\n"],"names":["colors","getColors","getSnackbarMsg","classes","date","timings","formatTimeFromTimestamp","cls","_a","_b","getStatusText","getClassStatus","classEvent","ATTENDANCE_STATUS","attendanceStatsText","calendarData","attended","missed","paused","dayClasses","parts","getDayStatusInfo","attendedClass","pausedClass","missedClass","Check2Icon","Styled.StatusSymbol","jsx","PauseIcon","CrossIcon","DotIcon","generateCalendarGrid","reportMonth","reportYear","firstDay","daysInMonth","grid","i","day","dateString","status","themeColor","statusSymbol","tooltipBgColor","snackbarBg","timestamp","hours","getTooltipContent","currentMonth"],"mappings":"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"}
@@ -0,0 +1,49 @@
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import { memo as C, useMemo as i } from "react";
3
+ import d from "../../../../../ui/layout/flex-view.js";
4
+ import b from "../../../../../ui/separator/separator.js";
5
+ import m from "../../../../../ui/text/text.js";
6
+ import { CALENDAR_CONFIG as _ } from "./attendance-constants.js";
7
+ import { attendanceStatsText as g, generateCalendarGrid as w } from "./attendance-utils.js";
8
+ import { CalendarHeader as R, CalendarBody as S } from "./attendance.styled.js";
9
+ import T from "./attendence-view.js";
10
+ const j = ({
11
+ calendarData: e,
12
+ reportMonth: t,
13
+ reportYear: c,
14
+ onDateClick: f
15
+ }) => {
16
+ const u = i(
17
+ () => !!e && g(e),
18
+ [e]
19
+ ), n = i(
20
+ () => !!e && w(e, t, c),
21
+ [e, t, c]
22
+ ), A = i(() => e ? Object.values(e).some((o) => o.length > 0) : !1, [e]);
23
+ return !e || Object.keys(e).length === 0 || !A || !n ? null : /* @__PURE__ */ l(d, { children: [
24
+ /* @__PURE__ */ r(m, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Attendance" }),
25
+ /* @__PURE__ */ r(m, { $renderAs: "ub2-bold", $color: "BLACK_T_60", children: u }),
26
+ /* @__PURE__ */ r(b, { heightX: 1 }),
27
+ /* @__PURE__ */ l(d, { $borderColor: "WHITE_5", children: [
28
+ /* @__PURE__ */ r(R, { children: _.DAY_HEADERS.map((o) => /* @__PURE__ */ r(m, { $align: "center", $renderAs: "ub3", $color: "BLACK_T_60", children: o }, o)) }),
29
+ /* @__PURE__ */ r(S, { children: n.map((o, s) => {
30
+ const h = s % 7 === 6, p = Math.ceil(n.length / 7), $ = Math.floor(s / 7) + 1 === p;
31
+ return /* @__PURE__ */ r(
32
+ T,
33
+ {
34
+ day: o,
35
+ reportMonth: t,
36
+ onDateClick: f,
37
+ isSunday: h,
38
+ isLastRow: $
39
+ },
40
+ o ? `day-${o.date}` : `empty-${s}`
41
+ );
42
+ }) })
43
+ ] })
44
+ ] });
45
+ }, I = C(j);
46
+ export {
47
+ I as default
48
+ };
49
+ //# sourceMappingURL=attendance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { CALENDAR_CONFIG } from './attendance-constants';\nimport type { IAttendanceProps } from './attendance-types';\nimport { attendanceStatsText, generateCalendarGrid } from './attendance-utils';\nimport * as Styled from './attendance.styled';\nimport AttendenceView from './attendence-view';\n\nconst Attendance: FC<IAttendanceProps> = ({\n calendarData,\n reportMonth,\n reportYear,\n onDateClick,\n}) => {\n const attendanceStats = useMemo(\n () => !!calendarData && attendanceStatsText(calendarData),\n [calendarData],\n );\n const calendarGrid = useMemo(\n () => !!calendarData && generateCalendarGrid(calendarData, reportMonth, reportYear),\n [calendarData, reportMonth, reportYear],\n );\n\n const hasClasses = useMemo(() => {\n if (!calendarData) return false;\n\n return Object.values(calendarData).some(dayClasses => dayClasses.length > 0);\n }, [calendarData]);\n\n if (!calendarData || Object.keys(calendarData).length === 0 || !hasClasses || !calendarGrid) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Attendance\n </Text>\n <Text $renderAs=\"ub2-bold\" $color=\"BLACK_T_60\">\n {attendanceStats}\n </Text>\n <Separator heightX={1} />\n <FlexView $borderColor=\"WHITE_5\">\n <Styled.CalendarHeader>\n {CALENDAR_CONFIG.DAY_HEADERS.map(dayLetter => (\n <Text $align=\"center\" $renderAs=\"ub3\" $color=\"BLACK_T_60\" key={dayLetter}>\n {dayLetter}\n </Text>\n ))}\n </Styled.CalendarHeader>\n <Styled.CalendarBody>\n {calendarGrid.map((day, index) => {\n const isSunday = index % 7 === 6;\n const totalRows = Math.ceil(calendarGrid.length / 7);\n const currentRow = Math.floor(index / 7) + 1;\n const isLastRow = currentRow === totalRows;\n\n return (\n <AttendenceView\n day={day}\n key={day ? `day-${day.date}` : `empty-${index}`}\n reportMonth={reportMonth}\n onDateClick={onDateClick}\n isSunday={isSunday}\n isLastRow={isLastRow}\n />\n );\n })}\n </Styled.CalendarBody>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(Attendance);\n"],"names":["Attendance","calendarData","reportMonth","reportYear","onDateClick","attendanceStats","useMemo","attendanceStatsText","calendarGrid","generateCalendarGrid","hasClasses","dayClasses","FlexView","jsx","Text","Separator","jsxs","Styled.CalendarHeader","dayLetter","Styled.CalendarBody","day","index","isSunday","totalRows","isLastRow","AttendenceView","Attendance$1","memo"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAmC,CAAC;AAAA,EACxC,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AACF,MAAM;AACJ,QAAMC,IAAkBC;AAAA,IACtB,MAAM,CAAC,CAACL,KAAgBM,EAAoBN,CAAY;AAAA,IACxD,CAACA,CAAY;AAAA,EAAA,GAETO,IAAeF;AAAA,IACnB,MAAM,CAAC,CAACL,KAAgBQ,EAAqBR,GAAcC,GAAaC,CAAU;AAAA,IAClF,CAACF,GAAcC,GAAaC,CAAU;AAAA,EAAA,GAGlCO,IAAaJ,EAAQ,MACpBL,IAEE,OAAO,OAAOA,CAAY,EAAE,KAAK,CAAcU,MAAAA,EAAW,SAAS,CAAC,IAFjD,IAGzB,CAACV,CAAY,CAAC;AAEb,SAAA,CAACA,KAAgB,OAAO,KAAKA,CAAY,EAAE,WAAW,KAAK,CAACS,KAAc,CAACF,IACtE,yBAINI,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,cAAA;AAAA,sBACCA,GAAK,EAAA,WAAU,YAAW,QAAO,cAC/B,UACHT,GAAA;AAAA,IACA,gBAAAQ,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,IACvB,gBAAAC,EAACJ,GAAS,EAAA,cAAa,WACrB,UAAA;AAAA,MAAA,gBAAAC,EAACI,GAAA,EACE,YAAgB,YAAY,IAAI,OAC9B,gBAAAJ,EAAAC,GAAA,EAAK,QAAO,UAAS,WAAU,OAAM,QAAO,cAC1C,UAD4DI,EAAA,GAAAA,CAE/D,CACD,GACH;AAAA,MACA,gBAAAL,EAACM,GAAA,EACE,YAAa,IAAI,CAACC,GAAKC,MAAU;AAC1B,cAAAC,IAAWD,IAAQ,MAAM,GACzBE,IAAY,KAAK,KAAKf,EAAa,SAAS,CAAC,GAE7CgB,IADa,KAAK,MAAMH,IAAQ,CAAC,IAAI,MACVE;AAG/B,eAAA,gBAAAV;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,KAAAL;AAAA,YAEA,aAAAlB;AAAA,YACA,aAAAE;AAAA,YACA,UAAAkB;AAAA,YACA,WAAAE;AAAA,UAAA;AAAA,UAJKJ,IAAM,OAAOA,EAAI,IAAI,KAAK,SAASC,CAAK;AAAA,QAAA;AAAA,MAOlD,CAAA,GACH;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeK,IAAAC,EAAK3B,CAAU;"}
@@ -0,0 +1,48 @@
1
+ import e from "styled-components";
2
+ import i from "../../../../../ui/layout/flex-view.js";
3
+ const l = e.div`
4
+ display: grid;
5
+ grid-template-columns: repeat(7, 1fr);
6
+ padding: 4px 0;
7
+ background-color: ${({ theme: t }) => t.colors.WHITE_2};
8
+ border-bottom: 1px solid ${({ theme: t }) => t.colors.WHITE_5};
9
+ `, n = e.div`
10
+ display: grid;
11
+ grid-template-columns: repeat(7, 1fr);
12
+ gap: 0;
13
+ `, s = e(i)(({ theme: { mediaQueries: t, colors: o }, $isSunday: r, $isLastRow: d }) => `
14
+ position: relative;
15
+ aspect-ratio: 7/6;
16
+ border-right: ${r ? "none" : `1px solid ${o.WHITE_5}`};
17
+ border-bottom: ${d ? "none" : `1px solid ${o.WHITE_5}`};
18
+
19
+ ${t.minWidthTablet} {
20
+ aspect-ratio: 3/2;
21
+ }
22
+ `), m = e(i)(({
23
+ theme: { mediaQueries: t },
24
+ $top: o,
25
+ $right: r
26
+ }) => `
27
+ position: absolute;
28
+ top: ${o || "0px"};
29
+ right: ${r || "0px"};
30
+
31
+ ${t.minWidthTablet} {
32
+ top: ${o || "2px"};
33
+ right: ${r || "2px"};
34
+ }
35
+ `), c = e.div`
36
+ > div {
37
+ width: 100%;
38
+ height: 100%;
39
+ }
40
+ `;
41
+ export {
42
+ n as CalendarBody,
43
+ s as CalendarDay,
44
+ l as CalendarHeader,
45
+ m as StatusSymbol,
46
+ c as TooltipWrapper
47
+ };
48
+ //# sourceMappingURL=attendance.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance.styled.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const CalendarHeader = styled.div`\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n padding: 4px 0;\n background-color: ${({ theme }) => theme.colors.WHITE_2};\n border-bottom: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n`;\n\nexport const CalendarBody = styled.div`\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0;\n`;\n\nexport const CalendarDay = styled(FlexView)<{\n $isSunday: boolean;\n $isLastRow: boolean;\n}>(({ theme: { mediaQueries, colors }, $isSunday, $isLastRow }) => {\n return `\n position: relative;\n aspect-ratio: 7/6;\n border-right: ${$isSunday ? 'none' : `1px solid ${colors.WHITE_5}`};\n border-bottom: ${$isLastRow ? 'none' : `1px solid ${colors.WHITE_5}`};\n\n ${mediaQueries.minWidthTablet} {\n aspect-ratio: 3/2;\n }\n`;\n});\n\nexport const StatusSymbol = styled(FlexView)<{ $top?: string; $right?: string }>(({\n theme: { mediaQueries },\n $top,\n $right,\n}) => {\n return `\n position: absolute;\n top: ${$top || '0px'};\n right: ${$right || '0px'};\n \n ${mediaQueries.minWidthTablet} {\n top: ${$top || '2px'};\n right: ${$right || '2px'};\n }\n`;\n});\n\nexport const TooltipWrapper = styled.div`\n > div {\n width: 100%;\n height: 100%;\n }\n`;\n"],"names":["CalendarHeader","styled","theme","CalendarBody","CalendarDay","FlexView","mediaQueries","colors","$isSunday","$isLastRow","StatusSymbol","$top","$right","TooltipWrapper"],"mappings":";;AAIO,MAAMA,IAAiBC,EAAO;AAAA;AAAA;AAAA;AAAA,sBAIf,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,6BAC5B,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,GAGnDC,IAAeF,EAAO;AAAA;AAAA;AAAA;AAAA,GAMtBG,IAAcH,EAAOI,CAAQ,EAGvC,CAAC,EAAE,OAAO,EAAE,cAAAC,GAAc,QAAAC,EAAA,GAAU,WAAAC,GAAW,YAAAC,QACzC;AAAA;AAAA;AAAA,oBAGWD,IAAY,SAAS,aAAaD,EAAO,OAAO,EAAE;AAAA,qBACjDE,IAAa,SAAS,aAAaF,EAAO,OAAO,EAAE;AAAA;AAAA,MAElED,EAAa,cAAc;AAAA;AAAA;AAAA,CAIhC,GAEYI,IAAeT,EAAOI,CAAQ,EAAsC,CAAC;AAAA,EAChF,OAAO,EAAE,cAAAC,EAAa;AAAA,EACtB,MAAAK;AAAA,EACA,QAAAC;AACF,MACS;AAAA;AAAA,YAEGD,KAAQ,KAAK;AAAA,aACZC,KAAU,KAAK;AAAA;AAAA,MAEtBN,EAAa,cAAc;AAAA,aACpBK,KAAQ,KAAK;AAAA,eACXC,KAAU,KAAK;AAAA;AAAA,CAG7B,GAEYC,IAAiBZ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,56 @@
1
+ import { jsx as r, jsxs as i, Fragment as h } from "react/jsx-runtime";
2
+ import { memo as u, useCallback as b } from "react";
3
+ import { IS_APP_RUNNING_IN_RN as f } from "../../../../../../constants/app-config.js";
4
+ import A from "../../../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import _ from "../../../../../ui/layout/flex-view.js";
6
+ import s from "../../../../../ui/text/text.js";
7
+ import { MONTH_NAMES as C } from "./attendance-constants.js";
8
+ import { getSnackbarMsg as T, getTooltipContent as I } from "./attendance-utils.js";
9
+ import { TooltipWrapper as S, CalendarDay as N, StatusSymbol as B } from "./attendance.styled.js";
10
+ function w({
11
+ day: e,
12
+ reportMonth: l,
13
+ onDateClick: o,
14
+ isSunday: c,
15
+ isLastRow: m
16
+ }) {
17
+ const t = C[l - 1] || "", p = b(() => {
18
+ o == null || o({
19
+ type: "info",
20
+ message: T((e == null ? void 0 : e.classes) || [], `${t} ${(e == null ? void 0 : e.date) ?? ""}`) ?? "",
21
+ bgColor: (e == null ? void 0 : e.snackbarBg) || "WHITE_5"
22
+ });
23
+ }, [t, e == null ? void 0 : e.classes, e == null ? void 0 : e.date, e == null ? void 0 : e.snackbarBg, o]), n = e != null && e.classes ? I(e.classes, t, e.date) : null;
24
+ return /* @__PURE__ */ r(S, { onClick: p, children: /* @__PURE__ */ r(
25
+ A,
26
+ {
27
+ renderAs: "primary",
28
+ position: "top",
29
+ hidden: f || !(e != null && e.hasClasses),
30
+ backgroundColor: (e == null ? void 0 : e.tooltipBgColor) || "WHITE_5",
31
+ tooltipItem: n ? /* @__PURE__ */ i(_, { children: [
32
+ /* @__PURE__ */ r(s, { $align: "center", $renderAs: "ab3", $color: "BLACK_1", children: n.dateAndTime }),
33
+ n.statusLines.map(($, g) => /* @__PURE__ */ r(s, { $align: "center", $renderAs: "ab3", $color: "BLACK_1", children: $ }, g))
34
+ ] }) : "",
35
+ children: /* @__PURE__ */ r(
36
+ N,
37
+ {
38
+ $background: (e == null ? void 0 : e.themeColor) || "WHITE_1",
39
+ $justifyContent: "center",
40
+ $alignItems: "center",
41
+ $isSunday: c,
42
+ $isLastRow: m,
43
+ children: e && /* @__PURE__ */ i(h, { children: [
44
+ /* @__PURE__ */ r(s, { $renderAs: "ab2", $color: "BLACK_T_38", children: e.date }),
45
+ /* @__PURE__ */ r(B, { children: !!e.statusSymbol && e.statusSymbol })
46
+ ] })
47
+ }
48
+ )
49
+ }
50
+ ) });
51
+ }
52
+ const R = u(w);
53
+ export {
54
+ R as default
55
+ };
56
+ //# sourceMappingURL=attendence-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendence-view.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendence-view.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../../constants/app-config';\nimport ArrowTooltip from '../../../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport { MONTH_NAMES } from './attendance-constants';\nimport { getSnackbarMsg, getTooltipContent } from './attendance-utils';\nimport * as Styled from './attendance.styled';\nimport type { ICalenderViewProps } from './attendance-types';\n\nfunction AttendanceView({\n day,\n reportMonth,\n onDateClick,\n isSunday,\n isLastRow,\n}: ICalenderViewProps) {\n const currentMonth = MONTH_NAMES[reportMonth - 1] || '';\n\n const handleClick = useCallback(() => {\n onDateClick?.({\n type: 'info',\n message: getSnackbarMsg(day?.classes || [], `${currentMonth} ${day?.date ?? ''}`) ?? '',\n bgColor: day?.snackbarBg || 'WHITE_5',\n });\n }, [currentMonth, day?.classes, day?.date, day?.snackbarBg, onDateClick]);\n\n const tooltipContent = day?.classes\n ? getTooltipContent(day.classes, currentMonth, day.date)\n : null;\n\n return (\n <Styled.TooltipWrapper onClick={handleClick}>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n hidden={IS_APP_RUNNING_IN_RN || !day?.hasClasses}\n backgroundColor={day?.tooltipBgColor || 'WHITE_5'}\n tooltipItem={\n tooltipContent ? (\n <FlexView>\n <Text $align=\"center\" $renderAs=\"ab3\" $color=\"BLACK_1\">\n {tooltipContent.dateAndTime}\n </Text>\n {tooltipContent.statusLines.map((statusLine, index) => (\n <Text $align=\"center\" $renderAs=\"ab3\" $color=\"BLACK_1\" key={index}>\n {statusLine}\n </Text>\n ))}\n </FlexView>\n ) : (\n ''\n )\n }\n >\n <Styled.CalendarDay\n $background={day?.themeColor || 'WHITE_1'}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $isSunday={isSunday}\n $isLastRow={isLastRow}\n >\n {day && (\n <>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_38\">\n {day.date}\n </Text>\n <Styled.StatusSymbol>{!!day.statusSymbol && day.statusSymbol}</Styled.StatusSymbol>\n </>\n )}\n </Styled.CalendarDay>\n </ArrowTooltip>\n </Styled.TooltipWrapper>\n );\n}\n\nexport default memo(AttendanceView);\n"],"names":["AttendanceView","day","reportMonth","onDateClick","isSunday","isLastRow","currentMonth","MONTH_NAMES","handleClick","useCallback","getSnackbarMsg","tooltipContent","getTooltipContent","jsx","Styled.TooltipWrapper","ArrowTooltip","IS_APP_RUNNING_IN_RN","jsxs","FlexView","Text","statusLine","index","Styled.CalendarDay","Fragment","Styled.StatusSymbol","AttendenceView","memo"],"mappings":";;;;;;;;;AAWA,SAASA,EAAe;AAAA,EACtB,KAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAuB;AACrB,QAAMC,IAAeC,EAAYL,IAAc,CAAC,KAAK,IAE/CM,IAAcC,EAAY,MAAM;AACtB,IAAAN,KAAA,QAAAA,EAAA;AAAA,MACZ,MAAM;AAAA,MACN,SAASO,GAAeT,KAAA,gBAAAA,EAAK,YAAW,CAAC,GAAG,GAAGK,CAAY,KAAIL,KAAA,gBAAAA,EAAK,SAAQ,EAAE,EAAE,KAAK;AAAA,MACrF,UAASA,KAAA,gBAAAA,EAAK,eAAc;AAAA,IAAA;AAAA,EAC7B,GACA,CAACK,GAAcL,KAAA,gBAAAA,EAAK,SAASA,KAAA,gBAAAA,EAAK,MAAMA,KAAA,gBAAAA,EAAK,YAAYE,CAAW,CAAC,GAElEQ,IAAiBV,KAAA,QAAAA,EAAK,UACxBW,EAAkBX,EAAI,SAASK,GAAcL,EAAI,IAAI,IACrD;AAEJ,SACG,gBAAAY,EAAAC,GAAA,EAAsB,SAASN,GAC9B,UAAA,gBAAAK;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,QAAQC,KAAwB,EAACf,KAAA,QAAAA,EAAK;AAAA,MACtC,kBAAiBA,KAAA,gBAAAA,EAAK,mBAAkB;AAAA,MACxC,aACEU,IACE,gBAAAM,EAACC,GACC,EAAA,UAAA;AAAA,QAAC,gBAAAL,EAAAM,GAAA,EAAK,QAAO,UAAS,WAAU,OAAM,QAAO,WAC1C,YAAe,YAClB,CAAA;AAAA,QACCR,EAAe,YAAY,IAAI,CAACS,GAAYC,MAC1C,gBAAAR,EAAAM,GAAA,EAAK,QAAO,UAAS,WAAU,OAAM,QAAO,WAC1C,UAAAC,EAAA,GADyDC,CAE5D,CACD;AAAA,MAAA,EAAA,CACH,IAEA;AAAA,MAIJ,UAAA,gBAAAR;AAAA,QAACS;AAAAA,QAAA;AAAA,UACC,cAAarB,KAAA,gBAAAA,EAAK,eAAc;AAAA,UAChC,iBAAgB;AAAA,UAChB,aAAY;AAAA,UACZ,WAAWG;AAAA,UACX,YAAYC;AAAA,UAEX,eAEG,gBAAAY,EAAAM,GAAA,EAAA,UAAA;AAAA,YAAA,gBAAAV,EAACM,KAAK,WAAU,OAAM,QAAO,cAC1B,YAAI,MACP;AAAA,YACA,gBAAAN,EAACW,GAAA,EAAqB,WAAC,CAACvB,EAAI,gBAAgBA,EAAI,cAAa;AAAA,UAAA,GAC/D;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;AAEA,MAAewB,IAAAC,EAAK1B,CAAc;"}
@@ -1,5 +1,5 @@
1
1
  import e from "styled-components";
2
- import o from "../../../../ui/layout/flex-view.js";
2
+ import o from "../../../../../ui/layout/flex-view.js";
3
3
  const i = e(o)`
4
4
  margin: 0 -16px;
5
5
  `;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback-styled.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const FeedbackContainer = styled(FlexView)`\n margin: 0 -16px;\n`;\n"],"names":["FeedbackContainer","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAoBC,EAAOC,CAAQ;AAAA;AAAA;"}
@@ -0,0 +1,100 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { memo as R, useCallback as l } from "react";
3
+ import c from "../../../../../ui/layout/flex-view.js";
4
+ import { ILLUSTRATIONS as g } from "../../../../../../assets/illustrations/illustrations.js";
5
+ import $ from "../../../../../ui/image/image.js";
6
+ import { invalidateMonthlyReport as k, useMonthlyReportPatch as P } from "../../api/use-monthly-report-get.js";
7
+ import f from "../../../../../ui/separator/separator.js";
8
+ import A from "../../../../../ui/text/text.js";
9
+ import C from "../../../../../ui/buttons/clickable/clickable.js";
10
+ import { FeedbackContainer as X } from "./feedback-styled.js";
11
+ import { useUIContext as w } from "../../../../../ui/context/context.js";
12
+ import { MONTHLY_REPORT_ANALYTICS_EVENTS as b } from "../../monthly-report-events.js";
13
+ const y = ({
14
+ reportId: t,
15
+ studentName: E,
16
+ onFeedback: s,
17
+ studentCourseId: h,
18
+ showSnackbar: m
19
+ }) => {
20
+ const _ = l(
21
+ (i, n) => {
22
+ i && m && m({
23
+ type: "error",
24
+ message: "Something went wrong. Please try again.",
25
+ bgColor: "red"
26
+ }), !i && s && (n != null && n.feedback) && (k(t), s(n.feedback, h));
27
+ },
28
+ [s, h]
29
+ ), { onEvent: r } = w(), { patch: d, isProcessing: p } = P({
30
+ onComplete: _
31
+ }), o = l(
32
+ (i) => {
33
+ d(t, { feedback: i });
34
+ },
35
+ [t, d]
36
+ ), u = l(() => {
37
+ r(b.REPORT_POSITIVE_FEEDBACK_CLICKED, {
38
+ report_id: t
39
+ }), o("positive");
40
+ }, [o, t, r]), T = l(() => {
41
+ r(b.REPORT_NEGATIVE_FEEDBACK_CLICKED, {
42
+ report_id: t
43
+ }), o("negative");
44
+ }, [o, t, r]);
45
+ return /* @__PURE__ */ a(X, { $gapX: 1.25, $background: "WHITE_3", children: [
46
+ /* @__PURE__ */ e(c, { $gutterX: 1, children: /* @__PURE__ */ a(A, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
47
+ "Are you happy with ",
48
+ E ?? "her",
49
+ " progress?"
50
+ ] }) }),
51
+ /* @__PURE__ */ e(f, { heightX: 1.5 }),
52
+ /* @__PURE__ */ a(c, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
53
+ /* @__PURE__ */ e(
54
+ C,
55
+ {
56
+ label: "Report thumps up",
57
+ disabled: p,
58
+ onClick: u,
59
+ children: /* @__PURE__ */ e(
60
+ c,
61
+ {
62
+ $widthX: 5,
63
+ $heightX: 5,
64
+ $alignItems: "center",
65
+ $justifyContent: "center",
66
+ $borderRadiusX: 2.5,
67
+ $borderColor: "BLACK_5",
68
+ children: /* @__PURE__ */ e($, { src: g.THUMPS_UP, alt: "UP", width: 32, height: 32 })
69
+ }
70
+ )
71
+ }
72
+ ),
73
+ /* @__PURE__ */ e(
74
+ C,
75
+ {
76
+ label: "Report thumps down",
77
+ disabled: p,
78
+ onClick: T,
79
+ children: /* @__PURE__ */ e(
80
+ c,
81
+ {
82
+ $widthX: 5,
83
+ $heightX: 5,
84
+ $alignItems: "center",
85
+ $justifyContent: "center",
86
+ $borderColor: "BLACK_5",
87
+ $borderRadiusX: 2.5,
88
+ children: /* @__PURE__ */ e($, { src: g.THUMPS_DOWN, alt: "DOWN", width: 32, height: 32 })
89
+ }
90
+ )
91
+ }
92
+ )
93
+ ] }),
94
+ /* @__PURE__ */ e(f, { heightX: 1.5 })
95
+ ] });
96
+ }, j = R(y);
97
+ export {
98
+ j as default
99
+ };
100
+ //# sourceMappingURL=feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.js","sources":["../../../../../../../src/features/timeline/monthly-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';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { MONTHLY_REPORT_ANALYTICS_EVENTS } from '../../monthly-report-events';\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 const { onEvent: trackEvent } = useUIContext();\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 trackEvent(MONTHLY_REPORT_ANALYTICS_EVENTS.REPORT_POSITIVE_FEEDBACK_CLICKED, {\n report_id: reportId,\n });\n handleFeedback('positive');\n }, [handleFeedback, reportId, trackEvent]);\n\n const handleNegativeFeedback = useCallback(() => {\n trackEvent(MONTHLY_REPORT_ANALYTICS_EVENTS.REPORT_NEGATIVE_FEEDBACK_CLICKED, {\n report_id: reportId,\n });\n handleFeedback('negative');\n }, [handleFeedback, reportId, trackEvent]);\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","trackEvent","useUIContext","updateMilestone","isProcessing","useMonthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","MONTHLY_REPORT_ANALYTICS_EVENTS","handleNegativeFeedback","Styled.FeedbackContainer","jsx","FlexView","jsxs","Text","Separator","Clickable","Image","ILLUSTRATIONS","Feedback$1","memo"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as e, jsx as n } from "react/jsx-runtime";
2
- import i from "../../../../../ui/text/text.js";
3
- import c from "../../../../../ui/layout/flex-view.js";
4
- import C from "../../../../../chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js";
2
+ import i from "../../../../../../ui/text/text.js";
3
+ 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
5
  import { calculateProgress as g } from "../goals-constants.js";
6
6
  const E = ({ chapters: t }) => !t || t.length === 0 ? null : t.map((o, u) => {
7
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;