@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 @@
1
+ {"version":3,"file":"activities-card-puzzles.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.tsx"],"sourcesContent":["import { type FC, useRef, memo, useCallback, useState, useEffect } from 'react';\n\nimport ChevronLeftIcon from '../../../../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../../../../assets/line-icons/icons/chevron-right';\nimport { type IActivitiesCardPuzzlesProps } from './activities-card-puzzles-types';\nimport { type IMonthlyActivity } from '../../../monthly-report-types';\nimport * as Styled from './activities-card-puzzles.styled';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Image from '../../../../../ui/image/image';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { NODE_STATE } from '../../../../daily-timeline-types';\nimport { stateIcon } from '../constants';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../../constants/app-config';\n\nconst ActivitiesCardPuzzles: FC<IActivitiesCardPuzzlesProps> = ({\n puzzles: newPuzzles,\n onPuzzleClick,\n}) => {\n const puzzles = newPuzzles || [];\n const scrollRef = useRef<HTMLDivElement>(null);\n const [canScrollLeft, setCanScrollLeft] = useState(false);\n const [canScrollRight, setCanScrollRight] = useState(false);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -180, behavior: 'smooth' });\n }\n }, []);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 180, behavior: 'smooth' });\n }\n }, []);\n\n const updateScrollButtons = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n setCanScrollLeft(scrollLeft > 0);\n setCanScrollRight(scrollLeft < scrollWidth - clientWidth - 10);\n }\n }, []);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n updateScrollButtons();\n\n scrollElement.addEventListener('scroll', updateScrollButtons);\n\n return () => {\n scrollElement.removeEventListener('scroll', updateScrollButtons);\n };\n }\n }, [updateScrollButtons, puzzles.length]);\n\n const renderPuzzleCard = useCallback(\n (puzzle: IMonthlyActivity) => (\n <Styled.PuzzleContainer\n key={puzzle.id}\n $gapX={1}\n $imageHue={puzzle.image_hue || 'BLUE'}\n $width={146}\n $height={162}\n $background={`${puzzle.image_hue || 'BLUE'}_2`}\n onClick={() =>\n onPuzzleClick?.({\n item_ref: puzzle.item_ref,\n feedback_comments: puzzle.feedback_comments,\n image_hue: puzzle.image_hue,\n title: puzzle.title,\n tip: puzzle.tip,\n })\n }\n >\n <Styled.StatusIcon\n $borderRadiusX={1}\n $background={\n puzzle.state === NODE_STATE.PENDING || puzzle.state === NODE_STATE.NOT_STARTED\n ? 'RED'\n : 'BLACK_1'\n }\n $widthX={1}\n $heightX={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {puzzle.state &&\n (stateIcon[puzzle.state as NODE_STATE] || stateIcon[NODE_STATE.COMPLETED])}\n </Styled.StatusIcon>\n <FlexView $background=\"TRANSPARENT\" $alignItems=\"center\">\n {puzzle.image_url && (\n <Image\n src={puzzle.image_url ?? ''}\n alt=\"Puzzle illustration\"\n width={68}\n height={68}\n withLoader={true}\n />\n )}\n <Separator heightX={1} />\n <FlexView $gutterX={0.25}>\n <Text $renderAs=\"ab3\" $align=\"center\">\n {puzzle.title}\n </Text>\n </FlexView>\n </FlexView>\n </Styled.PuzzleContainer>\n ),\n [onPuzzleClick],\n );\n\n if (!puzzles || puzzles.length === 0) return null;\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1}>\n <FlexView $position=\"relative\" $borderColor=\"GREY_2\">\n <Styled.ScrollButton\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={2}\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={!IS_APP_RUNNING_IN_RN && canScrollLeft}\n $left=\"0px\"\n $right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n <FlexView $gutterX={1} $gapX={1}>\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n {puzzles.map(renderPuzzleCard)}\n </FlexView>\n </Styled.ScrollContainer>\n </FlexView>\n\n <Styled.ScrollButton\n $position=\"absolute\"\n $widthX={2}\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={!IS_APP_RUNNING_IN_RN && canScrollRight}\n $left=\"auto\"\n $right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(ActivitiesCardPuzzles);\n"],"names":["ActivitiesCardPuzzles","newPuzzles","onPuzzleClick","puzzles","scrollRef","useRef","canScrollLeft","setCanScrollLeft","useState","canScrollRight","setCanScrollRight","handleScrollLeft","useCallback","handleScrollRight","updateScrollButtons","scrollLeft","scrollWidth","clientWidth","useEffect","scrollElement","renderPuzzleCard","puzzle","jsxs","Styled.PuzzleContainer","jsx","Styled.StatusIcon","NODE_STATE","stateIcon","FlexView","Image","Separator","Text","Styled.ContentWrapper","Styled.ScrollButton","IS_APP_RUNNING_IN_RN","ChevronLeftIcon","Styled.ScrollContainer","ChevronRightIcon","ActivitiesCardPuzzles$1","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAyD,CAAC;AAAA,EAC9D,SAASC;AAAA,EACT,eAAAC;AACF,MAAM;AACE,QAAAC,IAAUF,KAAc,IACxBG,IAAYC,EAAuB,IAAI,GACvC,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GAEpDG,IAAmBC,EAAY,MAAM;AACzC,IAAIR,EAAU,WACZA,EAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,UAAU,UAAU;AAAA,EAEjE,GAAG,CAAE,CAAA,GAECS,IAAoBD,EAAY,MAAM;AAC1C,IAAIR,EAAU,WACZA,EAAU,QAAQ,SAAS,EAAE,MAAM,KAAK,UAAU,UAAU;AAAA,EAEhE,GAAG,CAAE,CAAA,GAECU,IAAsBF,EAAY,MAAM;AAC5C,QA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,MAACS;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS;AAAA,QACT,SAAQ;AAAA,QACR,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,SAASpB;AAAA,QACT,UAAU,CAACqB,KAAwBzB;AAAA,QACnC,OAAM;AAAA,QACN,QAAO;AAAA,QAEP,UAAC,gBAAAe,EAAAa,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,MAAA;AAAA,IAC3C;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEeC,IAAAC,EAAKvC,CAAqB;"}
@@ -0,0 +1,58 @@
1
+ import t from "styled-components";
2
+ import i from "../../../../../ui/layout/flex-view.js";
3
+ import { EDeviceType as r } from "../../../../../ui/theme/constants.js";
4
+ import { getPuzzleCardPattern as n } from "../../../../../puzzles/utils/puzzle-pattern.js";
5
+ const c = t(i)`
6
+ position: relative;
7
+ min-width: 126px;
8
+ max-width: 126px;
9
+ margin-top: 6px;
10
+ border: 2px solid ${({ theme: o, $imageHue: e }) => o.colors[`${e || "BLUE"}_4`]};
11
+
12
+ &::before {
13
+ content: '';
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0;
17
+ right: 0;
18
+ bottom: 0;
19
+ background-image: ${({ $imageHue: o }) => `url(${n(o)})`};
20
+ background-size: cover;
21
+ opacity: 0.4;
22
+ }
23
+ `, d = t(i)`
24
+ width: 100%;
25
+ max-width: 512px;
26
+ position: relative;
27
+ `, m = t(i)`
28
+ position: absolute;
29
+ right: ${({ $right: o }) => o};
30
+ left: ${({ $left: o }) => o};
31
+ cursor: pointer;
32
+ transition: opacity 0.3s ease-in-out;
33
+ opacity: ${({ $visible: o }) => o ? 1 : 0};
34
+ pointer-events: ${({ $visible: o }) => o ? "auto" : "none"};
35
+ z-index: 10;
36
+ path {
37
+ fill: ${({ theme: o }) => o.colors.WHITE};
38
+ }
39
+ `, u = t(i)`
40
+ overflow-x: ${({ theme: o }) => o.device <= r.TABLET ? "scroll" : "hidden"};
41
+ overflow-y: visible;
42
+ scroll-behavior: smooth;
43
+ &::-webkit-scrollbar {
44
+ display: none;
45
+ }
46
+ `, x = t(i)`
47
+ position: absolute;
48
+ right: -8px;
49
+ top: -8px;
50
+ `;
51
+ export {
52
+ d as ContentWrapper,
53
+ c as PuzzleContainer,
54
+ m as ScrollButton,
55
+ u as ScrollContainer,
56
+ x as StatusIcon
57
+ };
58
+ //# sourceMappingURL=activities-card-puzzles.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities-card-puzzles.styled.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport { type THueNames } from '../../../../../ui/types';\nimport { EDeviceType } from '../../../../../ui/theme/constants';\nimport { getPuzzleCardPattern } from '../../../../../puzzles/utils/puzzle-pattern';\n\nexport const PuzzleContainer = styled(FlexView)<{\n $imageHue: THueNames;\n}>`\n position: relative;\n min-width: 126px;\n max-width: 126px;\n margin-top: 6px;\n border: 2px solid ${({ theme, $imageHue }) => theme.colors[`${$imageHue || 'BLUE'}_4`]};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n opacity: 0.4;\n }\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n width: 100%;\n max-width: 512px;\n position: relative;\n`;\n\nexport const ScrollButton = styled(FlexView)<{\n $visible?: boolean;\n $left: string;\n $right: string;\n}>`\n position: absolute;\n right: ${({ $right }) => $right};\n left: ${({ $left }) => $left};\n cursor: pointer;\n transition: opacity 0.3s ease-in-out;\n opacity: ${({ $visible }) => ($visible ? 1 : 0)};\n pointer-events: ${({ $visible }) => ($visible ? 'auto' : 'none')};\n z-index: 10;\n path {\n fill: ${({ theme }) => theme.colors.WHITE};\n }\n`;\n\nexport const ScrollContainer = styled(FlexView)`\n overflow-x: ${({ theme }) => (theme.device <= EDeviceType.TABLET ? 'scroll' : 'hidden')};\n overflow-y: visible;\n scroll-behavior: smooth;\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const StatusIcon = styled(FlexView)`\n position: absolute;\n right: -8px;\n top: -8px;\n`;\n"],"names":["PuzzleContainer","styled","FlexView","theme","$imageHue","getPuzzleCardPattern","ContentWrapper","ScrollButton","$right","$left","$visible","ScrollContainer","EDeviceType","StatusIcon"],"mappings":";;;;AAOa,MAAAA,IAAkBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,sBAOxB,CAAC,EAAE,OAAAC,GAAO,WAAAC,EAAU,MAAMD,EAAM,OAAO,GAAGC,KAAa,MAAM,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAShE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA;AAAA,GAMvEE,IAAiBL,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMhCK,IAAeN,EAAOC,CAAQ;AAAA;AAAA,WAMhC,CAAC,EAAE,QAAAM,EAAO,MAAMA,CAAM;AAAA,UACvB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA;AAAA;AAAA,aAGjB,CAAC,EAAE,UAAAC,EAAA,MAAgBA,IAAW,IAAI,CAAE;AAAA,oBAC7B,CAAC,EAAE,UAAAA,EAAA,MAAgBA,IAAW,SAAS,MAAO;AAAA;AAAA;AAAA,YAGtD,CAAC,EAAE,OAAAP,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA,GAIhCQ,IAAkBV,EAAOC,CAAQ;AAAA,gBAC9B,CAAC,EAAE,OAAAC,EAAM,MAAOA,EAAM,UAAUS,EAAY,SAAS,WAAW,QAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5EC,IAAaZ,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,27 @@
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
+ import { memo as t } from "react";
3
+ import d from "./activities-card/activities-card.js";
4
+ import l from "../../../../ui/layout/flex-view.js";
5
+ import h from "../../../../ui/text/text.js";
6
+ import u from "../../../../ui/separator/separator.js";
7
+ const x = ({ activities: o, onPuzzleClick: p }) => !o || Object.keys(o).length === 0 ? null : /* @__PURE__ */ f(l, { children: [
8
+ /* @__PURE__ */ e(h, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Activities" }),
9
+ /* @__PURE__ */ e(u, { heightX: 1 }),
10
+ /* @__PURE__ */ e(l, { $flexRowGapX: 1.5, children: Object.entries(o).map(([n, r]) => {
11
+ var m;
12
+ return r != null && r.length ? /* @__PURE__ */ e(
13
+ d,
14
+ {
15
+ nodeType: (m = r[0]) == null ? void 0 : m.node_type,
16
+ cardType: n,
17
+ activitiesList: r,
18
+ onPuzzleClick: p
19
+ },
20
+ n
21
+ ) : null;
22
+ }) })
23
+ ] }), w = t(x);
24
+ export {
25
+ w as default
26
+ };
27
+ //# sourceMappingURL=activities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities.js","sources":["../../../../../../src/features/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]) => {\n if (!activitiesList?.length) return null;\n\n return (\n <ActivitiesCard\n key={cardType}\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","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,UAAO,OAAA,QAAQF,CAAU,EAAE,IAAI,CAAC,CAACM,GAAUC,CAAc,MAAM;;AAC1D,WAACA,KAAA,QAAAA,EAAgB,SAGnB,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QAEC,WAAUC,IAAAF,EAAe,CAAC,MAAhB,gBAAAE,EAAmB;AAAA,QAC7B,UAAAH;AAAA,QACA,gBAAAC;AAAA,QACA,eAAAN;AAAA,MAAA;AAAA,MAJKK;AAAA,IAAA,IAJ2B;AAAA,EAWrC,CAAA,GACH;AACF,EAAA,CAAA,GAIWI,IAAAC,EAAKZ,CAAU;"}
@@ -0,0 +1,96 @@
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";
8
+ import { CARD_TYPE as o } from "../../monthly-report-types.js";
9
+ function R(_) {
10
+ switch (_) {
11
+ case o.learn:
12
+ return {
13
+ lottie: r.LEARN,
14
+ color: "YELLOW_2",
15
+ background: E.NODE_LEARN_BG
16
+ };
17
+ case o.practice:
18
+ case o.smart_practice:
19
+ case o.sat_mock_test:
20
+ return {
21
+ lottie: r.PRACTICE,
22
+ color: "PURPLE_2",
23
+ background: E.NODE_PRACTICE_BG
24
+ };
25
+ case o.puzzle:
26
+ return {
27
+ lottie: r.PUZZLE,
28
+ color: "PURPLE_2",
29
+ background: E.NODE_PUZZLE_BG
30
+ };
31
+ case o.test:
32
+ case o.diagnostic:
33
+ return {
34
+ lottie: r.TEST,
35
+ color: "ORANGE_2",
36
+ background: E.NODE_CUSTOM_TEST_BG
37
+ };
38
+ case o.challenge:
39
+ return {
40
+ lottie: r.COMPETITIVE_ARENA,
41
+ color: "ORANGE_2",
42
+ background: E.NODE_TEST_PREP_BG
43
+ };
44
+ case o.advanced:
45
+ return {
46
+ lottie: r.TEST,
47
+ color: "GREEN_2",
48
+ background: E.NODE_TEST_PREP_BG
49
+ };
50
+ case o.subjective:
51
+ return {
52
+ lottie: r.SUBJECTIVE,
53
+ color: "BLUE_2",
54
+ background: E.NODE_SUBJECTIVE_BG
55
+ };
56
+ case o.recap:
57
+ case o.remedial:
58
+ case o.revision:
59
+ return {
60
+ lottie: r.RECAP,
61
+ color: "BLUE_2",
62
+ background: E.NODE_RECAP_BG
63
+ };
64
+ case o.activity:
65
+ case o.wb_activity:
66
+ return {
67
+ lottie: r.ACTIVITY,
68
+ color: "ORANGE_2",
69
+ background: E.NODE_ACTIVITY_BG
70
+ };
71
+ case o.video:
72
+ return {
73
+ lottie: r.VIDEO,
74
+ color: "GREEN_2",
75
+ background: E.NODE_VIDEO_BG
76
+ };
77
+ default:
78
+ return {
79
+ lottie: r.PROJECT,
80
+ color: "GREEN_2",
81
+ background: E.NODE_PROJECT_BG
82
+ };
83
+ }
84
+ }
85
+ const P = {
86
+ [c.COMPLETED]: /* @__PURE__ */ t(e, { color: "WHITE" }),
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" }),
90
+ [c.WAIT_FOR_REVIEW]: /* @__PURE__ */ t(e, { color: "WHITE" })
91
+ };
92
+ export {
93
+ R as getCardTypeIconMap,
94
+ P as stateIcon
95
+ };
96
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../src/features/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-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_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_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_CUSTOM_TEST_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_PREP_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;"}
@@ -0,0 +1,15 @@
1
+ import { NODE_STATE as e } from "../../../daily-timeline-types.js";
2
+ const T = (n) => {
3
+ const o = n.filter(
4
+ (t) => t.state === e.COMPLETED || t.state === e.WAIT_FOR_REVIEW
5
+ ).length, l = n.filter(
6
+ (t) => t.state === e.IN_PROGRESS
7
+ ).length, r = n.filter(
8
+ (t) => t.state === e.PENDING || t.state === e.NOT_STARTED
9
+ ).length;
10
+ return { totalDone: o, totalPending: l, totalOverdue: r };
11
+ };
12
+ export {
13
+ T as countActivitiesByState
14
+ };
15
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/activities/utils.ts"],"sourcesContent":["import { type IMonthlyActivity } from '../../monthly-report-types';\nimport { NODE_STATE } from '../../../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,29 @@
1
+ const E = {
2
+ ATTENDED: "attended",
3
+ MISSED: "missed",
4
+ PAUSED: "paused"
5
+ }, A = {
6
+ DAYS_PER_WEEK: 7,
7
+ DAY_HEADERS: ["S", "M", "Tu", "W", "Th", "F", "S"],
8
+ FIRST_DAY_OF_WEEK: 0
9
+ // Sunday = 0
10
+ }, S = [
11
+ "Jan",
12
+ "Feb",
13
+ "Mar",
14
+ "Apr",
15
+ "May",
16
+ "Jun",
17
+ "Jul",
18
+ "Aug",
19
+ "Sep",
20
+ "Oct",
21
+ "Nov",
22
+ "Dec"
23
+ ];
24
+ export {
25
+ E as ATTENDANCE_STATUS,
26
+ A as CALENDAR_CONFIG,
27
+ S as MONTH_NAMES
28
+ };
29
+ //# sourceMappingURL=attendance-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-constants.js","sources":["../../../../../../src/features/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,107 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import f from "../../../../../assets/line-icons/icons/check2.js";
3
+ import _ from "../../../../../assets/line-icons/icons/cross.js";
4
+ import c from "../../../../../assets/line-icons/icons/dots-icon.js";
5
+ import D from "../../../../../assets/line-icons/icons/pause-icon.js";
6
+ import { ATTENDANCE_STATUS as s } from "./attendance-constants.js";
7
+ import { StatusSymbol as C } from "./attendance.styled.js";
8
+ import T from "../../../../ui/theme/clrs.js";
9
+ const p = T(), R = (t, n) => {
10
+ var o;
11
+ if (!(t != null && t.length)) return "";
12
+ const e = t.map((i) => {
13
+ const r = new Date(i.time * 1e3).getHours();
14
+ return `${r % 12 || 12} ${r >= 12 ? "PM" : "AM"}`;
15
+ });
16
+ return t.every(
17
+ (i) => {
18
+ var r, u;
19
+ return i.is_present === ((r = t == null ? void 0 : t[0]) == null ? void 0 : r.is_present) && i.is_paused === ((u = t == null ? void 0 : t[0]) == null ? void 0 : u.is_paused);
20
+ }
21
+ ) ? `${n} / ${e.join(" / ")}
22
+ ${((o = t == null ? void 0 : t[0]) == null ? void 0 : o.status) || ""}` : [n, ...t.map(y)].join(`
23
+ `);
24
+ }, $ = (t) => t.is_present ? s.ATTENDED : t.is_paused ? s.PAUSED : s.MISSED, P = (t) => {
25
+ let n = 0, e = 0, a = 0;
26
+ Object.values(t).forEach((i) => {
27
+ i.forEach((r) => {
28
+ switch ($(r)) {
29
+ case s.ATTENDED:
30
+ n++;
31
+ break;
32
+ case s.PAUSED:
33
+ a++;
34
+ break;
35
+ default:
36
+ e++;
37
+ break;
38
+ }
39
+ });
40
+ });
41
+ const o = [];
42
+ return n > 0 && o.push(`${n} attended`), e > 0 && o.push(`${e} missed`), a > 0 && o.push(`${a} paused`), `${o.join(", ")}.`;
43
+ }, b = (t) => {
44
+ if (t.length === 0)
45
+ return {
46
+ status: null,
47
+ themeColor: null,
48
+ statusSymbol: ""
49
+ };
50
+ const n = t.every((o) => o.is_present), e = t.every((o) => o.is_paused), a = t.every((o) => !o.is_present && !o.is_paused);
51
+ return n ? {
52
+ status: s.ATTENDED,
53
+ themeColor: "GREEN_1",
54
+ statusSymbol: /* @__PURE__ */ m(f, { color: "GREEN_6", width: 14, height: 14 }),
55
+ tooltipBgColor: "GREEN_2",
56
+ snackbarBg: p.GREEN_2
57
+ } : e ? {
58
+ status: s.PAUSED,
59
+ themeColor: "WHITE_4",
60
+ statusSymbol: /* @__PURE__ */ m(D, { color: "BLACK_T_60", width: 8, height: 8 }),
61
+ tooltipBgColor: "WHITE_5",
62
+ snackbarBg: p.WHITE_5
63
+ } : a ? {
64
+ status: s.MISSED,
65
+ themeColor: "ORANGE_1",
66
+ statusSymbol: /* @__PURE__ */ m(_, { color: "RED", width: 12, height: 12 }),
67
+ tooltipBgColor: "ORANGE_2",
68
+ snackbarBg: p.ORANGE_2
69
+ } : {
70
+ status: s.PAUSED,
71
+ themeColor: "WHITE_4",
72
+ statusSymbol: /* @__PURE__ */ m(C, { $top: "2px", $right: "2px", children: /* @__PURE__ */ m(c, { color: "GREEN_6", width: 8, height: 8 }) }),
73
+ tooltipBgColor: "WHITE_5",
74
+ snackbarBg: p.WHITE_5
75
+ };
76
+ }, x = (t, n, e) => {
77
+ const a = new Date(e, n - 1, 1).getDay(), o = new Date(e, n, 0).getDate(), i = [];
78
+ for (let r = 0; r < a; r++)
79
+ i.push(null);
80
+ for (let r = 1; r <= o; r++) {
81
+ const u = `${e}-${n.toString().padStart(2, "0")}-${r.toString().padStart(2, "0")}`, d = t[u] || [], { status: g, themeColor: h, statusSymbol: E, tooltipBgColor: S, snackbarBg: l } = b(d);
82
+ i.push({
83
+ date: r,
84
+ status: g,
85
+ hasClasses: d.length > 0,
86
+ classes: d,
87
+ themeColor: h,
88
+ statusSymbol: E,
89
+ tooltipBgColor: S,
90
+ snackbarBg: l
91
+ });
92
+ }
93
+ return i;
94
+ }, y = (t) => {
95
+ if (!t.status) return "";
96
+ const e = new Date(t.time * 1e3).getHours(), a = e >= 12 ? "PM" : "AM";
97
+ return `${`${e % 12 || 12} ${a}`}: ${t.status}`;
98
+ };
99
+ export {
100
+ P as attendanceStatsText,
101
+ x as generateCalendarGrid,
102
+ $ as getClassStatus,
103
+ b as getDayStatusInfo,
104
+ R as getSnackbarMsg,
105
+ y as getStatusText
106
+ };
107
+ //# sourceMappingURL=attendance-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance-utils.js","sources":["../../../../../../src/features/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 => {\n const hours = new Date(cls.time * 1000).getHours();\n\n return `${hours % 12 || 12} ${hours >= 12 ? 'PM' : 'AM'}`;\n });\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=\"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: <PauseIcon color=\"BLACK_T_60\" width={8} height={8} />,\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=\"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\nexport const getStatusText = (classEvent: IClassEvent) => {\n if (!classEvent.status) return '';\n\n const date = new Date(classEvent.time * 1000);\n const hours = date.getHours();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n const displayHours = hours % 12 || 12;\n\n const timeStr = `${displayHours} ${ampm}`;\n\n return `${timeStr}: ${classEvent.status}`;\n};\n"],"names":["colors","getColors","getSnackbarMsg","classes","date","timings","cls","hours","_a","_b","getStatusText","getClassStatus","classEvent","ATTENDANCE_STATUS","attendanceStatsText","calendarData","attended","missed","paused","dayClasses","parts","getDayStatusInfo","attendedClass","pausedClass","missedClass","Check2Icon","PauseIcon","CrossIcon","jsx","Styled.StatusSymbol","DotIcon","generateCalendarGrid","reportMonth","reportYear","firstDay","daysInMonth","grid","i","day","dateString","status","themeColor","statusSymbol","tooltipBgColor","snackbarBg","ampm"],"mappings":";;;;;;;;AAaA,MAAMA,IAASC,EAAU,GAEZC,IAAiB,CAACC,GAAoCC,MAAiB;;AAC9E,MAAA,EAACD,KAAA,QAAAA,EAAS,QAAe,QAAA;AAEvB,QAAAE,IAAUF,EAAQ,IAAI,CAAOG,MAAA;AACjC,UAAMC,IAAQ,IAAI,KAAKD,EAAI,OA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AC,EAAE,UACpDG,IAAc,IAAI,KAAKF,GAAYD,GAAa,CAAC,EAAE,WACnDI,IAAgC,CAAA;AAGtC,WAASC,IAAI,GAAGA,IAAIH,GAAUG;AAC5B,IAAAD,EAAK,KAAK,IAAI;AAIhB,WAASE,IAAM,GAAGA,KAAOH,GAAaG,KAAO;AAC3C,UAAMC,IAAa,GAAGN,CAAU,IAAID,EAAY,SAAA,EAAW,SAAS,GAAG,GAAG,CAAC,IAAIM,EAC5E,WACA,SAAS,GAAG,GAAG,CAAC,IACbnB,IAAaJ,EAAawB,CAAU,KAAK,CAAA,GACzC,EAAE,QAAAC,GAAQ,YAAAC,GAAY,cAAAC,GAAc,gBAAAC,GAAgB,YAAAC,EAAW,IACnEvB,EAAiBF,CAAU;AAE7B,IAAAiB,EAAK,KAAK;AAAA,MACR,MAAME;AAAA,MACN,QAAAE;AAAA,MACA,YAAYrB,EAAW,SAAS;AAAA,MAChC,SAASA;AAAA,MACT,YAAAsB;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,IAAA,CACD;AAAA,EACH;AAEO,SAAAR;AACT,GAEa1B,IAAgB,CAACE,MAA4B;AACpD,MAAA,CAACA,EAAW,OAAe,QAAA;AAGzB,QAAAL,IADO,IAAI,KAAKK,EAAW,OAAO,GAAI,EACzB,YACbiC,IAAOtC,KAAS,KAAK,OAAO;AAKlC,SAAO,GAFS,GAFKA,IAAQ,MAAM,EAEJ,IAAIsC,CAAI,EAEtB,KAAKjC,EAAW,MAAM;AACzC;"}
@@ -0,0 +1,44 @@
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import { memo as $, useMemo as n } from "react";
3
+ import l from "../../../../ui/layout/flex-view.js";
4
+ import h from "../../../../ui/separator/separator.js";
5
+ import m from "../../../../ui/text/text.js";
6
+ import { CALENDAR_CONFIG as u } from "./attendance-constants.js";
7
+ import { attendanceStatsText as C, generateCalendarGrid as b } from "./attendance-utils.js";
8
+ import { CalendarHeader as _, CalendarBody as x } from "./attendance.styled.js";
9
+ import g from "./attendence-view.js";
10
+ const T = ({
11
+ calendarData: e,
12
+ reportMonth: t,
13
+ reportYear: i,
14
+ onDateClick: c
15
+ }) => {
16
+ const A = n(
17
+ () => !!e && C(e),
18
+ [e]
19
+ ), s = n(
20
+ () => !!e && b(e, t, i),
21
+ [e, t, i]
22
+ ), f = n(() => e ? Object.values(e).some((r) => r.length > 0) : !1, [e]);
23
+ return !e || Object.keys(e).length === 0 || !f || !s ? null : /* @__PURE__ */ d(l, { children: [
24
+ /* @__PURE__ */ o(m, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Attendance" }),
25
+ /* @__PURE__ */ o(m, { $renderAs: "ub2-bold", $color: "BLACK_T_60", children: A }),
26
+ /* @__PURE__ */ o(h, { heightX: 1 }),
27
+ /* @__PURE__ */ d(l, { $borderColor: "WHITE_5", children: [
28
+ /* @__PURE__ */ o(_, { children: u.DAY_HEADERS.map((r) => /* @__PURE__ */ o(m, { $align: "center", $renderAs: "ub3", $color: "BLACK_T_60", children: r }, r)) }),
29
+ /* @__PURE__ */ o(x, { children: s.map((r, p) => /* @__PURE__ */ o(
30
+ g,
31
+ {
32
+ day: r,
33
+ reportMonth: t,
34
+ onDateClick: c
35
+ },
36
+ r ? `day-${r.date}` : `empty-${p}`
37
+ )) })
38
+ ] })
39
+ ] });
40
+ }, w = $(T);
41
+ export {
42
+ w as default
43
+ };
44
+ //# sourceMappingURL=attendance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance.js","sources":["../../../../../../src/features/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 <AttendenceView\n day={day}\n key={day ? `day-${day.date}` : `empty-${index}`}\n reportMonth={reportMonth}\n onDateClick={onDateClick}\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","AttendenceView","Attendance$1","memo"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAmC,CAAC;AAAA,EACxC,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAA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AEJ,GAEeE,IAAAC,EAAKxB,CAAU;"}
@@ -0,0 +1,39 @@
1
+ import r from "styled-components";
2
+ import t from "../../../../ui/layout/flex-view.js";
3
+ const e = r.div`
4
+ display: grid;
5
+ grid-template-columns: repeat(7, 1fr);
6
+ padding: 4px 0;
7
+ background-color: ${({ theme: o }) => o.colors.WHITE_2};
8
+ border-bottom: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
9
+ `, l = r.div`
10
+ display: grid;
11
+ grid-template-columns: repeat(7, 1fr);
12
+ gap: 0;
13
+ `, p = r(t)`
14
+ position: relative;
15
+ aspect-ratio: 3/2;
16
+ border-right: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
17
+ border-bottom: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
18
+
19
+ &:nth-child(7n) {
20
+ border-right: none;
21
+ }
22
+ `, a = r.div`
23
+ position: absolute;
24
+ top: ${({ $top: o }) => o || "2px"};
25
+ right: ${({ $right: o }) => o || "2px"};
26
+ `, s = r.div`
27
+ > div {
28
+ width: 100%;
29
+ height: 100%;
30
+ }
31
+ `;
32
+ export {
33
+ l as CalendarBody,
34
+ p as CalendarDay,
35
+ e as CalendarHeader,
36
+ a as StatusSymbol,
37
+ s as TooltipWrapper
38
+ };
39
+ //# sourceMappingURL=attendance.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendance.styled.js","sources":["../../../../../../src/features/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 position: relative;\n aspect-ratio: 3/2;\n border-right: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n border-bottom: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n\n &:nth-child(7n) {\n border-right: none;\n }\n`;\n\nexport const StatusSymbol = styled.div<{ $top?: string; $right?: string }>`\n position: absolute;\n top: ${({ $top }) => $top || '2px'};\n right: ${({ $right }) => $right || '2px'};\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","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;AAAA;AAAA;AAAA,4BAGd,CAAC,EAAE,OAAAH,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,6BAClC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOnDI,IAAeL,EAAO;AAAA;AAAA,SAE1B,CAAC,EAAE,MAAAM,QAAWA,KAAQ,KAAK;AAAA,WACzB,CAAC,EAAE,QAAAC,QAAaA,KAAU,KAAK;AAAA,GAG7BC,IAAiBR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,52 @@
1
+ import { jsx as e, jsxs as n, Fragment as c } from "react/jsx-runtime";
2
+ import { memo as p, useCallback as g } from "react";
3
+ import { IS_APP_RUNNING_IN_RN as h } from "../../../../../constants/app-config.js";
4
+ import b from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import f from "../../../../ui/layout/flex-view.js";
6
+ import s from "../../../../ui/text/text.js";
7
+ import { MONTH_NAMES as u } from "./attendance-constants.js";
8
+ import { getSnackbarMsg as $, getStatusText as A } from "./attendance-utils.js";
9
+ import { TooltipWrapper as _, CalendarDay as T, StatusSymbol as I } from "./attendance.styled.js";
10
+ function S({ day: r, reportMonth: l, onDateClick: t }) {
11
+ const o = u[l - 1] || "", m = g(() => {
12
+ t == null || t({
13
+ type: "info",
14
+ message: $((r == null ? void 0 : r.classes) || [], `${o} ${(r == null ? void 0 : r.date) ?? ""}`) ?? "",
15
+ bgColor: (r == null ? void 0 : r.snackbarBg) || "WHITE_5"
16
+ });
17
+ }, [o, r == null ? void 0 : r.classes, r == null ? void 0 : r.date, r == null ? void 0 : r.snackbarBg, t]);
18
+ return /* @__PURE__ */ e(_, { onClick: m, children: /* @__PURE__ */ e(
19
+ b,
20
+ {
21
+ renderAs: "primary",
22
+ position: "top",
23
+ hidden: h || !(r != null && r.hasClasses),
24
+ backgroundColor: (r == null ? void 0 : r.tooltipBgColor) || "WHITE_5",
25
+ tooltipItem: r != null && r.classes ? /* @__PURE__ */ n(f, { children: [
26
+ /* @__PURE__ */ n(s, { $align: "center", $renderAs: "ab3", $color: "BLACK_1", children: [
27
+ o,
28
+ " ",
29
+ r.date
30
+ ] }),
31
+ r.classes.map((i) => /* @__PURE__ */ e(s, { $align: "center", $renderAs: "ab3", children: A(i) }, i.time))
32
+ ] }) : "",
33
+ children: /* @__PURE__ */ e(
34
+ T,
35
+ {
36
+ $background: (r == null ? void 0 : r.themeColor) || "WHITE_1",
37
+ $justifyContent: "center",
38
+ $alignItems: "center",
39
+ children: r && /* @__PURE__ */ n(c, { children: [
40
+ /* @__PURE__ */ e(s, { $renderAs: "ab2", $color: "BLACK_T_38", children: r.date }),
41
+ /* @__PURE__ */ e(I, { children: !!r.statusSymbol && r.statusSymbol })
42
+ ] })
43
+ }
44
+ )
45
+ }
46
+ ) });
47
+ }
48
+ const k = p(S);
49
+ export {
50
+ k as default
51
+ };
52
+ //# sourceMappingURL=attendence-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attendence-view.js","sources":["../../../../../../src/features/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, getStatusText } from './attendance-utils';\nimport * as Styled from './attendance.styled';\nimport type { ICalenderViewProps } from './attendance-types';\n\nfunction AttendanceView({ day, reportMonth, onDateClick }: 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 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 day?.classes ? (\n <FlexView>\n <Text $align=\"center\" $renderAs=\"ab3\" $color=\"BLACK_1\">\n {currentMonth} {day.date}\n </Text>\n {day.classes.map(classEvent => (\n <Text $align=\"center\" $renderAs=\"ab3\" key={classEvent.time}>\n {getStatusText(classEvent)}\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 >\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","currentMonth","MONTH_NAMES","handleClick","useCallback","getSnackbarMsg","jsx","Styled.TooltipWrapper","ArrowTooltip","IS_APP_RUNNING_IN_RN","jsxs","FlexView","Text","classEvent","getStatusText","Styled.CalendarDay","Fragment","Styled.StatusSymbol","AttendenceView","memo"],"mappings":";;;;;;;;;AAWA,SAASA,EAAe,EAAE,KAAAC,GAAK,aAAAC,GAAa,aAAAC,KAAmC;AAC7E,QAAMC,IAAeC,EAAYH,IAAc,CAAC,KAAK,IAE/CI,IAAcC,EAAY,MAAM;AACtB,IAAAJ,KAAA,QAAAA,EAAA;AAAA,MACZ,MAAM;AAAA,MACN,SAASK,GAAeP,KAAA,gBAAAA,EAAK,YAAW,CAAC,GAAG,GAAGG,CAAY,KAAIH,KAAA,gBAAAA,EAAK,SAAQ,EAAE,EAAE,KAAK;AAAA,MACrF,UAASA,KAAA,gBAAAA,EAAK,eAAc;AAAA,IAAA;AAAA,EAC7B,GACA,CAACG,GAAcH,KAAA,gBAAAA,EAAK,SAASA,KAAA,gBAAAA,EAAK,MAAMA,KAAA,gBAAAA,EAAK,YAAYE,CAAW,CAAC;AAExE,SACG,gBAAAM,EAAAC,GAAA,EAAsB,SAASJ,GAC9B,UAAA,gBAAAG;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,QAAQC,KAAwB,EAACX,KAAA,QAAAA,EAAK;AAAA,MACtC,kBAAiBA,KAAA,gBAAAA,EAAK,mBAAkB;AAAA,MACxC,aACEA,KAAA,QAAAA,EAAK,UACH,gBAAAY,EAACC,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAD,EAACE,KAAK,QAAO,UAAS,WAAU,OAAM,QAAO,WAC1C,UAAA;AAAA,UAAAX;AAAA,UAAa;AAAA,UAAEH,EAAI;AAAA,QAAA,GACtB;AAAA,QACCA,EAAI,QAAQ,IAAI,CAAAe,wBACdD,GAAK,EAAA,QAAO,UAAS,WAAU,OAC7B,UAAcE,EAAAD,CAAU,KADgBA,EAAW,IAEtD,CACD;AAAA,MAAA,EAAA,CACH,IAEA;AAAA,MAIJ,UAAA,gBAAAP;AAAA,QAACS;AAAAA,QAAA;AAAA,UACC,cAAajB,KAAA,gBAAAA,EAAK,eAAc;AAAA,UAChC,iBAAgB;AAAA,UAChB,aAAY;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,CAACnB,EAAI,gBAAgBA,EAAI,cAAa;AAAA,UAAA,GAC/D;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;AAEA,MAAeoB,IAAAC,EAAKtB,CAAc;"}
@@ -0,0 +1,9 @@
1
+ import e from "styled-components";
2
+ import o from "../../../../ui/layout/flex-view.js";
3
+ const i = e(o)`
4
+ margin: 0 -16px;
5
+ `;
6
+ export {
7
+ i as FeedbackContainer
8
+ };
9
+ //# sourceMappingURL=feedback-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback-styled.js","sources":["../../../../../../src/features/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;"}