@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,60 @@
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import { useRef as g, useMemo as n } from "react";
3
+ import { CarousalItem as m, CarouselWrapper as f } from "./achievements.styled.js";
4
+ import s from "../../../../ui/text/text.js";
5
+ import l from "../../../../ui/separator/separator.js";
6
+ import a from "../../../../ui/layout/flex-view.js";
7
+ import x from "../../../../ui/swipable-carousel/swipable-carousel.js";
8
+ import { IS_APP_RUNNING_IN_RN as p } from "../../../../../constants/app-config.js";
9
+ const B = ({ achievements: o, studentName: t }) => {
10
+ const d = g(null), i = n(
11
+ () => o.map((e) => /* @__PURE__ */ r(
12
+ m,
13
+ {
14
+ src: e.url,
15
+ alt: `Achievement ${e.asset_id}`,
16
+ withLoader: !0,
17
+ height: p ? "343px" : "480px"
18
+ },
19
+ e.asset_id
20
+ )),
21
+ [o]
22
+ ), h = n(
23
+ () => o.length >= 2 ? `Outstanding month! ${t} earned several achievements showing excellent progress across different areas.` : `Great work! ${t} earned new achievements this month, demonstrating growth in their skills.`,
24
+ [o.length, t]
25
+ ), u = !p && i.length > 1;
26
+ return o != null && o.length ? /* @__PURE__ */ c(a, { children: [
27
+ /* @__PURE__ */ r(s, { $renderAs: "ab1-bold", color: "BLACK_1", children: "Achievements" }),
28
+ /* @__PURE__ */ r(l, { heightX: 0.125 }),
29
+ /* @__PURE__ */ r(a, { $marginBottom: -24, children: /* @__PURE__ */ r(s, { $renderAs: "ub2", color: "BLUE_6", children: h }) }),
30
+ /* @__PURE__ */ r(f, { $height: "580px", children: /* @__PURE__ */ r(
31
+ x,
32
+ {
33
+ ref: d,
34
+ items: i,
35
+ defaultIndex: 0,
36
+ transitionDuration: 300,
37
+ showDots: !0,
38
+ dotsConfig: {
39
+ dotColor: "BLACK_1",
40
+ inactiveDotColor: "WHITE_1",
41
+ activeIndicatorSize: "8px",
42
+ inactiveIndicatorSize: "8px",
43
+ spacing: "8px"
44
+ },
45
+ showNavigationButtons: u,
46
+ navigationConfig: {
47
+ buttonVariant: "secondary",
48
+ buttonSize: "xsmall",
49
+ spacing: 8,
50
+ hideOnMobile: !0
51
+ }
52
+ }
53
+ ) }),
54
+ /* @__PURE__ */ r(l, { heightX: 0.75 })
55
+ ] }) : null;
56
+ };
57
+ export {
58
+ B as default
59
+ };
60
+ //# sourceMappingURL=achievements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"achievements.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/achievements/achievements.tsx"],"sourcesContent":["import { useMemo, useRef, type FC } from 'react';\n\nimport { type IAchievementsProps } from './achievements-types';\nimport type { ISwipableCarouselRefs } from '../../../../ui/swipable-carousel/swipable-carousel-types';\nimport * as Styled from './achievements.styled';\nimport Text from '../../../../ui/text/text';\nimport Separator from '../../../../ui/separator/separator';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SwipableCarousel from '../../../../ui/swipable-carousel/swipable-carousel';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../constants/app-config';\n\nconst Achievements: FC<IAchievementsProps> = ({ achievements, studentName }) => {\n const carouselRef = useRef<ISwipableCarouselRefs>(null);\n\n const carouselItems = useMemo(\n () =>\n achievements.map(achievement => (\n <Styled.CarousalItem\n key={achievement.asset_id}\n src={achievement.url}\n alt={`Achievement ${achievement.asset_id}`}\n withLoader\n height={IS_APP_RUNNING_IN_RN ? '343px' : '480px'}\n />\n )),\n [achievements],\n );\n\n const tipText = useMemo(\n () =>\n achievements.length >= 2\n ? `Outstanding month! ${studentName} earned several achievements showing excellent progress across different areas.`\n : `Great work! ${studentName} earned new achievements this month, demonstrating growth in their skills.`,\n [achievements.length, studentName],\n );\n\n const showNavigationButtons = !IS_APP_RUNNING_IN_RN && carouselItems.length > 1;\n\n if (!achievements?.length) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" color=\"BLACK_1\">\n Achievements\n </Text>\n <Separator heightX={0.125} />\n <FlexView $marginBottom={-24}>\n <Text $renderAs=\"ub2\" color=\"BLUE_6\">\n {tipText}\n </Text>\n </FlexView>\n <Styled.CarouselWrapper $height=\"580px\">\n <SwipableCarousel\n ref={carouselRef}\n items={carouselItems}\n defaultIndex={0}\n transitionDuration={300}\n // onIndexChange={handleIndexChange}\n showDots={true}\n dotsConfig={{\n dotColor: 'BLACK_1',\n inactiveDotColor: 'WHITE_1',\n activeIndicatorSize: '8px',\n inactiveIndicatorSize: '8px',\n spacing: '8px',\n }}\n showNavigationButtons={showNavigationButtons}\n navigationConfig={{\n buttonVariant: 'secondary',\n buttonSize: 'xsmall',\n spacing: 8,\n hideOnMobile: true,\n }}\n />\n </Styled.CarouselWrapper>\n <Separator heightX={0.75} />\n </FlexView>\n );\n};\n\nexport default Achievements;\n"],"names":["Achievements","achievements","studentName","carouselRef","useRef","carouselItems","useMemo","achievement","jsx","Styled.CarousalItem","IS_APP_RUNNING_IN_RN","tipText","showNavigationButtons","FlexView","Text","Separator","Styled.CarouselWrapper","SwipableCarousel"],"mappings":";;;;;;;;AAWA,MAAMA,IAAuC,CAAC,EAAE,cAAAC,GAAc,aAAAC,QAAkB;AACxE,QAAAC,IAAcC,EAA8B,IAAI,GAEhDC,IAAgBC;AAAA,IACpB,MACEL,EAAa,IAAI,CACfM,MAAA,gBAAAC;AAAA,MAACC;AAAAA,MAAA;AAAA,QAEC,KAAKF,EAAY;AAAA,QACjB,KAAK,eAAeA,EAAY,QAAQ;AAAA,QACxC,YAAU;AAAA,QACV,QAAQG,IAAuB,UAAU;AAAA,MAAA;AAAA,MAJpCH,EAAY;AAAA,IAAA,CAMpB;AAAA,IACH,CAACN,CAAY;AAAA,EAAA,GAGTU,IAAUL;AAAA,IACd,MACEL,EAAa,UAAU,IACnB,sBAAsBC,CAAW,oFACjC,eAAeA,CAAW;AAAA,IAChC,CAACD,EAAa,QAAQC,CAAW;AAAA,EAAA,GAG7BU,IAAwB,CAACF,KAAwBL,EAAc,SAAS;AAE1E,SAACJ,KAAA,QAAAA,EAAc,2BAKhBY,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAL,EAACM,GAAK,EAAA,WAAU,YAAW,OAAM,WAAU,UAE3C,gBAAA;AAAA,IACA,gBAAAN,EAACO,GAAU,EAAA,SAAS,MAAO,CAAA;AAAA,IAC3B,gBAAAP,EAACK,GAAS,EAAA,eAAe,KACvB,UAAA,gBAAAL,EAACM,GAAK,EAAA,WAAU,OAAM,OAAM,UACzB,UAAAH,EACH,CAAA,GACF;AAAA,IACC,gBAAAH,EAAAQ,GAAA,EAAuB,SAAQ,SAC9B,UAAA,gBAAAR;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,KAAKd;AAAA,QACL,OAAOE;AAAA,QACP,cAAc;AAAA,QACd,oBAAoB;AAAA,QAEpB,UAAU;AAAA,QACV,YAAY;AAAA,UACV,UAAU;AAAA,UACV,kBAAkB;AAAA,UAClB,qBAAqB;AAAA,UACrB,uBAAuB;AAAA,UACvB,SAAS;AAAA,QACX;AAAA,QACA,uBAAAO;AAAA,QACA,kBAAkB;AAAA,UAChB,eAAe;AAAA,UACf,YAAY;AAAA,UACZ,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,IACA,gBAAAJ,EAACO,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,EAC5B,EAAA,CAAA,IAvCO;AAyCX;"}
@@ -0,0 +1,15 @@
1
+ import o from "styled-components";
2
+ import t from "../../../../ui/image/image.js";
3
+ import e from "../../../../ui/layout/flex-view.js";
4
+ const m = o(e)`
5
+ overflow: hidden;
6
+ position: relative;
7
+ `, p = o(t)`
8
+ position: relative;
9
+ touch-action: auto;
10
+ `;
11
+ export {
12
+ p as CarousalItem,
13
+ m as CarouselWrapper
14
+ };
15
+ //# sourceMappingURL=achievements.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"achievements.styled.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/achievements/achievements.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const CarouselWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nexport const CarousalItem = styled(Image)`\n position: relative;\n touch-action: auto;\n`;\n"],"names":["CarouselWrapper","styled","FlexView","CarousalItem","Image"],"mappings":";;;AAKa,MAAAA,IAAkBC,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAKjCC,IAAeF,EAAOG,CAAK;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,128 @@
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import { memo as D, useRef as R, useState as z, useMemo as g, useCallback as d } from "react";
3
+ import { getCardTypeIconMap as u, stateIcon as p } from "../constants.js";
4
+ import { CARD_TYPE as f } from "../../../monthly-report-types.js";
5
+ import { ActivityCardContainerWrapper as I, ActivityCardContainer as B } from "./activities-card.styled.js";
6
+ import t from "../../../../../ui/layout/flex-view.js";
7
+ import M from "../../../../../ui/lottie-animation/lottie-animation.js";
8
+ import m from "../../../../../ui/text/text.js";
9
+ import S from "../../../../../homework/card-title.js";
10
+ import T from "../activities-card-puzzles/activities-card-puzzles.js";
11
+ import { NODE_STATE as $ } from "../../../../daily-timeline-types.js";
12
+ import k from "../../../../../ui/buttons/text-button/text-button.js";
13
+ import { countActivitiesByState as y } from "../utils.js";
14
+ const G = {
15
+ autoplay: !1,
16
+ loop: !0,
17
+ renderer: "canvas"
18
+ }, j = ({
19
+ cardType: n,
20
+ nodeType: A,
21
+ activitiesList: o = [],
22
+ onPuzzleClick: C
23
+ }) => {
24
+ const a = R(null), [s, b] = z(!1), x = g(() => {
25
+ const { totalDone: e, totalPending: i, totalOverdue: c } = y(o);
26
+ return [
27
+ e > 0 && `${e} Done`,
28
+ i > 0 && `${i} In-progress`,
29
+ c > 0 && `${c} Overdue`
30
+ ].filter(Boolean).join(", ");
31
+ }, [o]), { displayedActivities: X, remainingCount: h } = g(() => {
32
+ if (n === f.puzzle)
33
+ return { displayedActivities: o, remainingCount: 0 };
34
+ const e = 3, i = o.length > e;
35
+ return s || !i ? { displayedActivities: o, remainingCount: 0 } : {
36
+ displayedActivities: o.slice(0, e),
37
+ remainingCount: o.length - e
38
+ };
39
+ }, [o, s, n]), E = d(() => {
40
+ var e;
41
+ (e = a.current) == null || e.play();
42
+ }, []), w = d(() => {
43
+ var e;
44
+ (e = a.current) == null || e.stop();
45
+ }, []), _ = d(() => {
46
+ b((e) => !e);
47
+ }, []);
48
+ return /* @__PURE__ */ l(t, { onMouseEnter: E, onMouseLeave: w, children: [
49
+ /* @__PURE__ */ r(
50
+ I,
51
+ {
52
+ $background: u(n).color,
53
+ children: /* @__PURE__ */ l(
54
+ B,
55
+ {
56
+ $flexDirection: "row",
57
+ $alignItems: "center",
58
+ $height: "56px",
59
+ $bgImage: u(n).background,
60
+ $gutterX: 0.78125,
61
+ $flexGap: 8.5,
62
+ children: [
63
+ /* @__PURE__ */ r(
64
+ t,
65
+ {
66
+ $widthX: 2,
67
+ $heightX: 2,
68
+ $borderRadiusX: 2,
69
+ $background: "WHITE_1",
70
+ $position: "relative",
71
+ $alignItems: "center",
72
+ $justifyContent: "center",
73
+ children: /* @__PURE__ */ r(
74
+ M,
75
+ {
76
+ ref: a,
77
+ src: u(n).lottie,
78
+ width: 32,
79
+ height: 32,
80
+ settings: G
81
+ }
82
+ )
83
+ }
84
+ ),
85
+ /* @__PURE__ */ l(t, { children: [
86
+ /* @__PURE__ */ r(S, { cardHeader: n, nodeType: A }),
87
+ /* @__PURE__ */ r(m, { $renderAs: "ub3", $color: "BLACK_1", children: x })
88
+ ] })
89
+ ]
90
+ }
91
+ )
92
+ }
93
+ ),
94
+ o.length > 0 && (n === f.puzzle ? /* @__PURE__ */ r(T, { puzzles: o, onPuzzleClick: C }) : /* @__PURE__ */ l(t, { $flexRowGapX: 1.25, $gutterX: 1, $gapX: 1, $borderColor: "GREY_2", children: [
95
+ X.map(({ state: e, title: i, subtext: c, id: v }) => /* @__PURE__ */ l(t, { $flexDirection: "row", $flexGapX: 1.05, children: [
96
+ /* @__PURE__ */ r(t, { $gapX: 0.25, children: /* @__PURE__ */ r(
97
+ t,
98
+ {
99
+ $borderRadiusX: 1,
100
+ $background: e === $.PENDING || e === $.NOT_STARTED ? "RED" : "BLACK_1",
101
+ $widthX: 1,
102
+ $heightX: 1,
103
+ $alignItems: "center",
104
+ $justifyContent: "center",
105
+ children: !!e && (p[e] || p[$.COMPLETED])
106
+ }
107
+ ) }),
108
+ /* @__PURE__ */ l(t, { $flexRowGap: 4, children: [
109
+ /* @__PURE__ */ r(m, { $renderAs: "ub2", $color: "BLACK_1", children: i || "" }),
110
+ /* @__PURE__ */ r(m, { $renderAs: "ub3", $color: "BLACK_T_60", children: c || "" })
111
+ ] })
112
+ ] }, v)),
113
+ (h > 0 || s) && o.length > 3 && /* @__PURE__ */ r(t, { $gutterX: 2, children: /* @__PURE__ */ r(
114
+ k,
115
+ {
116
+ label: s ? "Show less" : `+${h} activities`,
117
+ size: "regular",
118
+ color: "BLACK_1",
119
+ onClick: _
120
+ }
121
+ ) })
122
+ ] }))
123
+ ] });
124
+ }, Z = D(j);
125
+ export {
126
+ Z as default
127
+ };
128
+ //# sourceMappingURL=activities-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/activities/activities-card/activities-card.tsx"],"sourcesContent":["import { memo, type FC, useRef, useCallback, useMemo, useState } from 'react';\n\nimport { type IActivitiesCardProps } from './activities-card-types';\nimport { getCardTypeIconMap, stateIcon } from '../constants';\nimport { CARD_TYPE } from '../../../monthly-report-types';\nimport * as Styled from './activities-card.styled';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../../ui/lottie-animation/lottie-animation';\nimport { type ILottieAnimationRef } from '../../../../../ui/lottie-animation/types';\nimport Text from '../../../../../ui/text/text';\nimport CardTitle from '../../../../../homework/card-title';\nimport { type TColorNames } from '../../../../../ui/types';\nimport ActivitiesCardPuzzles from '../activities-card-puzzles/activities-card-puzzles';\nimport { NODE_STATE } from '../../../../daily-timeline-types';\nimport TextButton from '../../../../../ui/buttons/text-button/text-button';\nimport { countActivitiesByState } from '../utils';\n\nconst lottieSettings = {\n autoplay: false,\n loop: true,\n renderer: 'canvas',\n};\n\nconst ActivitiesCard: FC<IActivitiesCardProps> = ({\n cardType,\n nodeType,\n activitiesList = [],\n onPuzzleClick,\n}) => {\n const lottieRef = useRef<ILottieAnimationRef>(null);\n const [showAllActivities, setShowAllActivities] = useState(false);\n\n const progressStatus = useMemo(() => {\n const { totalDone, totalPending, totalOverdue } = countActivitiesByState(activitiesList);\n\n return [\n totalDone > 0 && `${totalDone} Done`,\n totalPending > 0 && `${totalPending} In-progress`,\n totalOverdue > 0 && `${totalOverdue} Overdue`,\n ]\n .filter(Boolean)\n .join(', ');\n }, [activitiesList]);\n\n const { displayedActivities, remainingCount } = useMemo(() => {\n if (cardType === CARD_TYPE.puzzle) {\n return { displayedActivities: activitiesList, remainingCount: 0 };\n }\n\n const maxVisible = 3;\n const hasMore = activitiesList.length > maxVisible;\n\n if (showAllActivities || !hasMore) {\n return { displayedActivities: activitiesList, remainingCount: 0 };\n }\n\n return {\n displayedActivities: activitiesList.slice(0, maxVisible),\n remainingCount: activitiesList.length - maxVisible,\n };\n }, [activitiesList, showAllActivities, cardType]);\n\n const handleMouseEnter = useCallback(() => {\n lottieRef.current?.play();\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n lottieRef.current?.stop();\n }, []);\n\n const handleToggleActivities = useCallback(() => {\n setShowAllActivities(prev => !prev);\n }, []);\n\n return (\n <FlexView onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\n <Styled.ActivityCardContainerWrapper\n $background={getCardTypeIconMap(cardType).color as TColorNames}\n >\n <Styled.ActivityCardContainer\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $height=\"56px\"\n $bgImage={getCardTypeIconMap(cardType).background}\n $gutterX={0.78125}\n $flexGap={8.5}\n >\n <FlexView\n $widthX={2}\n $heightX={2}\n $borderRadiusX={2}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation\n ref={lottieRef}\n src={getCardTypeIconMap(cardType).lottie}\n width={32}\n height={32}\n settings={lottieSettings}\n />\n </FlexView>\n <FlexView>\n <CardTitle cardHeader={cardType} nodeType={nodeType} />\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\">\n {progressStatus}\n </Text>\n </FlexView>\n </Styled.ActivityCardContainer>\n </Styled.ActivityCardContainerWrapper>\n {activitiesList.length > 0 &&\n (cardType === CARD_TYPE.puzzle ? (\n <ActivitiesCardPuzzles puzzles={activitiesList} onPuzzleClick={onPuzzleClick} />\n ) : (\n <FlexView $flexRowGapX={1.25} $gutterX={1} $gapX={1} $borderColor=\"GREY_2\">\n {displayedActivities.map(({ state, title, subtext, id }) => (\n <FlexView $flexDirection=\"row\" $flexGapX={1.05} key={id}>\n <FlexView $gapX={0.25}>\n <FlexView\n $borderRadiusX={1}\n $background={\n state === NODE_STATE.PENDING || 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 {!!state && (stateIcon[state as NODE_STATE] || stateIcon[NODE_STATE.COMPLETED])}\n </FlexView>\n </FlexView>\n <FlexView $flexRowGap={4}>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n {title || ''}\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subtext || ''}\n </Text>\n </FlexView>\n </FlexView>\n ))}\n {(remainingCount > 0 || showAllActivities) && activitiesList.length > 3 && (\n <FlexView $gutterX={2}>\n <TextButton\n label={showAllActivities ? 'Show less' : `+${remainingCount} activities`}\n size=\"regular\"\n color=\"BLACK_1\"\n onClick={handleToggleActivities}\n />\n </FlexView>\n )}\n </FlexView>\n ))}\n </FlexView>\n );\n};\n\nexport default memo(ActivitiesCard);\n"],"names":["lottieSettings","ActivitiesCard","cardType","nodeType","activitiesList","onPuzzleClick","lottieRef","useRef","showAllActivities","setShowAllActivities","useState","progressStatus","useMemo","totalDone","totalPending","totalOverdue","countActivitiesByState","displayedActivities","remainingCount","CARD_TYPE","maxVisible","hasMore","handleMouseEnter","useCallback","_a","handleMouseLeave","handleToggleActivities","prev","jsxs","FlexView","jsx","Styled.ActivityCardContainerWrapper","getCardTypeIconMap","Styled.ActivityCardContainer","LottieAnimation","CardTitle","Text","ActivitiesCardPuzzles","state","title","subtext","id","NODE_STATE","stateIcon","TextButton","ActivitiesCard$1","memo"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAiB;AAAA,EACrB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAA2C,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC,IAAiB,CAAC;AAAA,EAClB,eAAAC;AACF,MAAM;AACE,QAAAC,IAAYC,EAA4B,IAAI,GAC5C,CAACC,GAAmBC,CAAoB,IAAIC,EAAS,EAAK,GAE1DC,IAAiBC,EAAQ,MAAM;AACnC,UAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,cAAAC,EAAa,IAAIC,EAAuBZ,CAAc;AAEhF,WAAA;AAAA,MACLS,IAAY,KAAK,GAAGA,CAAS;AAAA,MAC7BC,IAAe,KAAK,GAAGA,CAAY;AAAA,MACnCC,IAAe,KAAK,GAAGA,CAAY;AAAA,IAElC,EAAA,OAAO,OAAO,EACd,KAAK,IAAI;AAAA,EAAA,GACX,CAACX,CAAc,CAAC,GAEb,EAAE,qBAAAa,GAAqB,gBAAAC,EAAe,IAAIN,EAAQ,MAAM;AACxD,QAAAV,MAAaiB,EAAU;AACzB,aA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AAO,WAC1B,eAAS,IACZ;AAAA,4BACCA,GAAK,EAAA,WAAU,OAAM,QAAO,cAC1B,eAAW,IACd;AAAA,QAAA,GACF;AAAA,MAAA,EAAA,GAxBmDK,CAyBrD,CACD;AAAA,OACCvB,IAAiB,KAAKV,MAAsBJ,EAAe,SAAS,KACpE,gBAAA0B,EAACD,GAAS,EAAA,UAAU,GAClB,UAAA,gBAAAC;AAAA,QAACc;AAAA,QAAA;AAAA,UACC,OAAOpC,IAAoB,cAAc,IAAIU,CAAc;AAAA,UAC3D,MAAK;AAAA,UACL,OAAM;AAAA,UACN,SAASQ;AAAA,QAAA;AAAA,MAAA,GAEb;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEN,EAAA,CAAA;AAEJ,GAEemB,IAAAC,EAAK7C,CAAc;"}
@@ -0,0 +1,53 @@
1
+ import r from "styled-components";
2
+ import e from "../../../../../ui/layout/flex-view.js";
3
+ const n = r(e)`
4
+ background-image: url(${({ $bgImage: o }) => o});
5
+ background-size: cover;
6
+ background-position: center left;
7
+ background-repeat: no-repeat;
8
+ max-width: 512px;
9
+ position: relative;
10
+ overflow: hidden;
11
+ `, d = r(e)`
12
+ position: relative;
13
+ outline: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
14
+ `;
15
+ r(e)`
16
+ border: 2px dashed ${({ theme: o }) => o.colors.ORANGE_2};
17
+ border-radius: 8px;
18
+ padding: 12px;
19
+ margin-top: 8px;
20
+ position: relative;
21
+ `;
22
+ r(e)`
23
+ background-color: ${({ theme: o }) => o.colors.ORANGE_2};
24
+ color: white;
25
+ border-radius: 4px;
26
+ padding: 4px 8px;
27
+ font-size: 12px;
28
+ font-weight: 600;
29
+ min-width: 24px;
30
+ height: 20px;
31
+ align-items: center;
32
+ justify-content: center;
33
+ `;
34
+ r.button`
35
+ background: none;
36
+ border: none;
37
+ color: ${({ theme: o }) => o.colors.BLACK_1};
38
+ text-decoration: underline;
39
+ cursor: pointer;
40
+ font-size: 14px;
41
+ font-weight: 500;
42
+ padding: 0;
43
+ margin: 0;
44
+
45
+ &:hover {
46
+ color: ${({ theme: o }) => o.colors.ORANGE_2};
47
+ }
48
+ `;
49
+ export {
50
+ n as ActivityCardContainer,
51
+ d as ActivityCardContainerWrapper
52
+ };
53
+ //# sourceMappingURL=activities-card.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities-card.styled.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const ActivityCardContainer = styled(FlexView)<{ $bgImage: string }>`\n background-image: url(${({ $bgImage }) => $bgImage});\n background-size: cover;\n background-position: center left;\n background-repeat: no-repeat;\n max-width: 512px;\n position: relative;\n overflow: hidden;\n`;\n\nexport const ActivityCardContainerWrapper = styled(FlexView)`\n position: relative;\n outline: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n`;\n\nexport const MoreActivitiesContainer = styled(FlexView)`\n border: 2px dashed ${({ theme }) => theme.colors.ORANGE_2};\n border-radius: 8px;\n padding: 12px;\n margin-top: 8px;\n position: relative;\n`;\n\nexport const CountBadge = styled(FlexView)`\n background-color: ${({ theme }) => theme.colors.ORANGE_2};\n color: white;\n border-radius: 4px;\n padding: 4px 8px;\n font-size: 12px;\n font-weight: 600;\n min-width: 24px;\n height: 20px;\n align-items: center;\n justify-content: center;\n`;\n\nexport const MoreActivitiesLink = styled.button`\n background: none;\n border: none;\n color: ${({ theme }) => theme.colors.BLACK_1};\n text-decoration: underline;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n padding: 0;\n margin: 0;\n\n &:hover {\n color: ${({ theme }) => theme.colors.ORANGE_2};\n }\n`;\n"],"names":["ActivityCardContainer","styled","FlexView","$bgImage","ActivityCardContainerWrapper","theme"],"mappings":";;AAIa,MAAAA,IAAwBC,EAAOC,CAAQ;AAAA,0BAC1B,CAAC,EAAE,UAAAC,EAAS,MAAMA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASvCC,IAA+BH,EAAOC,CAAQ;AAAA;AAAA,uBAEpC,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAGnBJ,EAAOC,CAAQ;AAAA,uBAC/B,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAOjCJ,EAAOC,CAAQ;AAAA,sBACnB,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYxBJ,EAAO;AAAA;AAAA;AAAA,WAG9B,CAAC,EAAE,OAAAI,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aASjC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;"}
@@ -0,0 +1,120 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { memo as L, useRef as R, useState as h, useCallback as l, useEffect as v } from "react";
3
+ import X from "../../../../../../assets/line-icons/icons/chevron-left.js";
4
+ import w from "../../../../../../assets/line-icons/icons/chevron-right.js";
5
+ import { PuzzleContainer as T, StatusIcon as x, ContentWrapper as A, ScrollButton as m, ScrollContainer as I } from "./activities-card-puzzles.styled.js";
6
+ import i from "../../../../../ui/layout/flex-view.js";
7
+ import B from "../../../../../ui/image/image.js";
8
+ import k from "../../../../../ui/separator/separator.js";
9
+ import D from "../../../../../ui/text/text.js";
10
+ import { NODE_STATE as a } from "../../../../daily-timeline-types.js";
11
+ import { stateIcon as d } from "../constants.js";
12
+ const N = ({
13
+ puzzles: f,
14
+ onPuzzleClick: o
15
+ }) => {
16
+ const n = f || [], r = R(null), [$, g] = h(!1), [u, _] = h(!1), C = l(() => {
17
+ r.current && r.current.scrollBy({ left: -180, behavior: "smooth" });
18
+ }, []), b = l(() => {
19
+ r.current && r.current.scrollBy({ left: 180, behavior: "smooth" });
20
+ }, []), c = l(() => {
21
+ if (r.current) {
22
+ const { scrollLeft: t, scrollWidth: E, clientWidth: S } = r.current;
23
+ g(t > 0), _(t < E - S - 10);
24
+ }
25
+ }, []);
26
+ v(() => {
27
+ const t = r.current;
28
+ if (t)
29
+ return c(), t.addEventListener("scroll", c), () => {
30
+ t.removeEventListener("scroll", c);
31
+ };
32
+ }, [c, n.length]);
33
+ const p = l(
34
+ (t) => /* @__PURE__ */ s(
35
+ T,
36
+ {
37
+ $gapX: 1,
38
+ $imageHue: t.image_hue || "BLUE",
39
+ $width: 146,
40
+ $height: 162,
41
+ $background: `${t.image_hue || "BLUE"}_2`,
42
+ onClick: () => o == null ? void 0 : o({
43
+ item_ref: t.item_ref,
44
+ feedback_comments: t.feedback_comments,
45
+ image_hue: t.image_hue,
46
+ title: t.title,
47
+ tip: t.tip
48
+ }),
49
+ children: [
50
+ /* @__PURE__ */ e(
51
+ x,
52
+ {
53
+ $borderRadiusX: 1,
54
+ $background: t.state === a.PENDING || t.state === a.NOT_STARTED ? "RED" : "BLACK_1",
55
+ $widthX: 1,
56
+ $heightX: 1,
57
+ $alignItems: "center",
58
+ $justifyContent: "center",
59
+ children: t.state && (d[t.state] || d[a.COMPLETED])
60
+ }
61
+ ),
62
+ /* @__PURE__ */ s(i, { $background: "TRANSPARENT", $alignItems: "center", children: [
63
+ t.image_url && /* @__PURE__ */ e(
64
+ B,
65
+ {
66
+ src: t.image_url ?? "",
67
+ alt: "Puzzle illustration",
68
+ width: 68,
69
+ height: 68,
70
+ withLoader: !0
71
+ }
72
+ ),
73
+ /* @__PURE__ */ e(k, { heightX: 1 }),
74
+ /* @__PURE__ */ e(i, { $gutterX: 0.25, children: /* @__PURE__ */ e(D, { $renderAs: "ab3", $align: "center", children: t.title }) })
75
+ ] })
76
+ ]
77
+ },
78
+ t.id
79
+ ),
80
+ [o]
81
+ );
82
+ return !n || n.length === 0 ? null : /* @__PURE__ */ e(A, { $flexRowGapX: 1, children: /* @__PURE__ */ s(i, { $position: "relative", $borderColor: "GREY_2", children: [
83
+ /* @__PURE__ */ e(
84
+ m,
85
+ {
86
+ $background: "BLACK_T_60",
87
+ $justifyContent: "center",
88
+ $alignItems: "center",
89
+ $widthX: 2,
90
+ $height: "100%",
91
+ onClick: C,
92
+ $visible: $,
93
+ $left: "0px",
94
+ $right: "auto",
95
+ children: /* @__PURE__ */ e(X, { width: 24, height: 24 })
96
+ }
97
+ ),
98
+ /* @__PURE__ */ e(i, { $gutterX: 1, $gapX: 1, children: /* @__PURE__ */ e(I, { ref: r, children: /* @__PURE__ */ e(i, { $flexDirection: "row", $flexGapX: 1, children: n.map(p) }) }) }),
99
+ /* @__PURE__ */ e(
100
+ m,
101
+ {
102
+ $position: "absolute",
103
+ $widthX: 2,
104
+ $height: "100%",
105
+ $background: "BLACK_T_60",
106
+ $justifyContent: "center",
107
+ $alignItems: "center",
108
+ onClick: b,
109
+ $visible: u,
110
+ $left: "auto",
111
+ $right: "0px",
112
+ children: /* @__PURE__ */ e(w, { width: 24, height: 24 })
113
+ }
114
+ )
115
+ ] }) });
116
+ }, V = L(N);
117
+ export {
118
+ V as default
119
+ };
120
+ //# sourceMappingURL=activities-card-puzzles.js.map
@@ -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';\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={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={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","ChevronLeftIcon","Styled.ScrollContainer","ChevronRightIcon","ActivitiesCardPuzzles$1","memo"],"mappings":";;;;;;;;;;;AAcA,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,QAAIR,EAAU,SAAS;AACrB,YAAM,EAAE,YAAAW,GAAY,aAAAC,GAAa,aAAAC,EAAA,IAAgBb,EAAU;AAE3D,MAAAG,EAAiBQ,IAAa,CAAC,GACbL,EAAAK,IAAaC,IAAcC,IAAc,EAAE;AAAA,IAC/D;AAAA,EACF,GAAG,CAAE,CAAA;AAEL,EAAAC,EAAU,MAAM;AACd,UAAMC,IAAgBf,EAAU;AAEhC,QAAIe;AACkB,aAAAL,KAENK,EAAA,iBAAiB,UAAUL,CAAmB,GAErD,MAAM;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C,EAAKtC,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,95 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { LOTTIE as r } from "../../../../../assets/lottie/lottie.js";
3
+ import _ from "../../../../../assets/line-icons/icons/check2.js";
4
+ import T from "../../../../../assets/line-icons/icons/status.js";
5
+ import e from "../../../../../assets/line-icons/icons/exclamation.js";
6
+ import { NODE_STATE as E } from "../../../daily-timeline-types.js";
7
+ import { ILLUSTRATIONS as c } from "../../../../../assets/illustrations/illustrations.js";
8
+ import { CARD_TYPE as o } from "../../monthly-report-types.js";
9
+ function R(a) {
10
+ switch (a) {
11
+ case o.learn:
12
+ return {
13
+ lottie: r.LEARN,
14
+ color: "YELLOW_2",
15
+ background: c.NODE_LEARN_BG
16
+ };
17
+ case o.practice:
18
+ case o.smart_practice:
19
+ case o.extra_practice:
20
+ return {
21
+ lottie: r.PRACTICE,
22
+ color: "PURPLE_2",
23
+ background: c.NODE_PRACTICE_BG
24
+ };
25
+ case o.puzzle:
26
+ return {
27
+ lottie: r.PUZZLE,
28
+ color: "PURPLE_2",
29
+ background: c.NODE_PUZZLE_BG
30
+ };
31
+ case o.test:
32
+ case o.diagnostic:
33
+ return {
34
+ lottie: r.TEST,
35
+ color: "ORANGE_2",
36
+ background: c.NODE_CUSTOM_TEST_BG
37
+ };
38
+ case o.challenge:
39
+ return {
40
+ lottie: r.COMPETITIVE_ARENA,
41
+ color: "ORANGE_2",
42
+ background: c.NODE_TEST_PREP_BG
43
+ };
44
+ case o.advanced:
45
+ return {
46
+ lottie: r.TEST,
47
+ color: "GREEN_2",
48
+ background: c.NODE_TEST_PREP_BG
49
+ };
50
+ case o.subjective:
51
+ return {
52
+ lottie: r.SUBJECTIVE,
53
+ color: "BLUE_2",
54
+ background: c.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: c.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: c.NODE_ACTIVITY_BG
70
+ };
71
+ case o.video:
72
+ return {
73
+ lottie: r.VIDEO,
74
+ color: "GREEN_2",
75
+ background: c.NODE_VIDEO_BG
76
+ };
77
+ default:
78
+ return {
79
+ lottie: r.PROJECT,
80
+ color: "GREEN_2",
81
+ background: c.NODE_PROJECT_BG
82
+ };
83
+ }
84
+ }
85
+ const P = {
86
+ [E.COMPLETED]: /* @__PURE__ */ t(_, { color: "WHITE" }),
87
+ [E.IN_PROGRESS]: /* @__PURE__ */ t(T, { color: "WHITE" }),
88
+ [E.PENDING]: /* @__PURE__ */ t(e, { color: "WHITE" }),
89
+ [E.NOT_STARTED]: /* @__PURE__ */ t(e, { color: "WHITE" })
90
+ };
91
+ export {
92
+ R as getCardTypeIconMap,
93
+ P as stateIcon
94
+ };
95
+ //# sourceMappingURL=constants.js.map