@cuemath/leap 3.5.29 → 3.5.30-as10

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 (211) hide show
  1. package/dist/assets/illustrations/illustrations.js +22 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/images/images.js +8 -0
  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 +88 -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/parent-dashboard/comps/compact-header/compact-header.js +5 -5
  28. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -1
  29. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js +13 -0
  30. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js.map +1 -0
  31. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js +60 -0
  32. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js.map +1 -0
  33. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js +15 -0
  34. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js.map +1 -0
  35. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js +128 -0
  36. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -0
  37. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js +53 -0
  38. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +1 -0
  39. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +120 -0
  40. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -0
  41. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +58 -0
  42. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +1 -0
  43. package/dist/features/timeline/monthly-report/comps/activities/activities.js +27 -0
  44. package/dist/features/timeline/monthly-report/comps/activities/activities.js.map +1 -0
  45. package/dist/features/timeline/monthly-report/comps/activities/constants.js +95 -0
  46. package/dist/features/timeline/monthly-report/comps/activities/constants.js.map +1 -0
  47. package/dist/features/timeline/monthly-report/comps/activities/utils.js +15 -0
  48. package/dist/features/timeline/monthly-report/comps/activities/utils.js.map +1 -0
  49. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js +29 -0
  50. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js.map +1 -0
  51. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js +94 -0
  52. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js.map +1 -0
  53. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js +44 -0
  54. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js.map +1 -0
  55. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js +39 -0
  56. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js.map +1 -0
  57. package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js +52 -0
  58. package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js.map +1 -0
  59. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js +9 -0
  60. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js.map +1 -0
  61. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js +94 -0
  62. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js.map +1 -0
  63. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js +48 -0
  64. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +1 -0
  65. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js +28 -0
  66. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +1 -0
  67. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js +113 -0
  68. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +1 -0
  69. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js +30 -0
  70. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js.map +1 -0
  71. package/dist/features/timeline/monthly-report/comps/goals/goals.js +22 -0
  72. package/dist/features/timeline/monthly-report/comps/goals/goals.js.map +1 -0
  73. package/dist/features/timeline/monthly-report/monthly-report-styled.js +14 -0
  74. package/dist/features/timeline/monthly-report/monthly-report-styled.js.map +1 -0
  75. package/dist/features/timeline/monthly-report/monthly-report-types.js +5 -0
  76. package/dist/features/timeline/monthly-report/monthly-report-types.js.map +1 -0
  77. package/dist/features/timeline/monthly-report/monthly-report.js +69 -0
  78. package/dist/features/timeline/monthly-report/monthly-report.js.map +1 -0
  79. package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +10 -0
  80. package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +1 -0
  81. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +87 -0
  82. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -0
  83. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js +9 -0
  84. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js.map +1 -0
  85. package/dist/features/timeline/monthly-timeline/constants.js +41 -0
  86. package/dist/features/timeline/monthly-timeline/constants.js.map +1 -0
  87. package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js +9 -0
  88. package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js.map +1 -0
  89. package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js +6 -0
  90. package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js.map +1 -0
  91. package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js +28 -0
  92. package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js.map +1 -0
  93. package/dist/features/timeline/monthly-timeline/monthly-timeline.js +56 -0
  94. package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -0
  95. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js +9 -0
  96. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js.map +1 -0
  97. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js +9 -0
  98. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js.map +1 -0
  99. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js +35 -0
  100. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js.map +1 -0
  101. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js +53 -0
  102. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js.map +1 -0
  103. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js +19 -0
  104. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +1 -0
  105. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js +50 -0
  106. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +1 -0
  107. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js +9 -0
  108. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js.map +1 -0
  109. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js +22 -0
  110. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js.map +1 -0
  111. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js +9 -0
  112. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js.map +1 -0
  113. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js +84 -0
  114. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js.map +1 -0
  115. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js +11 -0
  116. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js.map +1 -0
  117. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js +36 -0
  118. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js.map +1 -0
  119. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js +55 -0
  120. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +1 -0
  121. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js +35 -0
  122. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js.map +1 -0
  123. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js +21 -0
  124. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js.map +1 -0
  125. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js +21 -0
  126. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js.map +1 -0
  127. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js +9 -0
  128. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js.map +1 -0
  129. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js +30 -0
  130. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js.map +1 -0
  131. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js +9 -0
  132. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +1 -0
  133. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js +56 -0
  134. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +1 -0
  135. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js +15 -0
  136. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +1 -0
  137. package/dist/features/timeline/ptm-report/ptm-report-constants.js +16 -0
  138. package/dist/features/timeline/ptm-report/ptm-report-constants.js.map +1 -0
  139. package/dist/features/timeline/ptm-report/ptm-report-helpers.js +8 -0
  140. package/dist/features/timeline/ptm-report/ptm-report-helpers.js.map +1 -0
  141. package/dist/features/timeline/ptm-report/ptm-report-styled.js +11 -0
  142. package/dist/features/timeline/ptm-report/ptm-report-styled.js.map +1 -0
  143. package/dist/features/timeline/ptm-report/ptm-report-types.js +5 -0
  144. package/dist/features/timeline/ptm-report/ptm-report-types.js.map +1 -0
  145. package/dist/features/timeline/ptm-report/ptm-report.js +113 -0
  146. package/dist/features/timeline/ptm-report/ptm-report.js.map +1 -0
  147. package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js +5 -0
  148. package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js.map +1 -0
  149. package/dist/features/timeline/timeline-tabs/timeline-tabs.js +41 -0
  150. package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +1 -0
  151. package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js +37 -0
  152. package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js.map +1 -0
  153. package/dist/features/ui/animated-arc/animated-arc-styled.js +7 -7
  154. package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -1
  155. package/dist/features/ui/animated-arc/animated-arc.js +37 -26
  156. package/dist/features/ui/animated-arc/animated-arc.js.map +1 -1
  157. package/dist/features/ui/linear-progress-bar/linear-progress-bar.js +39 -0
  158. package/dist/features/ui/linear-progress-bar/linear-progress-bar.js.map +1 -0
  159. package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js +23 -0
  160. package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js.map +1 -0
  161. package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js +57 -0
  162. package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js.map +1 -0
  163. package/dist/features/ui/swipable-carousel/swipable-carousel.js +132 -0
  164. package/dist/features/ui/swipable-carousel/swipable-carousel.js.map +1 -0
  165. package/dist/features/ui/swipeable-component/swipeable-component-styled.js.map +1 -0
  166. package/dist/features/ui/swipeable-component/swipeable-component.js +27 -0
  167. package/dist/features/ui/swipeable-component/swipeable-component.js.map +1 -0
  168. package/dist/features/ui/theme/text.js +14 -0
  169. package/dist/features/ui/theme/text.js.map +1 -1
  170. package/dist/index.d.ts +231 -25
  171. package/dist/index.js +588 -568
  172. package/dist/index.js.map +1 -1
  173. package/dist/static/2021.0683b580.png +0 -0
  174. package/dist/static/2022.d34ad7a5.png +0 -0
  175. package/dist/static/2023.fce87149.png +0 -0
  176. package/dist/static/2024.a275ee85.png +0 -0
  177. package/dist/static/2025.677cc187.png +0 -0
  178. package/dist/static/2026.63763214.png +0 -0
  179. package/dist/static/2027.b82dc039.png +0 -0
  180. package/dist/static/2028.580b8cc0.png +0 -0
  181. package/dist/static/coding-report-icon.91a1e900.svg +1 -0
  182. package/dist/static/elp-icon.d45b457d.svg +1 -0
  183. package/dist/static/english-icon.50c2e005.svg +1 -0
  184. package/dist/static/focus-blue.664be268.svg +1 -0
  185. package/dist/static/full-report.00112c74.svg +1 -0
  186. package/dist/static/key.fa0b4c98.svg +1 -0
  187. package/dist/static/live-session-blue.ec7fa85f.svg +1 -0
  188. package/dist/static/math-fit-grey.c32f37b3.svg +1 -0
  189. package/dist/static/no-report.4158fad3.svg +1 -0
  190. package/dist/static/opened-book-green.faacda34.svg +1 -0
  191. package/dist/static/percentage-pattern-yellow.6a25e820.svg +1 -0
  192. package/dist/static/pi-orange.132b108d.svg +1 -0
  193. package/dist/static/ptm-report-icon.5089218f.svg +1 -0
  194. package/dist/static/puzzle-purple.60ff4884.svg +1 -0
  195. package/dist/static/question-mark-yellow.1925aa04.svg +1 -0
  196. package/dist/static/renewal-blue.1ab3b2d4.svg +1 -0
  197. package/dist/static/sat-report-icon.4331be86.svg +1 -0
  198. package/dist/static/science-report-icon.a0014c40.svg +1 -0
  199. package/dist/static/thumbs-up-green.6a03b9d2.svg +1 -0
  200. package/dist/static/thumps-down.a1192a62.svg +1 -0
  201. package/dist/static/thumps-up.caa35a98.svg +1 -0
  202. package/dist/static/time-purple.ab1a458d.svg +1 -0
  203. package/package.json +3 -2
  204. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
  205. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
  206. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
  207. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
  208. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component-styled.js.map +0 -1
  209. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js +0 -26
  210. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js.map +0 -1
  211. /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":"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.extra_practice:\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};\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;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,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;AAC3D;"}
@@ -0,0 +1,15 @@
1
+ import { NODE_STATE as n } from "../../../daily-timeline-types.js";
2
+ const a = (e) => {
3
+ const o = e.filter(
4
+ (t) => t.state === n.COMPLETED
5
+ ).length, l = e.filter(
6
+ (t) => t.state === n.IN_PROGRESS
7
+ ).length, r = e.filter(
8
+ (t) => t.state === n.PENDING
9
+ ).length;
10
+ return { totalDone: o, totalPending: l, totalOverdue: r };
11
+ };
12
+ export {
13
+ a 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 => activity.state === NODE_STATE.COMPLETED,\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,\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,CAAAE,MAAYA,EAAS,UAAUC,EAAW;AAAA,EAC1C,EAAA,QACIC,IAAeJ,EAAe;AAAA,IAClC,CAAAE,MAAYA,EAAS,UAAUC,EAAW;AAAA,EAC1C,EAAA,QACIE,IAAeL,EAAe;AAAA,IAClC,CAAAE,MAAYA,EAAS,UAAUC,EAAW;AAAA,EAC1C,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,94 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import S from "../../../../../assets/line-icons/icons/check2.js";
3
+ import f from "../../../../../assets/line-icons/icons/cross.js";
4
+ import D from "../../../../../assets/line-icons/icons/dots-icon.js";
5
+ import _ from "../../../../../assets/line-icons/icons/pause-icon.js";
6
+ import { ATTENDANCE_STATUS as a } from "./attendance-constants.js";
7
+ import { StatusSymbol as C } from "./attendance.styled.js";
8
+ import T from "../../../../ui/theme/clrs.js";
9
+ const l = T(), w = (t, s) => [s, ...(t == null ? void 0 : t.map((o) => I(o))) || []].join("/n"), b = (t) => t.is_present ? a.ATTENDED : t.is_paused ? a.PAUSED : a.MISSED, x = (t) => {
10
+ let s = 0, o = 0, r = 0;
11
+ Object.values(t).forEach((i) => {
12
+ i.forEach((e) => {
13
+ switch (b(e)) {
14
+ case a.ATTENDED:
15
+ s++;
16
+ break;
17
+ case a.PAUSED:
18
+ r++;
19
+ break;
20
+ default:
21
+ o++;
22
+ break;
23
+ }
24
+ });
25
+ });
26
+ const n = [];
27
+ return s > 0 && n.push(`${s} attended`), o > 0 && n.push(`${o} missed`), r > 0 && n.push(`${r} paused`), `${n.join(", ")}.`;
28
+ }, A = (t) => {
29
+ if (t.length === 0)
30
+ return {
31
+ status: null,
32
+ themeColor: null,
33
+ statusSymbol: ""
34
+ };
35
+ if (t.length > 1)
36
+ return {
37
+ status: a.PAUSED,
38
+ themeColor: "WHITE_4",
39
+ statusSymbol: /* @__PURE__ */ u(C, { $top: "2px", $right: "2px", children: /* @__PURE__ */ u(D, { color: "GREEN_6", width: 8, height: 8 }) }),
40
+ tooltipBgColor: "WHITE_5",
41
+ snackbarBg: l.WHITE_5
42
+ };
43
+ const s = t.find((r) => r.is_present), o = t.find((r) => r.is_paused);
44
+ return s ? {
45
+ status: a.ATTENDED,
46
+ themeColor: "GREEN_1",
47
+ statusSymbol: /* @__PURE__ */ u(S, { color: "GREEN_6", width: 14, height: 14 }),
48
+ tooltipBgColor: "GREEN_2",
49
+ snackbarBg: l.GREEN_2
50
+ } : o ? {
51
+ status: a.PAUSED,
52
+ themeColor: "WHITE_4",
53
+ statusSymbol: /* @__PURE__ */ u(_, { color: "BLACK_T_60", width: 8, height: 8 }),
54
+ tooltipBgColor: "WHITE_5",
55
+ snackbarBg: l.WHITE_5
56
+ } : {
57
+ status: a.MISSED,
58
+ themeColor: "ORANGE_1",
59
+ statusSymbol: /* @__PURE__ */ u(f, { color: "RED", width: 12, height: 12 }),
60
+ tooltipBgColor: "ORANGE_2",
61
+ snackbarBg: l.ORANGE_2
62
+ };
63
+ }, P = (t, s, o) => {
64
+ const r = new Date(o, s - 1, 1).getDay(), n = new Date(o, s, 0).getDate(), i = [];
65
+ for (let e = 0; e < r; e++)
66
+ i.push(null);
67
+ for (let e = 1; e <= n; e++) {
68
+ const m = `${o}-${s.toString().padStart(2, "0")}-${e.toString().padStart(2, "0")}`, c = t[m] || [], { status: d, themeColor: h, statusSymbol: E, tooltipBgColor: g, snackbarBg: p } = A(c);
69
+ i.push({
70
+ date: e,
71
+ status: d,
72
+ hasClasses: c.length > 0,
73
+ classes: c,
74
+ themeColor: h,
75
+ statusSymbol: E,
76
+ tooltipBgColor: g,
77
+ snackbarBg: p
78
+ });
79
+ }
80
+ return i;
81
+ }, I = (t) => {
82
+ if (!t.status) return "";
83
+ const o = new Date(t.time * 1e3).getHours(), r = o >= 12 ? "PM" : "AM";
84
+ return `${`${o % 12 || 12} ${r}`}: ${t.status}`;
85
+ };
86
+ export {
87
+ x as attendanceStatsText,
88
+ P as generateCalendarGrid,
89
+ b as getClassStatus,
90
+ A as getDayStatusInfo,
91
+ w as getSnackbarMsg,
92
+ I as getStatusText
93
+ };
94
+ //# 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 return [date, ...(classes?.map(item => getStatusText(item)) || [])].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 if (dayClasses.length > 1) {\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\n const attendedClass = dayClasses.find(cls => cls.is_present);\n const pausedClass = dayClasses.find(cls => 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 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\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","item","getStatusText","getClassStatus","classEvent","ATTENDANCE_STATUS","attendanceStatsText","calendarData","attended","missed","paused","dayClasses","parts","getDayStatusInfo","jsx","Styled.StatusSymbol","DotIcon","attendedClass","cls","pausedClass","Check2Icon","PauseIcon","CrossIcon","generateCalendarGrid","reportMonth","reportYear","firstDay","daysInMonth","grid","i","day","dateString","status","themeColor","statusSymbol","tooltipBgColor","snackbarBg","hours","ampm"],"mappings":";;;;;;;;AAaA,MAAMA,IAASC,EAAU,GAEZC,IAAiB,CAACC,GAAoCC,MAC1D,CAACA,GAAM,IAAID,KAAA,gBAAAA,EAAS,IAAI,CAAQE,MAAAC,EAAcD,CAAI,OAAM,CAAA,CAAG,EAAE,KAAK,IAAI,GAGlEE,IAAiB,CAACC,MACzBA,EAAW,aACNC,EAAkB,WAGvBD,EAAW,YACNC,EAAkB,SAGpBA,EAAkB,QAGdC,IAAsB,CAACC,MAAgC;AAClE,MAAIC,IAAW,GACXC,IAAS,GACTC,IAAS;AAEb,SAAO,OAAOH,CA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A;AAGzB,QAAAiC,IADO,IAAI,KAAKjC,EAAW,OAAO,GAAI,EACzB,YACbkC,IAAOD,KAAS,KAAK,OAAO;AAKlC,SAAO,GAFS,GAFKA,IAAQ,MAAM,EAEJ,IAAIC,CAAI,EAEtB,KAAKlC,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,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,MACtB,gBAAAR;AAAA,QAACS;AAAA,QAAA;AAAA,UACC,KAAAF;AAAA,UAEA,aAAAlB;AAAA,UACA,aAAAE;AAAA,QAAA;AAAA,QAFKgB,IAAM,OAAOA,EAAI,IAAI,KAAK,SAASC,CAAK;AAAA,MAIhD,CAAA,GACH;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,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 r, jsxs as t, Fragment as c } from "react/jsx-runtime";
2
+ import { memo as p, useCallback as f } from "react";
3
+ import { IS_APP_RUNNING_IN_RN as g } from "../../../../../constants/app-config.js";
4
+ import $ from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import b from "../../../../ui/layout/flex-view.js";
6
+ import n from "../../../../ui/text/text.js";
7
+ import { MONTH_NAMES as l } from "./attendance-constants.js";
8
+ import { getSnackbarMsg as h, getStatusText as u } from "./attendance-utils.js";
9
+ import { TooltipWrapper as A, CalendarDay as _, StatusSymbol as T } from "./attendance.styled.js";
10
+ function C({ day: e, reportMonth: s, onDateClick: o }) {
11
+ const m = f(() => {
12
+ o == null || o({
13
+ type: "info",
14
+ message: h((e == null ? void 0 : e.classes) || [], `${l[s]} ${(e == null ? void 0 : e.date) ?? ""}`) ?? "",
15
+ bgColor: (e == null ? void 0 : e.snackbarBg) || "WHITE_5"
16
+ });
17
+ }, []);
18
+ return /* @__PURE__ */ r(A, { onClick: m, children: /* @__PURE__ */ r(
19
+ $,
20
+ {
21
+ renderAs: "primary",
22
+ position: "top",
23
+ hidden: g || !(e != null && e.hasClasses),
24
+ backgroundColor: (e == null ? void 0 : e.tooltipBgColor) || "WHITE_5",
25
+ tooltipItem: e != null && e.classes ? /* @__PURE__ */ t(b, { children: [
26
+ /* @__PURE__ */ t(n, { $align: "center", $renderAs: "ab3", $color: "BLACK_1", children: [
27
+ l[s],
28
+ " ",
29
+ e.date
30
+ ] }),
31
+ e.classes.map((i) => /* @__PURE__ */ r(n, { $align: "center", $renderAs: "ab3", children: u(i) }, i.time))
32
+ ] }) : "",
33
+ children: /* @__PURE__ */ r(
34
+ _,
35
+ {
36
+ $background: (e == null ? void 0 : e.themeColor) || "WHITE_1",
37
+ $justifyContent: "center",
38
+ $alignItems: "center",
39
+ children: e && /* @__PURE__ */ t(c, { children: [
40
+ /* @__PURE__ */ r(n, { $renderAs: "ab2", $color: "BLACK_T_38", children: e.date }),
41
+ /* @__PURE__ */ r(T, { children: !!e.statusSymbol && e.statusSymbol })
42
+ ] })
43
+ }
44
+ )
45
+ }
46
+ ) });
47
+ }
48
+ const k = p(C);
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 AttendenceView({ day, reportMonth, onDateClick }: ICalenderViewProps) {\n const handleClick = useCallback(() => {\n onDateClick?.({\n type: 'info',\n message:\n getSnackbarMsg(day?.classes || [], `${MONTH_NAMES[reportMonth]} ${day?.date ?? ''}`) ?? '',\n bgColor: day?.snackbarBg || 'WHITE_5',\n });\n }, []);\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 {MONTH_NAMES[reportMonth]} {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(AttendenceView);\n"],"names":["AttendenceView","day","reportMonth","onDateClick","handleClick","useCallback","getSnackbarMsg","MONTH_NAMES","jsx","Styled.TooltipWrapper","ArrowTooltip","IS_APP_RUNNING_IN_RN","jsxs","FlexView","Text","classEvent","getStatusText","Styled.CalendarDay","Fragment","Styled.StatusSymbol","AttendenceView$1","memo"],"mappings":";;;;;;;;;AAWA,SAASA,EAAe,EAAE,KAAAC,GAAK,aAAAC,GAAa,aAAAC,KAAmC;AACvE,QAAAC,IAAcC,EAAY,MAAM;AACtB,IAAAF,KAAA,QAAAA,EAAA;AAAA,MACZ,MAAM;AAAA,MACN,SACEG,GAAeL,KAAA,gBAAAA,EAAK,YAAW,CAAI,GAAA,GAAGM,EAAYL,CAAW,CAAC,KAAID,KAAA,gBAAAA,EAAK,SAAQ,EAAE,EAAE,KAAK;AAAA,MAC1F,UAASA,KAAA,gBAAAA,EAAK,eAAc;AAAA,IAAA;AAAA,EAEhC,GAAG,CAAE,CAAA;AAEL,SACG,gBAAAO,EAAAC,GAAA,EAAsB,SAASL,GAC9B,UAAA,gBAAAI;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,QAAQC,KAAwB,EAACV,KAAA,QAAAA,EAAK;AAAA,MACtC,kBAAiBA,KAAA,gBAAAA,EAAK,mBAAkB;AAAA,MACxC,aACEA,KAAA,QAAAA,EAAK,UACH,gBAAAW,EAACC,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAD,EAACE,KAAK,QAAO,UAAS,WAAU,OAAM,QAAO,WAC1C,UAAA;AAAA,UAAAP,EAAYL,CAAW;AAAA,UAAE;AAAA,UAAED,EAAI;AAAA,QAAA,GAClC;AAAA,QACCA,EAAI,QAAQ,IAAI,CAAAc,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,cAAahB,KAAA,gBAAAA,EAAK,eAAc;AAAA,UAChC,iBAAgB;AAAA,UAChB,aAAY;AAAA,UAEX,eAEG,gBAAAW,EAAAM,GAAA,EAAA,UAAA;AAAA,YAAA,gBAAAV,EAACM,KAAK,WAAU,OAAM,QAAO,cAC1B,YAAI,MACP;AAAA,YACA,gBAAAN,EAACW,GAAA,EAAqB,WAAC,CAAClB,EAAI,gBAAgBA,EAAI,cAAa;AAAA,UAAA,GAC/D;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;AAEA,MAAemB,IAAAC,EAAKrB,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;"}
@@ -0,0 +1,94 @@
1
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import { memo as X, useCallback as i } from "react";
3
+ import n from "../../../../ui/layout/flex-view.js";
4
+ import { ILLUSTRATIONS as p } from "../../../../../assets/illustrations/illustrations.js";
5
+ import g from "../../../../ui/image/image.js";
6
+ import { invalidateMonthlyReport as w, useMonthlyReportPatch as y } from "../../api/use-monthly-report-get.js";
7
+ import $ from "../../../../ui/separator/separator.js";
8
+ import P from "../../../../ui/text/text.js";
9
+ import f from "../../../../ui/buttons/clickable/clickable.js";
10
+ import { FeedbackContainer as x } from "./feedback-styled.js";
11
+ const R = ({
12
+ reportId: l,
13
+ studentName: b,
14
+ onFeedback: c,
15
+ studentCourseId: s,
16
+ showSnackbar: a
17
+ }) => {
18
+ const u = i(
19
+ (r, o) => {
20
+ r && a && a({
21
+ type: "error",
22
+ message: "Something went wrong. Please try again.",
23
+ bgColor: "red"
24
+ }), !r && c && (o != null && o.feedback) && (w(l), c(o.feedback, s));
25
+ },
26
+ [c, s]
27
+ ), { patch: m, isProcessing: d } = y({
28
+ onComplete: u
29
+ }), t = i(
30
+ (r) => {
31
+ m(l, { feedback: r });
32
+ },
33
+ [l, m]
34
+ ), C = i(() => {
35
+ t("positive");
36
+ }, [t]), k = i(() => {
37
+ t("negative");
38
+ }, [t]);
39
+ return /* @__PURE__ */ h(x, { $gapX: 1.25, $background: "WHITE_3", children: [
40
+ /* @__PURE__ */ e(n, { $gutterX: 1, children: /* @__PURE__ */ h(P, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
41
+ "Are you happy with ",
42
+ b ?? "her",
43
+ " progress?"
44
+ ] }) }),
45
+ /* @__PURE__ */ e($, { heightX: 1.5 }),
46
+ /* @__PURE__ */ h(n, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
47
+ /* @__PURE__ */ e(
48
+ f,
49
+ {
50
+ label: "Report thumps up",
51
+ disabled: d,
52
+ onClick: C,
53
+ children: /* @__PURE__ */ e(
54
+ n,
55
+ {
56
+ $widthX: 5,
57
+ $heightX: 5,
58
+ $alignItems: "center",
59
+ $justifyContent: "center",
60
+ $borderRadiusX: 2.5,
61
+ $borderColor: "BLACK_5",
62
+ children: /* @__PURE__ */ e(g, { src: p.THUMPS_UP, alt: "UP", width: 32, height: 32 })
63
+ }
64
+ )
65
+ }
66
+ ),
67
+ /* @__PURE__ */ e(
68
+ f,
69
+ {
70
+ label: "Report thumps down",
71
+ disabled: d,
72
+ onClick: k,
73
+ children: /* @__PURE__ */ e(
74
+ n,
75
+ {
76
+ $widthX: 5,
77
+ $heightX: 5,
78
+ $alignItems: "center",
79
+ $justifyContent: "center",
80
+ $borderColor: "BLACK_5",
81
+ $borderRadiusX: 2.5,
82
+ children: /* @__PURE__ */ e(g, { src: p.THUMPS_DOWN, alt: "DOWN", width: 32, height: 32 })
83
+ }
84
+ )
85
+ }
86
+ )
87
+ ] }),
88
+ /* @__PURE__ */ e($, { heightX: 1.5 })
89
+ ] });
90
+ }, I = X(R);
91
+ export {
92
+ I as default
93
+ };
94
+ //# sourceMappingURL=feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../ui/image/image';\nimport { invalidateMonthlyReport, useMonthlyReportPatch } from '../../api/use-monthly-report-get';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport * as Styled from './feedback-styled';\n\nconst Feedback = ({\n reportId,\n studentName,\n onFeedback,\n studentCourseId,\n showSnackbar,\n}: IFeedbackTypesProps) => {\n const onComplete = useCallback(\n (err: string | null, data?: IMonthlyReportResponse) => {\n if (err && showSnackbar) {\n showSnackbar({\n type: 'error',\n message: 'Something went wrong. Please try again.',\n bgColor: 'red',\n });\n }\n\n if (!err && onFeedback && data?.feedback) {\n invalidateMonthlyReport(reportId);\n onFeedback(data.feedback, studentCourseId);\n }\n },\n [onFeedback, studentCourseId],\n );\n\n const { patch: updateMilestone, isProcessing } = useMonthlyReportPatch({\n onComplete,\n });\n\n const handleFeedback = useCallback(\n (feedback: TFeedback) => {\n updateMilestone(reportId, { feedback });\n },\n [reportId, updateMilestone],\n );\n\n const handlePositiveFeedback = useCallback(() => {\n handleFeedback('positive');\n }, [handleFeedback]);\n\n const handleNegativeFeedback = useCallback(() => {\n handleFeedback('negative');\n }, [handleFeedback]);\n\n return (\n <Styled.FeedbackContainer $gapX={1.25} $background=\"WHITE_3\">\n <FlexView $gutterX={1}>\n <Text $renderAs=\"ab2-black\" $color=\"BLACK_1\" $align=\"center\">\n Are you happy with {studentName ?? 'her'} progress?\n </Text>\n </FlexView>\n <Separator heightX={1.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={3} $alignItems=\"center\" $justifyContent=\"center\">\n <Clickable\n label=\"Report thumps up\"\n disabled={isProcessing}\n onClick={handlePositiveFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2.5}\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.THUMPS_UP} alt=\"UP\" width={32} height={32} />\n </FlexView>\n </Clickable>\n <Clickable\n label=\"Report thumps down\"\n disabled={isProcessing}\n onClick={handleNegativeFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"BLACK_5\"\n $borderRadiusX={2.5}\n >\n <Image src={ILLUSTRATIONS.THUMPS_DOWN} alt=\"DOWN\" width={32} height={32} />\n </FlexView>\n </Clickable>\n </FlexView>\n <Separator heightX={1.5} />\n </Styled.FeedbackContainer>\n );\n};\n\nexport default memo(Feedback);\n"],"names":["Feedback","reportId","studentName","onFeedback","studentCourseId","showSnackbar","onComplete","useCallback","err","data","invalidateMonthlyReport","updateMilestone","isProcessing","useMonthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","handleNegativeFeedback","Styled.FeedbackContainer","jsx","FlexView","jsxs","Text","Separator","Clickable","Image","ILLUSTRATIONS","Feedback$1","memo"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAW,CAAC;AAAA,EAChB,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AACF,MAA2B;AACzB,QAAMC,IAAaC;AAAA,IACjB,CAACC,GAAoBC,MAAkC;AACrD,MAAID,KAAOH,KACIA,EAAA;AAAA,QACX,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,MAAA,CACV,GAGC,CAACG,KAAOL,MAAcM,KAAA,QAAAA,EAAM,cAC9BC,EAAwBT,CAAQ,GACrBE,EAAAM,EAAK,UAAUL,CAAe;AAAA,IAE7C;AAAA,IACA,CAACD,GAAYC,CAAe;AAAA,EAAA,GAGxB,EAAE,OAAOO,GAAiB,cAAAC,EAAA,IAAiBC,EAAsB;AAAA,IACrE,YAAAP;AAAA,EAAA,CACD,GAEKQ,IAAiBP;AAAA,IACrB,CAACQ,MAAwB;AACP,MAAAJ,EAAAV,GAAU,EAAE,UAAAc,EAAA,CAAU;AAAA,IACxC;AAAA,IACA,CAACd,GAAUU,CAAe;AAAA,EAAA,GAGtBK,IAAyBT,EAAY,MAAM;AAC/C,IAAAO,EAAe,UAAU;AAAA,EAAA,GACxB,CAACA,CAAc,CAAC,GAEb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,QAAO,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,YAAA;AAAA,UAC3E;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAP,EAACI,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,EAC3B,EAAA,CAAA;AAEJ,GAEeI,IAAAC,EAAK5B,CAAQ;"}
@@ -0,0 +1,48 @@
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";
5
+ import { calculateProgress as g } from "../goals-constants.js";
6
+ const E = ({ chapters: t }) => !t || t.length === 0 ? null : t.map((o, u) => {
7
+ const { completed: _, total: a } = o.progress_stat, { completed: $, total: m } = o.previous_progress_stat || {}, r = g(_, a), d = g($ || 0, m || 0), s = r - d, l = o.previous_progress_stat && s > 0 && a === m, f = l ? s : 0, p = r === 100;
8
+ return /* @__PURE__ */ e(
9
+ c,
10
+ {
11
+ $flexDirection: "row",
12
+ $flexGapX: 1,
13
+ $gutterX: 1,
14
+ children: [
15
+ o.image_url && /* @__PURE__ */ n(
16
+ C,
17
+ {
18
+ completionPercentage: l ? d : r,
19
+ imageUrl: o.image_url,
20
+ delta: f,
21
+ imageWidth: 42,
22
+ iconWidth: 16,
23
+ deltaProgressColor: "GREEN_5",
24
+ iconColor: "WHITE",
25
+ iconBackgroundColor: "BLACK_1",
26
+ iconPosition: { top: 0, right: 0 }
27
+ }
28
+ ),
29
+ /* @__PURE__ */ e(c, { children: [
30
+ /* @__PURE__ */ n(i, { $renderAs: "ub2", $color: "BLACK_1", children: o.chapter_name }),
31
+ /* @__PURE__ */ e(c, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.25, children: [
32
+ /* @__PURE__ */ n(i, { $renderAs: "ub3", $color: "BLACK_T_60", children: p ? "Completed" : `${r}% completed` }),
33
+ l && !p && /* @__PURE__ */ e(i, { $renderAs: "ab3", $color: "GREEN_6", children: [
34
+ "(+",
35
+ Math.round(s),
36
+ "%)"
37
+ ] })
38
+ ] })
39
+ ] })
40
+ ]
41
+ },
42
+ `${o.chapter_name}-${u}`
43
+ );
44
+ });
45
+ export {
46
+ E as default
47
+ };
48
+ //# sourceMappingURL=goal-chapter-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-chapter-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.tsx"],"sourcesContent":["import { type FC } from 'react';\n\nimport { type IGoalsCardChaptersProps } from './goals-card-types';\nimport Text from '../../../../../ui/text/text';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport ChapterCircularProgress from '../../../../../chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress';\nimport { calculateProgress } from '../goals-constants';\n\nconst GoalsCardChapters: FC<IGoalsCardChaptersProps> = ({ chapters }) => {\n if (!chapters || chapters.length === 0) {\n return null;\n }\n\n return chapters.map((chapter, i) => {\n const { completed, total } = chapter.progress_stat;\n const { completed: prevCompleted, total: prevTotal } = chapter.previous_progress_stat || {};\n const progress = calculateProgress(completed, total);\n const previousProgress = calculateProgress(prevCompleted || 0, prevTotal || 0);\n const progressDifference = progress - previousProgress;\n const showDelta =\n chapter.previous_progress_stat && progressDifference > 0 && total === prevTotal;\n const delta = showDelta ? progressDifference : 0;\n const isCompoleted = progress === 100;\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $flexGapX={1}\n $gutterX={1}\n key={`${chapter.chapter_name}-${i}`}\n >\n {chapter.image_url && (\n <ChapterCircularProgress\n completionPercentage={showDelta ? previousProgress : progress}\n imageUrl={chapter.image_url}\n delta={delta}\n imageWidth={42}\n iconWidth={16}\n deltaProgressColor=\"GREEN_5\"\n iconColor=\"WHITE\"\n iconBackgroundColor=\"BLACK_1\"\n iconPosition={{ top: 0, right: 0 }}\n />\n )}\n <FlexView>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n {chapter.chapter_name}\n </Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.25}>\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {isCompoleted ? 'Completed' : `${progress}% completed`}\n </Text>\n {showDelta && !isCompoleted && (\n <Text $renderAs=\"ab3\" $color=\"GREEN_6\">\n (+{Math.round(progressDifference)}%)\n </Text>\n )}\n </FlexView>\n </FlexView>\n </FlexView>\n );\n });\n};\n\nexport default GoalsCardChapters;\n"],"names":["GoalsCardChapters","chapters","chapter","i","completed","total","prevCompleted","prevTotal","progress","calculateProgress","previousProgress","progressDifference","showDelta","delta","isCompoleted","jsxs","FlexView","jsx","ChapterCircularProgress","Text"],"mappings":";;;;;AAQA,MAAMA,IAAiD,CAAC,EAAE,UAAAC,QACpD,CAACA,KAAYA,EAAS,WAAW,IAC5B,OAGFA,EAAS,IAAI,CAACC,GAASC,MAAM;AAClC,QAAM,EAAE,WAAAC,GAAW,OAAAC,MAAUH,EAAQ,eAC/B,EAAE,WAAWI,GAAe,OAAOC,MAAcL,EAAQ,0BAA0B,IACnFM,IAAWC,EAAkBL,GAAWC,CAAK,GAC7CK,IAAmBD,EAAkBH,KAAiB,GAAGC,KAAa,CAAC,GACvEI,IAAqBH,IAAWE,GAChCE,IACJV,EAAQ,0BAA0BS,IAAqB,KAAKN,MAAUE,GAClEM,IAAQD,IAAYD,IAAqB,GACzCG,IAAeN,MAAa;AAGhC,SAAA,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,WAAW;AAAA,MACX,UAAU;AAAA,MAGT,UAAA;AAAA,QAAAd,EAAQ,aACP,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,sBAAsBN,IAAYF,IAAmBF;AAAA,YACrD,UAAUN,EAAQ;AAAA,YAClB,OAAAW;AAAA,YACA,YAAY;AAAA,YACZ,WAAW;AAAA,YACX,oBAAmB;AAAA,YACnB,WAAU;AAAA,YACV,qBAAoB;AAAA,YACpB,cAAc,EAAE,KAAK,GAAG,OAAO,EAAE;AAAA,UAAA;AAAA,QACnC;AAAA,0BAEDG,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAC,EAACE,KAAK,WAAU,OAAM,QAAO,WAC1B,YAAQ,cACX;AAAA,4BACCH,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,WAAW,MAC7D,UAAA;AAAA,YAAC,gBAAAC,EAAAE,GAAA,EAAK,WAAU,OAAM,QAAO,cAC1B,UAAeL,IAAA,cAAc,GAAGN,CAAQ,cAC3C,CAAA;AAAA,YACCI,KAAa,CAACE,KACb,gBAAAC,EAACI,KAAK,WAAU,OAAM,QAAO,WAAU,UAAA;AAAA,cAAA;AAAA,cAClC,KAAK,MAAMR,CAAkB;AAAA,cAAE;AAAA,YAAA,GACpC;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA7BK,GAAGT,EAAQ,YAAY,IAAIC,CAAC;AAAA,EAAA;AA8BnC,CAEH;"}
@@ -0,0 +1,28 @@
1
+ import o from "styled-components";
2
+ import t from "../../../../../ui/layout/flex-view.js";
3
+ const p = o(t)`
4
+ position: absolute;
5
+ bottom: 0px;
6
+ left: 0;
7
+ right: 0;
8
+ `, s = o(t)`
9
+ border-top: none;
10
+ `, a = o(t)`
11
+ position: relative;
12
+ &::after {
13
+ content: '';
14
+ position: absolute;
15
+ height: 12px;
16
+ width: 20px;
17
+ left: 10px;
18
+ top: -8px;
19
+ clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
20
+ background-color: ${({ theme: e, $background: r }) => e.colors[r ?? "WHITE_1"]};
21
+ }
22
+ `;
23
+ export {
24
+ s as ChaptersContainer,
25
+ p as ProgressBarContainer,
26
+ a as TagContainer
27
+ };
28
+ //# sourceMappingURL=goals-card-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goals-card-styled.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const ProgressBarContainer = styled(FlexView)`\n position: absolute;\n bottom: 0px;\n left: 0;\n right: 0;\n`;\n\nexport const ChaptersContainer = styled(FlexView)`\n border-top: none;\n`;\n\nexport const TagContainer = styled(FlexView)`\n position: relative;\n &::after {\n content: '';\n position: absolute;\n height: 12px;\n width: 20px;\n left: 10px;\n top: -8px;\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n background-color: ${({ theme, $background }) => theme.colors[$background ?? 'WHITE_1']};\n }\n`;\n"],"names":["ProgressBarContainer","styled","FlexView","ChaptersContainer","TagContainer","theme","$background"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOtCC,IAAoBF,EAAOC,CAAQ;AAAA;AAAA,GAInCE,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAUnB,CAAC,EAAE,OAAAG,GAAO,aAAAC,QAAkBD,EAAM,OAAOC,KAAe,SAAS,CAAC;AAAA;AAAA;"}